问题
I have the following issue. I downloaded this sample project. I develop primarily on Windows 10 however for the iOS part I purchased a VM from macinthecloud.com
I have a real iPhone device however since we use VM I cannot connect it, or it is too complicated/expensive. My goal was to create ipa/zip file which I can later use for UI tests through Appium. I purchased Apple Developer Account and was able to create an ipa file.
It is installed on the simulator however if you try to run it, it immediately crashes. I read everything I could find, some people suggest that probably the build architecture is wrong. The only available option from this MacOS VM is ARM64. The following error was displayed from the simulator debug log:
Nov 10 10:13:06 DXU684 com.apple.CoreSimulator.SimDevice.AEDE77F9-AFD7-4788-9F69-9FB6FA9CDF54[63635] (com.apple.videosubscriptionsd[64306]): Service exited with abnormal code: 1
Nov 10 10:13:08 DXU684 com.apple.CoreSimulator.SimDevice.AEDE77F9-AFD7-4788-9F69-9FB6FA9CDF54[63635] (UIKitApplication:com.xamarin.standardcontrols[0x2a65][63661][64308]): Program specified by service does not contain any valid architectures for this system.
Can you please suggest how I can handle the problem? I need to run the Xamarin app on the Simulator installed through Appium (which is going well, guess is the primary problem of the build settings)
回答1:
Program specified by service does not contain any valid architectures for this system.
In a IPA build, there is no x86_64
option as there are no x86-based iOS devices, only ARM-based.
What you could do is build for simulator/x86_64 and drag/drop the resulting .app
to the simulator (or install via xcrun simctl install...
, which is what everyone uses (Appium, Xamarin, ...) for controlling the simulator).
The .app
is generated in the bin/iPhoneSimulator
directory, example below:
├── bin
│ └── iPhoneSimulator
│ └── Debug
│ ├── device-builds
│ │ ├── iphone11.4-12.0
│ │ │ ├── ios_XXXX.app
│ │ └── iphone11.4-12.1
│ │ ├── ios_XXXX.app
Note: Building via Xcode 10.1 / iOS 12.1 / Xamarin.iOS 12.2.?.? will produce an .app
that produces an .plist
error when installed via drag/drop, but not when installed via simctl
. This does not occur on earlier Xamarin.iOS 12.x versions and "assume" it is a Xamarin bug as the plist is slightly malformed when compared to an Xcode build (simctl
does not seem to care, but the simulator GUI does...)
来源:https://stackoverflow.com/questions/53242057/sample-xamarin-app-crashes-on-iphone-simulator