Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
If I have a big project and have several features. The features will be developed by another developer independently in another iOS project. The features can include UIViewcontrollers, Navigation and other things what an iOS app normally has. Then I have the main app where the feature projects will be integrated in an xcode workspace. How can I reference the other feature projects from the main app/projects? I tried loading a viewcontroller from a storyboard it seems not finding it. I also tried adding using build phases but I can't make it work.
I read this article Using CocoaPods To Modularize Big iOS Apps. The blog talks about using cocoapods which I am trying to avoid. I don't seem to find something that says it works with SVN which was the reason I wont use it for what I need. There is the framework option but Im looking for a better solution.
Cocoapods can help you integrate your subprojects in one main project. Besides cocoapods, you also need a modularization framework to help you use these subprojects's codes . For example, subproject A need to use subproject B's view controller, but A can't get the .h file in B, this is really a problem. I have an open source modularization framework in iOS named TinyPart, may can help you learn something about modularization in iOS. https://github.com/RyanLeeLY/TinyPart
have a look here for how to load other storyboard's view controllers from another project/framework. Not sure if its exactly what you are looking for but it seems like a similar problem
In your case under the guide linked in the link above, have a look at Developing the Framework as a Dependent Project
You might want to follow a proper pattern where software components are depending on an abstract instead of concrete implementation. Please check out http://www.oodesign.com/dependency-inversion-principle.html
Make the feature as a library project, it then can be developed separately and then stuck in a Sandbox project for development. When it is done, stick it back to your main project.
You should declare an interface (or in Objective-C you call it protocol) for that feature, so your main project knows how to use it. Make a dummy implementation of that protocol, stick it to the main project, so while the library is being developed, you can still go on with your main project's development.
Related
This question already has answers here:
How do I manage building a Lite vs Paid version of an iPhone app?
(6 answers)
Closed 4 years ago.
I have an XCode Project(iOS App for only iPhones) and I want to use same codebase for publishing different application. I have to change icon, name and design for this second application. Therefore, I did not use Localization.
Also in codebase, I need some variables to hold different keywords for different targets.
Is there any way to do it or I have to clone same project and change this files after?
Thanks.
Take a look at this question.
StackOverFlow Question
You will have to convert the code to swift but this gives you the basics to get started.
One workspace, two app targets, one set of code files.
Alternatively, use a framework. In that case it might be one workspace and two complete Xcode projects plus the framework.
I have a fully functional iOS project (objective-c) that uses different cocoapods libraries, storyboard, DBManager files and all the files that a normal app can have. However we need to share our project/app with one of the client, and I am thinking to share it as a static library.
My question is How can I convert a current existing project into a static universal library and is it even possible to do so, I looked into this, however all I could find is guide on creating a brand new static library.
There are few similar stack overflow questions I came across like this one or this one but solutions are little vague or for me its hard to follow
Any help on this would be appreciable
Thanks
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
For a while now I have been killing spare time by creating a 2D game programming toolkit/library. It is written in Objective C, and consists of an OpenGL rendering system and a whole bunch of AI, physics code, a bunch of specialized containers and other game related stuff. Apart from the OpenGL based View mechanism (obviously), most of this code should be easily portable to iOS since it only uses the Foundation Framework and that framework appears to be implemented on iOS. So far I have only been testing the various components using a Cocoa NSOpenGLView but now I want to create a OS X/iOS library.
My Question is:
What's the best strategy for creating an Objective-C library that can be integrated into either iOS or OS X applications?
The Xcode 'New Project' dialog offers only:
iPhone OS; Library:
- Cocoa Touch Static Library.
Mac OS X, Framework and Library:
- Cocoa Framework
- Cocoa Library
- Bundle
- BSD C Library
- STL C++ Library
- JNI Library
At first glance none of these seems to be intended for creating a library that can be integrated into either OS X or iOS applications.
Well, I finally found the correct set of Google search terms, so to answer my own question (DOH!), it seems to be possible to share code, at least between iPhone apps and possibly also iPhone and OS X apps within certain limits. You have to create a 'static library' and use 'cross-project references':
http://www.clintharris.net/2009/iphone-app-shared-libraries/
http://www.amateurinmotion.com/articles/2009/02/08/creating-a-static-library-for-iphone.html
http://zetetic.net/blog/2010/02/15/building-static-libraries-to-share-code-on-iphone-and-mac-os-x-projects/
http://weston-fl.com/blog/?p=808
Haven't tested any of this yet but it looks promising.
You can do this with Targets.
Create a new project for a Cocoa Library. Then add a new target for a iOS Static Library. As you create new files ensure they're added to the appropriate targets (i.e. presumably both in your case) and set per-target build settings as required.
Projects using your library on the different platforms will need to link against the appropriate product but you won't need to duplicate your code.
This question already has answers here:
What is the difference between a framework and a library? [closed]
(22 answers)
Closed 8 years ago.
I am learning development on osx and ios. So far, coding is ok. The most difficult is to handle all the files, all the configuration issues (of xcode), and so on. I thought hearing from a guru about libraries/frameworks would help me a lot!
I would like to know more about libraries and frameworks.
What is a library, what is a framework (and what's the difference between them)?
Where can I find a list of all the frameworks (of all the libraries?)? Or: what are the most important frameworks?
What can I do without any framework?
Your first question is very well explained here
Finding the right frameworks is half the fun coding with iOS. There are loads of lists out there and depending on what you are doing there are some frameworks that are very used. One great tool to look at is cocoapods. It can not only help you find frameworks but it also manages the frameworks in your project. Adding cocoapods in my opinion should be the fist thing you do in a project. All that said, my three favorite frameworks are:
AFNetworking: To handle network requests.
RestKit: To transform JSON into objects. (it's actually built on top of AFNetworking)
SVProgressHUD: A lightweight progress HUD
Finally you can do everything without ever using an external framework but why would you recode something that is already coded and battle tested.
In addition to my comment, some informations about frameworks on OS X/iOS.
A framework on OS X/iOS is a bundle used to distribute shared resources, including library code, resource files, header files… For more details see
A list of system frameworks available on OS X here
This question already has answers here:
How to build a framework or library for other developers, the secure way? [closed]
(3 answers)
Closed 8 years ago.
I have a developed a generic class and I want to give it to one of my friend.
How can I hide the code so that he should not view the logic in that. Can I do something like apple does by giving us only the .h files.
Please help me in achieving this. Thanks.
you need to create your own static library i.e. .a file in xcode. And it is not very tough, you can do this in just in few mins.
Read this tutorial and try in out:
How to make Universal Static library (.a file) in iOs using xCode
You will have to make your own library (framework) for this.
You can search about it there are many tutorials about that. One of them is How to build a framework or library for other developers, the secure way?
Edit: Great Tutorial
Creating Static Libraries For iOS