Moodle Mobile Building the app for iOS: Difference between revisions
From MoodleDocs
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
#* ''sudo /usr/local/lib/node_modules/cordova/bin/cordova build'' - not necessary, just check the build works. | #* ''sudo /usr/local/lib/node_modules/cordova/bin/cordova build'' - not necessary, just check the build works. | ||
# In Finder change the permission on ~/Apps/moodlemobile_android_cordova folder: Read + Write to everyone | # In Finder change the permission on ~/Apps/moodlemobile_android_cordova folder: Read + Write to everyone | ||
# Add the cordova plugins | |||
#* ''git clone git://github.com/alunny/ChildBrowser.git ./ChildBrowser'' - we are now going to install cordova compatible plugin with the plugin install command line. | |||
#* ''sudo /usr/local/lib/node_modules/cordova/bin/cordova plugin add ChildBrowser/'' | |||
# In Finder open ''/Users/jerome/Apps/moodlemobile_android_cordova/platforms/ios/MoodleMobileBeta.xcodeproj''. Test you can build the default Cordova app on your phone. | # In Finder open ''/Users/jerome/Apps/moodlemobile_android_cordova/platforms/ios/MoodleMobileBeta.xcodeproj''. Test you can build the default Cordova app on your phone. | ||
# Copy the Moodle mobile app into www folder | # Copy the Moodle mobile app into www folder | ||
Line 18: | Line 21: | ||
#* ''mv ./moodlemobile/ platforms/ios/www/'' | #* ''mv ./moodlemobile/ platforms/ios/www/'' | ||
#* ''cp platforms/ios/www_old/cordova.js platforms/ios/www/'' | #* ''cp platforms/ios/www_old/cordova.js platforms/ios/www/'' | ||
#* ''cp platforms/ios/www_old/childbrowser.js platforms/ios/www/'' | |||
#* '' | #* ''mv platforms/ios/www_old/childbrowser platforms/ios/www/'' | ||
#* '' |
Revision as of 09:31, 26 March 2013
this is a quick guide to build the official Moodle Mobile app on iOS. It should be pretty easy to do it for your own organization.
- Install xcode
- Install NodeJs
- Install cordova-cli
- sudo npm install -g cordova - it will install cordova. Note that on my machine I have some warnings about the ios bootstrap process being skipped but all the following steps seem to work ok anyway...
- Create a Xcode project
- /usr/local/lib/node_modules/cordova/bin/cordova create ~/Apps/moodlemobile_android_cordova com.moodle.moodlemobile MoodleMobileBeta
- cd ~/Apps/moodlemobile_android_cordova
- sudo /usr/local/lib/node_modules/cordova/bin/cordova platform add ios
- sudo /usr/local/lib/node_modules/cordova/bin/cordova build - not necessary, just check the build works.
- In Finder change the permission on ~/Apps/moodlemobile_android_cordova folder: Read + Write to everyone
- Add the cordova plugins
- git clone git://github.com/alunny/ChildBrowser.git ./ChildBrowser - we are now going to install cordova compatible plugin with the plugin install command line.
- sudo /usr/local/lib/node_modules/cordova/bin/cordova plugin add ChildBrowser/
- In Finder open /Users/jerome/Apps/moodlemobile_android_cordova/platforms/ios/MoodleMobileBeta.xcodeproj. Test you can build the default Cordova app on your phone.
- Copy the Moodle mobile app into www folder
- git clone git://github.com/moodlehq/moodlemobile.git ./moodlemobile
- mv platforms/ios/www/ platforms/ios/www_old/
- mv ./moodlemobile/ platforms/ios/www/
- cp platforms/ios/www_old/cordova.js platforms/ios/www/
- cp platforms/ios/www_old/childbrowser.js platforms/ios/www/
- mv platforms/ios/www_old/childbrowser platforms/ios/www/