Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported architectures Error When Uploading to iTunes Connect #2352

Closed
quinncnl opened this issue Aug 7, 2015 · 4 comments
Closed

Unsupported architectures Error When Uploading to iTunes Connect #2352

quinncnl opened this issue Aug 7, 2015 · 4 comments
Assignees

Comments

@quinncnl
Copy link

quinncnl commented Aug 7, 2015

My env: Xcode 7 beta 4, Realm swift-2.0 branch.

It's doing well on both simulator and my devices. However, when I was archiving, Xcode reported:

Unsupported architectures.  The executable for xxxx/Realm.framwork contains unsupported architectures [x86_64, i386]
Unsupported architectures.  The executable for xxxx/RealmSwift.framwork contains unsupported architectures [x86_64, i386]

I think I should do something with strip-frameworks.sh.
What should I do exactly?
Thx!

==== updated Friday=====
This morning I found Xcode had an update to beta 5, so I updated. After fixing some problems coming along, I managed to get the aforementioned problem again.

@quinncnl
Copy link
Author

quinncnl commented Aug 7, 2015

I solved the problem using lipo. But can we set the target arch in build command?

http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/

@jpsim
Copy link
Contributor

jpsim commented Aug 7, 2015

Hi @strongwillow, how did you install Realm Swift? If you're using the prebuilt binary frameworks, please make sure to add a build phase to your app's main target: bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework/strip-frameworks.sh". We detail this in our Swift 1.2 installation instructions, but have't reflected that in our Swift 2.0 instructions yet. I've created an issue to track updating our docs accordingly (#2353).

@jpsim jpsim added the pending label Aug 7, 2015
@dhmspector
Copy link

I am having the same problem -- but in my case the added build phase to call strip-frameworks.sh is failing. I followed all the instructions to the letter, including removing my old Realm.Framework and starting from scratch -- it looks like in Xcode6.4 Xcode isn't copying all of the framework to the derived data directory but only the LIPO'd archive and headers (or perhaps moving them to a different place)... so the strip-frameworks.sh file cannot be found . This is with version 0.92.x and still occurs with 0.94

Update: Its an order of build script execution issue - one cannot have the strip frameworks anywhere before the the embedded frameworks get copied or the script isn't yet available in the build products directory. Seems like this might be a problem that most people are hitting... probably a good caveat in the instructions about where place this script in the build process.

@realm-ci realm-ci removed the pending label Aug 7, 2015
@quinncnl
Copy link
Author

quinncnl commented Aug 7, 2015

@dhmspector In fact I didn't follow exactly what the blog suggested. I only used lipo to extract and combine into one arm architecture library.
Then when I'm testing in simulator, I use the fat version of the two lib. When I'm archiving, I use the slim version. That works fine.

@quinncnl quinncnl closed this as completed Aug 8, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants