问题
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