Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in Xamarin.iOS ARKit demo project: “32-bit architectures are not supported when deployment target is 11 or later"

When deploying the ARKit Sample project from https://developer.xamarin.com/samples/monotouch/ios11/ARKitSample/, I get the build error Invalid architecture: ARMv7. 32-bit architectures are not supported when deployment target is 11 or later.

Everything with the deployment device and my development machine checks out:

I am running iOS 11 on the deployment device (an iPhone 6S Plus - ARKit will not run in the emulator), and have Xcode 9 installed (and have launched it once before starting Visual Studio for Mac). Visual Studio for Mac has also been updated to the latest Stable release (ARKit is not available on the Alpha and Beta releases at this point in time).

I am posting the fix to this problem below, in the hopes that it helps others who are going to be developing with ARKit on iOS 11.

like image 272
Fritz Lim Avatar asked Sep 24 '17 17:09

Fritz Lim


1 Answers

I'm building the ARKit project on Visual Studio for Mac, so this fix is tailored for it:

  1. Connect your device to your computer, and then select it as the deployment target in the dropdown menus next to the build button (the button that has the play arrow icon). This is so that the next steps are changing the options for your device, and not e.g. the emulator.
  2. Get into the project's iOS Build options (double-click the project name, or right-click on project name and choose Options -> Build -> iOS Build
  3. Make sure SDK Version is set to 11.0 (ARKit will only work on iOS 11 and above)
  4. Set Linker behavior to 'Link Framework SDKs Only`if it's not already set to that
  5. Set Supported architectures to ARM64 if it's not already set to that
  6. Enable the option Perform all 32-bit float operations as 64-bit float.

Step #6 was what fixed the build error for me.

like image 173
Fritz Lim Avatar answered Nov 20 '22 11:11

Fritz Lim