Can't build with bitcode enabled, can't upload without

Does anyone know what is going on with the latest ironsource merger? Since I updated to the levelplay/ads mediation/ironsource package I keep getting errors in IOS when trying to create builds.

When I build it on the frameworks settings bitcode enabled I can’t create an archive to upload and I get this error.

‘/Users//Library/Developer/Xcode/DerivedData/Unity-iPhone-ckriuyfimvfvsyaipbgbbuwbigsq/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos/Protobuf/libProtobuf.a(GPBDictionary.o)’ does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file ‘/Users/julianhana/Library/Developer/Xcode/DerivedData/Unity-iPhone-ckriuyfimvfvsyaipbgbbuwbigsq/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos/Protobuf/libProtobuf.a’ for architecture arm64

When I build it without bitcode, I can’t upload the project to apple from the archive, can’t create a new release like this.

Archive error I get when I try to upload it without bitcode enabled:
Invalid Bundle. The bundle at X/Frameworks/UnityFramework.framework’ contains disallowed file ‘Frameworks’. (ID: 8583b905-98de-4165-af60-e72148149ec8)

Hi @KingoJH Could you go to this link and write your problems? Thanks

did u get it solved??

@BillionEyes I did, so what worked for me was to remove the package, install it again, then remove it again. Go back to the old “legacy” ads package. Since uninstalling it still keeps ironsource files in the project, you got to delete the folder manually.

Then in order to build/publish you got to go to xcode, the folders. You should see cocoapods and the project. Set bitcode enabled to true for cocoapods. If you are using ironsource you got to set bitcode to true on cocoapods, but on the ironsource section, you need to set bitcode enabled to false.

Also, on every build, unity automatically reverts these. You got to keep changing these. It is also the only way to archive and publish for testflight/store properly.

With unity 2022.2 there is an issue with cocoapods installation. It has something to do with macos 13.1 where it doesn’t allow the installation sometimes. Even happened on my macbook after a reinstall.

This issue can also be caused by the cocoapods installation itself. Even if successful. Apparently Unity/Ironworks doesn’t like newer versions of cocoapods yet. You need to uninstall and install an older version. Unity resolver just installs the latest version which is broken.

In that case I recommend to
->Open terminal
->sudo gem uninstall cocoapods
->sudo gem install cocoapods -v 1.10.2

1 Like

@aylin_unity3d Sure, I wrote a short summary of this :slight_smile: