2014年7月8日 星期二

ios7 Storyboard UIViewController(first ViewController,root ViewController)



取消 Is Initial View Controller 的勾勾


設定Storyboard ID



刪除 Main Interface 內的文字


程式啟動時第一個 UIViewController welcomeStoryboard

// in AppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    UIViewController *firstViewController = [storyboard instantiateViewControllerWithIdentifier:@"welcomeStoryboard"];
    self.window.rootViewController = firstViewController;
    [self.window makeKeyAndVisible];
    return YES;

}

後續想轉跳的UIViewController myStoryboard

// in ViewController.m

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *view = [storyboard instantiateViewControllerWithIdentifier:@"myStoryboard"];
[view setModalPresentationStyle:UIModalPresentationFullScreen];
[self presentViewController:view animated:NO completion:nil];



2014年6月9日 星期一

產生ios pem

產生ios pem

  • 用 *.p12 產生 key.pem
openssl pkcs12 -nocerts -out key.pem -in key.p12
Enter Import Password:            //輸入匯入的密碼
MAC verified OK
Enter PEM pass phrase:                      //輸入自訂密碼
Verifying - Enter PEM pass phrase:    //驗證輸入自訂密碼
  • 用aps_development.cer 產生aps_development.pem
openssl x509 -in aps_development.cer -inform der -out aps_development.pem
  • 產生 ck.pem
cat aps_development.pem key.pem > ck.pem

  • developer 測試 ck.pem
openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert ck.pem -key ck.pem

  • production 測試 ck.pem 
  • 產生.net用p12
openssl pkcs12 -export -in aps_development.pem -inkey key.pem -certfile CertificateSigningRequest.certSigningRequest -name "net_dev" -out net_dev.p12


  • Convert a  .p12 containing a private key and certificates to PEM


openssl pkcs12 -in ck.p12 -out ck.pem -nodes

ios 終端機指令

到某個目錄:cd /目錄名稱/

桌面:
cd /Users/使用者名稱/Desktop/

cd ~/Desktop/
"~"表示到使用者資料夾下。

下一層目錄:cd ./目錄名稱/
上一層目錄:cd ../

2014年2月15日 星期六

Titanium Studio

win7(64bit)OS

安裝時出現
Unable to install Java - Setup will be aborted

移除全部的javay (JDK,JRE),再重新安裝Titanium Studio
2014/2/15