Xcode 6 does not allow creation of Mac OS X project using Swift - macos

So, a few days ago I download the new Xcode 6. I'm in the process of learning Swift. But here is the problem: It will only let me make a Swift app for iOS and not Mac OS X.
I start up Xcode and click, "Create New Xcode Project."
Next, I select, "Cocoa Application." But when I try to change the language from Objective-C to Swift, it won't let me! It will only show Objective-C!
Any ideas of why this is happening?

Swift for OS X isn't officially out yet.
Quoted from developer.apple.com/swift/resources:
Swift for OS X is coming with OS X Yosemite later this fall. If you
are using Swift to write Mac apps, you can download Xcode 6.1 GM seed
2 for Yosemite, which also includes the iOS 8.1 beta 2 SDK.
↳ Xcode 6.1 GM seed 2 for Yosemite Download

Xcode6-Beta6 ... if you can still get your hands on it ... will create a swift based project, even if you're running on Mavericks. I've been using it to create projects, and then opening them in Xcode6. Then in Xcode 6, to create a swift file, I hit cmd-N and go to the iOS section and pick the swift file type. Xcode 6 adds the swift file to the OS X project without any problems.

Related

Can I upload Xcode builds on macOS 10.12

Will I be capable of submitting an app with Xcode 7.3.1 while on the macOS 10.12 beta? According to this post, it is possible to run Xcode 7 alongside macOS 10.12.
Yes, you can! But if you're tying to do this, you will find two problems.
no .app file provided in bundle
Build with Xcode 7.3.1 then upload using Xcode 8 [Beta]. This will allow you to upload the archive.
When trying to submit to the store you will be faced with this error message:
New apps and app updates must be built with the public (GM) versions of Xcode 6 or later, OS X, and tvOS SDK. Don't submit apps built with beta software including beta OS X builds.
This is because your archive contain the Sierra's mark! I just solved this problem yesterday.
When you archived your app, find your archive in the Organizer, and then:
"Show in finder";
"Show package contents";
In the "xx.xcarchive" file, find the "Products"-"Applications"-"xx.app"(xx is your app's name), "Show package contents" again;
Finally, you can see there has a file named"Info.plist", open it;
Edit the value with a key named "BuildMachineOSBuild", I just change it to "15F34"(it's "El Capitan 10.11.5" 's version);
After that, you can upload this archive use Xcode or Application Loader, whatever you want!
Decided to try it out myself. Both methods of exporting through Xcode and Application Launcher failed with an error stating there was no .app file provided in bundle. Best to stay away from the macOS 10.12 beta if you want to continue developing for iOS 9.

xCode 6.4 crashes on El Capitan

I just downloaded El Capitan today and when I try to add a new view controller to my project, xCode crashes and I am unable to add any view controller to my project with I need. Is this happening to anybody else or does anybody have a fix for this? I have reinstalled xCode 6.4 multiple times and I do not want to use xCode 7 as I do not want to use Swift 2 just yet.
Xcode 6.4 does not work with OS X El Capitan. You need to download the Xcode 7.
Good luck!

Can I get Mac storyboards on Xcode 4?

I only have a 2007 macbook, and I can only get Xcode 4. I saw in Xcode 6 they have storyboards for mac (which I think was long overdue). Is there any way to get these mac storyboards in Xcode 4? (maybe port them in some how?)
Is there any way to get these mac storyboards in Xcode 4? (maybe port them in some how?)
No. There's no way to port Mac storyboards back to Xcode 4 because there's nothing to port them to. The problem isn't that Xcode 6 uses a different format or anything like that, it's that Xcode 4 doesn't support storyboards on the Mac at all.

Storyboards for OSX App in Xcode 6

With Xcode 6 StoryBoards were added for OSX Apps as well.
But when I create a new app in Cocoa , Storyboards button is disabled.
Am I missing something here ?
Storyboards are a feature of OS X 10.10 (Yosemite). If you run Xcode 6 on 10.9 (Mavericks), you won't be able to use them.

Xcode 4.1+ Autolayout checkbox missing

I am trying to enable autolayout for an iOS project but cannot find the checkbox in the info panel. I know it's supposed to be under the versioning section and above Localization. I also see that the documentation says:
Note: Auto Layout is available only in Mac OS X v10.7 Lion and later. If you are running Xcode 4 in Mac OS X v10.6 Snow Leopard, Auto Layout is not available.
from:
http://developer.apple.com/LIBRARY/IOS/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/InterfaceBuilder/InterfaceBuilder.html
I'm on Lion and running Xcode 4.2 and the checkbox is not showing. Any thoughts?
Auto Layout is implemented in AppKit in 10.7, so 10.7 is required to develop and to run. It isn't in iOS 4 or 5.

Resources