Archive IPA Error

Hi, Dear,

I have update the ios SDK to the newest version today.
but I got the follow error prompt when archive IPA file.
could you please give me some advice about this error.

2019-12-12 09:20:54 +0000 Assertion failed: Expected 2 archs in otool output:
/var/folders/3n/g2j5fddx3rb40d0l_1hr3pqm0000gn/T/IDEDistributionOptionThinning.~~~4IKm7E/Payload/TrueHair Dev.app/Frameworks/TrueHairSDK.framework/Frameworks/Structure.framework/Structure:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC_64 X86_64 ALL 0x00 DYLIB 36 4784 NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK NO_REEXPORTED_DYLIBS MH_HAS_TLV_DESCRIPTORS

You have not stripped out the x86_64 code from the binary. From the Structure.framework directory run this command:
lipo Structure -extract arm64 -output arm64

Then copy arm64 over the Structure binary to have an arm64 only framework.
cp -f arm64 Structure

1 Like

You can also add a script to did it a build time:

Thank a lot. I can package it now.
I thought about this issue before.but I didn’t any idea of solution.
Thanks for you command line.