Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Non-PIE Binary - The executable 'project name' is not a Position Independent Executable.

I uploaded a binary on into iTunes Connect, it was validated and accepted to publish to the App Store. I received an email from Apple, saying that my application is an invalid binary:

Dear developer,

We have discovered one or more issues with your recent delivery for "Project name". To process your delivery, the following issues must be corrected:

iPhone 5 Optimization Requirement - Your binary is not optimized for iPhone 5. As of May 1, all new iPhone apps and app updates submitted must support the 4-inch display on iPhone 5. All apps must include a launch image of the appropriate size. Learn more about iPhone 5 support by reviewing the iOS Human Interface Guidelines.

Though you are not required to fix the following issues, we wanted to make you aware of them:

Non-PIE Binary - The executable 'xyz.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.

I have changed the Don't Create Position Independent Executables option in Target > Build Settings to YES, but I still receive the same message above.

like image 854
Mr. Manjeet Avatar asked May 09 '13 06:05

Mr. Manjeet


2 Answers

There is now a document from Apple explaining the issue and how to solve it: QA1788: Building a Position Independent Executable,

Steps for building your application as PIE

  1. In Xcode, select your target in the "Targets" section, then click the "Build Settings" tab to view its settings.

  2. For iOS apps, set iOS Deployment Target to iOS 4.3 or later. For Mac apps, set OS X Deployment Target to OS X 10.7 or later.

  3. Verify that Generate Position-Dependent Code is set at to NO.

  4. Verify that Don't Create Position Independent Executables is set to NO.

like image 76
Vincent Gable Avatar answered Oct 15 '22 07:10

Vincent Gable


We're getting the same message on all of our app updates this week. You will need to set "Don't Create Position Independent Executables" to "NO" and "Generate Position-Dependent Code" to "NO", which is the default.

The key is that you will need to set "iOS Deployment Target" to 4.3 or later, or the PIE settings will be ignored.

You can test the app binary with this command and it will show "PIE" at the end of the line for a PIE exe. otool -vh MyAppExe

like image 32
K1w1Geek Avatar answered Oct 15 '22 07:10

K1w1Geek