How to hide code in implimentation file in iOS [duplicate] - ios

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

Related

Different AppDelegate and Storyboard files for different targets [duplicate]

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.

Xcode8.2 create a static library from an existing iOS project

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

Why can't we access Apple's implementation files? [duplicate]

This question already has answers here:
Where is the source code for NSObject.m? [closed]
(3 answers)
Closed 6 years ago.
I am learning about Objective-C runtime. I can access to NSObject.m root class to see how it works but I can not acces to NSProxy.m or UITableView.m files.
Why does Apple enable access to some implementation files and others not?
I've searched in Google but I haven't found anything.
Actually, you don't have access to any of Apple's Cocoa source code. It's secret.
You may have found online some open source version of NSObject (for the Darwin project or OpenStep / GNUStep or similar), but that is not Apple's Cocoa source code.
Apple may choose to provide an open source version of some of their code, e.g. http://www.opensource.apple.com/. But even then you don't really know what they are using under the hood.

What are ways to modularize an iOS App? [closed]

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.

In the osx/ios world, what is a library and what is a framework? [duplicate]

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

Resources