标签:
3.plist配置拍照界面,复制,粘贴等菜单的显示语言 显示中文
*存放一些全局的宏(整个项目中都用的上的宏)
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options{
//传过来请求串
NSString *text=[[url host] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSetURLQueryAllowedCharacterSet]];
UIAlertController *alert=[UIAlertController alertControllerWithTitle:@"打卡"message:text preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancel=[UIAlertAction actionWithTitle:@"取消"style:UIAlertActionStyleCancel handler:nil];
[alert addAction:cancel];
[self.window.rootViewController presentViewController:alert animated:YEScompletion:nil];
return YES;
}
在Safari中输入测试
vieim://user=123,pwd=456
4.在app中测试,需要添加可信任app
info.plist加入
<key>LSApplicationQueriesSchemes</key>
<array>
<string>urlscheme</string>
<string>urlscheme2</string>
<string>urlscheme3</string>
<string>urlscheme4</string>
</array>
调用
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"URL Scheme://URL identifier"]];
从结果看出app的地址构成是: URL Scheme://URL identifier
myapp://后面的字 可以为点"."和等号"=" 不可以为空格和问号
在plist里面Localization native development region 选择 china ,
然后Localized resources can be mixed 选 YES,如果没有Localized resources can be mixed,需手动添加
标签:
原文地址:http://www.cnblogs.com/douniwanxia/p/5885143.html