question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsupported Architectures

See original GitHub issue

When I try to submit the bundle to the TestFlight I get this error.

[Transporter Error Output]: ERROR ITMS-90087: "Unsupported Architectures. The executable for NativeRTC.app/Frameworks/WebRTC.framework contains unsupported architectures '[x86_64, i386]'."
[13:44:54]: [Transporter Error Output]: ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'NativeRTC.app/Frameworks/WebRTC.framework/WebRTC' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."
[13:44:54]: [Transporter Error Output]: ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker."
[13:44:54]: [Transporter Warning Output]: WARNING ITMS-90080: "The executable 'Payload/NativeRTC.app/Frameworks/WebRTC.framework' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables. For more information refer to Technical Q&A QA1788 - Building a Position Independent Executable in the iOS Developer Library."
[13:44:55]: Transporter transfer failed.
[13:44:55]: WARNING ITMS-90080: "The executable 'Payload/NativeRTC.app/Frameworks/WebRTC.framework' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables. For more information refer to Technical Q&A QA1788 - Building a Position Independent Executable in the iOS Developer Library."

I’m looking at this stackoverflow question. Any help much appreciated 😃

Edit 1:

As far as I can see x86_64 architecture is for iPad simulators while i386 is for iPhone simulators, both are 32 and 64bit compatible.

Edit 2:

Here they talk about Archive validation error: Invalid Segment Alignment and one of the answers refers to:

In my case I was submitting an app that include a framework I had built that was a universal framework - created using lipo (for use with both device and simulator).

After replacing the universal compiled framework with device compiled framework, validation was successful.

Edit 3:

Using lipo --info, you can see WebRTC.framework/WebRTC have multiple architectures indeed i386 x86_64 armv7 arm64.

> lipo -info NativeRTC.xcarchive/Products/Applications/NativeRTC.app/Frameworks/WebRTC.framework/WebRTC
Architectures in the fat file: NativeRTC.xcarchive/Products/Applications/NativeRTC.app/Frameworks/WebRTC.framework/WebRTC are: i386 x86_64 armv7 arm64

Edit 4.

From this article looks like https://github.com/oney/react-native-webrtc/blob/master/ios/WebRTC.framework/WebRTC has been complied with i386 x86_64 armv7 arm64 architectures. You can see it by cloning it and running lipo -detailed_info ios/WebRTC.framework/WebRTC.

I’m gonna try to remove i386 x86_64.

Edit 5. Running:

cd node_modules/react-native-webrtc/ios/WebRTC.framework/
lipo -remove i386 WebRTC -o WebRTC && lipo -remove x86_64 WebRTC -o WebRTC

Solves the problem. I’m gonna test however if it still works on simulators.

Edit 6. Nope! I get the following error:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_RTCConfiguration", referenced from:
      objc-class-ref in libRCTWebRTC.a(RCTConvert+WebRTC.o)
blabla

Edit 7.

So clearly there some issues, at least on my side. Is anyone experiencing the same problems?

Edit 8.

Apparently is an app store submission bug http://www.openradar.me/radar?id=6409498411401216

Edit 9.

I created this little script which helps me jump between architectures during dev and app store release.

'use strict';

const fs = require('fs');
const exec = require('child_process').execSync;

const WEBRTC_BIN_PATH = `${__dirname}/node_modules/react-native-webrtc/ios/WebRTC.framework`;
const ARCH_TYPES = ['i386','x86_64','armv7','arm64'];

if(process.argv[2] === '--extract' || process.argv[2] === '-e'){
  console.log(`Extracting...`);
  ARCH_TYPES.forEach(elm => {
    exec(`lipo -extract ${elm} WebRTC -o WebRTC-${elm}`,{cwd:WEBRTC_BIN_PATH});
  });
  exec('cp WebRTC WebRTC-all',{cwd:WEBRTC_BIN_PATH});
  console.log(exec('ls -ahl | grep WebRTC-',{cwd:WEBRTC_BIN_PATH}).toString().trim());
  console.log('Done!');
}

if(process.argv[2] === '--simulator' || process.argv[2] === '-s'){
  console.log(`Compiling simulator...`);
  exec(`lipo -o WebRTC -create WebRTC-x86_64 WebRTC-i386`,{cwd:WEBRTC_BIN_PATH});
  console.log(exec('ls -ahl | grep WebRTC',{cwd:WEBRTC_BIN_PATH}).toString().trim());
  console.log('Done!');
}

if(process.argv[2] === '--device' || process.argv[2] === '-d'){
  console.log(`Compiling device...`);
  exec(`lipo -o WebRTC -create WebRTC-armv7 WebRTC-arm64`,{cwd:WEBRTC_BIN_PATH});
  console.log(exec('ls -ahl | grep WebRTC',{cwd:WEBRTC_BIN_PATH}).toString().trim());
  console.log('Done!');
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
aleclarsoncommented, Sep 29, 2016

Did you follow this guide to a T?

I was having similar issues, and I think setting Enable Bitcode to No will help you.

2reactions
bkonklecommented, Dec 29, 2016

I was having this same issue, even after trying the script included here. (Thanks for that, though!) The tiny script in this post fixed the arch issue reliably without having to run anything manual, and resolved all of the other validation issues I was having (!!!): http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/

Thanks for this library, by the way!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Submit to App Store issues: Unsupported Architecture x86
When I archive the app and validate it then there are no issues but when I submit it to the app store then...
Read more >
Framework contain unsupported architecture - Apple Developer
I try to upload my app to App Store and I get this error. 1. ERROR ITMS-900087: "Unsupported Architecture.
Read more >
iOS Submission Unsupported Architectures issues - Medium
This time I've got errors with unsupported architectures during Apple submission. This issue reproduces if you upload the build via Application Loader.
Read more >
Unsupported architectures when submitting to App Store #1
Your executable contains unsupported architecture '[x86_64, i386]'." So I found out Result.framework and MposSDK.framework are causing this error.
Read more >
App Store Connect Operation ERROR ITMS-90087 - ABBYY
ERROR ITMS-90087: "Unsupported Architectures. The executable for HEY FAIR.app/Frameworks/ AbbyyRtrSDK.framework contains unsupported ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found