Skip to content
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

how to use base64 decode? #203

Open
reslear opened this issue Nov 13, 2023 · 1 comment
Open

how to use base64 decode? #203

reslear opened this issue Nov 13, 2023 · 1 comment

Comments

@reslear
Copy link

reslear commented Nov 13, 2023

good afternoon, @mlynch thx for #105 :)
do we have some kind of easy way to decode a base64 string?

for example $GOOGLE_SERVICE_PLIST_RAW it's more convenient to store in base64, but you have to decode it.

I suggest to do it:

  1. automatically value -> base64 === value
  2. or add from key with enumbase64.
platforms:
  ios:
    targets:
      App:
        plist:          
          - file: GoogleService-Info.plist
            xml: $GOOGLE_SERVICE_PLIST_RAW
            # add `from` attribute 
            from: base64

nodejs:

const value = Buffer.from(process.env.GOOGLE_SERVICE_PLIST_RAW, 'base64').toString(
  'ascii'
)

browser:

const value = atob(process.env.GOOGLE_SERVICE_PLIST_RAW)
@reslear
Copy link
Author

reslear commented Mar 29, 2024

also my current solution is:

# prebuid.sh

GOOGLE_SERVICE_PLIST_RAW=$(echo $GOOGLE_SERVICE_PLIST_RAW | base64 -d)
pnpm exec trapeze run trapeze-config.yml -y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant