
Photo by
dyumbo
HealthKit利用時のアップロードエラー
環境
・Xcode 12.3
エラー内容
アプリ更新のためApp Store ConnectにDistribute Appする際に以下のようなエラーが発生した
ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '[ ]' for the key 'com.apple.developer.healthkit.access' in 'Payload/SampleProject.app/SampleProject'."
対応方法
ここを参考にSampleProject.entitlementsファイルから HealthKit Capabilities を削除することでエラーが出なくなりHealthKitにもアクセスできるようになった
補足
TARGETS > Signing & Capabilities からHealthKitを削除するとエラーは出なくなるがHealthKitにアクセスできなくなった
SampleProject.entitlementsからHealthKit Capabilitiesを削除するとSigning & CapabilitiesからHealthKitの表示はなくなる