Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Q&As > Tools > Xcode >

Developing with ZeroLink: small applications and launching on other computers


Q: I built my app with Xcode, and I ran into two issues: the application binary was much smaller than it was previously, and it doesn't launch on any Mac other than the one on which I built it. Why?

A: The answer is that your application was built with ZeroLink enabled. ZeroLink is a new and powerful technology that eliminates the link step in building, by building your application as a small stub which loads and links in .o files as the application is running. This has two implications:

  • The application binary itself inside the application package will be a lot smaller than normal, because it's just a stub that loads in the rest of the pieces of the application as needed at runtime.
  • If dragged to another Macintosh (or shipped to an end user), the application won't run properly because it's not really the complete app; it's just a stub, and the rest of its pieces are elsewhere on disk.
Although ZeroLink is very helpful for speeding the development turnaround cycle, if you are running into either of these two issues, you may wish to temporarily turn off ZeroLink in Xcode. Because build styles override target settings, changing the ZeroLink setting in your target will not have an effect; the Development build style turns on ZeroLink, overriding the target setting. Xcode indicates that this setting is overridden by drawing a line through it in the build tab of the target inspector. Instead, ZeroLink can be turned off by unchecking the 'ZeroLink' checkbox in the Development build style in the project inspector (click on the project in Xcode, press Command-I, select the Styles tab and pick the Development build style). You will need to then clean and rebuild your application in Xcode to generate an application that does not depend on ZeroLink.



Note:
Another approach to generating an application that does not depend on ZeroLink is to switch to the Deployment build style, which (unlike the Development build style) does not have ZeroLink on. You can easily switch between build styles as needed by customizing your Xcode toolbar: select "Customize Toolbar..." from the View menu and add the build styles pop-up menu for activating a build style. Once again a clean and rebuild are necessary to build a non-ZeroLink application.




[Oct 31, 2003]