Giter VIP home page Giter VIP logo

phonegap-app-template's Introduction

Requirements

App Build Installation

To use this repository you will first need to create a PhoneGap application. You can do so by manually running the commands below in your terminal window, or run the shell script in ./build/scripts/install.sh which contains the same content.

Automatic Build Installation ( do you trust me? ):

You can install the App via the command line with either curl or wget which will run this Shell Script.

via curl:

cd /your/project/folder
curl -L https://raw.githubusercontent.com/manifestinteractive/phonegap-app-template/stable/build/scripts/install.sh | sh

via wget:

cd /your/project/folder
wget --no-check-certificate https://raw.githubusercontent.com/manifestinteractive/phonegap-app-template/stable/build/scripts/install.sh -O - | sh

NOTE:

You will need to modify ./www/assets/js/config.js to your projects specifications. Also, you will still need to make the changes listed below in the iOS Build Settings.

Manual Build Installation:

#1. PhoneGap Installation:

cd /your/project/folder
npm update -g phonegap cordova grunt-cli

#2. Creating PhoneGap Project:

phonegap create myapp com.manifestinteractive.myapp MyApp
cd myapp

#3. Clone Repository:

rm -fr www
git clone -b stable https://github.com/manifestinteractive/phonegap-app-template.git www

#4. Setup Grunt:

cd www
npm install
gem install sass
grunt
cd -

#5. Copy Config File:

cp www/assets/js/config.dist.js www/assets/js/config.js

NOTE: You will need to modify ./www/assets/js/config.js to your projects specifications.

#6. Installing Required Plugins:

cordova plugin add org.apache.cordova.device
cordova plugin add org.apache.cordova.dialogs
cordova plugin add org.apache.cordova.globalization
cordova plugin add org.apache.cordova.inappbrowser
cordova plugin add org.apache.cordova.network-information
cordova plugin add org.apache.cordova.splashscreen
cordova plugin add https://github.com/danwilson/google-analytics-plugin.git
cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=myapp
cordova plugin add https://github.com/phonegap-build/StatusBarPlugin.git
cordova plugin add https://github.com/VersoSolutions/CordovaClipboard

#7. Copy Build Hooks into Project:

cp -R www/build/hooks/* hooks/
chmod 755 hooks/*/*.js

#8. Replace iOS & Android Build Files ( modified from default ):

rm platforms/ios/MyApp/Resources/icons/*.png
rm platforms/ios/MyApp/Resources/splash/*.png
rm -fr platforms/android/res/drawable*

cp www/assets/img/ios/icon/*.png platforms/ios/MyApp/Resources/icons/
cp www/assets/img/ios/screen/*.png platforms/ios/MyApp/Resources/splash/
cp -R www/assets/img/android/* platforms/android/res/

rm platforms/ios/MyApp/MyApp-Info.plist
cp www/build/ios/MyApp-Info.plist platforms/ios/MyApp/MyApp-Info.plist

#9. Build Application & Launch in iOS Simulator:

cordova emulate ios

Build Tools:

#1. Automation Scripts:

To help speed up development, there are a few tools in ./build/scripts that you might want to check out.

  • myapp.sh This is a shell script that adds aliases and commands to automate building & debugging. See the comments at the top of the file for instructions.
  • install.sh This is the script to automatically install and build the app for you.
  • open-webinspector.applescript This applescript will automatically launch Apple's Safari Web Inspector for your iOS Simulator. This is used by manifestinteractive.sh and you wont need to mess with it much.

#2. Grunt Development:

This project uses Grunt to package separate development files together. This makes the development process easier as large components are broken up into logical smaller files.

This also means that you SHOULD NOT be edting files in either assets/js or assets/css folders as these files are built from grunt.

To take advantage of Grunt during the development process, you just need to run the following command to watch for any file changes setup to rebuild the scripts used in the app.

cd /path/to/project/www
grunt watch

If you do not want to watch for live file changes, you can use the following to repackage code as needed.

cd /path/to/project/www
grunt js
grunt css

License

OSI Approved License

LGPL v3 license

Currently licensed under the LGPL v3 license.

phonegap-app-template's People

Contributors

peter-schmalfeldt avatar manifestinteractive avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.