appcelerator module for existing ios project sdk

断了今生、忘了曾经 提交于 2020-01-06 02:21:06

问题


I want to use into my titanium project the functionalities provided by an existing sdk (deezer sdk).

I know I must deal with modules, so I found a lot of tutorials that explain well how to create a titanium module from scratch. But I didn't find something about to explain how to "wrap" an existing ios project within a titanium module. I just need the login/signup functionality and to retrieve the logged user (functionalities provided by the deezer ios sdk, of course).

can anybody help me on how to proceed?

thanks in advance Dario


回答1:


After creating the vanilla module, you have to include the framework you are wrapping (so deezer SDK) inside the bundle. Then follow these steps to add the framework to the compiler directives. Essentially you just add this:

OTHER_LDFLAGS=$(inherited) -framework DeezerSDK

To the module.xconfig file. Just check what the exact name is of the SDK.

After that, you can use the DeezerSDK just like you would in regular native Xcode development.

EDIT:

If the library is just a *.a file, then you can model what Titanium did for the Google Admob module. Its best to just inspect their project, bt essentially all that you need to do is create the vanilla titanium module, drop in the *.a file, and the headers, and then use it just like a native project.



来源:https://stackoverflow.com/questions/17783721/appcelerator-module-for-existing-ios-project-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!