Mih*_*hai 11 ios cocoapods onesignal
我正在尝试将Xcode 7.2.1中的OneSignal SDK与CocoaPods 1.0.0.beta.2和use_frameworks!指令集成.当我尝试在AppDelegate.swift中导入框架时,我得到了
没有这样的模块'OneSignal'.
我也有Cocoapods包含的其他框架没有问题(例如:Fabric)
我设法在另一个项目中安装带有cocoapods的OneSignal SDK,但没有use_frameworks!指令.我使用了桥接头.
Wes*_*y92 15
对于 OneSignal 5.0.0(在 Flutter 上),我必须使用:
import OneSignalFramework
Run Code Online (Sandbox Code Playgroud)
代替
import OneSignal
Run Code Online (Sandbox Code Playgroud)
Swi*_*ing 12
您需要输入这些命令。它已经为我解决了这个问题:
$ pod deintegrate
$ pod install
Run Code Online (Sandbox Code Playgroud)
我的 Pod 文件:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Your_Project_Name' do
# Comment the next line if you don't want to use dynamic frameworks
# Pods for Das Gedenken
pod 'OneSignal'
end
target 'OneSignalNotificationServiceExtension' do
#only copy below line
pod 'OneSignal'
end
Run Code Online (Sandbox Code Playgroud)
用Swift编写的use_frameworks!Pod 可以用,导入,如果你不这样做,CocoaPods会抱怨并尝试在Swift代码中导入pod.
虽然任何没有用Swift编写的pod都需要使用桥接头.
引用OneSignal窗格,入门指南指示使用Swift的应用程序包含桥接标头以便使用该窗格.OneSignal:入门指南
如果您在开始开发 OneSignal 之前已经有 pod 文件,则需要为 OneSignalNotificationServiceExtension 添加新目标。
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
Run Code Online (Sandbox Code Playgroud)
将以上代码添加到podfile后。您必须再次“pod install”。
| 归档时间: |
|
| 查看次数: |
3577 次 |
| 最近记录: |