Ios,xcod7/8,ios using modify points

Source: Internet
Author: User

Xcod7 using the Modify point 1.xcode7 New project, all HTTP requests under Foundation are changed to HTTPS requests.

HTTP+SSL/TLS+TCP = HTTPS

That is, the service needs to provide an interface for HTTPS (TLS 1.2);

If the service does not change, then the client info.plist root <dict> need to add the following key value;

Simple trust of all HTTP servers

<key>NSAppTransportSecurity</key>

<dict>

<!--Connect to anything (this was probably bad)--

<key>NSAllowsArbitraryLoads</key>

<true/>

</dict>

or rigorous.

<key>NSAppTransportSecurity</key>

<dict>

<key>NSExceptionDomains</key>

<dict>

<key>yourserver.com</key>

<dict>

<!--Include to allow subdomains-->

<key>NSIncludesSubdomains</key>

<true/>

<!--Include to allow insecure HTTP requests-->

<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>

<true/>

<!--Include to specify minimum TLS version-->

<key>NSTemporaryExceptionMinimumTLSVersion</key>

<string>TLSv1.1</string>

</dict>

</dict>

</dict>

2.xcode7 default on, Bitcode (iwatch required), will cause some third-party framework error (such as Friend League errors)

YOUMENG/LIBMOBCLICKLIBRARY.A (MOBCLICK.O) ' does not contain bitcode. You must rebuild it with Bitcode enabled (Xcode setting Enable_bitcode), obtain a updated library from the vendor, or dis Able Bitcode for this target. For Architecture ARMv7

This is either updating the library, or you can search for Bitcode in build setting, and the Enable Bitcode is set to NO

3.IOS9 Installing the Enterprise Certificate packaged app

Enterprise Certificate packaged app, installed in the phone inside the first time after opening the app. does not trust or trust the certificate as it was previously prompted;

This is a time when you need iOS9 settings-"general-" profile-"Enterprise-class application trust corresponding enterprise developers."

4.ios9 URL Schemes

In addition to setting the URL schemes in the project info URL types, you also need to add a trusted calling app to the Info.plist, otherwise the following error is returned

-canopenurl:failed for URL: "weixin://app/wx9c8771d3c07dfd30/"-Error: "The This app isn't allowed to the query for scheme Weix In

-canopenurl:failed for URL: "Wtloginmqq2://qzapp"-Error: "The This app was not allowed to the query for scheme wtloginmqq2"

Info.plist Join

<key>LSApplicationQueriesSchemes</key>

<array>

<string>urlscheme</string>

<string>urlscheme2</string>

<string>urlscheme3</string>

<string>urlscheme4</string>

</array>

5.iPad fit slide over and split view split screen applications It is best to change the pure code to STROYBOARD6. Partial library file suffix changes

The dylib suffix becomes TBD

For example: Become

Seven, Xcode7 compatible 32-bit and 64-bit mobile phone model pack

Change build active architecture only to no, that is, 32-bit and 64-bit are included, depending on the phone automatically choose to use 32 or 64.

Xcode8 using modify points

1. Real-Machine Debugging modification

Tick the places shown.

2. Apply Permissions Configuration

Add the following code to the Info.plist

<!--Albums--

<key>NSPhotoLibraryUsageDescription</key>

<string>app need your consent in order to access the album </string>

<!--camera--

<key>NSCameraUsageDescription</key>

<string>app requires your consent to access the camera </string>

<!--Microphones--

<key>NSMicrophoneUsageDescription</key>

<string>app need your consent to access the microphone </string>

<!--location--

<key>NSLocationUsageDescription</key>

<string>app need your consent to access the location </string>

<!--access to location during use--

<key>NSLocationWhenInUseUsageDescription</key>

<string>app requires your consent in order to access the location during use </string>

<!--always access location-

<key>NSLocationAlwaysUsageDescription</key>

<string>app requires your consent in order to always access the location </string>

<!--calendar--

<key>NSCalendarsUsageDescription</key>

<string>app need your consent in order to access the calendar </string>

<!--reminders--

<key>NSRemindersUsageDescription</key>

<string>app need your consent in order to access reminders </string>

<!--sports and fitness--

<key>NSMotionUsageDescription</key> <string>app need your consent to access sports and fitness </string>

<!--Health Updates-

<key>NSHealthUpdateUsageDescription</key>

<string>app need your consent to access health updates </string>

<!--health Sharing--

<key>NSHealthShareUsageDescription</key>

<string>app need your consent in order to access health sharing </string>

<!--Bluetooth--

<key>NSBluetoothPeripheralUsageDescription</key>

<string>app need your consent to access Bluetooth </string>

<!--Media Archive--

<key>NSAppleMusicUsageDescription</key>

<string>app need your consent to access the Media Library </string>

If it doesn't work, you can request background permissions, similar to this:

<key>UIBackgroundModes</key>

<array>

<!--here to write the key that you want to use in background mode

<string>location</string>

...

</array>

Ios,xcod7/8,ios using modify points

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.