Skip to content

Conversation

marionbarker
Copy link
Contributor

@marionbarker marionbarker commented Jun 20, 2025

Purpose

  1. Enable the use of the Add Identifiers action which stopped working following a modification made at Apple in May 2025.
  2. Update the version number for main to 3.6.2

Method

The solution requires using a special version of fastlane 2.228.0 with PR 29596 applied along with a modification to the fastlane/Fastfile file.

This uses a branch at the loopandlearn fork: https://github.com/loopandlearn/fastlane/tree/wip_2.228.0_pr29596

Details of updated files

See also PR #285 for the dev branch Add Identifier fix where this solution was initially implemented for Loop. This same method (regarding changes needed for items 1 and 2 below) also works for LoopFollow, LoopCaregiver, Trio, xDrip4iOS and iAPS.

  1. The Gemfile file is modified to use the SHA of the custom branch mentioned above, running bundle update fastlane and then committing the Gemfile and Gemfile.lock files.
  2. The fastlane/Fastfile was modified according to the suggestion by @dnzxy which adds the "platform" variable to the configure_bundle_id function.
  3. Following initial tests, it was determined that USERNOTIFICATIONS_TIMESENSITIVE is no longer supported, so this was removed from the fastlane/Fastfile capabilities for the Loop Identifier

Test

The detailed testing for this PR is found in the next comment.

@marionbarker marionbarker requested a review from ps2 June 20, 2025 21:03
@marionbarker
Copy link
Contributor Author

Test

Summary
When using fastlane 2.228.0 with the addition of changes from fastlane PR 29596 and the required modifications to Fastfile:

  • Add Identifiers works as expected with one caveat
    • The Time Sensitive Notification capability is not automatically added and must be enabled manually
  • The Build Action works as expected with newly created Identifiers

The GitHub action tests are performed at the GitHub organization name: docs-test.

Confirm Error

Run Add Identifiers using main branch (3.6.1) as the default branch.

with this error:

The provided entity includes an unknown relationship - 'capability' is not a relationship on the resource 'bundleIdCapabilities' - /data/relationships/capability

Confirm Success

Test with Existing Identifiers

The Identifiers required for a successful build already exist for this test.

Run Add Identifiers using hotfix/add_identifiers as the default branch

Test with Missing Identifiers

Initial identifiers list for Loop

loop-4-identifiers

and Loop Watch App

loop-watch-2-identifiers

  1. Delete all except the Loop Identifier, which cannot be deleted.
  2. Run Add Identifiers using hotfix/add_identifiers as the default branch

Build with newly created Identifiers, with Time Sensitive Notifications

  1. Configure the App Groups capability with Loop App Group for the 3 Identifiers that require it.
  2. Delete my Distribution Certificate (this deletes all profiles at developer.apple)
  3. Before Building: check the Loop capabilities:
    • App Groups
    • HealthKit
    • NFC Tag Reading
    • Push Notifications
    • Siri
    • Time Sensitive Notifications << previously enabled, will not be added automatically for new builders
  4. Build

Remove Capabilities from Loop Identifier and run Add Identifier

Remove all capabilities from Loop Identifier and then run Add Identifier again.

  • Successful Add Identifiers
  • Confirm that only 5 of the original 6 capabilities are added back (Time Sensitive Notifications is not enabled)

Build without Time Sensitive Notifications Capability

  1. Delete Certificate (removes all profiles)
  2. Run Build action

I think the relevant error is:

Archiving workspace LoopWorkspace with scheme LoopWorkspace

with more details:

[15:27:31]: Called from Fastfile at line 131
[15:27:31]: ```
[15:27:31]:     129:	    )
[15:27:31]:     130:	
[15:27:31]:  => 131:	    gym(
[15:27:31]:     132:	      export_method: "app-store",
[15:27:31]:     133:	      scheme: "LoopWorkspace",
[15:27:31]: ```
[15:27:31]: Error building the application - see the log above

The other thing mentors can look for is the Loop profile on the https://developer.apple.com/account/resources/profiles/list page shows as Invalid.

Restore Time Sensitive Notifications Capability

  1. Enable the Time Sensitive Notifications Capability to the Loop Identifier
  2. Build

Copy link
Contributor

@ps2 ps2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants