我最近通过在项目屏幕上添加单击+按钮将我的数据模型对象移动到了他们自己的框架中。我移动了所有文件,并将其目标成员更改为AppCore
,而不是App
。该项目纯粹是在Swift中。Cocoapods加入本地动态框架后的Mach-O链接器错误
我我podfile更新到下面:
platform :ios, '10.0'
inhibit_all_warnings!
target 'App' do
use_frameworks!
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Crash'
pod 'Firebase/Storage'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
target 'AppCore' do
inherit! :search_paths
end
end
每当我尝试建立我得到4个错误:
Undefined symbols for architecture arm64: "_OBJC_CLASS_$_FIRDataSnapshot", referenced from: objc-class-ref in SSWorkout.o "_OBJC_CLASS_$_FIRDatabase", referenced from: objc-class-ref in SSReference.o objc-class-ref in SSReferrable.o "_OBJC_CLASS_$_FIRAuth", referenced from: objc-class-ref in SSUser.o "_OBJC_CLASS_$_FIRDatabaseReference", referenced from: objc-class-ref in SSOperation.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已经deintegrated并重新安装了吊舱,清洗工程,清洗构建文件夹,删除派生数据等,我无法得到它编译。
您可以在演示项目中重现此操作,运行pod install
并尝试构建。
https://github.com/Raesu/Demo-Proj
谢谢你的澄清。那么,在Firebase构建为动态库之前,我不能像演示中那样使用自己的框架? – Raesu
不是没有很多的扭曲。请参阅https://github.com/firebase/FirebaseUI-iOS/blob/master/build.swift了解所需内容。 –