Position Independent Binary Generation

DavidBevinDavidBevin AUMember

I've created an app using Xamarin and attempted to load to Apple's App Store. However, Apple has "encouraged" me to address the following problem:

Non-PIE Binary - The executable 'myapp.app' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables.

Has anyone else experienced this?

Does anyone know how to generate non-PIE binaries using mdtool?

I can't find anything in the documentation or any settings in Xamarin Studio.

Thanks in advance.

Best Answer

Answers

  • JustinMosesJustinMoses USBeta

    Having the same problem with a build I'm submitting right now for approval.

  • Omer_TamirOmer_Tamir AUMember, Beta ✭✭

    Yes, I am having this problem in a new app that I submitted to Apple today.
    Not the already published Yomaney Lite / Yomaney that passed without any problem.

  • ShoganShogan USMember, University

    I also just got this message after submitting a 1.1 version of an app we have made. Googled, and saw this thread, so glad to know I am not the only one seeing this. Thanks for the update Rolf. From the wording in the e-mail I don't believe it should prevent apps from being released.

  • DavidBevinDavidBevin AUMember

    Thanks for the answer Joel.

    You're correct that it won't block the submission... but the fewer number of annoyances every time I publish a new app/version to the store the better.

    Please fix it... as well as the ability to generate an Archive file from the command line (mdtool)

  • NicWiseNicWise NZMember, Insider, Beta mod

    +1 for an update :) It's a warning, but they are likely to change it to the requirement soon enough! / @rolf

  • DanielBenedyktDanielBenedykt UYMember ✭✭

    Having the same issue. Thanks for the update Rolf.

  • JonathanNesbittJonathanNesbitt USMember, Beta

    I just ran into the same issue. Thanks for the info Rolf.

  • BradLinardBradLinard USMember, University

    Same issue here too - a client just indicated they received the notice when attempting to submit an app update. Thanks for the info!

  • Same issue, and not like a warning, apple rejected my binary.

    Thanks Rolf.

  • JohnHairJohnHair GBMember ✭✭✭✭✭

    Did Apple say you were rejected for this specific reason?
    That would be extremely serious.

  • BrainloopBrainloopBrainloopBrainloop DEBeta, University ✭✭

    @JorgeArranz They rejected you for this particular reason??

  • @Krumelur

    This is email from Apple

    :(

    Non-PIE Binary - The executable 'LastFlightFree.app' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables.

    Once the required corrections have been made, go to the Version Details page and click "Ready to Upload Binary." Continue through the submission process until the app status is "Waiting for Upload." You can then deliver the corrected binary.

    Regards,

    The App Store team

  • I was wrong, today upload again and the warning is same , but not rejected,

    Thanks.

  • DiegoCibilsDiegoCibils USMember

    I received the same warning email today after submitting my app. Hopefuly Xamarin finds a quick fix.

  • BrainloopBrainloopBrainloopBrainloop DEBeta, University ✭✭

    @JorgeArranz I still cannot follow. So first you uploaded your app and waited until it was "In Review" and then you received and e-mail from the review team, stating that your app was rejected because it was not PIE? Or did AppLoader reject to upload your binary?

    And today you have uploaded again and get the same warning (from AppLoader I suppose). If yes: how would you know already now that your app won't be rejected?

  • Sorry @Krumelur , mi english is no good.

    Yes , first upload binary, then, few "seconds" later i recived the email.

    When my app is will be review, i know.

    like rofl say it is only a warning, "i hope".

    Thanks

  • GerryHighGerryHigh USBeta ✭✭✭

    FYI I submitted an update using the Alpha Channel build (Xamarin.iOS
    Version: 6.3.4.36 (Business Edition)) and my app was approved yesterday. I never got a warning about a non-PIE binary.

  • My App is a game developed with MONOGAME :(

  • JonvanDorsten.2619JonvanDorsten.2619 NLMember
    edited May 2013

    Same issue, submitted today. They seem to say it needs to be solved in the next delivery so I expect no problems for now:

    Dear developer,
    We have discovered one or more issues with your recent delivery for "x". Your delivery was successful, but you may wish to correct the following issues in your next delivery:
    Non-PIE Binary - The executable 'x.app' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables.
    If you would like to update your binary for this app, you can reject this binary from the Binary Details page in iTunes Connect. Note that rejecting your binary will remove your app from the review queue and the review process will start over from the beginning when you resubmit your binary.
    Regards,
    The App Store team

  • AndreaSabbatiniAndreaSabbatini ITMember ✭✭

    "Me too" comment.
    Can we get a little explanation of why Apple would encourage the fix and what actually would benefit the app ?
    Thanks

  • StrayPointerStrayPointer USMember

    For what it's worth, my recent app-update which generated the PIE warning was just approved today. So at least for now, it's just a warning.

  • SimonBonannoSimonBonanno MTMember ✭✭

    Can we have an update from Xamarin about this issue? Will it be solved soon, as we also recieved a similar update:

    Dear developer,

    We have discovered one or more issues with your recent delivery for "XXX". Your delivery was successful, but you may wish to correct the following issues in your next delivery:

    Non-PIE Binary - The executable 'XXX' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables.

    If you would like to update your binary for this app, you can reject this binary from the Binary Details page in iTunes Connect. Note that rejecting your binary will remove your app from the review queue and the review process will start over from the beginning when you resubmit your binary.

    Regards,

    The App Store team

  • CimarSanabriaCimarSanabria BOMember

    When I submitted an update for an app two weeks ago, I also received this message from Apple, and the update was approved without problems. But this week, I submitted another update for the same app, and also I received the same warning from Apple, and also fortunately the update was approved

  • Great, for now it is no problem. My App got accepted today.

  • GaryCGaryC USMember

    Any updates on this? I've submitted my app yesterday and it has the same warnings.

  • MinervaSFMinervaSF ESMember

    Uploading today, the problem persist... Any fix on the way? Thanks.

  • Maico2007Maico2007 MXMember ✭✭

    I have the same problem too

    Non-PIE Binary - The executable 'Essfera.app' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables. For more information, refer to Technical Q&A QA1788 - Building a Position Independent Executable

  • EdwardCastilloEdwardCastillo USMember ✭✭

    Same Non-PIE warning on an app I uploaded today. Please keep me posted on any fixes....thanks

  • Jay_UKJay_UK GBMember ✭✭
    edited June 2013

    i have same prob too but I also got something about setting my apps for 4inch screens which I didnt quite know how to solve:

    iPhone 5 Optimization Requirement - Your binary is not optimized for iPhone 5. As of May 1, a....

  • HuGuangYuHuGuangYu CNBeta

    PIE support already in alpha channel.

    iPhone5 Optimization means you should add [email protected] to your project so that the app can auto full fill the screen(in words). Of course you should avoid any hardcoding for screen drawing.

  • Jay_UKJay_UK GBMember ✭✭

    Thanks @ Simon...I was wondering how to fill the screen when launching simulator in retina mode lol

  • gregorybgregoryb FRMember

    I still have the problem with the BETA Channel :(

  • alessiomorenaalessiomorena ITMember

    same problem here

  • Note: Xamarin.iOS 6.3.7 (released on July 10, 2013) should fix this issue. It is in the Alpha Channel of Xamarin Studio now.

  • IanVinkIanVink CAInsider, University ✭✭✭

    PIE issues are back in Xamarin 7.0.2 it seems (Randomly though, not in every app). See attachment when I try to submit.

  • ivrusubocaivrusuboca HKMember
    edited October 2013

    Hi Ian,

    I checked on the internet the PIE story ( and, then, my app I just submitted yesterday ) .

    It seems the easiest way to find out that your build is PIE is to do this :

    1. open terminal, then go to your XS project Build directory :

    cd ~/mywork/MySolution/MyApp/bin/iPhone/Debug/MyApp.app

    ( you can also check the bin/iPhone/AppStore/MyApp.app )

    1. inside MyApp.app directory, you have the binaries Xamarin built, among them being 'MyApp' itself.

    2. issue command : otool -vh MyApp ; you will see an output like this :

    Mach header
    magic cputype cpusubtype caps filetype ncmds sizeofcmds flags

    MH_MAGIC ARM V7 0x00 EXECUTE 29 3044 NOUNDEFS DYLDLINK TWOLEVEL PIE

    You notice, the very end of the output has 'PIE' . It means your binary is PIE .

    Now, according to various people ( link below ) , if you use a 3rd party library which is not PIE, your final binary won't be PIE either.

    If you do use such, then I suggest check all of them w/ 'otool' and see which one is not PIE .

    FYI, I do not use any 3rd party libs, I built my app with the latest XS alpha and the otool output of my app is the one above ( PIE compliant ) .

    Here's the link w/ the PIE story from stackoverflow :

    http://stackoverflow.com/questions/16455416/non-pie-binary-the-executable-project-name-is-not-a-position-independent-exe

    Regards. Ionut.

  • SebastienPouliotSebastienPouliot CAXamarin Team Xamurai

    The issue was that PIE is enabled by default when you target iOS 4.2 or later. E.g. if you target iOS 3.1 it is not possible to use PIE binaries (and they won't be built that way).

    So if you get this warning from Apple please check what's the minimum iOS version your project is targeting and adjust it if possible - i.e. supporting iOS 3.x is possible but very uncommon.

Sign In or Register to comment.