porting iOS project for mac platform - ios

I have been searching around for a method to port an iOS xcode built project to OSX xcode project. Unfortunately, I have found that because there is no UIKit or storyboard for OSX xcode (just individual .xib's). Is there a way around this?

If you're a registered Apple developer there's a new video up that goes through some of the basics and the design patterns you should be aware of, just named "Bringing Your iOS Apps To OS X".

The UI paradigm of any non-trivial iOS applications is entirely different to that of one for MacOSX.
Necessarily, you will need to redesign the View layer of the application. However, the Model layer ought to cleanly port over and at least some of your controller classes might be reusable, although MacOSX doesn't have anything equivalent to a UIViewContoller.
Besides this, many of the frameworks your app might be using are either available for both iOS and MacOSX (usually in cut-down form on the former), or a similar.

If your logic and UI are well separated, you have a chance at some good re-use, but at a minimum you will need to rebuild the UI layers of your app; it's going to take time.
If you don't have the time to invest, and if you are willing to try something experimental, there are a couple 3rd party frameworks available that attempt to bridge the UIKit AppKit gap.
You can probably consider many of these as risky 'shots in the dark', but they are worth a look. Keep in mind the long term support ramifications as well.
Chameleon
UMEKit

Related

Known issues for iOS modularized approach?

We've a classic iOS application which was developed using objective-c and it has lot of features. The same features has been used for other similar apps as well.
Now we've plan to rewamp the entite application. One of the approach to reduce the development work, we've plan to modularize features as framework re-using the same objective-c code, so that all applicaiton can use the framework and compile time will be less.
Also as part of rewamp, we will be using iOS 10 and swift3.
Please kindly share me your ideas/feedback, what are issues will be popup or any limitaion to do this approach.
Appreciate your help!
Thanks,
Srini
Just pack it as cocoapods and deploy into your company git is the fastest way i suppose, packing into framework is also fine but it have many boilerplate thing like cant run on either device or simulator, and if using fat framework then need to extract the simulator part out when you archive, or have to use embed framework if they are depent on each other,.... its just pretty annoying

Turn iOS project to OSX

what is the easiest and fastest way to turn iOS project to work on OSX. I've already added OSX to project, and tried to use ios storboard. But it just load empty window. Is there any simply, tricky way to do this? I dont want to rebuild entire UI, and link all outlets, etc..
Although quite similar in some respect, iOS and OS X are completely different when it comes to interface. Main difference being that UIKit doesn't exist on OS X meaning that your UI isn't compatible with OS X.
All your UI code will need to be started from scratch but most of the backing logic should be ok depending on how you've architectured your application.
As mentioned by Mikael in the comments, AppKit for UIKit Developers is a great article for iOS Developers looking to expand onto OS X.
Also, Separated at birth: Why Apple won't merge OS X and iOS is also another good article to give you a better understanding on why it works like this.

Show unity 3D in xcode project

I have a question. Is it possible to load unity project from web, and show it in Xcode project? In some non-fullscreen view? Also, unity must handle touch events. Any ideas, suggestions, links or anything else?
Thanks for advice.
P.S. Sorry for my english.
P.P.S. Main project created in Xcode, without unity.
load unity project from web
What do you mean by that? If you mean a compiled unity webplayer application, forget it.
If you mean a standard non compiled Unity project, note that with the iOS plugin you can compile for mobile Apple hardware. This used to cost a lot of money but now they're giving it out for free (included in Unity free).
Also, unity must handle touch events.
The standard Input Unity class handles touch events with methods such as GetTouch() and variables like touchCount or touches.
Unity is a very big and complex package: integrating it into an existing project may be overwhelmingly difficult. I really don't think there are natives way to do so.
Rather, I'd advise you to port your current XCode project into Unity (which sounds a really strange thing to do if you ask me).
Unity and XCode are 2 completely different tools: the former is useful for Cocoa classes and iOS IDE while the latter is for managing 3d game assets in a real-time interactive environment. I don't see how you can possibly integrate the two things.
Manage your project in a single IDE, it will make things a lot simpler.

Storyboard or XIB for iphone app development, which one should I pick?

I have a project whose release date is Q1 2013, should I use xib to get compatibility to iOS4.3 and early version, or should I just use storyboard to ignore iOS4.3 and early version users? I have checked some ios version share data, and just want to know you guys' opinions.
http://www.14oranges.com/2012/07/ios-version-statistics-%E2%80%93-july-14th-2012/
It depends on what you want to do with them I guess. I personally feel like xibs give you more power over a custom interface but that may just be because I'm used to them (I'm sure everything that can be done in xibs can be done in storyboards as well).
Storyboards will probably make the entire development process easier, seeing as though you can throw together a navigation or table view controller in a matter of a couple seconds. More details on perks of storyboards here.
Additionally, if you're worried about backwards compatibility before you start the project you should compile a summary of all the features of iOS that you wish to use. From this you can extrapolate which iOS devices/iOS versions will be able to run your app. Doing this should give you a clear idea of how far back you're able to support and should help make the 4.3+- decision easier.

Is it possible to develop an application for the iMac that is portable to the iPad?

Are the development environments the same? Does iPad support Java development?
For developing for iMac and iPad you can use Xcode for both. The project types will differ though.
I wouldn't worry about Java if you are working on the Apple platforms. Use Objective-C instead.
For Mac desktop you'll typically use the NSFoundation and the Cocoa frameworks. For the mobile devices you'll use the NSFoundation and UIKit frameworks. Notice that basic data types reuse the same framework (NSFoundation) but the frameworks for the GUIs are different. What this means is that you can create common code if you are only using NSFoundation. But you won't be able to use the same code for working with GUIs. This makes sense as the way GUIs work for desktop and mobile are very different.
The iPad only supports C++, Objective-C, and JavaScript. It's in the developer agreement. Also, on the iPad you will probably be using the cocoa touch framework which is different from the cocoa interface on Macs.
You can use Apple's XCode IDE to develop applications for both Mac OS X and the iOS platforms. I do not have a Mac, so I cannot give you much more insight as to if there are any differences when coding for one device or another, though I would imagine an app could be made fairly portable.
Unfortunately, Java is not supported on the iPad, and probably never will. The reasoning is the same as the reasoning Apple decided not to include Flash.
I hope this helps.
You can use XCode/Objective-C for both, but at least the user interface code would be completely different. You may be able to share some backend code and libraries.
Java is not supported on the iPad. You are down to C/C++/Objective-C and JavaScript.

Resources