小编Ren*_*ené的帖子

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

我想建立一个需要的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)

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

  • "我的模块的头文件中找不到''Ti.Module.h'文件"
  • 在我的模块的实现文件中有几个"不能使用'super',因为它是一个根类"

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

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

在此先感谢您的问候!

xcode titanium appcelerator ios

6
推荐指数
1
解决办法
1038
查看次数

标签 统计

appcelerator ×1

ios ×1

titanium ×1

xcode ×1