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

Keys not working on iOS #44

Open
1 task done
dayaki opened this issue Aug 22, 2023 · 9 comments
Open
1 task done

Keys not working on iOS #44

dayaki opened this issue Aug 22, 2023 · 9 comments

Comments

@dayaki
Copy link

dayaki commented Aug 22, 2023

Current behavior

Installed the package, did pod install, created keys.development.json file with secure entries:

{ "secure": { "APP_URL": "website-url.com", } }

but I can't access them, they return empty when I do console.log('keys', Keys.secureFor('APP_URL'))

Expected behavior

console.log('keys 2', Keys.secureFor('APP_URL')) should return the expected data in secure: { "APP_URL": "url"}

Platform

  • iOS

Versions

React Native Version -> 0.71.11
React Native Keys -> 0.5.14

@github-actions
Copy link

👋 @dayaki
Thanks for opening your issue here! If you find this package useful hit the star🌟!

@numandev1
Copy link
Owner

numandev1 commented Aug 22, 2023

@dayaki did you add this script in pre-action?

    export KEYSFILE = "keys.development.json"
   "${SRCROOT}/../node_modules/react-native-keys/keysIOS.js"

@dayaki
Copy link
Author

dayaki commented Aug 22, 2023

Just added it now and same issue. Do I need to follow the steps listed here https://github.com/numandev1/react-native-keys#ios ? even if I don't plan to access the variables from the native side?

@numandev1
Copy link
Owner

@dayaki no you don't need those steps, can we see it on zoom session?

@dayaki
Copy link
Author

dayaki commented Aug 22, 2023

yes sure

@numandev1
Copy link
Owner

@dayaki can you connect with me on LinkedIn https://www.linkedin.com/in/numandev/ where we can send zoom session

@dayaki
Copy link
Author

dayaki commented Aug 22, 2023

@numandev1 I figured it out...I was adding the scheme script in run pre-action instead of build pre-action. Would you advice thekeys.*.json files be added to git or be .gitignore

@numandev1
Copy link
Owner

@dayaki Yes, I advise you to add product keys.json into gitignore not dev or staging otherwise you have to involve in the setup of every new developer in the team

@numandev1
Copy link
Owner

@dayaki would you like to make PR for improve documentation of this package or you can give feedback i can change, thanks

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

2 participants