简体   繁体   English

如何验证应用程序二进制文件是否已启用饼图

[英]How to verify that app binary is pie enabled

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." 由于Apple严厉打击提交的未启用PIE的应用,因此我将目标版本设置为4.3,并将“不生成与位置无关的可执行文件”设置为“否”,但是当我提交给Apple时,他们仍然返回说“非PIE二进制文件-可执行文件“ MyApp”不是位置独立的可执行文件。请确保将构建设置配置为创建PIE可执行文件。”

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) 您只需要检查它是否运行良好,请转到终端并将自己放在根文件夹中(只需键入cd并按Enter键),然后在终端中键入以下行:$ otool -hv /path/to/MyApp.app/MyApp(/ path / to / MyApp.app / MyApp应该是您的应用程序的路径)

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. 要获取您的应用程序的路径,请转到xCode,在“产品”文件夹中,找到您的应用程序,右键单击它并在finder中显示,在finder中右键单击它并获取信息 ,然后找到路线。 You just have to add in the end of that rout yourApp.app/yourApp 您只需要在该路由的末尾添加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: 如果在标志部分下有一个PIE,则一切正常,您可以在此处获取信息:

https://developer.apple.com/library/ios/#qa/qa1788/_index.html#/apple_ref/doc/uid/DTS40013354 https://developer.apple.com/library/ios/#qa/qa1788/_index.html#/apple_ref/doc/uid/DTS40013354

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM