Since i upgrade Xcode to 12.2 version, i start having problems when i try to run my ionic app in iOS Simulator.
App build successfully but couldn't start in simulator, in physical device works properly. I obtain the next error message
No target specified for emulator. Deploying to undefined simulator.
Device type "com.apple.CoreSimulator.SimDeviceType.undefined" could not be found.
Thanks
I have also faced same problem after updating the Mojave.
You can launch the simulator by specifying complete path to CoreSimulator for target attribute. Try following commands
$ ionic cordova emulate ios --livereload --consolelogs --target="iPhone-6,com.apple.CoreSimulator.SimRuntime.iOS-12-2"
$ ionic cordova emulate ios --livereload --consolelogs --target="iPhone-6,com.apple.CoreSimulator.SimRuntime.iOS-12-2" --buildFlag="-UseModernBuildSystem=0"
Let me know if it didn't work for you.
Related
No matter what I try I can't get access to the Xcode simulators from my ionic/cordova project. Xcode Command Line Tool is installed.
cordova run ios --list
returns
Available ios devices:
Available ios virtual devices:
ionic cordova emulate ios --list
returns
Available ios virtual devices:
I have all the simulators in Xcode and it's working fine when Im opening the project in Xcode and run the simulators manually.
The consequences of this is that I cant run my app with livereload from the terminal:
ionic cordova emulate --livereload ios -- --buildFlag="-UseModernBuildSystem=0" --target="iPhone-X, 12.1"
returns
Device id for device name "iPhone X" and runtime "iOS 12.1" could not be found, or is not available.
This is a bug related to the new version of XCode. I had the same problem. I would advise you to uninstall and reinstall XCode but I don't think it will work.
I solved (dirty fix) my problem by applying what ejerskov says here: https://github.com/ios-control/ios-sim/issues/246
On platforms/ios/cordova/node_modules/ios-sim/src/lib.js
I have changed
available_runtimes[ runtime.name ] = (runtime.availability === '(available)');
to
available_runtimes[ runtime.identifier ] = (runtime.availability === '(available)');
Otherwise I think we should wait for a new release of ios-sim and cordova-ios...
I'm making an iOS app in Cordova on MacOS.
When I run cordova emulate ios the app builds and it opens the emulator for iPhone X iOS 11.4 but it never install the app in the emulator. It just shows the emulator home screen. It just stops there.
Why is it getting here and not going any further?
UPDATE:
Now after trying to start the emulation again a second time, it gives the following error:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
I have the same issue. I have resolved by building the app with cordova. then get myapp.app and run it over the emulator. you can follow the below steps:
run iOS simulator
install Xcode
Open emulator
build the app after adding platform iOS
run the app with the emulator
install ios sims
npm install -g ios-sim#next
List available simulators
xcrun simctl list
https://www.anexinet.com/blog/install-app-ios-simulator/
xcrun simctl install XXXXXXX-YYYYYY-XXXX-ZZZZ-XXXXXXXXX ~/path_to_app/myapp.app
More info
https://github.com/aymansalama/cordova-build-macos
I have a problem for my IOS running Ionic V1 project.
I use last version of Xcode : V8.3.3
My Ionic CLI is V2.0.0
My Ionic Project is V1.0
My Device Iphone 6 IOS 10.3.2
My app is running fine on browser, and is running fine on emulator ios. Also my app is running fine on android device. Problem comes when I run on IOS device.
Through Xcode, I had many erros with provisionning profiles but now I don't have anymore and I use the Iphone Developer for signing certificate. I have no warning. But when I lanch "Run" command on device through Xcode, the app installs without any warnings and launch a blank screen with no error or output on the output console log of xcode.
So Xcode running devices gives me a blank app screen with no error.
Through "Ionic Run IOS" or "Ionic Run Ios --device" or "Ionic run ios -l -s --device" I have an error 65 Xcode : build failed with this error :
Check dependencies
signing for "MyApp" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'IOS 10.3'.
I have been looking on the web for days without any issue.
Please would someone help me to make this app working as I can publish it then with no blank screen..
Regards
After my Xcode upgraded to version 7.3 I'm not able to start my Meteor apps on simulators other then iPhone-6s-Plus. When I enter command
meteor run ios
having no any simulator running it automatically starts iPhone-6s-Plus. But if I start some other simulator using Xcode then that's what I get trying to run app (using --verbose)
No target specified for emulator. Deploying to iPhone-6s-Plus, 9.3
simulator
** RUN SUCCEEDED **
An error was encountered processing the command
(domain=com.apple.CoreSimulator.SimError, code=159): Invalid device
state
How I can run my apps on any other simulator then iPhone-6s-Plus?
OK, seems it is normal behaviour with Meteor v1.3 described in documentation: http://guide.meteor.com/mobile.html#running-your-app
Currently, this will always run your app on a simulated iPhone 6s
Plus. Use ios-device to open Xcode and select another simulator
instead.
So command
meteor run ios-device
will open generated iOS project in Xcode where you will be able to select any other simulator or connected device.
I am developing a PhoneGap app on a Mac. I can spin up the iOS simulator by building, then running the following command:
phonegap run ios
The issue i'm having is that running this command always spins up iOS 7.0.3 (11B507) on a simulated iPhone Retina (3.5-inch). I'd like to be able to test different devices (iPad/previous versions of iOS) but see no way of specifying the device via the run command and haven't added any code to specify device or version.
Is there any way to specify which hardware device to use when debuggion such apps via the iOS simulator?
Thank you
You can use the cordova command instead of phonegap to run a specific device. First install cordova globally
sudo npm install -g cordova
Then you can check the available devices for the IOS Simulator with the command
ios-sim showdevicetypes
This will give you a list such as the following:
com.apple.CoreSimulator.SimDeviceType.iPhone-4s, 8.0
com.apple.CoreSimulator.SimDeviceType.iPhone-5, 8.0
com.apple.CoreSimulator.SimDeviceType.iPhone-5s, 8.0
com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus, 8.0
com.apple.CoreSimulator.SimDeviceType.iPhone-6, 8.0
com.apple.CoreSimulator.SimDeviceType.iPad-2, 8.0
com.apple.CoreSimulator.SimDeviceType.iPad-Retina, 8.0
com.apple.CoreSimulator.SimDeviceType.iPad-Air, 8.0
com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone, 8.0
com.apple.CoreSimulator.SimDeviceType.Resizable-iPad, 8.0
Finally, to select one device to run on the Simulator use the following command replacing the string for the device's name of your choice:
cordova emulate ios --target="device-name"
Examples:
cordova emulate ios --target="iPhone-5s"
cordova emulate ios --target="iPad-Retina"