Coder Social home page Coder Social logo

Support for different Apple Developer and iTunes Connect accounts about fastlane HOT 14 CLOSED

vytis avatar vytis commented on December 11, 2016

It seems that fastlane is having problems when iTC and developer's AppleID accounts are different. That happened in my case because my AppleID is assigned to multiple teams, but iTC doesn't support more that one account per email. fastlane tries to log in my AppleID email to iTC and fails because passwords don't match (even if they did it wouldn't work because that account is for different apps).

I have tried setting SIGH_USERNAME and DELIVER_USER to different emails but it seems that the latter is used all the time if present.

It seems that the problem might be because SIGH_USERNAME environment variable is read only when sigh is launched from command line:

but it falls back to DELIVER_USER from CredentialsManager if the class is instantiated directly:

My ruby knowledge is a bit limited and it might need updating several libs at the same time to make it work...

Just in case, the corresponding lane in Fastlane is (using floatsign to resign the .ipa):

lane :internal do
  sigh :adhoc
  system("ipa build -c \"AdHoc\" -w ../<AppName>.xcworkspace -s '<AppName>'")
  system("./ <AppName>.ipa \"iPhone Distribution: <team>" -b '' -p #{Actions.lane_context[Actions::SharedValues::SIGH_PROFILE_PATH]} <AppName>AdHoc.ipa")
  system("./ <AppName>.ipa \"iPhone Distribution: <team>" -b '' -p #{Actions.lane_context[Actions::SharedValues::SIGH_PROFILE_PATH]} <AppName>AppStore.ipa")
    api_token: '<api_token>',
    ipa: 'fastlane/<AppName>AdHoc.ipa',
    dsym: 'fastlane/<AppName>'
    # notes: ""
  deliver :skip_deploy, :beta

from fastlane.

Comments (14)

KrauseFx avatar KrauseFx commented on January 29, 2015

Thanks for your detailed report and sorry for not coming back earlier.

You can remove the first system('floatsign'), right?

The problem you described is caused because of

      self.username ||= ENV["DELIVER_USER"] || id_to_use || AppfileConfig.try_fetch_value(:apple_id) || load_from_keychain[0]

I'll update it to use the parameter first.

from fastlane.

KrauseFx avatar KrauseFx commented on January 29, 2015

Here we go: fastlane-old/[email protected]9d11249

Please download the CredentialsManager as zip and run sudo bundle install and sudo rake install and try again.

from fastlane.

KrauseFx avatar KrauseFx commented on January 29, 2015

Please try the latest version 👍

from fastlane.

vytis avatar vytis commented on January 29, 2015

I've added the first system('floatsign') just in case the .ipa was not made with the most up to date profile. Combined with sigh :skip_install flag this could easily be the case.

As for the issue, it doesn't seem to be fixed yet. It works good when using sigh from command line, but from fastlane it's still the same.

I think it happens because here the user is empty when the lib is called from fastlane:

Password manager is only initialized with value from SIGH_USERNAME when using standalone sigh command, not the lib:

from fastlane.

albertschulz avatar albertschulz commented on February 4, 2015

Having the same problem. Would be glad to have a solution for this 👍

from fastlane.

vytis avatar vytis commented on February 24, 2015

I have found an easy way to reproduce it with this lane (.ipa file is already present in the directory and Deliverfile simply points to that file):

lane :external do
  sigh :skip_install
  deliver :beta

At first sigh asks me for Developer's Portal account, but then fails to login to iTunesConnect because it doesn't ask it again but uses the previous account.

EDIT: Same happens if SIGH_USERNAME and DELIVER_USER are configured with different emails. If I comment out sigh everything completes successfully.

from fastlane.

lmirosevic avatar lmirosevic commented on March 3, 2015

👍 I'm also a member of multiple teams with a single email on the Member Centre on And I use different emails for each of the related iTC accounts on (out of necessity as iTC doesn't support multiple accounts under one email address).

Would be nice if fastlane would support this use case!

from fastlane.

KrauseFx avatar KrauseFx commented on March 3, 2015

@lmirosevic as far as I know, you can always add a ENV["DELIVER_USER"] = "[email protected]" before each of the steps.

from fastlane.

lmirosevic avatar lmirosevic commented on April 22, 2015

This can probably be closed. There is ENV['DELIVER_USER'] and the email property in the Deliverfile that would let you select a (different) iTC account.

from fastlane.

t2 avatar t2 commented on July 19, 2015

This is still an issue. Even when changing the DELIVER_USER and DELIVER_PASSWORD before calling deliver, it still uses the login session from when I call sigh

lane :demo do

    clean: false,
    workspace: ENV['WORKSPACE'],
    configuration: 'AdHoc',
    scheme: ENV['SCHEME']

  ENV['DELIVER_USER']=' email'
  ENV['DELIVER_PASSWORD']=' password' 
    force: false,
    output_path: "./fastlane/profiles",
    adhoc: true

  ENV['DELIVER_USER']='itunes connect email'
  ENV['DELIVER_PASSWORD']='itunes connect password'
  deliver(beta: true)

  slack(message: "Demo app successfully deployed!")

Please advise if I am missing something.

from fastlane.

KrauseFx avatar KrauseFx commented on July 19, 2015

@t2 Have you tried using:

sigh(username: ' email')

from fastlane.

t2 avatar t2 commented on July 19, 2015

@KrauseFx I did:

sigh(username: 'email', password: 'password')
You passed invalid parameters to 'sigh'.

sign(username: 'email')
``send_login_request': #Faraday::Response:0x000001020d9be0 (Spaceship::Client::InvalidUserCredentialsError)`

from fastlane.

KrauseFx avatar KrauseFx commented on December 5, 2015

screenshot 2015-12-05 00 11 00

This works now, add this to your Appfile. Let me know how that works 👍

from fastlane.

muzammil-triffort avatar muzammil-triffort commented on September 12, 2016 1

@KrauseFx it works, thanks!

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.