[TIMOB-19311] iOS: Configuring capabilities (app group) and team identity via tiapp.xml
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-08-11T18:09:24.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.0.0 |
Components | Tooling |
Labels | n/a |
Reporter | Chee Kiat Ng |
Assignee | Chris Barber |
Created | 2015-08-04T05:02:25.000+0000 |
Updated | 2017-10-18T22:08:15.000+0000 |
Description
To enable watchkit, there is a need to configure app group, and generate a entitlements file. Currently the proposed method described here:
https://wiki.appcelerator.org/display/guides2/Integrate+a+Native+iOS+App+Extension+or+WatchKit+App
requires us to manually set it up in the Xcode project, and also to manually create the entitlements file.
It will be great if we could just write the app group array in tiapp.xml and let *titanium build* do the rest.
Apple Documentation: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AddingCapabilities/AddingCapabilities.html
*Note:* From the ti developer perspective, he should be doing this in the following manner: 1. Log in to developer.apple.com, and create app group with the App ID consistent to his titanium app id. for example, if titanium app id is *com.appcelerator.testWatch*, app group id should be *group.com.appcelerator.testWatch* 2. After which, he should include this group id in tiapp.xml, and also the corresponding team identity. 3. Then ti build will have to map these information to the Xcode project build, as well as generate entitlement files.
PR #1: https://github.com/appcelerator/titanium_mobile/pull/7012
PR #2: https://github.com/appcelerator/titanium_mobile/pull/7013
PR #3: https://github.com/appcelerator/titanium_mobile/pull/7017
[~cbarber] does this ticket allow users to add any entitlement (for
Entitlements.plist
) viatiapp.xml
like they can forInfo.plist
? That's not clear to me. It seems like it is for app group and team identity only? If so, I will create a new ticket to add this to make integrating something like HealthKit easier instead of having to maintain aEntitlements.plist
file yourself. http://labs.appcelerator.com/project/55c3c788e014044625e9b2a1/HealthKit-Module[~fokkezb] Isn't the Entitlements.plist generated? I don't think it's existence is tied to the use of app groups or teams. This ticket was to add support for iOS capabilities. We only support the app group capability. As apart of app groups, we support teams. There are a ton of other capabilities that we do not support.
It is, unless you have one in the project root: https://github.com/appcelerator/titanium_mobile/blob/17dc8754653daaff170ea0c18f74218168a5633e/iphone/cli/commands/_build.js#L2219-L2258 So my request would be to make it work like
Info.plist
where we have a<ios>/<entitlements>
section which we merge with whatever we generate (and like recently fixed forInfo.plist
, without overwriting keys the user has set). I'll modify TIMOB-19911 to request this.Did any of this ever make it in to the docs? I don't see anything about it.
No clue. [~bimmel]?
[~rblalock], this was before my time so I have no idea but I'll look for it today. Does anyone know if there was a related TIDOC ticket created for this? Chances are if no TIDOC ticket exists, then it wasn't documented.
[~bimmel] No clue, but probably not. :)
I didn't find a TIDOC. I'm not even sure how it works to help you with this one Brian. You'll have to work with Chris on how it works.
Well, this is sorta complicated. If you have a watch app or iOS extension and you want them to be able to communicate with the iOS app, then you have to define an app group. This shows up under the "capabilities" in Xcode. This requires you specify a team and app account. Then you pick a app group that was linked with your entitlements that was created in the Apple developer portal. Here's an example of how to define this in the tiapp.xml:
The Tiapp.xml is all I was looking for actually.
From what I can tell, there is no Jira ticket nor any mention of this configuration in any of our docs. Please file a TIDOC ticket with the necessary info and I work on it right away.
Ok, I'll create a TIDOC and link it to this one and put the info Chris mentioned in the aforementioned page.
Closing ticket as fixed.