Embed framework will affect archive upload's Re-sign selection

Normally, after archive, after click Distrubute App, there will be a window called "Re-sign ***". And the window will offer two selections include: "Automatically manage signing" and "Manually manage signing".

But once my project contains some embed frameworks in project(first two in image 2, WebRTC related framework is managed by pods), when distribute in organizer, there will not show selection window, and go directly to Manually manage signing window.

My project also contains pods to manage other code, and I do not know it is related. Is this a bug or something, hope someone can fix this, cause manually manage code sign is not a good exp.

Accepted Reply

When using build script to lipo simulator and device framework

What!?!

In a Mach-O universal binary all of the architectures must be for the same platform. iOS and the iOS Simulator are different platforms, so putting those two architectures into the same Mach-O is not supported. You may have got past the current problem but you are very likely to encounter other weird problems down the line.

The correct way to ship a multi-platform framework is as an XCFramework. I strongly encourage you to get on that supported path rather than continuing down this one.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • XCFramework is a very good tool. I will use it in the future. But before XCFramework is introduced, the normal framework is combine with x86 and arm64 architecture as I knew. The only problem I encountered is when archive and upload, the framework contains x86 will be rejected. But this can be solved by scripts which rip the x86 part off. Thx for your help!

Add a Comment

Replies

I created a new iOS app from the built-in template and then added a framework target to it. I then built an archive from that and went to export that archive. The export process lets me select automatic signing. So, I don’t think there’s anything fundamental about embedded frameworks that prevent you from using automatic signing.

Are you sure it’s the frameworks that are causing the problem here? If you temporarily remove those frameworks, does it go away?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • Yes, before I post this issue, I remove the first two framework for digging the reason. And I double checked it today. It's really wired. My Xcode's version is 13.4. I will update Xcode to 13.4.1 to check the problem again.

Add a Comment

Found some clue here. I build the first two framework using aggregate target by adding some scripts(such as build and lipo) in build phase. If I use the target generate by framework target directly, this problem goes away.

Problem solved~ When using build script to lipo simulator and device framework, there is a minor mistake which using simulator folder as a base folder. I changed it to device framework folder, the issue is solved.

When using build script to lipo simulator and device framework

What!?!

In a Mach-O universal binary all of the architectures must be for the same platform. iOS and the iOS Simulator are different platforms, so putting those two architectures into the same Mach-O is not supported. You may have got past the current problem but you are very likely to encounter other weird problems down the line.

The correct way to ship a multi-platform framework is as an XCFramework. I strongly encourage you to get on that supported path rather than continuing down this one.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • XCFramework is a very good tool. I will use it in the future. But before XCFramework is introduced, the normal framework is combine with x86 and arm64 architecture as I knew. The only problem I encountered is when archive and upload, the framework contains x86 will be rejected. But this can be solved by scripts which rip the x86 part off. Thx for your help!

Add a Comment