2

In my Xcode project, I set up two schemes: Dev and Release; each corresponds to the configuration of the same name.

The problem is, when I activate the Release scheme, the project still uses the Dev configuration: in project details, I see product name and bundle identifier that belong to Dev.

Here’s scheme settings for Release. As you can see, the Release configuration is selected for all modes.

The Release configuration is selected for all modes

And here’s what I see in the Identity pane with the Release scheme activated:

The Dev configuration is still selected

Is it an Xcode bug or me doing something wrong? How can I fix this?

Yakov Manshin
  • 664
  • 9
  • 24
  • M - Have you found any solution for it? I am facing problem while enabling/disabling capabilities as per different build configurations. – Gaurav Borole Apr 29 '19 at 15:27

1 Answers1

0

If you have configured your project properly with which configuration to use for a scheme, then you can check by installing app on simulator side by side for every schemes.

Refer below post for configuration: https://medium.com/slalom-engineering/ios-managing-multiple-environments-with-a-single-target-94cf823a6447 https://medium.freecodecamp.org/managing-different-environments-and-configurations-for-ios-projects-7970327dd9c9

  • Yes, I am able to install two apps side by side both in simulator and on a physical device. However, the project area still displays Dev configuration details, and when I change project settings (enable data protection, for example), Xcode creates a new app ID on the developer portal, whose bundle identifier matches the Dev configuration, instead of adding the entitlement to the existing app ID. – Yakov Manshin Jan 17 '19 at 13:01
  • Check your Product bundle identifier inside build settings is set from config file. – Yogesh Pareek Jan 17 '19 at 13:42
  • I checked it already: the bundle ID is different for Dev and Release, just as I intended. – Yakov Manshin Jan 17 '19 at 13:44
  • I tried enabling data protection on my app and it adds to dev & prod configuration on portal together. So can you share some more details how have you configured your project. – Yogesh Pareek Jan 17 '19 at 13:53
  • I have two configurations in my project: Release and Dev. For Dev, I added “Dev” to product name and `.dev` to bundle identifier. I created two schemes, one for each configuration. When I have the Release scheme activated, project summary and build settings still display details for Dev (product name ending with “Dev” and bundle ID, with `.dev`). And when I try to enable data protection (the Release scheme is still active), a separate app appears on the developer portal, with its ID ending with `.dev`, and the created entitlements file has “Dev” in its name. – Yakov Manshin Jan 18 '19 at 07:39