项目作者: Essent

项目描述 :
nativescript hook for supporting custom xcode 8 entitlements, see https://github.com/NativeScript/nativescript-cli/issues/2075
高级语言: JavaScript
项目地址: git://github.com/Essent/nativescript-custom-entitlements.git
创建时间: 2017-01-10T09:15:25Z
项目社区:https://github.com/Essent/nativescript-custom-entitlements

开源协议:MIT License

下载


Nativescript Xcode 8 custom entitlements

Nativescript hook for supporting custom xcode 8 entitlements, see https://github.com/NativeScript/nativescript-cli/issues/2075

npm version

Installation

Npm

  1. npm install nativescript-custom-entitlements --save-dev

Configuration

You’ll need to have a entitlements file app.entitlements in the app/App_Resources/iOS folder.

TIP You can open the project in xcode 8 and activate the entitlements you need. xcode will generate an entitlements file which you can copy to your nativescript project

Example entitlements file

app/App_Resources/iOS/app.entitlements

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3. <plist version="1.0">
  4. <dict>
  5. <key>aps-environment</key>
  6. <string>development</string>
  7. </dict>
  8. </plist>

Run Demo

  1. npm run setup
  2. npm run demo.ios

Check entitlements

  1. npm run setup
  2. npm run resetdemo
  3. cd demo
  4. tns build ios --for-device
  5. cp demo/platforms/ios/build/device/demo.ipa build/demo/platforms/ios/build/device/demo.zip
  6. unzip demo/platforms/ios/build/device/demo.zip -d demo/platforms/ios/build/device/
  7. codesign -d --entitlements :- "demo/platforms/ios/build/device/Payload/demo.app"