Open iOSNinja opened 1 year ago
Hello, I have some customer apps that were created a few (2-3) years ago with "game-center" not added both in Xcode capabilities and also in provisioning profile. All app stores builds got approved till now until recently their certs/profiles got expired and i had used fastlane match command to regenerate them(this i did it in last week or so). The new provisioning profiles i see got included with game-center capability ON automatically, even though i dont see it in xcode->capabilities section or in the entitlements file. I do not pass game-center on in match command. Below is my match command:
match(
git_private_key: sshKey,
type: 'appstore',
app_identifier: bundleId,
team_id: teamId,
git_branch: teamId,
readonly: false,
keychain_name: keychainName,
keychain_password: "temppassword",
profile_name: bundleId
)
Is fastlane match still enabling game-center capability ON automatically in the provisioning profile?
I'm not able to submit my new app builds for review. It's throwing below errors:
And also, any idea if Apple is requiring it mandatory have game-center enabled for all apps(non-gaming apps) by default?
Any help is appreciated! @Katsz Thank you.
We are also experiencing this issue. It appears that game center is getting enabled by default.
Here is the error we see when we try to publish the app:
appStoreVersions with id 'XXXXXXX' is not in valid state. - This resource cannot be reviewed, please check associated errors to see why. Your build indicates game center is enabled. - Your build has com.apple.developer.game-center key but appStoreVersion is missing gameCenterConfigurations relationship.
Has it always been enabled, but only now Apple is checking?
I don't believe anything has changed on our end, so I assume it's either an Apple rule or a Fastlane change.
Sup. Soon after #17172 game-center stopped being enabled by default, only in-apps left. While I personally don't have any problems with game-center becoming enabled when matching (it stays checked off as it should be) I would suggest you following:
My team was struggling against the same problem @iOSNinja reported for days, upgrading fastlane to the latest version like @Katsz suggested did the trick.
So, in our case, it was fastlane's fault.
Fastlane 2.214.0 does not fix this. Looking at the code, it doesn't look like "off"
is actually an allowed value for game_center in enable_services
for produce. ~The only thing I can think to do without a patch is to manually use the command line fastlane produce disable_services
~
Even disable_services is broken because it doesn't accept "off" as an option. What does work is using Spaceship directly:
bundle_id = Spaceship::ConnectAPI::BundleId.find(app_identifier)
bundle_id.update_capability("GAME_CENTER", enabled: false, settings: [])
Im also facing this issue and with more than 300 apps it would be nice to be able to use fastlane to turn it off :(
Fastlane 2.214.0 does not fix this. Looking at the code, it doesn't look like
"off"
is actually an allowed value for game_center inenable_services
for produce. ~The only thing I can think to do without a patch is to manually use the command linefastlane produce disable_services
~Even disable_services is broken because it doesn't accept "off" as an option. What does work is using Spaceship directly:
bundle_id = Spaceship::ConnectAPI::BundleId.find(app_identifier) bundle_id.update_capability("GAME_CENTER", enabled: false, settings: [])
HI @owurman can you by any chance elaborate how you got this to work, i have tried everything but keep getting: "\e[31m[!] undefined method `update_capability' for nil:NilClass" no matter what i do. Im not very well familier with Spaceship, but i really need to get this working :)
Thanks
app_identifier should be your full qualified app identifier (com.assembleMHN.appname) I can't really help you debug your Fastlane setup. See what you're getting for bundle_id? If it's nil, you're doing something wrong.
@owurman app identifier is complete, but thank you anyway appreciate the response.
Fastlane 2.214.0 does not fix this. Looking at the code, it doesn't look like
"off"
is actually an allowed value for game_center inenable_services
for produce. ~The only thing I can think to do without a patch is to manually use the command linefastlane produce disable_services
~Even disable_services is broken because it doesn't accept "off" as an option. What does work is using Spaceship directly:
bundle_id = Spaceship::ConnectAPI::BundleId.find(app_identifier) bundle_id.update_capability("GAME_CENTER", enabled: false, settings: [])
HI @owurman where did you place this code in FastFile as I keep getting this error - cannot find get_bundle_id method nil Class
I have placed the code in FastFile under before_all lane
before_all do
unless ENV['CUSTOM_APPLE_ID'].to_s.strip.empty?
bundle_id = Spaceship::ConnectAPI::BundleId.find(ENV['CUSTOM_APPLE_ID'])
bundle_id.update_capability("GAME_CENTER", enabled: false, settings: [])
end
end
Perhaps y'all need to first do:
apple_id = CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
Spaceship::ConnectAPI.login(apple_id)
In my case I was running this code after produce
which presumably handled that for me.
We had the same issue and only command we could get to work was
desc 'Turn off game center'
lane :turn_off_game_center do |options|
system("fastlane produce disable_services --game-center --username #{options[:apple_id]} --app-identifier #{options[:bundle_id]} --team-nam #{options[:team_name]} --team-id #{options[:team_id]}")
end
But this results in needing certs and provisioning profiles so need to regenerate those after running the above command
Originally posted by @Katsz in https://github.com/fastlane/fastlane/issues/17172#issuecomment-688139814