objective c - split an existing iOS app project into static library and app skin project -
i split existing ios app project 1 static library , 1 app project.
since existing app project has been copies multiple times brand new instances different resources(graphics, icons etc) , settings.
i find it's hard maintain across difference instances once core project has been updated.
so i'm turning core project static library model, views , third party libraries.
the other project contains app part contains customised resources , app settings.
the problem how can classes in static library getting app settings app project , main app project calling classes in library.
any practise , tools that?
the main app project can make use of static library classes through exported header (.h) files. recommend reading bit them here:
http://developer.apple.com/library/ios/#technotes/iosstaticlibraries/articles/creating.html
and creating static library here:
http://www.icodeblog.com/2011/04/07/creating-static-libraries-for-ios/
as for providing app-specific settings static library, sounds static library might need contain applicationsettings
protocol or similar, can provided static library calls require it. protocol define getters/setters known properties application possesses.
@protocol applicationsettings - (bool)isuserreallyawesome; - (void)setisuserreallyawesome:(bool)awesome; @end
then can either configure instance of object statically, or can provide each static library method requires it:
- (void)somestaticlibrarymethodwitharg:(nsstring *)arg settings:(id<applicationsettings>)settings { ... }
Comments
Post a Comment