Warning during archive App with iOS 8 Extension in Xcode 6
Asked Answered
U

9

58

I have a problem while archiving my app.

I created a new target for an iOS 8 extension.

When I archive the app, I receive a warning.

The warning is

"PBXCp Warning", "warning: skipping copy phase strip, binary is code signed: /Users/Library/Developer/Xcode/DerivedData/App/Build/Intermediates/ArchiveInter mediates/AppName/IntermediateBuildFilesPath/UninstalledProducts/AppExtappex/AppE xt"

The app is in Objective-C.

Unloose answered 20/9, 2014 at 13:6 Comment(7)
I'm getting that too. Not sure if it will result in any problems during submission.Alford
I'm also getting this warning for an app widget, but app submission was ok and works fine in appstore.Mcmillian
No, I've found any solution...Unloose
Yes, app submission was ok, and the app was approved.Unloose
This worked for me #5495420Gaultiero
Is that solution correct? If we just set "No" to stripping option , will it cause another problem?Hatley
No, if you set "No" to stripping option, the problem is the same...Unloose
D
25

Check the "Strip Debug Symbols During Copy" option in your Xcode target's build settings. Its saying that it cant strip debug symbols because the extension was already signed.

Dibs answered 7/10, 2014 at 22:9 Comment(4)
I cannot understand what that setting means but it worked. Thanks!Thymelaeaceous
Leave it NO for Debug builds, YES for Adhoc/Release.Dibs
@Locutus Have you actually checked the application binary inside the app bundle by comparing sizes? In my tests setting the value to NO had no effect when using Product Archive.Chaunce
If for some reason you referenced an unsigned, unstripped dependency, it would bloat.Mormon
D
8

If you create a brand new sample project and a Today Extension in Xcode 6.2, the default values are set to NO for stripping of debug symbols.

enter image description here

Doublebank answered 24/3, 2015 at 22:22 Comment(0)
A
8

Copied from: https://mcmap.net/q/324676/-xcode-6-archiving-and-get-a-warning-quot-skipping-copy-phase-strip-binary-is-code-signed-quot-when-add-quot-share-extension-quot-to-target

"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/

Anklebone answered 26/5, 2015 at 13:18 Comment(1)
I had the similar problem with Apple watch extension, this solution worked for me.Yeomanly
M
6

The framework / extension is already stripped and code signed by default. The application project cannot detect that the framework has already been stripped and throws a harmless warning. You should not disable it or your application will not be stripped.

Mormon answered 23/4, 2015 at 13:10 Comment(3)
this seems like it could be the correct explanation because none of the other answers resolved the issue. but do you have any documentation that "the framework / extension is already stripped and code signed by default?"Helvetian
The projects (framework and app) in the workspace are individually built. The app project references only the output binary from the framework project. In a release configuration the framework binary will be stripped (if the setting is enabled) and code signed. The same thing happens for the app project, except the framework binary is re-signed with the app project certificate. You could technically supply the app project with a debug framework binary that is unstripped and unsigned and the app project would strip and sign it.Mormon
when you say you should not disable it, do you mean we should leave its value as NO or YES?Para
C
3

There seems to be some confusion surrounding the effect of the Strip Debug Symbols During Copy build setting, I recommend reading this article for additional information: Skipping Copy Phase Strip.

Here are my key takeaways from researching this question:

  • When you create a new project with Xcode 6.2 or later the values inserted into the project file are NO for both of the default build configurations (Debug and Release) for this setting.
  • Setting the value to YES in the Release configuration and the performing a Product Archive has no effect on the generated application binary size (I encourage you to verify this through a test on your own projects).
  • Debug symbols used for Sybolication of iOS crash reports come from an external .dsym file which is separate from the application bundle so I would not expect the symbol table to be included in the binary.
Chaunce answered 8/5, 2015 at 22:57 Comment(0)
E
1

Check the "Strip Style"option in Xcode target's build Setting. If it is "Non-Global Symbols", change it to "All Symbols". this can solve the problem, but I don't know if there are other problems caused by this change.

Eastwards answered 16/10, 2014 at 16:27 Comment(0)
S
1

In the "Deployment" section in your target´s build setting look for Strip Debug Symbols During Copy and set it to YES for any production builds.

enter image description here

Sailesh answered 26/3, 2015 at 15:41 Comment(2)
I set the Release to Yes in WatchKit Extension and WatchKit App, and got more of the same warnings, this time for the Extension as well as the App proper. I also did not see the AppStore line in the Deployment section.Saturday
@AndrewDuncan The AppStore configuration is not created by XCode it was added by the develop or another tool. It's something I've seen fairly commonly when looking at iOS projects. It provides more flexibility when doing automated App Store builds.Chaunce
L
0

What worked for me was the following:

I edited the scheme that I was archiving. In that window, I selected 'Run' and then the tab 'Info'. In 'Build Configuration' I had changed it to 'Release'. I just changed it to 'Debug' (option by default) and that warning went away.

I hope this helps.

Leverrier answered 3/9, 2015 at 11:26 Comment(0)
G
-2

This is probably because you archive with the the DEBUG scheme. If you select the RELEASE scheme, then the option "strip debug symbols during copy" is set to YES and you do not have this warning.

I suggest to archive with DEBUG settings for beta testing, but with RELEASE settings for publication in the App Store.

Gunnery answered 19/3, 2015 at 23:35 Comment(2)
I am getting this warning too, but I archive with the RELEASE scheme.Rajkot
Hi Peter. See Paul's answer below.Gunnery

© 2022 - 2024 — McMap. All rights reserved.