PhoneGap projects with a Mac
- Installing Phone gap:
https://www.npmjs.com/package/phonegap#install
But that does not work straight away:
https://www.npmjs.com/package/phonegap#phonegap-command-not-found - Old project has bower.json file.
install bower
install dependanciesnpm install -g bower# cd into directory with bower.json file (mostly the static folder)bower install - Phonegap cli - install dependancies and build
- cordova-plugin-inappbrowser has a changed name on npm.. (this is specific to this old project)
- also, it seems config.xml is now outdated
- package.json is now the standard and is the final file that determines what packages / dependancies need to be installed - install xcode; accept tncsudo xcodebuild -license
If xcode not installed:
xcode-select: error: tool \'xcodebuild\' requires Xcode, but active developer directory \'/Library/Developer/CommandLineTools\' is a command line tools instance\nLikely to see this error, when only cli tools are installed - build for platform
phonegap build ios - Now open project in xcode (open the "project_name.xcodeproj" in xcode);
try to build
run the project on an emulator - If the project complains about Google-info plist file.
- might need to generate and import the file
- but if already generated: might have to first "add the file to project"
- then drag it to resources (or may be sometimes it gets picked on its own from project root )
- dragging to project root works most of the times. - Creating .ipa
https://stackoverflow.com/a/47940681 - Development on the browser
http://docs.phonegap.com/references/phonegap-cli/serve/

Comments
Post a Comment