Closed polaris7765 closed 1 year ago
This is why the readme notes that emulators aren't supported.
You can instead run it on Apple Silicon (M1/M2) macs with the Mac (Designed for iPhone)
target. (Unity Target SDK
set to Device SDK
).
There is a workaround for simulators that requires some fiddling:
Target SDK
in the unity player settings to Simulator SDK. (this builds in x86_64 mode)x86_64
should be enabled, no arm version can be allowed.
(you might need to do this for some pods as well, I don't remember)Now you might get it running on an emulator, but it isn't ideal and guaranteed. You will of course need to reverse all this to run it on a real iphone again.
This is why the readme notes that emulators aren't supported.
You can instead run it on Apple Silicon (M1/M2) macs with the
Mac (Designed for iPhone)
target. (UnityTarget SDK
set toDevice SDK
).Workaround
There is a workaround for simulators that requires some fiddling:
- Set
Target SDK
in the unity player settings to Simulator SDK. (this builds in x86_64 mode)- Remove all AR and XR packages in the unity package manager. (iOS emulators can't handle ARKit) If your app uses AR, you are out of luck and can stop reading here.
- In Xcode you need to edit the valid architecture for Runner and Unity-iphone. Only
x86_64
should be enabled, no arm version can be allowed. (you might need to do this for some pods as well, I don't remember)- On an Apple Silicon mac, this should run the emulator in Rosetta mode.
Now you might get it running on an emulator, but it isn't ideal and guaranteed. You will of course need to reverse all this to run it on a real iphone again.
thanks for your help, this is very useful for me, I try to run mac and export .ipa installed on real iPhone. both of them are working well.
and follow this picture also can help alot when you have some export ipa problem.
from:https://github.com/juicycleff/flutter-unity-view-widget/issues/83
Describe the bug when run iOS version In a simulator will see this error.
![2](https://user-images.githubusercontent.com/86842244/219331930-2188223a-656a-42f6-b65a-6164df4a3ae5.png)
To Reproduce Steps to reproduce the behavior:
Xcode : 14.01 Flutter: 3.7.3 Unity : 2021.3.10f1