我有2个目标,我的实际应用程序和我的框架(其中有一些屏幕和逻辑)
正如许多教程中所见,我正在通过调用框架中的第一个屏幕来初始化框架屏幕:
let frameworkBundle = Bundle(for: HomeViewController.self)
let storyboard = UIStoryboard.init(name: "Main", bundle: frameworkBundle)
window?.rootViewController = storyboard.instantiateInitialViewController()
window?.makeKeyAndVisible()
一切正常,但在实际应用程序加载之前,我得到一条错误消息:
Library not loaded
这是我的Podfile:
target 'TriageFramework' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'PhoneNumberKit', '~> 2.5'
pod 'Fabric'
pod 'SwiftKeychainWrapper'
pod 'Crashlytics'
pod 'SVProgressHUD'
target 'Virtual First' do
inherit! :search_paths
end
end
这是完整的错误消息:
dyld: Library not loaded: @rpath/PhoneNumberKit.framework/PhoneNumberKit
Referenced from: /var/containers/Bundle/Application/9DC8D338-6DD7-4CCA-8FD5-804DD00FE015/Virtual First.app/Virtual First
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/9DC8D338-6DD7-4CCA-8FD5-804DD00FE015/Virtual First.app/Frameworks/PhoneNumberKit.framework/PhoneNumberKit: mach-o, but wrong architecture
/private/var/containers/Bundle/Application/9DC8D338-6DD7-4CCA-8FD5-804DD00FE015/Virtual First.app/Frameworks/PhoneNumberKit.framework/PhoneNumberKit: mach-o, but wrong architecture
/private/var/containers/Bundle/Application/9DC8D338-6DD7-4CCA-8FD5-804DD00FE015/Virtual First.app/Frameworks/PhoneNumberKit.framework/PhoneNumberKit: mach-o, but wrong architecture
我在做什么错了?
答案 0 :(得分:1)
删除派生数据并清理项目。现在跑步。