Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rogerluan
Copy link
Member

@rogerluan rogerluan commented May 25, 2022

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

As I was writing code to generate .p12 files, I faced this error:

image

…even though my env was correct:

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE en_US.UTF-8

Description

This PR just copies the same strategy applied here #17446 to fix this very same issue.
After applying the fix, the result was successful:

image

Testing Steps

To test this branch, modify your Gemfile as:

gem 'fastlane', git: 'https://github.com/fastlane/fastlane.git', branch: 'rogerluan-fix-pem-encoding'

And run bundle install to apply the changes.

Then run the following command:

lane :generate_push_certificate do
  username = prompt(text: "Enter your username (e.g. [email protected]): ")
  password = "test"
  get_push_certificate(
    force: true, # create a new profile, even if the old one is still valid
    development: true,
    app_identifier: "com.test.test",
    username: username,
    p12_password: password,
    save_private_key: true,
    new_profile: proc do |profile_path| # this block gets called when a new profile was generated
      puts profile_path # the absolute path to the new PEM file
      # insert the code to upload the PEM file to the server
    end
  )
end

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me! 🙌 Thanks you for fixing ❤️

@joshdholtz joshdholtz merged commit 84ef480 into master May 25, 2022
@rogerluan rogerluan deleted the rogerluan-fix-pem-encoding branch May 25, 2022 09:28
Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations! 🎉 This was released as part of fastlane 2.206.2 🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants