Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19311] iOS: Configuring capabilities (app group) and team identity via tiapp.xml

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-08-11T18:09:24.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.0.0
ComponentsTooling
Labelsn/a
ReporterChee Kiat Ng
AssigneeChris Barber
Created2015-08-04T05:02:25.000+0000
Updated2017-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

Comments

  1. Chee Kiat Ng 2015-08-05

    *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.
  2. Chris Barber 2015-08-07

    PR #1: https://github.com/appcelerator/titanium_mobile/pull/7012
  3. Chris Barber 2015-08-07

    PR #2: https://github.com/appcelerator/titanium_mobile/pull/7013
  4. Chris Barber 2015-08-11

    PR #3: https://github.com/appcelerator/titanium_mobile/pull/7017
  5. Fokke Zandbergen 2015-11-12

    [~cbarber] does this ticket allow users to add any entitlement (for Entitlements.plist) via tiapp.xml like they can for Info.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 a Entitlements.plist file yourself. http://labs.appcelerator.com/project/55c3c788e014044625e9b2a1/HealthKit-Module
  6. Chris Barber 2015-11-12

    [~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.
  7. Fokke Zandbergen 2015-11-12

    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 for Info.plist, without overwriting keys the user has set). I'll modify TIMOB-19911 to request this.
  8. Rick Blalock 2016-03-01

    Did any of this ever make it in to the docs? I don't see anything about it.
  9. Chris Barber 2016-03-01

    No clue. [~bimmel]?
  10. (deactived) Brian Immel 2016-03-01

    [~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.
  11. Chris Barber 2016-03-01

    [~bimmel] No clue, but probably not. :)
  12. Rick Blalock 2016-03-01

    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.
  13. Chris Barber 2016-03-01

    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:
        <?xml version="1.0" encoding="UTF-8"?>
        <ti:app xmlns:ti="http://ti.appcelerator.org">
            <!-- snip -->
            <ios>
                <team-id>foo</team-id>
                <capabilities>
                    <app-groups>
                        <group>group.com.appc.foo</group>
                        <group>group.com.appc.bar</group>
                    </app-groups>
                </capabilities>
            </ios>
        </ti:app>
        
  14. Rick Blalock 2016-03-01

    The Tiapp.xml is all I was looking for actually.
  15. (deactived) Brian Immel 2016-03-01

    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.
  16. (deactived) Brian Immel 2016-03-01

    Ok, I'll create a TIDOC and link it to this one and put the info Chris mentioned in the aforementioned page.
  17. Lee Morris 2017-03-31

    Closing ticket as fixed.

JSON Source