My Xcode app won't launch on other Macs - xcode

My OS X application that I've created on Xcode won't launch on other Macs. It works perfectly fine and the way it should on my MacBook, where I created it, but on other MacBooks it just bounces on a dock for less than a second and disappears and it won't launch. I built my app on Product - > Archive
How can I make my app to launch on other Macs also? The minimum requirements are 10.7 and when I try my app on 10.6 it says it requires 10.7 or newer, but when I try it on other macs that do run 10.7 or 10.9 it won't launch. What to do?

When you create a Mac application project in Xcode, Xcode sets the deployment target to the version of OS X you're running. The deployment target is the earliest version of OS X that can run the application. When you created your project in Snow Leopard, the deployment target was set to 10.6, which means the application will run on 10.6 and later. When you created your project in Xcode 5.1, the deployment target was set to 10.9, which means the application won't run on earlier versions of OS X. That's why your project runs when you create it in Snow Leopard but not on Xcode 5.1 on Mavericks.
To support earlier versions of OS X, the first thing you must do is set the deployment target to the earliest version of OS X you want to support. If you set the deployment target to 10.7, the project will run on 10.7 and later, assuming you don't use any technologies or function calls introduced in later versions of OS X. For example, if you create a SpriteKit project, it won't run on anything before 10.9 because Apple introduced SpriteKit in 10.9. Xcode will not tell you when you use function calls introduced in later versions of OS X. You are responsible for making sure your code uses only functions available in 10.7.
You should also check the deployment target for your xib files.
To support 10.7, you must turn off base internationalization for your project. Base internationalization works only on 10.8 and later. To support 10.6, you must turn off auto layout for your xib files.
You can access your project settings by selecting the project from the project navigator on the left side of the project window. You can access xib file information by selecting the xib file from the project navigator and opening the file inspector. You can find more detailed information in the following article:
Supporting Earlier Versions of OS X and iOS

Related

Mac App Backwards Compatible to Yosemite

I'm on El Capitan in XCode 7.3.1 and Swift 2 trying to make my mac application work on Yosemite (it just doesn't open at all with no crash logs).
I have 10.10 set as the deployment target, but that didn't change anything.
I downloaded Xcode 6.4 on another machine and loaded the project and it's complaining a ton about all of my swift code not being a thing.
I'm assuming (hoping) I don't have to figure out how to write this in an old version of Swift in order to make it work on Yosemite.
How do I know which features of the new SDK need to be made backwards compatible?

Where to find SDK 10.7 for Xcode

I am using Xcode 5.1 and want to compile my app against Base SDK 10.7. However I just see SDK 10.8 and 10.9.
Where can I find the 10.7 base SDK ? I use
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
command to check sdk version at compilation time. Thanks.
https://download.developer.apple.com/Developer_Tools/xcode_4.3.3_for_lion/xcode_4.3.3_for_lion.dmg
You'll need an Apple login to download the file, but you don't need a paid App Store developer account.
Mount the image, right-click Xcode.app, then Show Package Contents. You will find MacOSX10.7.sdk in Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs.
Read the "Compatibility" section in the following link:
https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/WhatsNewXcode/00-Introduction/Introduction.html
Xcode 5.1.1 requires a Mac running OS X v10.8.4 (or later), or OS X
v10.9. It includes SDKs for OS X v10.8, OS X v10.9, and iOS v7.1. To
develop apps targeting prior versions of OS X or iOS, see “About SDKs
and the iOS Simulator.”
Also with release of new OS's and SDK's, Apple deprecate the old deployment targets, and restrict us to submit using new Xcode version only. In such a case you cannot go back to 10.7.

Xcode for mac OS X 10.6.3?

Is there a version of xcode available for mac OS X 10.6.3? I did several searches on google but the only versions that i find is for 10.6.6 and up.
And xcode 3.2.5 is for leopard and not snow leopard.
I want to use it for developing for Iphone and Ipad.
Thanks.
Have you checked here: http://connect.apple.com/
You need to login using your Apple ID. Also, as Analog File mentioned, that version is probably deprecated and you won't be able to submit your app to the App Store if you build one with it.

OS X App - deployment target set to 10.6 in Xcode, but app only runs on 10.7

I've just discovered that my current version of the app doesn't launch on 10.6.
It used to work fine in 10.6 before. So I must have changed something in recent versions. So before I dive in and start comparing the source codes, is there a way to find out what cause the app not to launch in 10.6 but works fine in 10.7.
Details:
Xcode 4.3
LLVM compiler 3.1
Deployment target set to 10.6
Also, would Xcode warn me if I'm using a 10.7-only API in my code?

Xcode built app on 10.6 wont run on 10.5.8

I am new here and new in Xcode world.
I made a simple app with Xcode 3.2 on Snow Leopard.
The resulting built app works on snow leopard, however it will not even start on leopard (10.5.8) - I get message "You cannot use this version of application with this version of Mac OS X". Is it normal?
Or is there a way to make app that will work both on Snow Leopard and Leopard? Please advise, as I have no way to find out myself
Thanks for any input
You need to change the deployment target in your Build Settings. You should set it to the lowest version of OS X that you're willing to provide support for. You should set your base SDK to the latest available public SDK.
If you do this, you must ensure that you only use new 10.6-only APIs after doing runtime checks for their existence. To do this, you can use functions like NSClassFromString and respondsToSelector:.
Any Frameworks or libraries that are new to 10.6 should be weak-linked. This will prevent the app from trying to load those frameworks on 10.5 and thus cause the program to crash when it doesn't find the frameworks.
All explained in the SDK Compatibility Guide from Apple (Requires (free) login).

Resources