Turn iOS project to OSX - ios

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.

Related

Getting Master-Detail App Template from Xcode 11?

For learning reason, I would like to get back the Master-Detail App template that was available in Xcode 11 and refer to the template codes inside. I also want both the Swift and Objective-C versions. However, to my astonishment it seems no one has asked this question before and seems there were no data source available where I could get back those files.
I try to reinstall my Xcode 12 back to Xcode 11 but that was not allowed as Mac complained that I am using Big Sur and I cannot use Xcode 11 with Big Sur. I also tried to check on YouTube etc. to look for potential useful information about Master Detail App and those existed on YouTube were from Xcode 5 or Xcode 6 or so where the split view controller thing were not in used yet.
I saw a reply online saying Master-Detail App is replaced with simply App and so we can just use App instead from there. That answer is of course factual but practically useless. As that answer assumed readers are pro enough to change between different templates, but if that's the case then readers like I won't need to ask that question in the first place. Readers look for that particular template for a reason, simply telling them to use something different is tautology.
In short, I cannot come up with a way to get back the exact Xcode 11 Master-Detail App template and I really need it for learning purpose. Is there something I can do with it?
You can search for tutorials (video or article) that uses Xcode 11 and get it from there.

porting iOS project for mac platform

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

For iOS developers, are there many differences between XCode 4.2 (iOS5) and XCode 4.5 (iOS6)?

I'm starting to learn iOS development using this awesome course on iTunes U:
http://www.stanford.edu/class/cs193p/cgi-bin/drupal/
However, this course was done in Fall 2011 and is using XCode 4.2 and iOS5.
I now see that XCode 4.5 (iOS6) is out.
I just want to know if it's a good thing following this course as it's already one year old?
Or if XCode 4.2 (iOS5) and XCode 4.5 (iOS6) are so similar, that I'll just have to tweak some things a little?
I used to follow the Fall 2010 course with XCode 3.2.5 (iOS 4.2) and I stopped to start the Fall 2011... and there were so many differences that it was almost like starting over.
I just want to make sure that by investing my time in the Fall 2011 course that I'm not learning stuff I would have to learn again in iOS6.
Thanks!
Besides all of the other good info in the other answers, please be aware that Xcode 4.5 comes with an updated LLVM compiler that provides you with much improved Objective-C features. Working with properties is much easier. You no longer need to explicitly declare instance variables for properties nor do you need the #synthesize statement. The new compiler makes working with arrays and dictionaries easier plus it is easier to box basic types.
The good news is that any code you write with the older compiler of Xcode 4.2 will continue to work under the newer compiler (but not the other way around).
Also keep in mind that Xcode 4.6 will be out soon so using 4.2 will just put you further behind.
The Stanford course you're about to learn is great and it contains lots of subjects, both basic and advanced. I can't think of anything that's not worth learning from the course even though it's outdated - you'll just have to learn about what's new in iOS6.0 after you've come to terms with the more important foundations and basics featured in the course.
Have fun learning iOS
Regarding the differences between the various versions, I'd suggest you check out the Objective-C Feature Availability Index and the Xcode release notes. The major shift in Xcode 4.5 is the support for iOS 6, and you can see a list of those features in What's New in iOS: iOS 6
I think you'll be able to follow the Stanford class even if you're running Xcode 4.5.2 (or whatever). There are some minor differences, but most of those are just new features that you might not yet avail yourself of yet. Frankly, many (most?) of us are still deploying iOS 5 (or earlier) apps today, to ensure backwards compatibility with users with older versions of iOS on their devices, anyway, so if you focus on iOS 5 while you learn the basics, I think that's fine. So, go ahead and gain mastery of iOS 5 using that course, and when you're done, you can then go through the WWDC 2012 videos to familiarize yourself with some iOS 6 features and new Xcode features.
The only major stumbling block that leaps out at me (if you focus on iOS 5 targets) might be autolayout which is an iOS 6 feature which defaults to being turned on. To avoid confusion here, whenever creating a new storyboard or NIB, you may want to turn off "autolayout". If so, go to Interface Builder, click somewhere on the background, select the "file inspector" in the right panel, and make sure the "Use Autolayout" flag is unchecked.
For the record, they just updated the CS193P Web Site
They will make the Winter 2012-2013 course available via iTunesU:
Winter (2012-13) quarter's lectures are currently scheduled to be made
available via iTunesU. Don't expect them to appear the day after the
first lecture, however! There is some work involved to prepare and
publish them. Please be patient.
That sounds cool!

Make iOS & Mac UI elements 'shake'

I'm sure you have seen it before; when typing passwords on the mac, if you get it wrong, it shakes!
What I want to know is, is there a way of doing this with UI objects in XCode (on either iOS or Mac platforms).
Thanks!
There's a tutorial on the excellent cimgf.com which describes what you want.

What are the blue atomic groupings/tags in MacOS and iOS apps' text field controls called? And is it a standard OS feature?

I have no idea how to call these and so I'm having a hard time googling for it. I've seen these a several times in iOS and MacOS apps to think they might be an OS feature. I'm talking about the blue tags or groups in text field controls. See the images below.
That's an NSTokenField on Mac. On iOS there's no official implementation (file a request if you want one) so you'd have to go with a third-party implementation. If I remember correctly, the Three20 framework has one...
Googling found these iOS versions:
JSTokenField
TTMessageRecipientField (I think)
This helper class is SO much better... https://github.com/thermogl/TITokenFieldView

Resources