Build iOS app from Cordova Command Line - ios

When building and uploading a iOS app our approach is like this.
Create the mobile app and put the Cordova configuration
run cordova platform add ios then basically load the generated folder / project into XCode
Configure and select the Signing on XCode
Use XCode to build the iOS app and upload the Archive to TestFlight
In what way all these can be done with the Cordova command-line?

Related

How to build a cordova project in xcode?

I want to build my cordova project so I can publish it in the app store.
when i load the project from ./src-cordova/platforms/ios/myapp.xcodeproj in xcode
And I want to build it I get the following error
error: Build input file cannot be found: '/Users/user/Projects/git/myapp/src-cordova/platforms/ios/CordovaLib/Cordova/Info.plist' (in target 'Cordova' from project 'CordovaLib')
I tried to change the project properties to legacy build and changed the built option Any iOS device (arm64) and any mac (silicon,intel) but still get the same error.
What to I have to do to build the app so that I can publish it.
The solution was to delete the cordova project and reinstall it cordova platform rm ios and then cordova platform add ios

iOS multi-target support for Ionic?

I'm using Ionic 5 to create multiplatform applications and Testflight to distribute iOS app to testers.
I would prefer Testflight users to not directly testing on production server so I found this article which suggests submitting a different iOS target for Testflight.
Is there any way to make ionic works with multi target iOS apps?
Ideally it should be like:
ionic cap copy ios --prod to copy to the "App (Production)" target
ionic cap copy ios to copy to the "App (Testflight)" target.
Thanks

How can i use build ipa with cordova cli?

Now i have someone's .p12 certificate and .mobileprovision and i have a cordova ios
project, so i want use cordova cli: cordova build ios --device --release to build signed ipa, what can i do?
when i try cordova build ios --device --release --buildConfig it show :
No iOS profile matching 'TeamID/UUID' found: Xcode couldn't find a profile matching 'TeamID/UUID'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor
i installed the profile with double click it already and load the .p12 to keychain too
I found that when i use cordova with version 5.4.1 and xode 7.0 it works.

Xcode does not include changes in rebuild of cordova app

I am experiencing the problem that Xcode does not incorporate any changes made to HTML/CSS/JS files when rebuilding the app for iOS
Right now I am deleting the whole platforms/ios folder and rerunning cordova add platform ios every time. This can't be the intended way of testing cordova apps. What is a good workflow for testing cordova apps on an iOS device?
Well, the recommended workflow for testing Cordova apps is not using Xcode at all, just use the Cordova CLI to run your apps. But the truth is that running from the CLI might be slower than using Xcode.
What you need to copy the changes from www to the Xcode project is to run cordova prepare ios before running from Xcode. You can do it manually or create a Xcode build script to run it for you.
To add a build script, on Xcode select your project target, go to Build Phases, click the + button and select New Build Script phase.
You can try to just add cordova prepare ios and this might work.
If you get a cordova command not found, then you also need to add Cordova path to your PATH. To do it, open a terminal and type which cordova, you'll get the Cordova path, something like /Users/davidnathan/.nvm/versions/node/v4.4.7/bin/cordova.
Now add that path without the cordova part to your build script before the cordova prepare ios, something like
PATH=/Users/davidnathan/.nvm/versions/node/v4.4.7/bin/:$PATH && cordova prepare ios
Move the build script to be over the existing "Copy www directory"
Try ionic cordova prepare ios.

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