Can I develop my own objective-C Framework for Cocoa Touch Applications?

前端 未结 9 1134
抹茶落季
抹茶落季 2020-12-13 07:03

Is it possible to create an own obj-C Cocoa Touch framework which can be used by other developers? And furthermore can you protect this framework?

9条回答
  •  北荒
    北荒 (楼主)
    2020-12-13 08:03

    The frameworks in Objective C are typically just C / ObjC code and a bunch of classes, nothing amazingly special. As such, you can create your own if you'd like, and then just include that in your project when you build it. The iPhone doesn't care about the difference, it just knows to put all that code into your app, along with everything else.

    Have a look at the Framework Programming Guide on Apple's website. It will get you started. Essentially what you'll do is create a Framework project in XCode and then go from there.

    As for "protecting" your framework, I assume you mean making your code unreadable. I'm not sure if and how you can do this, but perhaps Apple's guide will say something about it.

提交回复
热议问题