Tuesday, December 11, 2012

Submitting a C++Builder XE3 application to the Mac AppStore

Yesterday, I filled a hole in the schedule with an impromptu session on visualization of mathematical functions. At the end I also showed how to submit the application to the Mac AppStore.

At the end I ran into an error saying "Invalid Binary" and I filled in the details for my contact information that it asked me for.

However, this didn't solve the entire problem.

You also need to turn off Dynamic RTL and Run Time Packages. Unless you code sign them manually on the Mac side.

Finally, in order to bypass an issue with the Incremental Linker for Mac, you will need to turn off the Incremental Linker.

Doing these three things in addition gave me a successful submission to the AppStore.

:)

15 comments:

  1. Hi,

    i've also problems submitting my Delphi XE 2 app to the MacOs AppStore:

    Missing DWARF data - Your app does not include DWARF data with architecture information in Contents/MacOS/MyApp . In your Xcode build settings, ensure that the debug information is set to "DWARF with dSYM" and that the list of valid architectures does not include PPC

    It seems to be a missing element in macho binary?
    Best regards
    Dirk

    ReplyDelete
  2. Shouldn'T this be a painless task? I really enjoy FireMonkey + iOS (and OSX) compatibility, but Apple runs at 150mph. I know it's a bit hard to keep up with them, but I feel like we are left a bit by ourselves here... So how about Xcode 4.6? How to deploy FM (and shortly FM2) with it? Specifics are needed in these cases.... Please don't see it as bad criticism. I'm a BIG Embarcadero fan. Anders is off the chart: really awesome. My only fear is that Apple moves so fast that keeping up with it (developer wise) is not viable... Hope I'm wrong.

    ReplyDelete
  3. Yes, it should be a painless process. Well, at least from our side. ;)

    The Incremental Linker issue is a bug that we're aware of now.

    The other thing - turning off dynamic RTL and runtime packages is simply a good idea, because all of your dylibs and such need to be in your AppBundle anyway, so instead of code signing all the dynamic dylibs it's much easier to build a single executable.

    ReplyDelete
  4. Hi Anders, thanks for your statement!

    "The Incremental Linker issue is a bug that we’re aware of now."
    What does it mean? I want to press on "compile" and submit it to the app store. Before investigating much more time, can you tell us what does this bug mean for us developers?

    My investigations, see QC 111296, is for XE 2 the missing LC_UUID in the MachO binary, XE 3 seems to be fine, or does the bug affect XE 3 also?

    Due to this bugs AppStore submission with Delphi is the far away of a "painless" procedure..

    I'm an application developer and don't want to dive to dive too deep into the rabbit hole of binaries..
    Best regards
    Dirk

    ReplyDelete
  5. Anders,

    one "dive" too much and thanks for your investigations!
    Dirk

    ReplyDelete
  6. Dirk,

    This blogs is about C++Builder XE3.

    C++Builder, by default, has run-time packages and dynamic RTL turned on. The are probably many reasons for this, but the main one is that C++ puts a lot more work on the compiler, linker and anything else in the tool chain than what Delphi does, due to the fact that C++ is a much more complex language. In order to cut down on compilation and linking time these options are set to by dynamically linked by default.

    Delphi, on the other hand, creates a monolithic binary by default, because the above isn't a concern.

    QC111296 was fixed for XE3. In Delphi XE3 it's a very simple matter of, just like you say, hitting compile and deploying to the AppStore.

    In C++Builder XE3, I recommend that you turn off run-time packages and dynamic RTL, and due to a C++ incremental linker bug, turn the incremental linker off. This simply means that the linker being used is the non-incremental one.

    Again, this blog post has nothing to do with Delphi.

    Hope that helps.

    ReplyDelete
  7. Hi Anders,

    OK, i'm on the wrong blog, sorry for that.
    "QC111296 was fixed for XE3" - That's an important information that nobody at Emb could tell me before, thanks! So the incremental bug only affects C++Builder.

    Best regards
    Dirk

    ReplyDelete
  8. total stranger...

    The Hacker’s Corner » Blog Archive » Submitting a C++Builder XE3 application to the Mac AppStore...

    ReplyDelete
  9. Sincerely Yours,I noticed your blog named "The Hacker’s Corner » Blog Archive » Submitting a C Builder XE3 application to the Mac AppStore" daily. Your writing style is witty, keep it up! And you can look our website about 南一題庫網.

    ReplyDelete
  10. Hello there, I discovered your blog by the use of Google
    whilst searching for a comparable matter, your site came up,
    it looks good. I've bookmarked it in my google bookmarks.


    Hi there, simply become alert to your blog via Google, and located that
    it is really informative. I am going to be careful for
    brussels. I'll be grateful should you continue this in future.
    Many folks will be benefited from your writing.
    Cheers!

    ReplyDelete
  11. I'd likke to thank you for the eforts you've put in penning this blog.
    I am hoping to see the same high-grade blog posts from you in the future as well.

    In fact, your creative writing abilities has insoired me to get my very own site now ;)

    ReplyDelete
  12. Thanks for sharing your info. I truly appreciate your efforts and I am waiting for your next post thanks once again.

    ReplyDelete

Note: Only a member of this blog may post a comment.