Giter Club home page Giter Club logo

Comments (14)

champo avatar champo commented on April 25, 2024 1

Awesome! That's the most ruby thing I've seen.

from fastlane.

KrauseFx avatar KrauseFx commented on April 25, 2024

Right now, the only solution is to remove the app_identifier information from your Appfile and launch the tool by passing your app identifier using the environment or flag.

There a lot of room for improvement, thanks for letting me know 👍

from fastlane.

champo avatar champo commented on April 25, 2024

Thing is, the sigh action uses the AppfileConfig.try_fetch_value directly (see here). Just verified what happens and I'm gettting a nice RuntimeError:

FATAL [2015-02-12 16:08:22.76]: No app_identifier definied in `./fastlane/Appfile`
FATAL [2015-02-12 16:08:22.76]: fastlane finished with errors
/Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/actions/sigh.rb:19:in `run': No app_identifier definied in `./fastlane/Appfile` (RuntimeError)
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/fast_file.rb:81:in `block (2 levels) in method_missing'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/actions/actions_helper.rb:29:in `execute_action'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/fast_file.rb:80:in `block in method_missing'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/fast_file.rb:79:in `chdir'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/fast_file.rb:79:in `method_missing'
    from (eval):8:in `block (2 levels) in parse'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/runner.rb:18:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/runner.rb:18:in `block in execute'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/runner.rb:12:in `chdir'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/runner.rb:12:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/lane_manager.rb:15:in `block in cruise_lanes'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/lane_manager.rb:14:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/lib/fastlane/lane_manager.rb:14:in `cruise_lanes'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/bin/fastlane:31:in `block (2 levels) in run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/command.rb:155:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/runner.rb:421:in `run_active_command'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/runner.rb:81:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.2.1/lib/commander/delegates.rb:8:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/bin/fastlane:59:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane-0.1.7/bin/fastlane:63:in `<top (required)>'
    from /usr/bin/fastlane:23:in `load'
    from /usr/bin/fastlane:23:in `<main>'

from fastlane.

KrauseFx avatar KrauseFx commented on April 25, 2024

Easy solution for now: Change your Appfile to

app_identifier ENV["APP_IDENTIFIER"]

and set the correct app identifier in each lane:

ENV["APP_IDENTIFIER"] = "com.krausefx.beta"

from fastlane.

gabu avatar gabu commented on April 25, 2024

👍

from fastlane.

joshdholtz avatar joshdholtz commented on April 25, 2024

@champo Did that solution work for you? Just curious cause doing some issues cleaning 😁

from fastlane.

KrauseFx avatar KrauseFx commented on April 25, 2024

Yes, this worked, let's leave it like this for now 👍

from fastlane.

gwennguihal avatar gwennguihal commented on April 25, 2024

I'm used the version 1.0.0 and I can't switch the bundle ID and the team using for_lane in the AppFile.
In the generated ipa, in the info.plist, the bundle id is still that of the beta lane.

for_lane "ios beta" do
    app_identifier "com.beta.FastLanePOC"
    apple_id "[email protected]"
    team_id "1TEAM1"
end

for_lane "ios deploy" do
    app_identifier "com.deploy.FastLanePOC"
    apple_id "[email protected]"
    team_id "2TEAM2"
end

from fastlane.

KrauseFx avatar KrauseFx commented on April 25, 2024

@myrddinus sorry that was my mistake. Depending on your Fastfile, you'll probably have to use for_lane "beta" with the ios. If that doesn't work, please share your Fastfile

from fastlane.

gwennguihal avatar gwennguihal commented on April 25, 2024

@KrauseFx My Fastfile below :

# Customise this file, documentation can be found here:
# https://github.com/KrauseFx/fastlane/tree/master/docs

# If you want to automatically update fastlane if a new version is available:
update_fastlane

# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "1.0.0"

default_platform :ios

platform :ios do

  before_all do
    ENV["DELIVER_USER"] = "[email protected]"
    ENV["DELIVER_PASSWORD"] = "MyPassword"

    cocoapods

  xctool :test, [
      "--workspace", "'FastLanePOC.xcworkspace'",
      "--scheme", "'FastLanePOC'",
      "--configuration", "Debug",
      "--sdk", "iphonesimulator",
      "--arch", "i386"
    ].join(" ")

    increment_build_number
  end

  desc "Runs all the tests"
  lane :test do
    # snapshot
  end

  desc "Submit a new Beta Build to Apple TestFlight"
  desc "This will also make sure the profile is up to date"
  lane :beta do
    sigh(
      output_path: "build",
      filename: "inhouse.mobileprovision"
      )
    ipa(
      workspace: "FastLanePOC.xcworkspace",
      configuration: "Release",
      scheme: "FastLanePOC",
      embed: "inhouse.mobileprovision", 
      clean: true, 
      destination: "build",
      ipa: "my-app.ipa",
      xcargs: "DEBUG=0",
      archive: nil
    )
  end

  desc "Deploy a new version to the App Store"
  desc "** Full Markdown** Support: `code`"
  lane :deploy do
    # Helper.log.info "Bundle id '#{app_identifier}'".blue
    sigh(
      output_path: "build",
      filename: "distrib.mobileprovision"
      )
    ipa(
      workspace: "FastLanePOC.xcworkspace",
      configuration: "Release",
      scheme: "FastLanePOC",
      embed: "distrib.mobileprovision", 
      clean: true, 
      destination: "build",
      ipa: "my-app-distrib.ipa",
      xcargs: "DEBUG=0",
      archive: true
    )
  end

  after_all do |lane|
    # This block is called, only if the executed lane was successful

    # slack({
    #   message: "Successfully deployed new App Update."
    # })
  end


  error do |lane, exception|
    # slack({
    #   message: exception.message,
    #   success: false
    # })
  end

end


# More information about multiple platforms in fastlane: 
# https://github.com/KrauseFx/fastlane/blob/master/docs/Platforms.md

from fastlane.

KrauseFx avatar KrauseFx commented on April 25, 2024

@myrddinus I'm not sure, but I think you misunderstood what the app_identifier option in the Appfile is about (I think I could improve documentation on that). The app_identifier doesn't change your app's app identifier, but is used for deliver, snapshot and so on.

from fastlane.

gwennguihal avatar gwennguihal commented on April 25, 2024

@KrauseFx Thanks for your response.
I can only do this by resigning the app if I understand.
I believed I could switch the bundle id before launch an ipa action. Resigning may cause some problem with the apple watch.

from fastlane.

gwennguihal avatar gwennguihal commented on April 25, 2024

Using custom xcconfig, I can change the bundle ID, the signing identity and the provisioning profile according to the configuration (debug, release, ...).
Then ipa action is working.

from fastlane.

marcomorain avatar marcomorain commented on April 25, 2024

👍

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.