From 9943dce82d35c44ff5a5d2d1e19731a87bcf3f75 Mon Sep 17 00:00:00 2001 From: Millian Lamiaux Date: Thu, 23 Apr 2026 22:34:54 +0200 Subject: [PATCH] fix: add HealthKit entitlement and regenerate Xcode project to resolve NSInvalidArgumentException The iOS app target was missing the com.apple.developer.healthkit entitlement and the Xcode project was out of sync with project.yml, causing a crash when HealthKitService requested write authorization for active energy, workouts, and heart rate types. --- .../TabataGo.xcodeproj/project.pbxproj | 5 +- .../xcshareddata/xcschemes/TabataGo.xcscheme | 79 +++++++++++++++++++ .../xcschemes/TabataGoTests.xcscheme | 55 +++++++++++++ .../xcschemes/xcschememanagement.plist | 37 ++++++++- .../TabataGo/Resources/TabataGo.entitlements | 4 +- 5 files changed, 173 insertions(+), 7 deletions(-) create mode 100644 tabatago-swift/TabataGo.xcodeproj/xcshareddata/xcschemes/TabataGo.xcscheme create mode 100644 tabatago-swift/TabataGo.xcodeproj/xcshareddata/xcschemes/TabataGoTests.xcscheme diff --git a/tabatago-swift/TabataGo.xcodeproj/project.pbxproj b/tabatago-swift/TabataGo.xcodeproj/project.pbxproj index 7001977..5e921c2 100644 --- a/tabatago-swift/TabataGo.xcodeproj/project.pbxproj +++ b/tabatago-swift/TabataGo.xcodeproj/project.pbxproj @@ -189,7 +189,7 @@ D593D23B6A2F633DFA166D91 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; D66750D77B59FCF4F321B36E /* GlobalStatsCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlobalStatsCard.swift; sourceTree = ""; }; D8425C668A3901B0F12DBFCD /* WatchConnectivityTypes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = WatchConnectivityTypes.swift; path = ../../TabataGo/Services/WatchConnectivityTypes.swift; sourceTree = ""; }; - D8A69F6B8DC5329436762B50 /* TabataGo.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = TabataGo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + D8A69F6B8DC5329436762B50 /* TabataGo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TabataGo.app; sourceTree = BUILT_PRODUCTS_DIR; }; D983B6DEDE62A8F0E9E09E66 /* TabataGoWatch.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = TabataGoWatch.entitlements; sourceTree = ""; }; DA21206AD91A5F95926EEA05 /* PaywallView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaywallView.swift; sourceTree = ""; }; DBC464C4D17B88E57FB5477C /* WatchPlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WatchPlayerView.swift; sourceTree = ""; }; @@ -224,7 +224,6 @@ 25FD149C9626FEC155E8C72E /* PhoneConnectivityManager.swift */, A84A0F7F17713D5D0A679122 /* PurchaseService.swift */, 4EDF0ED76A8476BF1F80EF8C /* SupabaseService.swift */, - D8425C668A3901B0F12DBFCD /* WatchConnectivityTypes.swift */, ); path = Services; sourceTree = ""; @@ -880,6 +879,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = TabataGo/Resources/TabataGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; + DEVELOPMENT_TEAM = 2MJF39L8VY; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = TabataGo/Resources/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 26.0; @@ -982,6 +982,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = TabataGo/Resources/TabataGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; + DEVELOPMENT_TEAM = 2MJF39L8VY; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = TabataGo/Resources/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 26.0; diff --git a/tabatago-swift/TabataGo.xcodeproj/xcshareddata/xcschemes/TabataGo.xcscheme b/tabatago-swift/TabataGo.xcodeproj/xcshareddata/xcschemes/TabataGo.xcscheme new file mode 100644 index 0000000..980436d --- /dev/null +++ b/tabatago-swift/TabataGo.xcodeproj/xcshareddata/xcschemes/TabataGo.xcscheme @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tabatago-swift/TabataGo.xcodeproj/xcshareddata/xcschemes/TabataGoTests.xcscheme b/tabatago-swift/TabataGo.xcodeproj/xcshareddata/xcschemes/TabataGoTests.xcscheme new file mode 100644 index 0000000..f8c1078 --- /dev/null +++ b/tabatago-swift/TabataGo.xcodeproj/xcshareddata/xcschemes/TabataGoTests.xcscheme @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tabatago-swift/TabataGo.xcodeproj/xcuserdata/20015659.xcuserdatad/xcschemes/xcschememanagement.plist b/tabatago-swift/TabataGo.xcodeproj/xcuserdata/20015659.xcuserdatad/xcschemes/xcschememanagement.plist index 2d748fa..9b8a418 100644 --- a/tabatago-swift/TabataGo.xcodeproj/xcuserdata/20015659.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/tabatago-swift/TabataGo.xcodeproj/xcuserdata/20015659.xcuserdatad/xcschemes/xcschememanagement.plist @@ -5,6 +5,16 @@ SchemeUserState TabataGo.xcscheme_^#shared#^_ + + orderHint + 4 + + TabataGoTests.xcscheme_^#shared#^_ + + orderHint + 3 + + TabataGoUITests.xcscheme_^#shared#^_ orderHint 2 @@ -12,12 +22,35 @@ TabataGoWatch.xcscheme_^#shared#^_ orderHint - 3 + 0 TabataGoWatchWidget.xcscheme_^#shared#^_ orderHint - 4 + 1 + + + SuppressBuildableAutocreation + + 3945C3998B4B66F30759718C + + primary + + + 90BAF2DB5D7456CD45975E26 + + primary + + + 92991789C3A5B2A5FACF07A1 + + primary + + + D1E2CCCC7C9BD41029959883 + + primary + diff --git a/tabatago-swift/TabataGo/Resources/TabataGo.entitlements b/tabatago-swift/TabataGo/Resources/TabataGo.entitlements index 09890e8..800b1a1 100644 --- a/tabatago-swift/TabataGo/Resources/TabataGo.entitlements +++ b/tabatago-swift/TabataGo/Resources/TabataGo.entitlements @@ -9,8 +9,6 @@ health-records com.apple.security.application-groups - - group.com.tabatago.app - +