OneSignal模块存在问题。它一直给我没有这样的模块OneSignal,我用可可豆荚安装它,并在我的pod文件中有use_frameworks!
。我真的不知道我应该配置什么才能使它工作
我在这里尝试了其他解决方案,如:
Getting error No such module using Xcode, but the framework is there
pod文件
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'Jaee2' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Jaee2
pod 'OneSignal', '>= 2.5.2', '< 3.0'
end
target 'OneSignalNotificationServiceExtension' do
use_frameworks!
pod 'OneSignal', '>= 2.5.2', '< 3.0'
end
答案 0 :(得分:4)
当AppDelegate
出现在import OneSignal
时,您是否也看到同样的错误?如果不是,请确保在您的pod文件中为目标pod 'OneSignal', '>= 2.5.2', '< 3.0'
添加了OneSignalNotificationServiceExtension
。因此,您的pod文件应如下所示:
target 'OneSignalNotificationServiceExtension' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for OneSignalNotificationServiceExtension
pod 'OneSignal', '>= 2.5.2', '< 3.0'
end
target 'test' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for test
pod 'OneSignal', '>= 2.5.2', '< 3.0'
end
答案 1 :(得分:0)
如果您不想使用可可豆。 Swift Package Manager
可用。