Since Apple is cracking down on the non PIE enabled apps submitted, I set my target version to 4.3 and the "Don't Generate Position Independent Executables" setting to be NO, but when I submitted to Apple, they still returned saying "Non-PIE Binary - The executable 'MyApp' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables."
Anyone have an idea what other settings I need to change?
Thanks
You just need to check if it works good Go to terminal and place yourself in the root folder (just type cd and press enter) Then type this line in terminal: $ otool -hv /path/to/MyApp.app/MyApp (/path/to/MyApp.app/MyApp should be the path to your app)
To get the path of your app, go to xCode, and in the folder Products, you have your app, right click it and show in finder , right click it in finder and get info , there you have the route. You just have to add in the end of that rout yourApp.app/yourApp
After run that line in terminal, something like this will appear:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC ARM V7 0x00 EXECUTE 39 4548 NOUNDEFS DYLDLINK TWOLEVEL PIE
/Users/AGMacBookOscar/Library/Developer/Xcode/DerivedData/Stache-dryffgnvhpkbsxguxecizmadewxv/Build/Products/Debug-iphoneos/Wisdom.app/Wisdom (architecture armv7s):
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC ARM V7S 0x00 EXECUTE 39 4548 NOUNDEFS DYLDLINK TWOLEVEL PIE
If under flags section there is a PIE, then everything is ok you have the info here:
https://developer.apple.com/library/ios/#qa/qa1788/_index.html#/apple_ref/doc/uid/DTS40013354
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.