react-native-keys icon indicating copy to clipboard operation
react-native-keys copied to clipboard

Keys not working on iOS

Open dayaki opened this issue 1 year ago β€’ 9 comments

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

  • [X] iOS

Versions

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

dayaki avatar Aug 22 '23 13:08 dayaki

πŸ‘‹ @dayaki Thanks for opening your issue here! If you find this package useful hit the star🌟!

github-actions[bot] avatar Aug 22 '23 13:08 github-actions[bot]

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

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

numandev1 avatar Aug 22 '23 13:08 numandev1

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?

dayaki avatar Aug 22 '23 15:08 dayaki

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

numandev1 avatar Aug 22 '23 15:08 numandev1

yes sure

dayaki avatar Aug 22 '23 16:08 dayaki

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

numandev1 avatar Aug 22 '23 17:08 numandev1

@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

dayaki avatar Aug 22 '23 23:08 dayaki

@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 avatar Aug 23 '23 05:08 numandev1

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

numandev1 avatar Aug 23 '23 05:08 numandev1

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Aug 23 '24 02:08 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Aug 30 '24 02:08 github-actions[bot]