Ionic building an IOS application - ios

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

Related

Unable to find command: platform add ios

I have a old ionic project that run in version 1.3.3. And I updated to new version 5.4.16. But, when I try build the project using "ionic platform add ios"
Its doesn't work and I receive this message:
Unable to find command: platform add ios
I look for this in doc, but nothing done.
Is there anything I can do or some other command that replaces ionic platform add ios in newer versions?
It's: ionic cordova platform add ios
https://ionicframework.com/docs/cli/commands/cordova-platform

Ionic native plugin not working after build --prod

I implemented some ionic native plugins in an app (standard install and imported to app.module properly). When I tested it, it worked fine in my DevApp. After I built it with ionic build --prod and open it, my plugins are not working at all. I'm building it as an iOS app. Is there any steps I'm missing?
My steps:
create ionic 4 app
ionic cordova platform add ios
build my app and install plugins
test it on DevApp and it's fine
ionic build --prod (I'm thinking maybe this step is wrong? Should I build in other ways to make native plugins work or included on iOS device?)
Thanks for your help!

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..

Cordova platform add IOS Cocoapods and phonegap-push-plugin error in CMD

I'm working on a Cordova app in Visual Studio 2015.
I tried to add the iOS platform to cordova by running this in cmd
C:\cordovaProjectDirectory > cordova platform add iOS
this is the error I get
cocoapods error.jpg
I have been trying to get push notifications to work on my iOS device via remote build and I suspect this might be causing the problem.
Android device is working fine
What I have tried :
removing and installing phonegap-push-plugin
removing and installing ios platform
deleting platform/ios folder and clearing cordova cache
create empty project and run same cmds
Some info :
cordova cli 6.3.1
phonegap-push-plugin 1.9.2
node 5.6.0
npm 3.6.0
Alot of the solutions I see for installing Cocoapods are for MAC Terminal.
I have no idea what I'm missing or doing wrong.
Any advice is greatly appreciated!

How to include phonegap application in the iOS

I am creating a phonegap application in ios and i am following below mentioned link
http://docs.phonegap.com/en/1.9.0/guide_getting-started_ios_index.md.html
It is said in the link that we need to download the phone gap, which i had done already
and then click on the cordova based application, but in my app I am not getting the options
to select the same.
So can anyone suggest how it can be done?
PhoneGap installation process has been changed. You will not get any template in Xcode and we can do is creating app in terminal
List of this you need to install phoneGap are
1. node.js
2. cordova
3. phonegap
first install node.js and then phone gap/cordova
once your installation is completed open terminal and then create a cordova based application
use this for creating process
http://cordova.apache.org/docs/en/3.3.0/guide_cli_index.md.html
this for plugins
http://docs.phonegap.com/en/3.4.0/cordova_plugins_pluginapis.md.html#Plugin%20APIs
cd to your workspace
cd /Users/xxxx/Desktop
create cordova project
cordova create your-project-name
cd to your project
cd your-project-name
add ios platform
cordova platform add ios
build your project using cordova build
cordova build ios
done !!
Reference: http://blog.revivalx.com/2014/02/21/crud-operation-using-jquery-mobile-on-android-part-1/

Resources