zdavatz / amiko-osx

AmiKo Desitin for AmiKo OS X
https://apps.apple.com/ch/app/amiko-desitin/id708142753?mt=12
GNU General Public License v3.0
3 stars 2 forks source link

Xcode automatically adds Game Center entitlement since Xcode 14.3.1 release. #276

Closed zdavatz closed 1 year ago

zdavatz commented 1 year ago
  1. If Game Center is enabled in your Identifier of your profile, then Automatic Signing in Xcode will turn it on, even if the entitlement is not set:
  2. Bildschirmfoto 2023-08-21 um 16 11 07
  3. But Xcode just adds it:
  4. Bildschirmfoto 2023-08-21 um 16 12 41
zdavatz commented 1 year ago
  1. Looking here: /Users/zdavatz/Library/Developer/Xcode/DerivedData/AmiKo-cbujqnfbpgswoqbjnncjphmnjpsm/Build/Products/Release/AmiKo Desitin.app/Contents/MacOS
  2. codesign -d -vvvv --entitlements :- AmiKo\ Desitin | grep game
  3. I can see game-center enabled:
    Warning: Specifying ':' in the path is deprecated and will not work in a future release
    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>com.apple.application-identifier</key><string>4B37356EGR.amikoosx</string><key>com.apple.developer.aps-environment</key><string>development</string><key>com.apple.developer.game-center</key><true/><key>com.apple.developer.icloud-container-identifiers</key><array><string>iCloud.com.ywesee.AmikoDesitin</string></array><key>com.apple.developer.icloud-services</key><array><string>CloudDocuments</string><string>CloudKit</string></array><key>com.apple.developer.team-identifier</key><string>4B37356EGR</string><key>com.apple.developer.ubiquity-container-identifiers</key><array><string>iCloud.com.ywesee.AmikoDesitin</string></array><key>com.apple.security.app-sandbox</key><true/><key>com.apple.security.device.usb</key><true/><key>com.apple.security.files.bookmarks.app-scope</key><true/><key>com.apple.security.files.user-selected.read-write</key><true/><key>com.apple.security.get-task-allow</key><true/><key>com.apple.security.network.client</key><true/><key>com.apple.security.personal-information.addressbook</key><true/><key>com.apple.security.print</key><true/><key>com.apple.security.smartcard</key><true/></dict></plist>
  4. So I guess we need to codesign with our own entitlement file: AmiKo Desitin.entitlements
  5. See: https://github.com/zdavatz/amiko-osx/issues/264
zdavatz commented 1 year ago
  1. This should work:
  2. codesign -s - -i amikoosx --entitlements /Users/zdavatz/Documents/xcode/amiko-osx/AmiKo\ Desitin.entitlements -f ./AmiKo\ Desitin
zdavatz commented 1 year ago
  1. Ok somehow Xcode adds the wrong Gaming entitlement here
  2. /private/var/folders/xd/by4rc5b143l8dzmj_y0zq4zh0000gn/T/XcodeDistPipeline.~~~6VOWlu/Root/Applications/AmiKo Desitin.app/Contents/MacOS
  3. So I do:
  4. codesign -s - -i amikoosx --entitlements /Users/zdavatz/Documents/xcode/amiko-osx/AmiKo\ Desitin.entitlements -f ./AmiKo\ Desitin in that dir.
  5. This Dir also contains the Entitlement files if you run Archive from Xcode:
  6. /private/var/folders/xd/by4rc5b143l8dzmj_y0zq4zh0000gn/T/XcodeDistPipeline.~~~df1IdL/
zdavatz commented 1 year ago

This was probably introduced with this Release: https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes

zdavatz commented 1 year ago

Bug Report with Apple filed.

PNG-Bild
zdavatz commented 1 year ago

Ok, GameCenter was enabled here: https://developer.apple.com/account/resources/identifiers/bundleId/edit/A3Z39GMH4H latest-screenshot

zdavatz commented 1 year ago
  1. Bildschirmfoto 2023-08-22 um 15 17 15
  2. But they want Game Center.
zdavatz commented 1 year ago
  1. Ok, the same profile has to be added here as well in Xcode:
  2. Bildschirmfoto 2023-08-22 um 15 28 34