[英]How to build an Appcelerator Titanium iOS Module that requires a CocoaPods pod
我想構建一個需要CocoaPods pod( https://cocoapods.org/pods/NearbyMessages )的本地iOS模塊。
我使用Titanium命令行界面創建了一個新模塊:
ti create --type=module --platforms=ios ...
我按照CocoaPods( https://guides.cocoapods.org/using/using-cocoapods.html )的說明創建了Podfile:
platform :ios, '9.0'
target 'MyModule' do
pod 'NearbyMessages'
end
我將Podfile放入我的iOS模塊目錄的“ iphone”目錄中:
MyModule
- LICENCE
- README
- assets
- documentation
- example
- iphone
- Podfile
- ...
- timodule.xml
- titanium.xcconfig
我使用以下命令安裝了Pod:
pod install
我使用新創建的* .xcworkspace文件打開XCode,並將以下行添加到Titan.xcconfig文件的末尾:
#include "Pods/Target Support Files/Pods-MyModule/Pods-MyModule.debug.xcconfig"
不幸的是,這會導致一些錯誤,例如:
我嘗試了包括Pods配置文件在內的各種變體,但沒有一個成功。
誰能告訴我正確的XCode設置在本機iOS模塊中如何使用NearestMessages窗格嗎?
在此先感謝您,並致以最誠摯的問候!
需要將build.py文件更新為使用工作空間文件。 在build_module方法內,將-workspace和-scheme參數添加到xcodebuild。 這些行應如下所示:
rc = os.system("xcodebuild -workspace %s.xcworkspace -scheme %s -sdk iphoneos -configuration Release" %(manifest['name'],manifest['name']))
rc = os.system("xcodebuild -workspace %s.xcworkspace -scheme %s -sdk iphonesimulator -configuration Release" %(manifest['name'],manifest['name']))
進行此更改后, python build.py
應該可以成功運行。
我只是想為自己解決這個問題,因此可能需要采取更多步驟,但這使我超出了您的意思。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.