Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12153

Setting bundle identifier and app display name from build settings

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • xcode-plugin
    • None

      Hi,

      in my environment its needed to build an app with annother bundle identifier for testing and comparing on the same device. It would be very helpfull if your plugin supports this settings.
      And i you support Configurations in a comma separated list it would also be very nice.

      thanks
      andreas

          [JENKINS-12153] Setting bundle identifier and app display name from build settings

          Hi,

          I understand your need and I may be agree to integrate new options to change the bundle identifier and the app display name but the question is how ?
          For versions I'm using agvtool command line utility to do it. But for these information I don't know how I could do it without manually hacking in the descriptor. WDYT ?

          About multiple configuration entries, the xcodebuild command line tool seems to support only one configuration per build. How do you imagine the behavior of the plugin ? It calls several times the xcodebuild command line with all paramaters for each configuration ?

          Arnaud Héritier added a comment - Hi, I understand your need and I may be agree to integrate new options to change the bundle identifier and the app display name but the question is how ? For versions I'm using agvtool command line utility to do it. But for these information I don't know how I could do it without manually hacking in the descriptor. WDYT ? About multiple configuration entries, the xcodebuild command line tool seems to support only one configuration per build. How do you imagine the behavior of the plugin ? It calls several times the xcodebuild command line with all paramaters for each configuration ?

          Hi,

          i have an ant Task for doint that. I use apache commons-configuration for editing the plist via XMLPropertyListConfiguration, then its possible to set values in plist like

          conf.setProperty("CFBundleDisplayName", appName);
          conf.setProperty("CFBundleIdentifier", bundleIdentifier);

          multible configuration is optional, i called xcodebuild per commandline several times, my result is an build with 5 ipa s for every config. But i can also configure 5 build steps.

          thank you
          Andreas

          Andreas Müller added a comment - Hi, i have an ant Task for doint that. I use apache commons-configuration for editing the plist via XMLPropertyListConfiguration, then its possible to set values in plist like conf.setProperty("CFBundleDisplayName", appName); conf.setProperty("CFBundleIdentifier", bundleIdentifier); multible configuration is optional, i called xcodebuild per commandline several times, my result is an build with 5 ipa s for every config. But i can also configure 5 build steps. thank you Andreas

          lacostej added a comment -

          /usr/libexec/PlistBuddy is also an alternative to edit plist files.

          lacostej added a comment - /usr/libexec/PlistBuddy is also an alternative to edit plist files.

          If you want to use different bundle IDs or app display names in different circumstances, update Info.plist directly. For example, create a user-defined "APP_BUNDLE_ID" build setting, and then set your target's CFBundleIdentifier to ${APP_BUNDLE_ID}, which you can then choose to define differently in your Debug vs Release build configs. You can create as many build configurations as you need to.

          Once you've made CFBundleIdentifier or CFBundleDisplayName dependent on your build configuration, you could even override them at runtime as arguments to xcodebuild, but to do so would be foolish. It's pathological to put your build server in charge of determining essential metadata like your bundle ID or displayed bundle name, because it means the project can't build correctly anywhere else.

          In my opinion, this feature request should be closed without action.

          Nathaniel Irons added a comment - If you want to use different bundle IDs or app display names in different circumstances, update Info.plist directly. For example, create a user-defined "APP_BUNDLE_ID" build setting, and then set your target's CFBundleIdentifier to ${APP_BUNDLE_ID}, which you can then choose to define differently in your Debug vs Release build configs. You can create as many build configurations as you need to. Once you've made CFBundleIdentifier or CFBundleDisplayName dependent on your build configuration, you could even override them at runtime as arguments to xcodebuild, but to do so would be foolish. It's pathological to put your build server in charge of determining essential metadata like your bundle ID or displayed bundle name, because it means the project can't build correctly anywhere else. In my opinion, this feature request should be closed without action.

            Unassigned Unassigned
            inidona Andreas Müller
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: