Reputation: 1379
While integrating code-push in my react-native app using code-push tutorial, i ran following command:
react-native link react-native-code-push
It asked for deployment keys then, which i pasted but now i want to change those keys.
I tried to unlink with the following command but its not working,
react-native unlink react-native-code-push
Can someone please guid me, as i'm new to both react-native and code push?
Upvotes: 0
Views: 7151
Reputation: 121
So basically deployment keys can be stored in different locations and it depends upon how you have configured the application.
You can always find what is the location of the deployment key the following way:
1) For Android it is injected in MainApplication.java file -> getPackages method (the 1st parameter for CodePush class constructor).
By default it should be R.string.reactNativeCodePush_androidDeploymentKey
which points exactly to strings.xml
file. You can override this if needed and store deployment key in arbitrary place or simply hard-code it here (though it is not recommended).
2) For iOS the default place to store deployment key is Info.plist
file located in iOS folder of the application (entry named CodePushDeploymentKey).
Later it is extracted by the app in native module in CodePushConfig.m
class.
Upvotes: 1
Reputation: 1379
list.info
CodePushDeploymentKey
strings.xml
reactNativeCodePush_androidDeploymentKey
update values of these keys and it will work :)
Upvotes: 4