APICloud developer Advanced Road | iOS modify entitlements file

This article comes from APICloud official forum,

Thanks ed main  technical advice -Kenny  a share.

 

I. Overview
iOS native development to achieve some special features, such as using HealthKit, to achieve Universal Links, etc., need to open the switch corresponding to the function of the target project Capabilities option, and a final configuration is written to the project .entitlements file, below we provide a method of configuring the entitlements file.

Second, the configuration
.entitlements is xml format file, a new text file, named UZApp.entitlements content file, then the file is placed in the res directory page widget package, the contents of which will be added to the compiler when compiling the cloud inside UZApp.entitlements in engineering.

Note To implement the features you want, not only to the configuration file entitlements, but also for your App Id check on the corresponding function described above in the Apple Developer website.



三、示例
1、配置HealthKit
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.healthkit</key>
<true/>
</dict>
</plist>
复制代码

2、配置Associated Domains
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:domain.com</string>
</array>
</dict>
</plist>
复制代码

Guess you like

Origin www.cnblogs.com/APICloud/p/12106218.html