1. 程式人生 > >iOS-ERROR ITMS-90046: "Invalid Code Signing Entitlements.

iOS-ERROR ITMS-90046: "Invalid Code Signing Entitlements.

ERROR ITMS-90046: “Invalid Code Signing Entitlements. Your application bundle’s signature contains code signing entitlements that are not supported on iOS. Specifically, value ‘*’ for key ‘com.apple.developer.associated-domains’ in ‘Payload/美妝嘉人.app/美妝嘉人’ is not supported.”

打包上線遇到了這個問題,查了好多資料(資料都不全),最終自己搞定。

解決方法:

1,檢視自己工程中的所有.entitlements檔案中是否有

com.apple.security.application-groups
這個值鍵,對應一個數組,裡邊是一個組的bundle id
如圖:entitlements
plist

2,去開發者帳號中檢查自己的AppId,檢視是否選擇了iCloud和Associated Domains 這兩個功能,而自己的工程壓根就沒有用到它們的地方,那就關閉了置為Disabled。重新Edit一下配置檔案(Provisioning Profiles)

appid

3,檢查工程檔案中,TARGETS 下的各個擴充套件中的Capabilities 是否和 AppId中的配置一致,講用不到的如iCloud和Associated Domains置為off

Capabilities

4,再次去開發這賬號確認當前的配置檔案(Provisioning Profiles)都是Active狀態,重新打包上線,問題解決