titanium:ios push notifications 筆記

http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1

http://blog.toright.com/archives/2806

http://tw.websense.com/content/support/library/mobile/admin_help/start_apn.aspx

tutorial:
1.http://www.titaniumtutorial.com/2012/07/appcelerator-cloud-push-notification-in.html
2.ios how to create push certificate
http://quickblox.com/developers/How_to_create_APNS_certificates
3.http://iosmuncher.blogspot.tw/2012/06/implementing-apns-in-titanium-start-to.html
4.http://blog.teemusk.com/2012/05/building-server-push-notifications-with-appcelerator-titanium-cloud/
5.http://justfly.idv.tw/2012/04/27/Just_1195.html
6.http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1

https://discussions.apple.com/thread/5141135

Managing ios device:
http://www.apple.com/iphone/business/it/management.html

Apple push certificates potal:
https://identity.apple.com/pushcert/

stackoverflow:
http://stackoverflow.com/questions/9743690/generate-mdm-certificate
http://www.softhinker.com/in-the-news/iosmdmvendorcsrsigning

Apple forum:
https://devforums.apple.com/community/support

ios developer library:
1.https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ManagingAccounts/ManagingAccounts.html#//apple_ref/doc/uid/TP40012582-CH24-SW1
2.https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction.html

Apple discussion:

https://discussions.apple.com/thread/5141135

run app on ios device:
http://www.ralfebert.de/archive/ios/tutorial_iosdev/run_app/
http://www.dodyrw.com/how-to-run-titanium-ios-app-on-device/
http://docs.appcelerator.com/titanium/latest/#!/guide/Deploying_to_iOS_devices
http://www.dodyrw.com/how-to-run-titanium-ios-app-on-device/
http://fstoke.me/blog/?p=1805

android app,使用gcm

到https://cloud.google.com/console/project登入開發者
註冊完後選api&auth,之後在google cloud messaging for android從off打開至on
之後點選credentials產生一個appid(記得產生keystore)

最後點overview你會看到projectid就是senderid

如果有用titanium,再將appid,senderid輸入至後台

http://developer.android.com/google/gcm/gs.html

http://justfly.idv.tw/2013/01/16/Just_1538.html

http://developer.android.com/google/gcm/gcm.html#register

https://sites.google.com/site/s70487s/android-research/gcm

https://github.com/Guti/Google-Cloud-Messaging–Titanium-/blob/master/dist/com.activate.gcm-android-0.5.zip

在ubuntu(12.04)上安裝titanium開發環境

step1.註冊titanium帳號
http://www.appcelerator.com/

step2.安裝titanium studio
註冊完帳號後可以至:https://my.appcelerator.com/resources  下載titanium studio
抓下來之後接壓縮安裝至個人目錄,例如Titanium_studio
之後進入該目錄執行TitaniumStudio ,安裝過程它會要求你輸入註冊帳密,之後即完成安裝

step3.安裝nodejs
可以參考:在ubuntu上安裝nodejs

step4.安裝java jdk
可以至官網下載:http://www.oracle.com/technetwork/java/javase/downloads/index.html

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

之後測試看看:
java -version
javac -version

step5.安裝android sdk
基本上這個部份跟著titanium官方網站實作即可。
安裝完android sdk後,要開啟android-sdk目錄下的tools裡執行android跟emulator
之後就可以打開titanium studio並且開一個專案,然後將你寫好的app deploy到emulator上
關於android sdk跟avd的部份可以參考:http://developer.android.com/tools/devices/managing-avds-cmdline.html

相關文章
1.http://blog.gslin.org/archives/2009/01/24/1935/%E5%B0%87-ubuntu-%E8%A3%A1%E7%9A%84-java-%E6%8F%9B%E6%88%90-sun-%E7%9A%84%E7%89%88%E6%9C%AC/
2.http://www.dotblogs.com.tw/jhsiao/archive/2013/09/03/116186.aspx
3.http://apexu.com/apexu/tw/modules/publisher/item.php?itemid=35
4.http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
5.http://forum.xda-developers.com/showthread.php?t=2021510
6.http://hamersun.blogspot.tw/2012/12/sun-java6-jdk.html

7.http://blog.gslin.org/archives/2009/01/24/1935/%E5%B0%87-ubuntu-%E8%A3%A1%E7%9A%84-java-%E6%8F%9B%E6%88%90-sun-%E7%9A%84%E7%89%88%E6%9C%AC/

8.http://www.dotblogs.com.tw/jhsiao/archive/2013/09/03/116186.aspx

9.http://apexu.com/apexu/tw/modules/publisher/item.php?itemid=35

10.http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

11.http://forum.xda-developers.com/showthread.php?t=2021510

12.http://hamersun.blogspot.tw/2012/12/sun-java6-jdk.html

13.
http://developer.android.com/sdk/index.html

14.http://blog.hinablue.me/entry/titanium-note-first-class-titanium-mobile-linux-androd

15.http://www.dotblogs.com.tw/kkman021/archive/2012/01/16/66071.aspx
http://eoffice.im.fju.edu.tw/phpbb/viewtopic.php?t=6877|

16.http://developer.android.com/tools/devices/managing-avds-cmdline.html

在ubuntu上安裝nodejs

到官方網站下載
http://nodejs.org/download/

tar zxvf node-v10.10.24.tar.gz

安裝必要套件:
sudo apt-get install build-essential

解壓縮之後進入目錄執行:
./configule
make install
sudo make install

以上應該就安裝完了:
之後可以打:
node -v 看版本

WordPress使用快取

在wp-config.php檔案裡面,有一行被註解的指令

defind('WP_CACHE',false);

將它取消註解並改為true即可。

之後可以再安裝 hyper cache這套外掛,網站會比原本快很多。

將你的image server加上CDN

如果你是用AWS的Route53當作DNS,而你再做圖片處理的時候,無法直接用子網域指你的img.domainname.com指到cloudfare , 因為Cloudfare不允許你這樣做,因此你需要在多申請一個網域,將Name server指到cloudfare即可,在將圖片的url指定到新申請的網址,弄完後使用者發request到你的image server時會先過cloudfare,而cloudfare會自動把你的圖片cache起來,這樣可以大大提昇效能~

記得還要設定Apache的virtual host~