Your SlideShare is downloading. ×
Rhodes mobile Framework
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Rhodes mobile Framework

733
views

Published on

Published in: Technology, News & Politics

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
733
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. RhodesRuby to iPhone, Android NativeApplicationYoshi Sakai / Twitter @bluemooninc
  • 2. Rhodes is• Rhodes makes multiple native application asthe iPhone, Android from single code.• Ruby + HTML MVC Framework• MIT License• Rhodes deploy to device with the Xcode andAndroid SDK,NDK.
  • 3. Install Rhodes• Open the Gems Folder– sudo chmod 775 /Library/Ruby/Gems/1.8• $ gem install rhodes
  • 4. Install homebrew• $ ruby -e "$(curl -fsSkLraw.github.com/mxcl/homebrew/go)"• $ sudo chmod 775 /usr/local• $ sudo chown -R $USER /usr/local/*• $ brew updateHomebrew is the package system for UNIX Tool on Macintosh. Homebrew is compactand simple than MacPorts.
  • 5. Install gcc• $ brew tap homebrew/dupes• $ brew install autoconf automake apple-gcc42
  • 6. Install Xcode• https://developer.apple.com/devcenter/ios/index.action
  • 7. Additional install on Xcode• Boot xCode, Click preference. After that Installthe iOS Simulator and Command line Tools
  • 8. Install Android SDK/NDK• Download the android JDK from Apple– http://support.apple.com/downloads/#java• Download Android SDK/NDK– http://developer.android.com/sdk/index.html#download• Select a 64bit version When you use MoutainLion– http://support.apple.com/kb/HT3696Android NDK is Native(C、C++) Development kit
  • 9. Path set for Android SDK• Open the terminal window and goto home.• Make a .bash_profile by Editor (vim etc…)• open .bash_profile is easy to edit on Mac
  • 10. .bash_profile• .bash_profile-------------------------------------------• export PATH=$PATH:/Users/bluemooninc/android_sdk/sdk/tools• #Android NDK PATH• ANDROID_NDK=/Users/bluemooninc/android_ndk/toolchains• export PATH=$PATH:${ANDROID_NDK}• #Android SDK PATH• ANDROID_SDK=/Users/bluemooninc/android_sdk/sdk/platform-tools• export PATH=$PATH:${ANDROID_SDK}• -------------------------------------------------------------
  • 11. Make sure the path• $ printenv• PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/local/rvm/bin:/Users/bluemooninc/android_sdk/sdk/tools:/Users/bluemooninc/android_ndk/toolchains:/Users/bluemooninc/android_sdk/sdk/• Check the Android SDK/NDK path• Close terminal or below command to refresh– $source ~/.bash_profile
  • 12. Set build parameter• $ rhodes-setup >> build.yml will made– We will ask you a few questions below about your devenvironment.– JDK path (required)(/Library/Java/Home): /System/Library/Flameworks/JavaVM.flamework/Home– Android SDK path (blank to skip) ():/Users/bluemooninc/android_sdk/sdk/– Android NDK path (blank to skip) ():/Users/bluemooninc/android_ndk/
  • 13. Get Ruby 2.0!• Ruby1.8.7 (Mac OS X Default) is old and errorstop on compile. You can get Version2 below.• $ ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"• $ brew install rbenv• $ brew install ruby
  • 14. Set UTF-8• /Library/Ruby/Gems/1.8/gems/highline-1.6.18/lib/highline.rb:621:in `say: undefinedmethod `default_external for Encoding:Class(NoMethodError)• default_external to UTF-8’
  • 15. Generate a Application• $ rhodes app storemanager– >> Ganerate an Application folder and templatefiles.• $ cd storemanager– >> move to project folder• $ rhodes model storemanager name– >> Ganarate a scaffold for MVC framework
  • 16. Run the Android simulator• rhodes/platform/android/build/androidcommon.rb– Add "_64” to androidcommon.rb When you drive64 bit as the Android NDK– $ndkhost = `uname -s`.downcase!.chomp! + "-x86_64”• $ rake run:android:rhosimulator– >> Quick simulate for debug
  • 17. 1 bug fix• As the 3.5.1.12 has one bug(Already fixed atgithub)– There is a bug in build script that causes this error.It is already fixed at master. You may fix it yourselfin your rhodes.Open /var/lib/gems/1.9.1/gems/rhodes-3.5.1.12/platform/android/build/android_tools.rb– At line 211 And make this line to look as Classname– FileUtils.rm_f $applog_path if !$applog_path.nil?
  • 18. Prepare the Android Virtual Device• Boot eclipse on android_sdk, Select AVMmanager on Window menu
  • 19. Change build.yml• build.yml for AVD ---------------------------------• android:• minSDK: 11• version: 4.0.3• emulator: galaxyS2• android_title: 0• orientation: portrait• --------------------------------------------------------
  • 20. Run the Emulator• $ adb start-server >> Start the adb server• rake run:android:rhosimulator >>Quick debug• $ rake run:android >> Deploy to the emulater
  • 21. Make the iOS Development• Edit build.yml --------------------------------• iphone:• configuration: Debug• sdk: iphonesimulator6.1• provisionprofile:• codesignidentity: "iPhone Developer"• -------------------------------------------------------
  • 22. Run the simulator• rake run:iphone:rhosimulator >> Quick debug• rake run:iPhone >> Deploy to iOS simulator
  • 23. Deploy to Android Device• $ CD $home >> move to home directory• open .android/adb_usb.ini• Connect USB your device and Check theManufacture ID by the system profiler on yourMacintosh
  • 24. Example of Galaxy SII• Manufacturer ID for Samsung• 0x04e8
  • 25. Check Device and Build• Cd ~/android_sdk/sdk/platform-tools/• android update adb• adb devicesList of devices attached4*************c device >> You will see your Android device serialnumber• Goto project folder and build it.rake run:android:deviceIf you’ve get the error: device not found, Then Try it below ex.• /Users/bluemooninc/android_sdk/sdk/platform-tools/adb -d install -r/Users/bluemooninc/RhodesProject/storemanager/bin/target/android/storemanager-debug.apkSuccess mean finish
  • 26. Deploy to iPhone Device• Edit build.yml---------------------------------• iphone:• configuration: Release• sdk: iphoneos6.1• provisionprofile:• codesignidentity: "iPhone Developer"• entitlements: ""• BundleIdentifier: com.xoopsec.ios.* >> from iOS developper• BundleURLScheme: StoreManager001 >> from iOS developper
  • 27. Generate a iPhone package• $ rake device:iphone:production– Will ganarate iOS folder below ex.RhodesProject/bin/target/iOS/iPhoneos6.1/Release/storemanager.app
  • 28. Build the Xcodeprj• $ rake switch_app• $ rake build:iphone:setup_xcode_projectLibrary/Ruby/Gems/1.8/gems/rhodes-3.5.1.12/platform/iphone/rhorunner.xcodeproj
  • 29. Deploy to Real device• Double click toLibrary/Ruby/Gems/1.8/gems/rhodes-3.5.1.12/platform/iphone/rhorunner.xcodeproj• Connect iPhone to USB and Click Run• After pages are Apple Developer registration
  • 30. yourappleid@mac.comhttps://developer.apple.com
  • 31. Make a certification data• Boot key chain from utility folder and select Assistant• Keep blank a CA email address,Save to disk, set the key pear info.• Input (2048bit, RSA to key pear parameter)• CertificateSigningRequest.certSigningRequest will save on your disk
  • 32. Entry your CertificationSelectCertification.After while youwill get a emailfor Approve.
  • 33. Install the certification on your Mac• Double click the downloadeddeveloper_identity.cer file from Apple
  • 34. Entry the iOS device info• Connect your iOS device on your Mac• Boot Xcode, Click device at Window OrganizerCopy this 40th strings
  • 35. Entry the Identifier to Developer
  • 36. Get the AppID• Wildcard App ID: opsit the domain name for unique name• App ID Name: as you like.ex)com.xoopsec.ios.*App name etc.
  • 37. Entry the Provisioning Profiles• Profile Name:As any• Certificates:check• App ID:Choice in this time• Device:Check
  • 38. Set Code Signing Identity• Open the Xcode project on Rhodes folder• Select Code Signing Identity in Build Setting