Pages

Sunday, March 25, 2012

How do you build FireMonkey iOS applications on Lion?

Delphi uses FPC 2.6.0 to do the iOS compilation.

image

I have Xcode 4.3.1 installed (no idea why the version is not displayed in the list).

image

FPC 2.6.0 doesn’t recognize it. Apparently it only works with Xcode up to 4.2.

image

Apple only offers XCode 4.3.1 for Lion.

image

So I’m asking you – can I really use Lion to compile FireMonkey iOS applications? Doesn’t seem so.

Sad smile

17 comments:

  1. I left XCode 4.2 on my dev machine and did not do any upgrade, but I m hardly imagen how EMRO can push FMX development for iOS without using latest Apple's dev chain!

    ReplyDelete
  2. I couldn't do it as I have a brand new Mac Mini that came with OS X 10.7 preinstalled :(

    ReplyDelete
    Replies
    1. On developer.apple.com i ve found a section with XCode 4.2.1 and 4.2 for Lion.

      It requires dev account, but you can register for free Safari dev program to get access! Then go to XCode4 section and look for "Addition downloads" link - then browse for 4.2.1 and 4.2!

      Proof: _http://pix.am/ubWe/

      Delete
  3. Anonymous11:25

    Got to the Mac dev center and then head down for Additional downloads. In the list of all downloads you can find the older builds of Xcode like 4.2.1 for Lion. This should provide you with the correct tools.

    ReplyDelete
  4. Thanks! I was looking in iOS dev center and there are no additional downloads, just Xcode 4.3.1. Never crossed my mind to check the Mac dev center too :(

    ReplyDelete
  5. Bob figured it out in his blog entry:
    http://www.bobswart.nl/Weblog/Blog.aspx?RootId=5:5267

    ReplyDelete
    Replies
    1. But of course! Now I remember reading that when Dr. Bob published it! Thanks!

      Delete
  6. Anonymous23:41

    Try to go to connect.apple.com. There you can download XCode 4.3.x full, not as App. In this file all dev tools included.

    ReplyDelete
    Replies
    1. That works perfectly, thanks!

      Delete
  7. Leslie20:57

    Gabr,

    Is your interest in IOS development a sign of OTL becoming multiplatform? Does FPC 2.6 support all the language elements OTL requires?

    ReplyDelete
  8. No, OTL will definitely not run on FPC. Maybe it will support iOS when we get the native compiler, but it's too early to tell.

    ReplyDelete
  9. Leslie13:36

    Ok, thanks.

    ReplyDelete
  10. First, flush your XCode:

    sudo /Developer/Library/uninstall-devtools –mode=all

    Then backtrack and install the version supported.

    ReplyDelete
  11. I've managed to install FPC 2.6.0 on OS X Lion 10.7.3 and XCode 4.3.2. The missing component was XCode Command Line Tools. Isn't that the component which ambiguously mentioned in http://17slon.com/blogs/gabr/files/How-do-you-build-Firemonkey-iOS-applicat_7824/image_4.png ?

    ReplyDelete
    Replies
    1. I presume so, yes.

      Delete
    2. Please post a picture of the Xcode components preferences of yours.
      I believe I don't have iOS 4.3/5.1 SDK installed http://i47.tinypic.com/vz8tnc.png as FireMonkey-iOS-XE2.pkg installer says http://i46.tinypic.com/fxgjlg.png

      Delete
    3. Even more, xcode_432_lion.dmg bundle does contain iOS 5.1 SDK:
      Posted Date: March 21, 2012
      Build: 4E2002
      Included iOS SDK: iOS 5.1
      Included Mac SDK: Mac OS X 10.7
      (see https://developer.apple.com/devcenter/ios/index.action)
      but FireMonkey-iOS-XE2.pkg doesn't recognize it. It might happen because Xcode 4.3.2 is now bundled into Xcode.app and its installation is a mere copying under Applications folder.
      So the only straightforward solution is to install Xcode 4.3.1 under Developer folder and iOS SDK 5.1 separately, right?

      Delete