![]() I copied that application from the DerivedData folder over to my 10.7 virtual machine, and it crashs when starting, show this error: Crashed Thread: 0Įxception Codes: 0x0000000000000002, 0x0000000000000000ĭyld: launch, loading dependent libraries The base SDK is set to 10.9 and the deployment target to 10.7. I just created a simple GUI application (a view, a lable, a button) which runs fine on Mavericks. It appears Swift applications don't run on OS X 10.7. So swift will no longer available for iOS6 and below Note: As per Xcode 6 beta 4 for swift apps deployment target should be iOS 7 or OS X 10.9(see the above update). Most of the APIs in Swift are just the replacement of the existing Objective-C APIs. So if you are not using any new APIs added as part of the iOS 8 SDK or some Swift specific APIs (corresponding API is not available for Objective-C) your application will seamlessly work on iOS 6 or later (tested and working), even on iOS 5 (not tested). ![]() ![]() My application contains only two files, AppDelegate.swift and ViewController.swift. It is a simple application, just adding a button programmatically. Let button = UIButton.buttonWithType(UIButtonType.System) as UIButtonīame = CGRectMake(100, 100, 100, 50)īutton.backgroundColor = eenColor()ītTitle("Test Button", forState: UIControlState.Normal)īutton.addTarget(self, action: "buttonTapped:", forControlEvents: UIControlEvents.TouchUpInside) Here is the code I have tested: import UIKit It uses the same compiler and runtime to create the binary. As Apple says, Swift code is binary compatible with Objective-C code. I have tested a simple application written completely in Swift in an iOS 6 device. Even though many people are saying that Swift will support only iOS 7+ and OS X 10.9+, from my experience it's not. Swift will no longer available for iOS6 and belowĪ Swift application can be run on iOS 6. So my previous answer(Shown below) will not be applicable to any further development. Setting an earlier deployment target results in a build failure. The Swift compiler and Xcode now enforce a minimum deployment target of iOS 7 or OS X Update - As per Xcode 6 Beta 4 iOS 7 and OS X 10.9 minimum deployment target
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |