zoukankan      html  css  js  c++  java
  • APICloud开发者进阶之路 |iOS修改entitlements文件

    本文出自APICloud官方论坛,

    感谢论坛版 技术咨询-Kenny 分享。

     

    一、概述
    iOS原生开发中若要实现某些特殊功能,如使用HealthKit、实现Universal Links等、需要在工程target的Capabilities选项中打开对应的功能开关,而最终的配置都会写入到工程中的一个.entitlements文件中,下面我们提供了配置该entitlements文件的方法。

    二、配置
    .entitlements是xml格式的文件,新建一个文本文件,修改内容后命名为UZApp.entitlements文件,然后将文件放置在widget网页包的res目录下,云编译时会将里面的内容添加到编译工程里面的UZApp.entitlements中。

    注意若要实现你想要的功能,不仅要配置entitlements文件,还要在苹果开发网站上面为你的App Id勾选上对应的功能。



    三、示例
    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>
    复制代码

  • 相关阅读:
    python3+selenium框架设计04-封装测试基类
    python3+selenium框架设计02-自动化测试框架需要什么
    python3+selenium框架设计01-Page Object
    python3+selenium入门16-窗口截图
    python3+selenium入门15-执行JavaScript
    爬虫入门
    NLP整体流程的代码
    NLTK与NLP原理及基础
    NLTK词性标注解释
    [hdu4355]Party All the Time(三分)
  • 原文地址:https://www.cnblogs.com/APICloud/p/12106218.html
Copyright © 2011-2022 走看看