I am developing an iPhone application. In my iPhone application, I am using the view-based application template. Now I want to use the Cocoa framework for using NSOpenPanelController in my iOS application. How do I use the Cocoa framework, and where do I use it in iOS? Can somebody please explain this to me in detail?
When I start a new project in iOS, it will by default add the frameworks UIKit and coreGraphics. But when I started a new Cocoa application, the default frameworks available are Foundation, Cocoa and Appkit.
I dragged the Cocoa framework from the Cocoa application to my ios application. That step is successful, but when I started build and run, then it again asked for AppKit framework. I dragged that one too in the same manner as Cocoa. Then it asked for foundation framework. In both the applications for iOS and Cocoa applications, foundation framework is different. How to do this? Please help.
Cocoa is only available to Mac OS X (desktop) applications. UIKit is only available to iOS applications. You cannot mix and match the two, as there is no system that has both. (You may be able to get some applications to use both in the Simulator, but they will fail to build for the actual device.)
iOS does not expose the file system to the user, so there is no equivalent to NSOpenPanel available. You will need to choose a different approach to whatever it is you’re doing.