Unit Test 工具1、OCUnit:從 xcode 2.1 開始整合到開發環境中,使用方便,不需要引入額外的庫。並可以配置 xcodebuild,實現在命令列測試,從而在 CI 中進行測試與報告。2、GTM 的單元測試部分:對 OCUnit 進行了擴充,增加了一些宏。地址:https://code.google.com/p/google-toolbox-for-mac/wiki/iPhoneUnitTesting3、GHUnit:帶有一個獨立的 GUI。地址:https://github.
- (NSString *)getUniqueStrByUUID{ CFUUIDRef uuidObj = CFUUIDCreate(nil);//create a new UUID //get the string representation of the UUID NSString *uuidString = (__bridge_transfer NSString *)CFUUIDCreateString(nil, uuidObj);
float systemVersion = [[[UIDevice currentDevice] systemVersion] floatValue];//iOS SystemVersion[[UIDevice currentDevice] name]); // Name of the phone as named by user [[UIDevice currentDevice] uniqueIdentifier]); // iOS5.0 及其以後這個方法已經被禁止使用。再繼續使用的後果是“
ref:http://bjango.com/articles/pngcompression/At face value, running your images through a tool like ImageOptim seems like a great idea. It grinds away, shaving kilobytes or bytes off each file, hopefully helping your app download and launch faster.
在應用中撥打到電話,可以參考如下的程式碼片段:// This will dial a call without prompting the user[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:1-800-555-1212"]];但是在撥打到電話前給使用者一個提示是比較友好的,參考如下程式碼片段(在iOS5.0下):NSString *number = @"telprompt://1-800-555-1
iOS: http://developer.apple.com/library/ios/#technotes/tn2239/_index.htmlMac OS X: http://developer.apple.com/library/ios/#technotes/tn2004/tn2124.html===============================================================Debugging Objective-C with