问题描述
我正在尝试构建一个使用 Onesignal
和 RealmSwift
的项目,但它们似乎无法正常协同工作
ld: framework not found RealmSwift
clang: error: linker command Failed with exit code 1 (use -v to see invocation)
有几个关于堆栈溢出的问题,但都不起作用:
我已经用 Ruby 重新安装了 Cocoapods
,deintegrate
d 并再次安装了带有 pod install
和 --repo-update
的 Pod。我在 Realm
页面的 Swift 包中添加了 bith Onesignal
和 .xcodeproj
,我已经多次清理构建并重新构建它 - 每次都遇到同样的问题。
Podfile 看起来像这样
# Uncomment the next line to define a global platform for your project
# platform :ios,'9.0'
source 'https://github.com/artsy/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'
target 'Selvhjelpsappen' do
use_frameworks!
# Fabric
pod 'Fabric'
pod 'Crashlytics'
# Firebase
pod 'Firebase/Core'
# pod 'FirebaseCrashlytics'
# VimeoPlayer
pod "PlayerKit"
# Handling JSON
pod 'SwiftyJSON','~> 4.0'
# Local DB
pod 'RealmSwift'
# Charts
pod 'ScrollableGraphView'
# Internet calls
pod 'Alamofire','~> 4.7'
# One Signal for push notifications
pod 'Onesignal','>= 2.6.2','< 3.0'
# Facebook SDK
pod 'FBSDKCoreKit'
end
target 'OnesignalNotificationServiceExtension' do
use_frameworks!
# One Signal for push notifications
pod 'Onesignal','< 3.0'
end
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |bc|
bc.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
if bc.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] == '8.0'
bc.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
end
Xcode 12.4 版。有什么提示吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)