LoopKit / Loop

An automated insulin delivery app for iOS, built on LoopKit
https://loopdocs.org
Other
1.51k stars 1.3k forks source link

Provisioning profile support for Xcode 16 #2226

Closed bjorkert closed 1 month ago

bjorkert commented 2 months ago

Xcode now stores the provisioning profile in a new location, which renders the hardcoded path in Scripts/capture-build-details.sh ineffective. This PR resolves the issue by reading the provisioning profile at runtime and storing it in a cached constant within the BuildDetails class.

Example of expire date using Xcode 16 and iOS 18. image

marionbarker commented 2 months ago

Status

This code fixes the problem of the expiration date being N/A.

Preparation

Remove *.mobileprovision from folders used by Xcode 15 and Xcode 16 before testing.

rm ~/Library/MobileDevice/Provisioning\ Profiles/*.mobileprovision
rm ~/Library/Developer/Xcode/UserData/Provisioning\ Profiles/*.mobileprovision

Test

  1. Build Loop 3.5.0 with no modifications, the expiration profile is not found
  2. Apply patch from PR 2226
  3. Build Loop 3.5.0 and expiration profile is reported as expected
marionbarker commented 1 month ago

Checking this PR - no testing was done for TestFlight expiration when using GitHub build action. (Apologies) Lesson learned for the future.