Skip to content

Commit 6df7e40

Browse files
authored
Document entitlements (#86)
1 parent f76e1ed commit 6df7e40

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Documentation/xtool.docc/Control.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,36 @@ iconPath: Resources/AppIcon.png
107107
> Tip:
108108
>
109109
> Your app icon must be a png, and it should ideally have a resolution of 1024x1024px.
110+
111+
## Add entitlements
112+
113+
You may need to add special [entitlements](https://developer.apple.com/documentation/bundleresources/entitlements) to your app, for example you need the `com.apple.developer.homekit` entitlement in order to connect to HomeKit devices.
114+
115+
First create an `App.entitlements` file with the necessary entitlements:
116+
117+
```plist
118+
<?xml version="1.0" encoding="UTF-8"?>
119+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
120+
<plist version="1.0">
121+
<dict>
122+
<key>com.apple.developer.homekit</key>
123+
<true/>
124+
</dict>
125+
</plist>
126+
```
127+
128+
Then, tell xtool about it via `xtool.yml`:
129+
130+
```yaml
131+
entitlementsPath: App.entitlements
132+
```
133+
134+
> Troubleshooting:
135+
>
136+
> There are a number of situations in which xtool may not be able to successfully apply an entitlement to your app.
137+
>
138+
> - Some entitlements, such as [Network Extension](https://developer.apple.com/documentation/bundleresources/entitlements/com.apple.developer.networking.networkextension), don't work with free developer accounts. You might need to enrol in one of the Apple Developer Programs to use these.
139+
> - Other entitlements, like [User Notifications Filtering](https://developer.apple.com/documentation/bundleresources/entitlements/com.apple.developer.usernotifications.filtering), require special permission from Apple. If you do have the appropriate permission, these may or may not work with xtool.
140+
> - Many entitlements require specific "Capabilities" to be enabled on your app in the Developer Services portal. xtool handles this for you, but we need to add code to xtool for each Entitlement-Capability mapping. If you run into a Capability that we don't handle yet, please let us know.
141+
>
142+
> Entitlements are a large surface area. If you find any bugs or missing functionality, please [create a GitHub Issue](https://github.com/xtool-org/xtool/issues/new/choose).

0 commit comments

Comments
 (0)