我想建立一个需要的CocoaPods吊舱(原生的iOS模块https://cocoapods.org/pods/NearbyMessages).
我使用Titanium命令行界面创建了一个新模块:
ti create --type=module --platforms=ios ...
Run Code Online (Sandbox Code Playgroud)
我跟着从的CocoaPods(指令https://guides.cocoapods.org/using/using-cocoapods.html)创建Podfile:
platform :ios, '9.0'
target 'MyModule' do
pod 'NearbyMessages'
end
Run Code Online (Sandbox Code Playgroud)
我将Podfile放入iOS模块目录的"iphone"目录中:
MyModule
- LICENCE
- README
- assets
- documentation
- example
- iphone
- Podfile
- ...
- timodule.xml
- titanium.xcconfig
Run Code Online (Sandbox Code Playgroud)
我使用以下命令安装了pod:
pod install
Run Code Online (Sandbox Code Playgroud)
我用新创建的*.xcworkspace文件打开了XCode,并将以下行添加到titanium.xcconfig文件的末尾:
#include "Pods/Target Support Files/Pods-MyModule/Pods-MyModule.debug.xcconfig"
Run Code Online (Sandbox Code Playgroud)
但不幸的是,这会导致一些错误,例如:
我尝试了包含Pods配置文件的不同变体,但没有一个成功.
任何人都可以告诉我一个正确的XCode设置应该如何在本机iOS模块中使用NearbyMessages pod?
在此先感谢您的问候!