Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit aec64cc

Browse files
committed
remove package reserved word, bump version, persist device identifier
1 parent 88b7fb3 commit aec64cc

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

CodePush.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ function getPromisifiedSdk(requestFetchAdapter, config) {
103103
});
104104
};
105105

106-
sdk.reportStatusDeploy = (package, status) => {
106+
sdk.reportStatusDeploy = (deployedPackage, status) => {
107107
return new Promise((resolve, reject) => {
108-
module.exports.AcquisitionSdk.prototype.reportStatusDeploy.call(sdk, package, status, (err) => {
108+
module.exports.AcquisitionSdk.prototype.reportStatusDeploy.call(sdk, deployedPackage, status, (err) => {
109109
if (err) {
110110
reject(err);
111111
} else {
@@ -115,9 +115,9 @@ function getPromisifiedSdk(requestFetchAdapter, config) {
115115
});
116116
};
117117

118-
sdk.reportStatusDownload = (package, status) => {
118+
sdk.reportStatusDownload = (downloadedPackage, status) => {
119119
return new Promise((resolve, reject) => {
120-
module.exports.AcquisitionSdk.prototype.reportStatusDownload.call(sdk, package, (err) => {
120+
module.exports.AcquisitionSdk.prototype.reportStatusDownload.call(sdk, downloadedPackage, (err) => {
121121
if (err) {
122122
reject(err);
123123
} else {

CodePushConfig.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ - (instancetype)init
3434
NSString *serverURL = [infoDictionary objectForKey:@"CodePushServerURL"];
3535

3636
NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
37-
NSString* clientUniqueId = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
37+
NSString* clientUniqueId = [userDefaults stringForKey:ClientUniqueIDConfigKey];
38+
if (clientUniqueId == nil) {
39+
clientUniqueId = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
40+
[userDefaults setObject:clientUniqueId forKey:ClientUniqueIDConfigKey];
41+
[userDefaults synchronize];
42+
}
3843

3944
if (!serverURL) {
4045
serverURL = @"https://codepush.azurewebsites.net/";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"url": "https://github.com/Microsoft/react-native-code-push"
1717
},
1818
"dependencies": {
19-
"code-push": "1.5.0-beta",
19+
"code-push": "1.5.1-beta",
2020
"semver": "^5.1.0"
2121
},
2222
"devDependencies": {

0 commit comments

Comments
 (0)