使用开发包需要蓝牙权限和网络权限

1 蓝牙权限开启，需要在info.plist文件添加以下字段
  NSBluetoothAlwaysUsageDescription
  NSBluetoothPeripheralUsageDescription
  UIBackgroundModes
    bluetooth-central

  蓝牙使用权限说明可这样写
  The app needs to communicate with the printer via bluetooth

2 网络权限开启，可在进入App时，调用以下代码开启
-(void)testHttp
{
    NSURL *url = [NSURL URLWithString:@"https://www.baidu.com"];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    NSURLSession *session = [NSURLSession sharedSession];
    NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
        if (error == nil) {
            NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
            NSLog(@"%@",dict);
        }
    }];
    
    [dataTask resume];
}
