Titaniumãã«ãæé ã¾ã¨ã
id:naoya ãããªãã¨ãã Titanium ã試ãã¦ã¿ããã¨æã£ããè²ã ã¨ã¯ã¾ã£ãã®ã§ã¾ã¨ãã¦ããã¾ããå°ãªãã¨ãåã®ç°å¢ã§ã¯iOS 4.1以ä¸ã® SDK ãå©ç¨ãã¦ãã㨠Titanium ã®ãã¦ã³ãã¼ãã ãã§ã¯ãã¡ã§ãèªåã§ã® build ãå¿ è¦ã§ããã¨ããããã§ä»¥ä¸ã§ã¯ãã«ãæ¹æ³ãã解説ãã¾ãã
ä»å㯠iPhone 㨠Android ãåæã«éçºããã®ãç®çãªã®ã§ Mac ã®äººã ãã対象ã§ã Windows ã®ã²ã¨ã¯ããããªãã
追è¨
id:maxy ããããã³ã¡ã³ãã§
http://builds.appcelerator.com.s3.amazonaws.com/index.html
ãããã¦ã³ãã¼ãåºæ¥ãã®ãæãã¦ãããã¾ããï¼ã³ãããæ¯ï¼ã§ãã«ãããã¦ã¦ä¾¿å©ï¼
å¿ è¦ç°å¢
- OSX Snow Leopard
- X code with iOS SDK 4.1 (4.2 beta2 ã§ã¯ãã¾ãåãã¾ããã§ãã)
- Macports ã®ã¤ã³ã¹ãã¼ã« (homebrew ã¨ãã§ã大ä¸å¤«ã ã¨ã¯æãã¾ãã)
ã»ããã¢ãã
Titanium ã® ã»ããã¢ããåã« Xcode ã®ã¤ã³ã¹ãã¼ã«ã¯æ¸ã¾ãã¦ããã¾ããããéçºè åãã«4.2 Beta ãæã«å ¥ãã¾ããã試ããã¨ããé§ç®ã ã£ãã®ã§ 4.1 ãããããã§ãã
ç¶ãã¦ãAndroid SDK ãã»ããã¢ãããã¾ãã
http://developer.android.com/sdk/index.html
ãããææ°ã® OSX åã SDK ããã³ãã¼ããã¾ãããã®å¾ãé©å½ãªæã«è§£åãã¾ãããããããã³ãã³ãã©ã¤ã³ã§
sudo ln -s /Path/TO/Your/Android-SDK /opt/android-sdk
ã¨ããæãã§ã·ã³ããªãã¯ãªã³ã¯ãè²¼ã£ã¦ããã¾ãããã«ãããã¨ãã«å¿ é ã§ãã
ã¤ãã«ãã³ãã³ãã©ã¤ã³ããã次ã®ã³ãã³ããæã£ã¦ç®¡çãã¼ã«ãèµ·åãã¾ãã
/Path/TO/Your/Android-SDK/tools/android
å·¦ãã¤ã³ã® "Avairable Package" ãã¯ãªãã¯ãã¦ããã®å¾å³ãã¤ã³ã®ãªã¹ãã«ãããä¸è§å½¢ãã¯ãªãã¯ãã¦ãããªãªã¹ããåºãã¾ãã
ãã®ç»é¢ã¯ã»ããã¢ãããçµãã£ã¦ãç¶æ ãªã®ã§ãåºã¦ãªãã®ã§ãã
ãé¸æã§ããã®ã§ãé¸æããä¸ã§ "Install Selected" ãã¯ãªãã¯ãã¦SDKãã¤ã³ã¹ãã¼ã«ãã¾ãããã
ããã§ãAndroid SDK ã®ã»ããã¢ããã¯çµäºã§ãã
Titaniumã®ç¬èªãã«ã
Titanium ã
http://developer.appcelerator.com/get_started
ãããã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ããã ãã§ããã使ããã¯ããªã®ã§ãããåã®ç°å¢(iOS SDK 4.1)ã§ã¯ãã¾ãåããªãã¦ãTitanium Mobile ãèªåã§ãã«ãããå¿
è¦ãããã¾ããã
ã¨ããããã§ãgit ã§ã½ã¼ã¹ãåã£ã¦ãã¾ãã
cd ~/src git clone http://github.com/appcelerator/titanium_mobile.git
ã§å±éããããã£ã¬ã¯ããªã«å ¥ã£ã¦ã
scons
ãã¾ãã
scons ããªãã¨ãã¯
ãã®ãscons ãã¯ã»ã¢ãã§ãpythonã§æ¸ãããmakeã®ãããªãã®ãªã®ã§ãã port ã§ã®ã¤ã³ã¹ãã¼ã«ãããããã¾ããä¾åãã¦ããdb46ãããããã¾ãã
ããã³ã±ãã¨ãã¯
sudo port clean --all -f db46 sudo port selfupdate sudo port install scons
ãªã©ããã¨ãã¾ãããã¾ãã
ãã㧠scons ãç¡äºåãã°ã
~/src/titanium_mobile/dist
ã«ãmobilesdk-1.5.0-osx.zip ãçæããã¦ãã¾ããããã解åãã¦ãä¸ã«å«ã¾ããmobilesdk/osx/1.5.0 ã
/Library/Application Support/Titanium/mobilesdk/osx
ã«ã³ãã¼ããã°çµäºã§ããTitanium ã®ããã¸ã§ã¯ãã®è¨å®ã§ããã®æ°ãã sdk ãé¸æã§ããããã«ãªãã¾ãã
ããã§ãTitanium ã§ã®éçºã楽ãããã¯ãï¼
http://github.com/appcelerator/KitchenSink.git
ãããKitchenSinkããã¸ã§ã¯ãããã¦ã³ãã¼ããã¦ãTitaniumã§ãã«ãããã¨ã使ããUIã®ã·ã§ã¼ã±ã¼ã¹ãåããã¾ããå人çã«ã¯ã
'BaseUI' > 'Views' > 'TableView'
ã« pull to refresh ã¨ããæè¿æµè¡ãã®ãã¼ãã«ãå¼ã£å¼µã£ã¦å
容ãæ´æ°ããUIãå
¥ã£ã¦ããã®ãã¨ã¦ãå°è±¡çã§ããã
JSã§ãµã¯ãã¨æ¸ãã¦ãã¾ãã¯ã¢ãã¯ãä½ã£ã¦ã¿ãã¨ããç¨éã«ã使ãããã§ãããã®é±æ«ã«ã§ããªã«ãã¤ãã£ã¦ã¿ããããªã