Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple Bundle ID and/or per target Bundle ID #169

Open
devmauvsantos opened this issue Apr 12, 2022 · 3 comments
Open

Allow multiple Bundle ID and/or per target Bundle ID #169

devmauvsantos opened this issue Apr 12, 2022 · 3 comments
Assignees
Labels
Milestone

Comments

@devmauvsantos
Copy link

devmauvsantos commented Apr 12, 2022

Background

Currently, it is mandatory to have a bundle_id on our target list and it needs to be a String, so for example:

variants.yml:
bundle_id: 'com.bundle.id1'

Variants will populate the file fastlane/Matchfile with:
app_identifier("com.bundle.id2")

But as listed here: https://docs.fastlane.tools/actions/match/#handle-multiple-targets
Fastlane already supports multiple targets/bundle IDs

Solution

Two possible solutions would be to allow the user to set a list of bundle ids or multiple targets w/ bundle id.

Example 1:

    xcodeproj: YourXcodeProj.xcodeproj
    targets:
      YourApp:
        name: Your App
        bundle_id: 
           - com.bundle.id1
           - com.bundle.id2
           - com.bundle.id3
        test_target: YourAppTests
        app_icon: AppIcon
        source:
          path: Sources
          info: Sources/Info.plist
          config: Sources

Example 2:

    xcodeproj: YourXcodeProj.xcodeproj
    targets:
      - YourApp:
           name: Your App
           bundle_id: com.bundle.id1
           test_target: YourAppTests
           app_icon: AppIcon
           source:
             path: Sources
             info: Sources/Info.plist
             config: Sources
      - YourAppTarget2:
           name: Your App
           bundle_id: com.bundle.id2
           test_target: YourAppTests
           app_icon: AppIcon
           source:
             path: Sources
             info: Sources/Info.plist
             config: Sources

Expecting the result to be:
fastlane/Matchfile
app_identifier(["com.bundle.id1", "com.bundle.id2", "com.bundle.id3"])

@devmauvsantos devmauvsantos added the enhancement New feature or request label Apr 12, 2022
@arthurpalves
Copy link
Member

Right now each variant has a bundle ID, either specified directly or using the default bundle ID + ID suffixes:

default: com.bundle.id // taken from app.bundle_id
variant1: com.bundle.id.aVariantsSuffix // app.bundle_id + id_suffix
variant2: com.variant.custom // completely overriding default

When switching to a variant, the bundle ID of that specific variant is configured in the project and also specified in fastlane/Matchfile.

With this in mind, what is the benefit of having multiple ids in fastlane/Matchfile?

@devmauvsantos
Copy link
Author

@arthurpalves to me no value right now as I am not using variants sadly, but our use case used to be we had a project that were 5 different apps, with 4 different environments.

So we used to have:

  • Bank 1 - Dev

  • Bank 1 - Dev 2

  • Bank 1 - Stg

  • Bank 1 - Prod

  • Bank 2 - Dev

  • Bank 2 - Dev 2

  • Bank 2 - Stg

  • Bank 2 - Prod

...

And with that we had a difficult time with so many variants.
Apart from that the biggest issue we had was that, for Fastlane we needed the Matchfile to have:

app_identifier(["com.backbase.bank1", "com.backbase.bank2", "com.backbase.bank3"])

So we could run our pipelines once and get the certificate for all of them easily.

@arthurpalves
Copy link
Member

@devmauvsantos I see. We have similar requirements internally. @noursandidb is working on solving this 👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants