iOS Development

ios – Primary app can not discover a pod utilized by customized shared framework

Spread the love


I’ve a important app “authenticator” that makes use of a customized framework “storage”. The “storage” use RealmSwift to deal with any CRUD performance and being utilized by the principle app and its embedded extensions. That is the Podfile:

# Remark the subsequent line in case you do not wish to use dynamic frameworks
use_frameworks!

# Uncomment the subsequent line to outline a world platform on your venture
platform :ios, '11.0'

workspace 'authenticator-ios'

goal 'authenticator-ios' do
  venture 'authenticator-ios'
  # Pods for authenticator-ios
  pod 'Rudder', '~> 1.15.1'
  pod 'RxSwift', '6.6.0'
  pod 'RxCocoa', '6.6.0'
  pod 'KeychainAccess'
  pod 'Swinject'
  pod 'SwiftOTP', :git => 'https://github.com/lachlanbell/SwiftOTP.git', :department => 'swift-5.0-cryptoswift'
  pod 'RecaptchaEnterprise', '18.3.0'
  pod 'RealmSwift', '~>10'
  pod 'Alamofire'
  pod 'RxAlamofire'
  pod 'SwiftLint'
  pod 'lottie-ios'
  
  goal 'authenticator-iosTests' do
    inherit! :search_paths
    # Pods for testing
    pod 'RxBlocking', '6.6.0'
    pod 'RxTest', '6.6.0'
  finish

  goal 'authenticator-iosUITests' do
    inherit! :search_paths
    # Pods for testing
    pod 'RxBlocking', '6.6.0'
    pod 'RxTest', '6.6.0'
  finish
finish

goal 'storage' do
  venture 'storage'
  pod 'RealmSwift', '~>10'
  goal 'storageTests' do
  finish
finish


# FORCE SET DEPLOYMENT TARGET TO 11.0 SINCE platform :ios, '11.0' DIDN'T DO ANYTHING!
post_install do |pi|
    pi.pods_project.targets.every do |t|
        t.build_configurations.every do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
        finish
    finish
finish

I’ve performed pod set up. I’ve added the storage.framework into the Frameworks, Libraries, and Embedded Content material in Common tab and Hyperlink Binary With Libraries in Construct Phases tab. After I swap the scheme to storage, I can construct the framework. However once I swap again and attempt to construct the principle app it returned this error:

No such module 'RealmSwift'

And the corresponding line shouldn’t be a line from the important app‘s courses, however the storage framework’s. It’s in the entire derivations of RealmSwift.Object which might be solely used internally within the framework. The principle app should not (and does not) learn about these courses.

Living proof: Error

Can anyone inform me what’s improper? Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *