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

Passing arguments to ItunesTransporter.new #149

Closed
bmkiefer opened this Issue Mar 22, 2015 · 13 comments

Comments

Projects
None yet
3 participants
@bmkiefer

bmkiefer commented Mar 22, 2015

In the initialize function for a itunes_transporter.rb you allow for a username and password to be passed. Is there any way to leverage that functionality to pass my username/password combination to the transporter on creation using the exposed ruby classes to allow me to upload to testflight?

@KrauseFx

This comment has been minimized.

Collaborator

KrauseFx commented Mar 22, 2015

You mean something like

Deliver::ItunesTransporter.new('email@email.com', 'my_password')
@bmkiefer

This comment has been minimized.

bmkiefer commented Mar 22, 2015

Thank you for your quick replies. Yes, I see that. How do I pass to the correct class to upload to test flight given those setter methods are private? My current code is as follows. My goal is to move the ipa up to testflight without it needs to prompt me for my user/password combination. No meta data is necessary for my application.

apple_id = "email@email.com"
it_pass =  "my_password"
app_id = "111111111"
ipa_path = "/path/to/production.ipa"
itunes_bundle = "com.test.bundle"

Deliver::ItunesTransporter.hide_transporter_output
strategy = Deliver::IPA_UPLOAD_STRATEGY_JUST_UPLOAD

app = Deliver::App.new(app_identifier: itunes_bundle, apple_id: app_id)
ipa = Deliver::IpaUploader.new(app, '/tmp/', ipa_path, strategy)

ipa.transporter = Deliver::ItunesTransporter.new(apple_id, it_pass)

result = ipa.upload!

It says the transporter function is private. Is there something I am missing to configure this correctly?

@KrauseFx

This comment has been minimized.

Collaborator

KrauseFx commented Mar 22, 2015

Which of these methods is private? hide_transporter_output?

@bmkiefer

This comment has been minimized.

bmkiefer commented Mar 22, 2015

The transporter get function of the AppMetaData class

@bmkiefer

This comment has been minimized.

bmkiefer commented Mar 23, 2015

I guess the better question is, If I have the five inputs given above, how can I deploy my application to test flight using the exposed ruby classes without having to store my password in the keychain? Again, no metadata is necessary. If all that needs happen, is to create a setter function that is public, I am happy to submit a pull request to do so.

@KrauseFx

This comment has been minimized.

Collaborator

KrauseFx commented Mar 24, 2015

So, if there was a way to just skip the saving into the Keychain and provide the password using environment variables, would that be okay?

@bmkiefer

This comment has been minimized.

bmkiefer commented Mar 24, 2015

If you think that would be the best solution to be able upload without the keychain, I am all for it.

@KrauseFx

This comment has been minimized.

Collaborator

KrauseFx commented Mar 24, 2015

I just implemented a flag for this. Download the https://github.com/KrauseFx/CredentialsManager and run sudo bundle install and sudo rake install (since it's not released yet)

Then, set the environment variable using FASTLANE_DONT_STORE_PASSWORD

@bmkiefer

This comment has been minimized.

bmkiefer commented Mar 24, 2015

Awesome I will test this tonight. I will set that environment variable to true and then set the DELIVER_USER and DELIVER_PASSWORD to my itunes credentials. This should work without needed to use the exposed ruby classes, correct?

@KrauseFx

This comment has been minimized.

Collaborator

KrauseFx commented Mar 24, 2015

Yes, exactly. And your password should not be stored in the Keychain afterwards.

@bmkiefer

This comment has been minimized.

bmkiefer commented Mar 25, 2015

Felix, I verified this and it works great. Thank you for doing this for me!

@KrauseFx

This comment has been minimized.

Collaborator

KrauseFx commented Mar 25, 2015

Glad I could help 👍

@fastlanebot

This comment has been minimized.

fastlanebot commented Mar 7, 2016

This issue was migrated to fastlane/fastlane#2361. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo 🚀

@fastlane-old fastlane-old locked and limited conversation to collaborators Mar 11, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.