如何构建需要CocoaPods pod的Appcelerator Titanium iOS模块

如何构建需要CocoaPods pod的Appcelerator Titanium iOS模块,第1张

概述我想构建一个需要 CocoaPods pod( https://cocoapods.org/pods/NearbyMessages)的原生iOS模块. 我使用Titanium命令行界面创建了一个新模块: ti create --type=module --platforms=ios ... 我按照CocoaPods(https://guides.cocoapods.org/using/using- 我想构建一个需要 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,并将以下行添加到titanium.xcconfig文件的末尾:

#include "Pods/Target Support files/Pods-MyModule/Pods-MyModule.deBUG.xcconfig"

但不幸的是,这会导致一些错误,例如:

>“我的模块的头文件中找不到”Ti.Module.h’文件”
>几个“不能使用’super’因为它是我的模块的实现文件中的根类”

我尝试了包含Pods配置文件的不同变体,但没有一个成功.

任何人都可以告诉我一个正确的XCode设置应该如何在本机iOS模块中使用NearbyMessages pod?

在此先感谢您的问候!

解决方法 需要更新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应该可以成功运行.

我只是想为自己搞清楚这一点,所以可能需要更多的步骤,但这让我超越了你的目标.

总结

以上是内存溢出为你收集整理的如何构建需要CocoaPods pod的Appcelerator Titanium iOS模块全部内容,希望文章能够帮你解决如何构建需要CocoaPods pod的Appcelerator Titanium iOS模块所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1047313.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存