Xcode 6 Archiving and get a warning “Skipping copy phase strip ,binary is code signed” when add “share extension” to target

冷暖自知 提交于 2019-11-30 06:40:23

Do not disable Strip Debug Symbols During Copy in your application project. This will bloat your app (if you have other unsigned dependencies).

It occurs because building the application project attempts to strip the framework but it can't since the framework is already codesigned. However the framework has already been stripped during it's build, so the warning is harmless. Xcode isn't doesn't seem to detect that the codesigned framework has already been stripped.

You should leave it as is.

"Compiled code usually contains debug information. This debug stuff is helpful for inspecting running code in debugger, but less so for the optimized code you would ship in distribution builds. Therefore it gets stripped out when doing an Archive build.

The problem here is that PBXCp is unable to strip out debug symbols from signed binaries because this would invalidate the digital signature. So if you have a project that was created before Xcode 6.3 you will now get a warning like this.

To fix the warning simply change both values to NO. Removing them does not work because the default value is still YES for both. The project templates that came with Xcode 6.3 have these turned off by default. Only projects that were started with older templates still have YES on the Release line."

Source: https://www.cocoanetics.com/2015/04/skipping-copy-phase-strip/

I experienced the same warning and solved it by setting "Strip Debug Symbols During Copy" to "NO" in Build Settings of the containing app(not the extension), as you knew.

On the other hand, changing the same setting of the extension had no effect. This make clear the actual meaning of the warning. That is, stripping symbol does not mean the symbols "of the target" will be striped, but does mean the target will try to strip symbols "of embedded binaries".

Consequently, I believe the actual meaning of the warning would be that Xcode can't strip out debug symbols of the extension binary while archiving the container app, because the extension binary which need to be embedded in the container app "was" already compiled and frozen by code-signing before Xcode tries to strip out symbols of the extension binary while archiving the container app.

It seems like Xcode's default build settings related to striping debug symbols of the embedded extension binaries needs to be correctly updated not to show this warning.

In my case was related with 2 AppIcons (I forgot the fill them) , check if you have all the AppIcons in the xxx.xcassets file with the right xxpt. From here I beg Apple to improve this check or enable an auto-tool to complete all the AppIcons set. It is crazy.

If you are using Xcode 9.34.1, click in the project settings. Use the filter to find the correct setting: type "strip debug". You will find the settings COPY_PHASE_STRIP. Probably is set to "Yes". Set to "No" to remove the warning.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!