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

Error building on an iPhone 6: missing required architecture arm64 #32

Open
yusuftor opened this issue Apr 7, 2018 · 4 comments
Open

Comments

@yusuftor
Copy link

yusuftor commented Apr 7, 2018

I have got the code working on the iPhone simulator, but when building for my iPhone it gives the following error:

ld: warning: ignoring file /.../JotUI.framework/JotUI, missing required architecture arm64 in file /.../JotUI.framework/JotUI (2 slices)
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_JotBrushTexture", referenced from:
      objc-class-ref in Pen.o
  "_OBJC_CLASS_$_JotDefaultBrushTexture", referenced from:
      objc-class-ref in Pen.o
  "_OBJC_CLASS_$_JotView", referenced from:
      objc-class-ref in SigningViewController.o
  "_OBJC_CLASS_$_JotBufferManager", referenced from:
      objc-class-ref in SigningViewController.o
  "_OBJC_CLASS_$_JotViewStateProxy", referenced from:
      objc-class-ref in MyViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm guessing the framework needs to be built for arm64 but I'm not sure how to do that? Does that require the code to be updated in the framework or can I fix this by doing something else?
Thanks!

@yusuftor
Copy link
Author

yusuftor commented Apr 7, 2018

I think this might be to do with where I'm getting the build framework from. After I've built the project where should I be accessing the framework from?

@adamwulf
Copy link
Owner

adamwulf commented Apr 8, 2018

Are you building the framework and then copying it into your main project? If so, make sure you have iOS Device selected as the build target in Xcode:

screen shot 2018-04-07 at 8 46 02 pm

Then I believe you can Product => Archive and use that. Or you can simply use the debug build version that Xcode will put in the Products directory.

screen shot 2018-04-07 at 8 47 24 pm

@yusuftor
Copy link
Author

yusuftor commented Apr 8, 2018

Ok so Product => Archive seems to create an xcarchive, but no framework? Using the debug build version works but then I can't build for simulator. I need to make a universal framework so I can test on simulator and device.

@adamwulf
Copy link
Owner

adamwulf commented Apr 8, 2018

According to https://gkbrown.org/2017/10/11/creating-a-universal-framework-in-xcode-9/, the only way to build a single framework that contains both simulator and device versions is to build the project twice and combine them with a script.

I usually have an Xcode workspace that contains my main app's project and also the JotUI project, and then add the JotUI to the main project's linked frameworks. Then Xcode will re-build JotUI depending on the target I needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants