0

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?

Pang
  • 9,564
  • 146
  • 81
  • 122
RHO
  • 1
  • 1
  • 1
    Anything interesting in *Console.app*? – trojanfoe Aug 13 '14 at 18:03
  • @RHO, Why did you try the app on 10.6 when the minimum requirements are 10.7 and later? Do you need to support 10.6? That's important because supporting 10.6 has more things to check for than supporting 10.7. You should also provide more information, such as the type of project you created in Xcode and the deployment target you set for the project. If you didn't set a deployment target, let us know, as that is important information. – Swift Dev Journal Aug 13 '14 at 19:45
  • No, nothing intesting in console.app .:/ Everything works fine and it shows the code fine. @Mark - I tried it on Snow Leopard, because I was wondering if it would disappear from dock as well. A funny thing is that I tried creating an app on the latest Xcode today again and it didn't work, but I tried to create the same app on Snow Leopard (Xcode 4.2) and it works perfectly fine on every Mac. The source code is exactly the same and I built the app exactly the same way. Why don't apps created on the newest Xcode won't work? What is different? Thank you very much – RHO Aug 14 '14 at 18:19

1 Answers1

0

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

Swift Dev Journal
  • 19,282
  • 4
  • 56
  • 66