NimbleKit - fast iOS app development

I want to create a .a file, how ?

Ask questions and share your skills here

I want to create a .a file, how ?

Postby francisco » Fri Jan 20, 2012 9:52 am

Hello,

I have some clases and I want to create a .a file library to reuse in other projects for other people but I not want give the source code to that people.

How I can build this clases to create the .a library ?

Regards.
Francisco.
User avatar
francisco
NimbleKit Guru
 
Posts: 163
Joined: Thu Dec 01, 2011 12:45 pm
Location: Barcelona, Spain

Re: I want to create a .a file, how ?

Postby HalfMoon » Fri Jan 20, 2012 1:50 pm

I think you'll need to create a static library to do that:

In Xcode create a new project and choose iOS Framework & lIbrary / Cocoa Touch Static Library, then import your classes. If you google "iOS Static Library" you should find plenty of examples.
8-)
User avatar
HalfMoon
NimbleKit Guru
 
Posts: 662
Joined: Thu Jun 04, 2009 6:21 pm
Location: Brighton, UK

Re: I want to create a .a file, how ?

Postby francisco » Fri Jan 20, 2012 2:48 pm

Hello HalfMoon,

Thanks for reply. When I have my custom .a library, I want to use it with NK. Is possible to do "NKRegisterClass("ClassFromCustomLibrary");" to register some class from my custom library ?

Regards.
Francisco.
User avatar
francisco
NimbleKit Guru
 
Posts: 163
Joined: Thu Dec 01, 2011 12:45 pm
Location: Barcelona, Spain

Re: I want to create a .a file, how ?

Postby HalfMoon » Fri Jan 20, 2012 4:29 pm

TBH, I'm not sure as I've not tried it.
:mrgreen:
In theory it should work, as this is how the NK library (libNimbleKit.a) works - if you look at the NKit.js file, you have functions like:
CallNKitAction("NKFeature?value="+theValue);
User avatar
HalfMoon
NimbleKit Guru
 
Posts: 662
Joined: Thu Jun 04, 2009 6:21 pm
Location: Brighton, UK

Re: I want to create a .a file, how ?

Postby francisco » Fri Jan 20, 2012 6:17 pm

Hello HalfMoon,

I create library and add to a NK project and working GREAT !!!

I will upload a sample project if someone want test.


Regards.
Francisco.
User avatar
francisco
NimbleKit Guru
 
Posts: 163
Joined: Thu Dec 01, 2011 12:45 pm
Location: Barcelona, Spain

Re: I want to create a .a file, how ?

Postby HalfMoon » Fri Jan 20, 2012 7:16 pm

Awesome!
8-)

Sure, pop up a sample project - it's always helpful for everyone to have sample code to play with.
:)
User avatar
HalfMoon
NimbleKit Guru
 
Posts: 662
Joined: Thu Jun 04, 2009 6:21 pm
Location: Brighton, UK


Return to How To...

Who is online

Users browsing this forum: No registered users and 2 guests