Can I change the app name just for the iOS build?

I built an Android app and successfully submitted it to the Google Play store. Now, I’d like to build an iOS app and submit it to the Apple App Store. I successfully built it with expo build:ios but when I tried to submit it with eas submit --platform, I go the following error:

✖ Failed to create App Store app Fahrenheit
    UnexpectedAppleResponse: App name "Fahrenheit" has already been used on a different account. If you have 
    trademark rights to this name and would like it released for your use, submit a claim to Apple.
    Please visit https://appstoreconnect.apple.com and resolve any warnings, then try again.
    Code: APP_CREATE_NAME_UNAVAILABLE

I’m assuming that I should change the name value in the app.json file but I don’t want to change the name of the Android app. So, I have a couple of questions:

  • Is there a way to change the name just for the iOS build?
  • Is there a way to check what names are available in the App Store without having to submit every time to find out?
  1. interestingly there isn’t a one-liner to do this with the classic build service (expo build). instead, you can use app.config.js for your config and when you build for ios pass in some value like PLATFORM=ios expo build:ios and then in app.config.js set name to name: process.env.PLATFORM === 'ios' ? 'Fahrenheit But Does Not Clash' : 'Fahrenheit' or something like that.
  2. you can do this in app store connect. find the entry for your app or create one if it doesn’t exist, then go to rename it and you will be told whether you can do it or not
2 Likes

This is helpful, @notbrent. Thanks.

I added an app.config.js file with:

export default {
  name: process.env.PLATFORM === 'ios' ? 'Fahrenheit Sous Vide' : 'Fahrenheit'
};

That said, when I PLATFORM=ios expo build:ios, I get the following error:

Cannot automatically write to dynamic config at: app.config.js
Please add the following to your Expo config

{
  "ios": {
    "bundleIdentifier": "com.draftbit.fahrenheit"
  }
}

Any thoughts?

I re-read the Expo documentation. It looks like the following syntax is the proper way to do it. My bad.

export default ({ config }) => {
  // console.log(config.name); // prints 'My App'
  return {
    ...config,
    name: process.env.PLATFORM === 'ios' ? 'Fahrenheit Sous Vide' : 'Fahrenheit'
  };
};

Still not working.

I even console.log to make sure it was using the right name:

const iosName = process.env.PLATFORM === 'ios' ? 'Fahrenheit Sous Vide' : 'Fahrenheit';

export default ({ config }) => {
  console.log(config.name, iosName);
  return {
    ...config,
    name: iosName
  };
};

It is. But, when I run eas submit --platform ios, I’m still getting:

✖ Failed to create App Store app Fahrenheit
    UnexpectedAppleResponse: App name "Fahrenheit" has already been used on a different account. If you have trademark 
    rights to this name and would like it released for your use, submit a claim to Apple.
    Please visit https://appstoreconnect.apple.com and resolve any warnings, then try again.
    Code: APP_CREATE_NAME_UNAVAILABLE

:thinking:

did you run PLATFORM=ios expo build:ios? you need to set the env var. you can verify that it is set correctly by running PLATFORM=ios expo config --type public, and downloading your ipa, extracting it, and checking Info.plist

I did. And when I check with the config CLI, everything looks fine. I even checked the Info.plist and can’t find any instance of the string “Fahrenheit” (case-sensitive, without the “Sous Vide” part) in it.

Could it be that something got saved on either the Expo or the Apple side when I initially try with the already-taken name? And now it’s stuck?

i believe you may need to do PLATFORM=ios eas submit in this case, the first time you submit, because we create the app record based on the name in your app config at this point

Ah, okay. Thanks a lot.

For what it’s worth, I ended up created an app manually in https://appstoreconnect.apple.com and it seems to have unblocked a few things. I just hope I didn’t make it worse by having two references who don’t understand each other now. I re-ran eas submit --platform ios now and it went further:

Your binary has been successfully uploaded to App Store Connect!

:crossed_fingers:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.