Answered by:
Position Independent Binary Generation

Question
-
User2234 posted
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.
Tuesday, May 7, 2013 1:41 AM
Answers
-
User39 posted
This is a new check Apple has added to the App Store.
Currently Xamarin.iOS is not able to generate PIE executables, but we will obviously look into it and try to fix it as soon as possible.
Note that it seems to be a warning only, it doesn't prevent apps from getting approved.
- Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
Tuesday, May 7, 2013 10:05 AM
All replies
-
User829 posted
Having the same problem with a build I'm submitting right now for approval.
Tuesday, May 7, 2013 3:17 AM -
User1102 posted
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.
Tuesday, May 7, 2013 9:39 AM -
User39 posted
This is a new check Apple has added to the App Store.
Currently Xamarin.iOS is not able to generate PIE executables, but we will obviously look into it and try to fix it as soon as possible.
Note that it seems to be a warning only, it doesn't prevent apps from getting approved.
- Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
Tuesday, May 7, 2013 10:05 AM -
User10974 posted
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.
Wednesday, May 8, 2013 8:43 AM -
User2234 posted
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)
Wednesday, May 8, 2013 11:47 AM -
User59 posted
+1 for an update :) It's a warning, but they are likely to change it to the requirement soon enough! / @rolf
Wednesday, May 8, 2013 4:05 PM -
User3177 posted
Having the same issue. Thanks for the update Rolf.
Wednesday, May 8, 2013 4:18 PM -
User1288 posted
I just ran into the same issue. Thanks for the info Rolf.
Wednesday, May 8, 2013 8:38 PM -
User9337 posted
Same issue here too - a client just indicated they received the notice when attempting to submit an app update. Thanks for the info!
Thursday, May 9, 2013 3:03 AM -
User1838 posted
Same issue, and not like a warning, apple rejected my binary.
Thanks Rolf.
Thursday, May 9, 2013 10:12 AM -
User74 posted
Did Apple say you were rejected for this specific reason? That would be extremely serious.
Thursday, May 9, 2013 11:16 AM -
User223 posted
@JorgeArranz They rejected you for this particular reason??
Thursday, May 9, 2013 2:59 PM -
User1838 posted
@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
Thursday, May 9, 2013 3:28 PM -
User1838 posted
I was wrong, today upload again and the warning is same , but not rejected,
Thanks.
Thursday, May 9, 2013 4:50 PM -
User10470 posted
I received the same warning email today after submitting my app. Hopefuly Xamarin finds a quick fix.
Thursday, May 9, 2013 6:46 PM -
User223 posted
@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?
Thursday, May 9, 2013 6:47 PM -
User1838 posted
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
Thursday, May 9, 2013 7:11 PM -
User192 posted
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.
Friday, May 10, 2013 12:50 AM -
User1220 posted
It seems app made by Unity3d/Marmalade also hit this problem
http://forum.unity3d.com/threads/181518-Non-PIE-Binary-apple-send-this-email-to-me?p=1240748#post1240748
https://devnet.madewithmarmalade.com/questions/9692/ios-app-rejected-with-non-pie-binary-error.html
Friday, May 10, 2013 3:58 AM -
User1838 posted
My App is a game developed with MONOGAME :(
Friday, May 10, 2013 10:08 AM -
User9450 posted
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
Friday, May 10, 2013 1:55 PM -
User9953 posted
"Me too" comment. Can we get a little explanation of why Apple would encourage the fix and what actually would benefit the app ? Thanks
Sunday, May 12, 2013 12:13 PM -
User5908 posted
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.
Monday, May 13, 2013 1:23 AM -
User11722 posted
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
Wednesday, May 15, 2013 11:03 AM -
User11931 posted
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
Thursday, May 16, 2013 9:17 PM -
User9 posted
We have a potential fix for this , so we're currently putting this through our QA team.
Thursday, May 16, 2013 11:13 PM -
User9450 posted
Great, for now it is no problem. My App got accepted today.
Saturday, May 18, 2013 6:27 AM -
User4234 posted
Any updates on this? I've submitted my app yesterday and it has the same warnings.
Thursday, May 23, 2013 8:39 PM -
User5020 posted
Uploading today, the problem persist... Any fix on the way? Thanks.
Friday, May 31, 2013 10:50 AM -
User12386 posted
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
Saturday, June 1, 2013 5:30 PM -
User621 posted
Same Non-PIE warning on an app I uploaded today. Please keep me posted on any fixes....thanks
Monday, June 3, 2013 12:06 AM -
User7082 posted
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....
Thursday, June 20, 2013 12:37 AM -
User239 posted
PIE support already in alpha channel.
iPhone5 Optimization means you should add Default-568h@2x.png 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.
Thursday, June 20, 2013 1:34 AM -
User7082 posted
Thanks @ Simon...I was wondering how to fill the screen when launching simulator in retina mode lol
Thursday, June 20, 2013 6:51 AM -
User15608 posted
I still have the problem with the BETA Channel :(
Friday, June 21, 2013 6:53 PM -
User14041 posted
same problem here
Friday, June 28, 2013 9:47 AM -
User81 posted
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.
Wednesday, July 10, 2013 3:34 PM -
User482 posted
PIE issues are back in Xamarin 7.0.2 it seems (Randomly though, not in every app). See attachment when I try to submit.
Saturday, October 19, 2013 7:38 PM -
User21835 posted
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 :
- 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 )
inside MyApp.app directory, you have the binaries Xamarin built, among them being 'MyApp' itself.
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.
Sunday, October 20, 2013 6:13 AM -
User2589 posted
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.
Monday, October 21, 2013 12:56 PM