hunterp
hunterp

Reputation: 15986

file was built for arm64 which is not the architecture being linked (x86_64)

I am building a framework first to use in my ios simulator. However I get this error when importing it into the main project:

file was built for arm64 which is not the architecture being linked (x86_64)

Here is the build info of my framework: enter image description here

UPDATE:

I created a universal framework using this technique: https://medium.com/@syshen/create-an-ios-universal-framework-148eb130a46c but I'm still getting the error

UPDATE: Results from running file on the binary:

hunterp$ file dinkle 
dinkle: Mach-O universal binary with 2 architectures
dinkle (for architecture x86_64):   Mach-O 64-bit dynamically linked shared library x86_64
dinkle (for architecture arm64):    Mach-O 64-bit dynamically linked shared library

Upvotes: 11

Views: 8719

Answers (2)

Vivek Yadav
Vivek Yadav

Reputation: 1137

To create framework and convert .h file into .a fat file. Compile your project with simulator target and device target ,after these two tasks you have to join to make universal file with shell.

Upvotes: 4

hunterp
hunterp

Reputation: 15986

I was incorrectly copying the binary framework and using an old one from before I changed it into a universal.

Upvotes: 5

Related Questions