Xcode杂七杂八的设置

一:http请求(info.plist)

NSAppTransportSecurityNSAllowsArbitraryLoads

NSAllowsArbitraryLoads 设置YES


二:资源文件打包bundle(setting)

1,setting Base SDK

2,iOS deployment target

3,COMBINE_HIDPI_IMAGES  -> NO


三:权限设置(info.plist)

在info.plist 文件中 添加 权限设置

Privacy - Photo Library Usage Description

App需要您的同意,才能访问媒体资料库

NSBluetoothPeripheralUsageDescription

App需要您的同意,才能访问蓝牙

NSCalendarsUsageDescription

App需要您的同意,才能访问日历

NSCameraUsageDescription

App需要您的同意,才能访问相机

NSHealthShareUsageDescription

App需要您的同意,才能访问健康分享

NSHealthUpdateUsageDescription

App需要您的同意,才能访问健康更新

NSLocationAlwaysUsageDescription

App需要您的同意,才能始终访问位置

NSLocationUsageDescription

App需要您的同意,才能访问位置

NSLocationWhenInUseUsageDescription

App需要您的同意,才能在使用期间访问位置

NSMicrophoneUsageDescription

App需要您的同意,才能访问麦克风

NSMotionUsageDescription

App需要您的同意,才能访问运动与健身

NSPhotoLibraryUsageDescription

App需要您的同意,才能访问相册

NSRemindersUsageDescription

App需要您的同意,才能访问提醒事项


四:使用自己创建的framework

如果framework中有资源bundle,一定要把bundle单独再拖到项目中一次。


Xcode杂七杂八的设置_第1张图片
修改general中的选项

将自己打包的framework添加到embeded binaries中。


五:通讯白名单(info.plist)

LSApplicationQueriesSchemes中添加


微信支付+支付宝支付

六:跳转App(info.plist)

设置目标app的URL types

设置自己的应用标识

在跳转app中的通讯白名单中加入自己app的Scheme

通讯白名单

下一段代码进行跳转

NSString*url =@"TestDemo://com.TestDemo.www";

if([[UIApplicationsharedApplication]

canOpenURL:[NSURLURLWithString:url]])

{

[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:url]];

}

else

{

NSLog(@"can not open URL scheme TestDemo");

}

目标app中进行接收

- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url

{

// 接受传过来的参数

NSString*text = [[urlhost]stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

UIAlertView*alertView = [[UIAlertViewalloc]initWithTitle:@"已跳转到app"

message:text

delegate:nil

cancelButtonTitle:@"OK"

otherButtonTitles:nil];

[alertViewshow];

returnYES;

}


以上。

你可能感兴趣的:(Xcode杂七杂八的设置)