Git Product home page Git Product logo

Comments (18)

lisbakke avatar lisbakke commented on March 29, 2024 6

For anyone looking to use fastlane with multiple apps in one xcode project:

  1. make separate targets per app

  2. Make separate directories for metadata & screenshots. If you already have the apps in the appstore, run these

deliver download_metadata --metadata_path fastlane/metadata-app1 --app_identifier com.yourcompany.App1

and

deliver download_screenshots --screenshots_path fastlane/screenshots-app1 --app_identifier com.yourcompany.App1

  1. Setup your Fastfile for multiple targets / dirs:
lane :app1_appstore do
  match(type: "appstore",
  app_identifier: "com.yourcompany.App1",
  git_url: "https://github.com/username/repos")

  gym(scheme: "App 1 Scheme")
  deliver(metadata_path: "fastlane/metadata-app1",
   screenshots_path: "fastlane/screenshots-app1",
   app_identifier: "com.yourcompany.App1")
end

lane :app2_appstore do
  match(type: "appstore",
  app_identifier: "com.yourcompany.App2",
  git_url: "https://github.com/username/repos")

  gym(scheme: "App 2 Scheme")
  deliver(metadata_path: "fastlane/metadata-app2",
   screenshots_path: "fastlane/screenshots-app2",
   app_identifier: "com.yourcompany.App2")
end

from fastlane.

nicolaslauquin avatar nicolaslauquin commented on March 29, 2024 1

There are many industrial&service scenarios when we have to create multiple target. I would prefer handle simple project but the reality is that we need to use this kind of solution and it si much more efficient to use target in one project and be able to run into the simulator the wanted project by switching scheme than having to close and find&open the corresponding Xcode proj. Also, imagine you have to adapte a class or a xib by target, in one Xcode project it is much more easy to navigate, update and refactor.

Anyway, I don't want to convince you, I just I think there is a need for that kind of support.

from fastlane.

drosenstark avatar drosenstark commented on March 29, 2024 1

Thanks to this plug you can now update the plists directly for version numbers and build: https://github.com/SiarheiFedartsou/fastlane-plugin-versioning

I'm using it like this (inside a lane):

      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'Lite'
      )

and I have one of those per lane (I'm just learning this stuff... I imagine I could DRY it out somehow?)

Big shout out to @SiarheiFedartsou for providing this necessary plug. Cool stuff, thank you!

from fastlane.

KrauseFx avatar KrauseFx commented on March 29, 2024

Honestly I don't think it's correct to abuse Xcode targets to be different Apps, which is why I didn't have this in mind when creating fastlane and its tools. Why don't you use different Xcode projects with a shared code base?

Currently the only good solution is to write some Ruby code in your Deliverfile, Fastfile and Appfile to work with all your apps.

from fastlane.

frranck avatar frranck commented on March 29, 2024

Hi, i'm in the same situation; 1 project with (a lot) of multiple targets. That sounds more easy to maintain to me. (?)

from fastlane.

KrauseFx avatar KrauseFx commented on March 29, 2024

Okay. What kind of solution would you suggest? How would your perfect 'interface' look like for fastlane and its tools?

from fastlane.

nicolaslauquin avatar nicolaslauquin commented on March 29, 2024

My vision would be (user point of view):

  • centralize all the configuration into one unique file "App" (so it would take care of the redondant information I mentioned before).
  • keep a default usage configuration so it still work the same but allow to create some specific configuration "AppXXX" (having an extension would be even better to associate it to its favorite edition tool with associate color syntax)
  • then call the action just by be providing the config to load, like heroku command line for ex: fastline deploy --app AppXXX

from fastlane.

KrauseFx avatar KrauseFx commented on March 29, 2024

To your points

  1. If you init your project, the app_identifier should only be stored in the Appfile. Older versions of deliver also stored it in the Deliverfile, not any more.
  2. Syntax highlighting can easily be enabled (at least on Sublime Text), since the file name is the extension, if there is no real extension
  3. I like that, looks good. This reminds me of this issue: fastlane-old/credentials_manager#2

from fastlane.

nicolaslauquin avatar nicolaslauquin commented on March 29, 2024
  1. I just did a test from scratch and confirm the issue. By doing a fastlane initI got the app_identifier & apple_id stored in Deliverfile and Appfile. I also checked that I'm up to date with fastlane & deliver. If you do not reproduce maybe we can open a new thread for that or I can send you my log by mail.
  2. Ok for one but for multiple config app it wont anymore.
  3. cool :)

from fastlane.

KrauseFx avatar KrauseFx commented on March 29, 2024
  1. Oh, there must have been an error when merging, it's not there at https://github.com/KrauseFx/deliver/blob/master/lib/assets/DeliverfileExample, but still is at https://github.com/KrauseFx/deliver/blob/master/lib/assets/DeliverfileDefault, I'll push a fix
  2. True, I just followed the convention for Rakefile, Gemfile, Podfile, Makefile, which all don't have an extension

from fastlane.

mhilscher avatar mhilscher commented on March 29, 2024

👍

from fastlane.

nicolaslauquin avatar nicolaslauquin commented on March 29, 2024

Is this feature available ? Just tested with fastlane 0.7 the default ".env" file is well loaded but using a specific config file ".env.production" is not working:
fastlane inhouse --env production

/Library/Ruby/Gems/2.0.0/gems/fastlane-0.7.0/lib/fastlane/lane_manager.rb:38:in `cruise_lanes': undefined method `overload' for Dotenv:Module (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.7.0/bin/fastlane:32:in `block (2 levels) in run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.0/lib/commander/command.rb:179:in `call'

The command is working well with the default config file:
fastlane inhouse

INFO [2015-04-14 17:50:39.74]: -------------------------------------------------
INFO [2015-04-14 17:50:39.74]: --- Step: Verifying required fastlane version ---
INFO [2015-04-14 17:50:39.74]: -------------------------------------------------
INFO [2015-04-14 17:50:39.74]: fastlane version valid
INFO [2015-04-14 17:50:39.74]: Driving the lane 'inhouse'
ENV=ENV DEFAULT
INFO [2015-04-14 17:50:39.74]: fastlane.tools finished successfully 🎉

Files are present:

ls -al fastlane/.env*
fastlane/.env
fastlane/.env.development
fastlane/.env.production

Did I missed something? I followed the doc available here : https://github.com/KrauseFx/fastlane/blob/master/docs/Advanced.md

from fastlane.

KrauseFx avatar KrauseFx commented on March 29, 2024

@joshdholtz did the .env integration, maybe he can help? 😃

from fastlane.

thisiscrazy4 avatar thisiscrazy4 commented on March 29, 2024

@KrauseFx So is it possible to have multiple sets of metadata and screenshots? 1 for each target?

from fastlane.

agassiyzh avatar agassiyzh commented on March 29, 2024

Thank you for the great job. But I need this feature! I have 63 targets^_^

from fastlane.

KrauseFx avatar KrauseFx commented on March 29, 2024

@agassiyzh It is possible, have you tried using the env plugin? Do you need help on this? Do you have some Ruby experience?

Maybe @joshdholtz can add a comment on this.

from fastlane.

agassiyzh avatar agassiyzh commented on March 29, 2024

@KrauseFx Thx, I will try this plugin.

from fastlane.

KrauseFx avatar KrauseFx commented on March 29, 2024

For people coming from Google, check out the Guide to use fastlane for apps with multiple targets.

from fastlane.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.