Ionic cannot emulate ios - ios

The build was successful but I can't emulate it:
When i want to check the file, the 'platform/ios/build' folder doesn't even exist
I'm using osx Mojave btw

I'm using XCode 10, and to run it you need to add flag:
# Cordova CLI
cordova run ios --buildFlag='-UseModernBuildSystem=0'
cordova build ios --buildFlag='-UseModernBuildSystem=0'
# Ionic CLI
ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0"
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
source: https://github.com/apache/cordova-ios/issues/407

Related

How to fix no such file - ios/platform_www/cordova.js

When I run ionic cordova prepare ios on my Macbook Air, I get the following error:
ENOENT: no such file or directory, open '/Users/myUserID/Ionic/myApp/platforms/ios/platform_www/cordova.js
I was previously able to run this command but after moving my latest code over (from Windows machine), now suddenly there is an issue.
Any ideas on where to troubleshoot this? Or what causes it?
Try the following commands in order:
ionic cordova platform rm android --save
ionic cordova platform add android#latest --save
It seems the project is missing cordova.js on platforms folder & while building it missing some important files , So you can run below commands for respective platforms.
Android
ionic cordova platform rm android --save
ionic cordova platform add android --save
iOS
ionic cordova platform rm ios --save
ionic cordova platform add ios --save
It should work..

Unable to build ionic 3 application for ios using Xcode10

I have created a blank ionic project. And I was successfully able to add android platform. But when I am trying to build it on IOS device (XCode 10) it is freezing as shown in the image.
.
I ran below command to build the project:
ionic cordova run ios -- --buildFlag="-UseModernBuildSystem=0"
I have also tried:
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
But no success.
Any help is recommended. I am stuck on it and is not able to resolve it after referring to various posts.
u could try to do this
ionic cordova prepare ios --prod
and the make the build direct on xCode

Phonegap Error using XCode 9/iOS 11

Getting "No target specified for emulator. Deploying to undefined simulator Device type "com.apple.CoreSimulator.SimDeviceType.undefined" could not be found." error while running Phonegap project using XCode 9/iOS 11. Has anyone got workaround?
Update cordova to 4.5.0
cordova plugin save
npm install -g cordova
cordova platform rm ios
cordova platform add ios#4.5.0
cordova plugin remove cordova-plugin-console
Yes… cordova plugin console is now deprecated and needs to be removed. You will get here the details

ionic build ios **export failed** error: exportArchive: Found no compatible export methds

When I run: ionic build ios the archive succeeds but the export fails.
Error Messages:
error: exportArchive: Found no compatible export methods for: DVTFilePath:0x7f9d3dc41d20:'/Users/**PATH**/platforms/ios/**PROJECTNAME**.xcarchive'
Error Domain=IDEFoundationErrorDomain Code=1 "Found no compatible export methods for: DVTFilePath:0x7f9d3dc41d20:'/Users/**PATH**/platforms/ios/**PROJECTNAME**.xcarchive'" UserInfo={NSLocalizedDescription=Found no compatible export methods for: DVTFilePath:0x7f9d3dc41d20:'/Users/**PATH**/platforms/ios/**PROJECTNAME**.xcarchive'}
Error: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,fasTask.xcarchive,-exportOptionsPlist,/Users/**PATH**/platforms/ios/exportOptions.plist,-exportPath,/Users/**PATH**/platforms/ios/build/device
I modified the exportOptions.plist 'method' key to 'export_method' but same error message.
I tried uninstalling Xcode and re-installing. The first build after re-installation gives me a successful build. Any builds after the first build give me the same error message as before.
Also if I npm uninstall -g ionic cordova and delete everything in the platform folder, then npm install -g ionic cordova then the first build succeeds but any build after it fails.
ionic serve works fine every-time.
Details:
Xcode 7.3.1
ionic 2.1.14
cordova 6.4.0
cordova-ios 4.3.1
ios-deploy 1.9.0
Thanks.
Hey I am having the same issue, it happened after updating ionic and cordova to the lastest version. I created a new project ionic start added platform ios and when trying ionic run ios --device i got the same output that you're having after building trying to export.
When running an older (pre-update) project i was not having any problem at all after i did a ionic platform rm ios and then ionic platform add ios the problem reproduced again. I think is has to be to the way that the updated cli is adding the platform or that it is expecting an updated SDK version (Xcode 8).
A workaround is first launch and installing the app to the device using Xcode, then in the terminal do ionic run ios --device -l this will create a livereload ionic server. At the end it will show the error but the livereload server will be still working and you can develop and the changes will be reflected on the app without any problem.
Xcode: 7.3.2
Ionic: 2.1.13
Cordova: 6.4
Try
ionic build ios --emulator

Ionic building an IOS application

I have finished building and compiling the Android version of the application from my windows laptop.
But to run it on IOS, am I supposed to copy the application folder to a MAC computer and run "ionic run ios"?
Follow these steps.
Check whether Ionic is already installed in Mac by typing ionic -v.
If Ionic is already installed, type the following commands:
ionic platform add ios.
ionic build ios.
If Ionic is not installed yet,
First install Node.js in Mac.
Then install Cordova and Ionic by using this command:
npm install -g cordova ionic
Once done with the installation, use the above commands for adding platform and build.
Then you will able to see Xcode file in platform folder iOS.
Then you can ask iOS developer to generate ipa file for iOS build.
You should add ionic ios platform before build
ionic platform add ios
Read this link : Ionic build

Resources