@appzung/react-native-code-push 8.3.2 → 10.0.0-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/CodePush.js +22 -19
  2. package/CodePush.podspec +3 -3
  3. package/LICENSE.md +1 -1
  4. package/README.md +159 -296
  5. package/android/app/.gradle/config.properties +2 -0
  6. package/android/app/build.gradle +2 -0
  7. package/android/app/local.properties +8 -0
  8. package/android/app/src/main/AndroidManifest.xml +1 -2
  9. package/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java +27 -21
  10. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +5 -5
  11. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushConstants.java +1 -1
  12. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +1 -1
  13. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInstallMode.java +2 -2
  14. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidPublicKeyException.java +2 -2
  15. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidUpdateException.java +1 -1
  16. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushMalformedDataException.java +2 -2
  17. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +5 -5
  18. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNotInitializedException.java +2 -2
  19. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushTelemetryManager.java +14 -14
  20. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUnknownException.java +2 -2
  21. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateManager.java +1 -1
  22. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateState.java +2 -2
  23. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java +16 -9
  24. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUtils.java +1 -1
  25. package/android/app/src/main/java/com/microsoft/codepush/react/DownloadProgress.java +1 -1
  26. package/android/app/src/main/java/com/microsoft/codepush/react/DownloadProgressCallback.java +1 -1
  27. package/android/app/src/main/java/com/microsoft/codepush/react/FileUtils.java +1 -1
  28. package/android/app/src/main/java/com/microsoft/codepush/react/ReactInstanceHolder.java +1 -1
  29. package/android/app/src/main/java/com/microsoft/codepush/react/SettingsManager.java +1 -1
  30. package/android/app/src/main/java/com/microsoft/codepush/react/TLSSocketFactory.java +1 -1
  31. package/android/build.gradle +3 -0
  32. package/android/codepush.gradle +3 -3
  33. package/docs/advanced-usage.md +56 -0
  34. package/docs/api-android.md +12 -75
  35. package/docs/api-ios.md +5 -17
  36. package/docs/api-js.md +18 -55
  37. package/docs/setup-android.md +15 -397
  38. package/docs/setup-ios.md +24 -198
  39. package/docs/setup-windows.md +7 -74
  40. package/ios/CodePush/CodePush.h +4 -4
  41. package/ios/CodePush/CodePush.m +10 -9
  42. package/ios/CodePush/CodePushConfig.m +14 -11
  43. package/ios/CodePush/CodePushPackage.m +60 -60
  44. package/ios/CodePush/CodePushTelemetryManager.m +13 -13
  45. package/ios/CodePush.xcodeproj/project.pbxproj +24 -470
  46. package/ios/PrivacyInfo.xcprivacy +31 -0
  47. package/package.json +27 -24
  48. package/react-native.config.js +1 -1
  49. package/scripts/generateBundledResourcesHash.js +1 -1
  50. package/scripts/getFilesInFolder.js +1 -1
  51. package/scripts/recordFilesBeforeBundleCommand.js +1 -1
  52. package/typings/react-native-code-push.d.ts +22 -22
  53. package/windows/CodePush/CodePushConfig.cpp +3 -3
  54. package/windows/CodePush/CodePushConfig.h +3 -3
  55. package/windows/CodePush/CodePushNativeModule.cpp +27 -27
  56. package/windows/CodePush/CodePushNativeModule.h +4 -4
  57. package/windows/CodePush/CodePushTelemetryManager.cpp +12 -12
  58. package/windows/CodePush/CodePushTelemetryManager.h +1 -1
  59. package/.azurepipelines/build-rn-code-push-1es.yml +0 -104
  60. package/.azurepipelines/test-rn-code-push.yml +0 -94
  61. package/.config/CredScanSuppressions.json +0 -14
  62. package/SECURITY.md +0 -41
  63. package/docs/multi-deployment-testing-android.md +0 -148
  64. package/docs/multi-deployment-testing-ios.md +0 -59
  65. package/ios/CodePush/Base64/Base64/MF_Base64Additions.h +0 -34
  66. package/ios/CodePush/Base64/Base64/MF_Base64Additions.m +0 -252
  67. package/ios/CodePush/Base64/README.md +0 -47
  68. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithm.h +0 -69
  69. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.h +0 -16
  70. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.m +0 -51
  71. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.h +0 -15
  72. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.m +0 -55
  73. package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.h +0 -24
  74. package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.m +0 -41
  75. package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.h +0 -28
  76. package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.m +0 -205
  77. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.h +0 -103
  78. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.m +0 -322
  79. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.h +0 -37
  80. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.m +0 -145
  81. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.h +0 -35
  82. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.m +0 -551
  83. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTRSAlgorithm.h +0 -23
  84. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.h +0 -43
  85. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.m +0 -230
  86. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.h +0 -31
  87. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.m +0 -113
  88. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.h +0 -38
  89. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.m +0 -500
  90. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.h +0 -18
  91. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.m +0 -214
  92. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.h +0 -23
  93. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.m +0 -29
  94. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.h +0 -19
  95. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.m +0 -68
  96. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.h +0 -18
  97. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.m +0 -72
  98. package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.h +0 -67
  99. package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.m +0 -111
  100. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.h +0 -119
  101. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.m +0 -307
  102. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.h +0 -94
  103. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.m +0 -619
  104. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.h +0 -164
  105. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.m +0 -514
  106. package/ios/CodePush/JWT/Core/Coding/JWTCoding.h +0 -24
  107. package/ios/CodePush/JWT/Core/Coding/JWTCoding.m +0 -11
  108. package/ios/CodePush/JWT/Core/FrameworkSupplement/JWT.h +0 -52
  109. package/ios/CodePush/JWT/Core/FrameworkSupplement/Map.modulemap +0 -5
  110. package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.h +0 -28
  111. package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.m +0 -70
  112. package/ios/CodePush/JWT/Core/Supplement/JWTDeprecations.h +0 -22
  113. package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.h +0 -34
  114. package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.m +0 -73
  115. package/ios/CodePush/JWT/LICENSE +0 -19
  116. package/ios/CodePush/JWT/README.md +0 -489
  117. package/ios/CodePush/SSZipArchive/Common.h +0 -81
  118. package/ios/CodePush/SSZipArchive/README.md +0 -1
  119. package/ios/CodePush/SSZipArchive/SSZipArchive.h +0 -76
  120. package/ios/CodePush/SSZipArchive/SSZipArchive.m +0 -691
  121. package/ios/CodePush/SSZipArchive/aes/aes.h +0 -198
  122. package/ios/CodePush/SSZipArchive/aes/aes_via_ace.h +0 -541
  123. package/ios/CodePush/SSZipArchive/aes/aescrypt.c +0 -294
  124. package/ios/CodePush/SSZipArchive/aes/aeskey.c +0 -548
  125. package/ios/CodePush/SSZipArchive/aes/aesopt.h +0 -739
  126. package/ios/CodePush/SSZipArchive/aes/aestab.c +0 -391
  127. package/ios/CodePush/SSZipArchive/aes/aestab.h +0 -173
  128. package/ios/CodePush/SSZipArchive/aes/brg_endian.h +0 -126
  129. package/ios/CodePush/SSZipArchive/aes/brg_types.h +0 -219
  130. package/ios/CodePush/SSZipArchive/aes/entropy.c +0 -54
  131. package/ios/CodePush/SSZipArchive/aes/entropy.h +0 -16
  132. package/ios/CodePush/SSZipArchive/aes/fileenc.c +0 -144
  133. package/ios/CodePush/SSZipArchive/aes/fileenc.h +0 -121
  134. package/ios/CodePush/SSZipArchive/aes/hmac.c +0 -145
  135. package/ios/CodePush/SSZipArchive/aes/hmac.h +0 -103
  136. package/ios/CodePush/SSZipArchive/aes/prng.c +0 -155
  137. package/ios/CodePush/SSZipArchive/aes/prng.h +0 -82
  138. package/ios/CodePush/SSZipArchive/aes/pwd2key.c +0 -103
  139. package/ios/CodePush/SSZipArchive/aes/pwd2key.h +0 -57
  140. package/ios/CodePush/SSZipArchive/aes/sha1.c +0 -258
  141. package/ios/CodePush/SSZipArchive/aes/sha1.h +0 -73
  142. package/ios/CodePush/SSZipArchive/minizip/crypt.h +0 -130
  143. package/ios/CodePush/SSZipArchive/minizip/ioapi.c +0 -369
  144. package/ios/CodePush/SSZipArchive/minizip/ioapi.h +0 -175
  145. package/ios/CodePush/SSZipArchive/minizip/mztools.c +0 -284
  146. package/ios/CodePush/SSZipArchive/minizip/mztools.h +0 -31
  147. package/ios/CodePush/SSZipArchive/minizip/unzip.c +0 -1839
  148. package/ios/CodePush/SSZipArchive/minizip/unzip.h +0 -248
  149. package/ios/CodePush/SSZipArchive/minizip/zip.c +0 -1910
  150. package/ios/CodePush/SSZipArchive/minizip/zip.h +0 -202
  151. package/scripts/postlink/android/postlink.js +0 -87
  152. package/scripts/postlink/ios/postlink.js +0 -116
  153. package/scripts/postlink/run.js +0 -11
  154. package/scripts/postunlink/android/postunlink.js +0 -74
  155. package/scripts/postunlink/ios/postunlink.js +0 -87
  156. package/scripts/postunlink/run.js +0 -11
  157. package/scripts/tools/linkToolsAndroid.js +0 -57
  158. package/scripts/tools/linkToolsIos.js +0 -130
  159. package/windows-legacy/CodePush/CodePush.csproj +0 -128
  160. package/windows-legacy/CodePush/CodePushUtils.cs +0 -47
  161. package/windows-legacy/CodePush/FileUtils.cs +0 -40
  162. package/windows-legacy/CodePush/Properties/AssemblyInfo.cs +0 -29
  163. package/windows-legacy/CodePush/Properties/CodePush.rd.xml +0 -33
  164. package/windows-legacy/CodePush/UpdateManager.cs +0 -305
  165. package/windows-legacy/CodePush/UpdateUtils.cs +0 -46
  166. package/windows-legacy/CodePush.Net46/Adapters/Http/HttpProgress.cs +0 -28
  167. package/windows-legacy/CodePush.Net46/Adapters/Storage/ApplicationDataContainer.cs +0 -106
  168. package/windows-legacy/CodePush.Net46/CodePush.Net46.csproj +0 -103
  169. package/windows-legacy/CodePush.Net46/CodePushUtils.cs +0 -158
  170. package/windows-legacy/CodePush.Net46/FileUtils.cs +0 -55
  171. package/windows-legacy/CodePush.Net46/Properties/AssemblyInfo.cs +0 -36
  172. package/windows-legacy/CodePush.Net46/UpdateManager.cs +0 -330
  173. package/windows-legacy/CodePush.Net46/UpdateUtils.cs +0 -70
  174. package/windows-legacy/CodePush.Net46/packages.config +0 -5
  175. package/windows-legacy/CodePush.Net46.Test/ApplicationDataContainerTest.cs +0 -105
  176. package/windows-legacy/CodePush.Net46.Test/CodePush.Net46.Test.csproj +0 -137
  177. package/windows-legacy/CodePush.Net46.Test/Properties/AssemblyInfo.cs +0 -36
  178. package/windows-legacy/CodePush.Net46.Test/TelemetryManagerTest.cs +0 -117
  179. package/windows-legacy/CodePush.Net46.Test/app.config +0 -11
  180. package/windows-legacy/CodePush.Net46.Test/packages.config +0 -4
  181. package/windows-legacy/CodePush.Shared/CodePush.Shared.projitems +0 -22
  182. package/windows-legacy/CodePush.Shared/CodePush.Shared.shproj +0 -13
  183. package/windows-legacy/CodePush.Shared/CodePushConstants.cs +0 -35
  184. package/windows-legacy/CodePush.Shared/CodePushNativeModule.cs +0 -329
  185. package/windows-legacy/CodePush.Shared/CodePushReactPackage.cs +0 -235
  186. package/windows-legacy/CodePush.Shared/CodePushUtils.cs +0 -70
  187. package/windows-legacy/CodePush.Shared/InstallMode.cs +0 -9
  188. package/windows-legacy/CodePush.Shared/MinimumBackgroundListener.cs +0 -44
  189. package/windows-legacy/CodePush.Shared/SettingsManager.cs +0 -148
  190. package/windows-legacy/CodePush.Shared/TelemetryManager.cs +0 -250
  191. package/windows-legacy/CodePush.Shared/UpdateState.cs +0 -9
@@ -1,130 +0,0 @@
1
- var glob = require("glob");
2
- var path = require("path");
3
- var xcode = require("xcode");
4
- var packageFile = require('../../../../package.json');
5
-
6
- var ignoreNodeModules = { ignore: "node_modules/**" };
7
- var ignoreNodeModulesAndPods = { ignore: ["node_modules/**", "ios/Pods/**"] };
8
- var appDelegatePaths = glob.sync("**/AppDelegate.+(mm|m)", ignoreNodeModules);
9
-
10
- exports.codePushHeaderImportStatement = `#import <CodePush/CodePush.h>`;
11
- exports.codePushHeaderImportStatementFormatted = `\n${this.codePushHeaderImportStatement}`;
12
- exports.codePushBundleUrl = "[CodePush bundleURL]";
13
- exports.oldBundleUrl = "[[NSBundle mainBundle] URLForResource:@\"main\" withExtension:@\"jsbundle\"]";
14
- exports.linkedJsCodeLocationAssignmentStatement = "jsCodeLocation = [CodePush bundleURL];";
15
-
16
- exports.getJsCodeLocationPatch = function(defaultJsCodeLocationAssignmentStatement) {
17
- return `
18
- #ifdef DEBUG
19
- ${defaultJsCodeLocationAssignmentStatement}
20
- #else
21
- ${this.linkedJsCodeLocationAssignmentStatement}
22
- #endif`;
23
- }
24
-
25
- // Fix for https://github.com/microsoft/react-native-code-push/issues/477
26
- // Typical location of AppDelegate.m for newer RN versions: $PROJECT_ROOT/ios/<project_name>/AppDelegate.m
27
- // Let's try to find that path by filtering the whole array for any path containing <project_name>
28
- // If we can't find it there, play dumb and pray it is the first path we find.
29
- exports.getAppDeletePath = function() {
30
- return findFileByAppName(appDelegatePaths, packageFile ? packageFile.name : null) || appDelegatePaths[0];
31
- }
32
-
33
- exports.getPlistPath = function() {
34
- var xcodeProjectPaths = glob.sync(`**/*.xcodeproj/project.pbxproj`, ignoreNodeModulesAndPods);
35
- if (!xcodeProjectPaths){
36
- return getDefaultPlistPath();
37
- }
38
-
39
- if (xcodeProjectPaths.length !== 1) {
40
- console.log('Could not determine correct xcode proj path to retrieve related plist file, there are multiple xcodeproj under the solution.');
41
- return getDefaultPlistPath();
42
- }
43
-
44
- var xcodeProjectPath = xcodeProjectPaths[0];
45
- var parsedXCodeProj;
46
-
47
- try {
48
- var proj = xcode.project(xcodeProjectPath);
49
- //use sync version because there are some problems with async version of xcode lib as of current version
50
- parsedXCodeProj = proj.parseSync();
51
- }
52
- catch(e) {
53
- console.log('Couldn\'t read info.plist path from xcode project - error: ' + e.message);
54
- return getDefaultPlistPath();
55
- }
56
-
57
- var INFO_PLIST_PROJECT_KEY = 'INFOPLIST_FILE';
58
- var RELEASE_BUILD_PROPERTY_NAME = "Release";
59
- var targetProductName = packageFile ? packageFile.name : null;
60
-
61
- //Try to get 'Release' build of ProductName matching the package name first and if it doesn't exist then try to get any other if existing
62
- var plistPathValue = getBuildSettingsPropertyMatchingTargetProductName(parsedXCodeProj, INFO_PLIST_PROJECT_KEY, targetProductName, RELEASE_BUILD_PROPERTY_NAME) ||
63
- getBuildSettingsPropertyMatchingTargetProductName(parsedXCodeProj, INFO_PLIST_PROJECT_KEY, targetProductName) ||
64
- getBuildSettingsPropertyMatchingTargetProductName(parsedXCodeProj, INFO_PLIST_PROJECT_KEY, null, RELEASE_BUILD_PROPERTY_NAME) ||
65
- getBuildSettingsPropertyMatchingTargetProductName(parsedXCodeProj, INFO_PLIST_PROJECT_KEY) ||
66
- parsedXCodeProj.getBuildProperty(INFO_PLIST_PROJECT_KEY, RELEASE_BUILD_PROPERTY_NAME) ||
67
- parsedXCodeProj.getBuildProperty(INFO_PLIST_PROJECT_KEY);
68
-
69
- if (!plistPathValue){
70
- return getDefaultPlistPath();
71
- }
72
-
73
- //also remove surrounding quotes from plistPathValue to get correct path resolved
74
- //(see https://github.com/microsoft/react-native-code-push/issues/534#issuecomment-302069326 for details)
75
- return path.resolve(path.dirname(xcodeProjectPath), '..', plistPathValue.replace(/^"(.*)"$/, '$1'));
76
- }
77
-
78
- // Helper that filters an array with AppDelegate.m paths for a path with the app name inside it
79
- // Should cover nearly all cases
80
- function findFileByAppName(array, appName) {
81
- if (array.length === 0 || !appName) return null;
82
-
83
- for (var i = 0; i < array.length; i++) {
84
- var path = array[i];
85
- if (path && path.indexOf(appName) !== -1) {
86
- return path;
87
- }
88
- }
89
-
90
- return null;
91
- }
92
-
93
- function getDefaultPlistPath() {
94
- //this is old logic in case we are unable to find PLIST from xcode/pbxproj - at least we can fallback to default solution
95
- return glob.sync(`**/${packageFile.name}/*Info.plist`, ignoreNodeModules)[0];
96
- }
97
-
98
- // This is enhanced version of standard implementation of xcode 'getBuildProperty' function
99
- // but allows us to narrow results by PRODUCT_NAME property also.
100
- // So we suppose that proj name should be the same as package name, otherwise fallback to default plist path searching logic
101
- function getBuildSettingsPropertyMatchingTargetProductName(parsedXCodeProj, prop, targetProductName, build) {
102
- var target;
103
- var COMMENT_KEY = /_comment$/;
104
- var PRODUCT_NAME_PROJECT_KEY = 'PRODUCT_NAME';
105
- var TV_OS_DEPLOYMENT_TARGET_PROPERTY_NAME = 'TVOS_DEPLOYMENT_TARGET';
106
- var TEST_HOST_PROPERTY_NAME = 'TEST_HOST';
107
-
108
- var configs = parsedXCodeProj.pbxXCBuildConfigurationSection();
109
- for (var configName in configs) {
110
- if (!COMMENT_KEY.test(configName)) {
111
- var config = configs[configName];
112
- if ( (build && config.name === build) || (build === undefined) ) {
113
- if (targetProductName) {
114
- if (config.buildSettings[prop] !== undefined && config.buildSettings[PRODUCT_NAME_PROJECT_KEY] == targetProductName) {
115
- target = config.buildSettings[prop];
116
- }
117
- } else {
118
- if (config.buildSettings[prop] !== undefined &&
119
- //exclude tvOS projects
120
- config.buildSettings[TV_OS_DEPLOYMENT_TARGET_PROPERTY_NAME] == undefined &&
121
- //exclude test app
122
- config.buildSettings[TEST_HOST_PROPERTY_NAME] == undefined) {
123
- target = config.buildSettings[prop];
124
- }
125
- }
126
- }
127
- }
128
- }
129
- return target;
130
- }
@@ -1,128 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
- <PropertyGroup>
5
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7
- <ProjectGuid>{446A85D9-55EB-4C7D-8B9D-448306C833D6}</ProjectGuid>
8
- <OutputType>Library</OutputType>
9
- <AppDesignerFolder>Properties</AppDesignerFolder>
10
- <RootNamespace>CodePush</RootNamespace>
11
- <AssemblyName>CodePush</AssemblyName>
12
- <DefaultLanguage>en-US</DefaultLanguage>
13
- <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
14
- <TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
15
- <TargetPlatformMinVersion>10.0.14393.0</TargetPlatformMinVersion>
16
- <MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
17
- <FileAlignment>512</FileAlignment>
18
- <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
19
- </PropertyGroup>
20
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
21
- <PlatformTarget>x86</PlatformTarget>
22
- <DebugSymbols>true</DebugSymbols>
23
- <OutputPath>bin\x86\Debug\</OutputPath>
24
- <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
25
- <NoWarn>;2008</NoWarn>
26
- <DebugType>full</DebugType>
27
- <PlatformTarget>x86</PlatformTarget>
28
- <UseVSHostingProcess>false</UseVSHostingProcess>
29
- <ErrorReport>prompt</ErrorReport>
30
- </PropertyGroup>
31
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
32
- <PlatformTarget>x86</PlatformTarget>
33
- <OutputPath>bin\x86\Release\</OutputPath>
34
- <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
35
- <Optimize>true</Optimize>
36
- <NoWarn>;2008</NoWarn>
37
- <DebugType>pdbonly</DebugType>
38
- <PlatformTarget>x86</PlatformTarget>
39
- <UseVSHostingProcess>false</UseVSHostingProcess>
40
- <ErrorReport>prompt</ErrorReport>
41
- </PropertyGroup>
42
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
43
- <PlatformTarget>ARM</PlatformTarget>
44
- <DebugSymbols>true</DebugSymbols>
45
- <OutputPath>bin\ARM\Debug\</OutputPath>
46
- <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
47
- <NoWarn>;2008</NoWarn>
48
- <DebugType>full</DebugType>
49
- <PlatformTarget>ARM</PlatformTarget>
50
- <UseVSHostingProcess>false</UseVSHostingProcess>
51
- <ErrorReport>prompt</ErrorReport>
52
- </PropertyGroup>
53
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
54
- <PlatformTarget>ARM</PlatformTarget>
55
- <OutputPath>bin\ARM\Release\</OutputPath>
56
- <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
57
- <Optimize>true</Optimize>
58
- <NoWarn>;2008</NoWarn>
59
- <DebugType>pdbonly</DebugType>
60
- <PlatformTarget>ARM</PlatformTarget>
61
- <UseVSHostingProcess>false</UseVSHostingProcess>
62
- <ErrorReport>prompt</ErrorReport>
63
- </PropertyGroup>
64
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
65
- <PlatformTarget>x64</PlatformTarget>
66
- <DebugSymbols>true</DebugSymbols>
67
- <OutputPath>bin\x64\Debug\</OutputPath>
68
- <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
69
- <NoWarn>;2008</NoWarn>
70
- <DebugType>full</DebugType>
71
- <PlatformTarget>x64</PlatformTarget>
72
- <UseVSHostingProcess>false</UseVSHostingProcess>
73
- <ErrorReport>prompt</ErrorReport>
74
- </PropertyGroup>
75
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
76
- <PlatformTarget>x64</PlatformTarget>
77
- <OutputPath>bin\x64\Release\</OutputPath>
78
- <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
79
- <Optimize>true</Optimize>
80
- <NoWarn>;2008</NoWarn>
81
- <DebugType>pdbonly</DebugType>
82
- <PlatformTarget>x64</PlatformTarget>
83
- <UseVSHostingProcess>false</UseVSHostingProcess>
84
- <ErrorReport>prompt</ErrorReport>
85
- </PropertyGroup>
86
- <PropertyGroup>
87
- <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
88
- </PropertyGroup>
89
- <ItemGroup>
90
- <Compile Include="UpdateManager.cs" />
91
- <Compile Include="UpdateUtils.cs" />
92
- <Compile Include="CodePushUtils.cs" />
93
- <Compile Include="FileUtils.cs" />
94
- <Compile Include="Properties\AssemblyInfo.cs" />
95
- <EmbeddedResource Include="Properties\CodePush.rd.xml" />
96
- </ItemGroup>
97
- <ItemGroup>
98
- <ProjectReference Include="..\..\..\react-native-windows\ReactWindows\ReactNative\ReactNative.csproj">
99
- <Project>{c7673ad5-e3aa-468c-a5fd-fa38154e205c}</Project>
100
- <Name>ReactNative</Name>
101
- </ProjectReference>
102
- </ItemGroup>
103
- <ItemGroup>
104
- <PackageReference Include="Newtonsoft.Json">
105
- <Version>13.0.1</Version>
106
- </PackageReference>
107
- <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
108
- <Version>6.0.6</Version>
109
- </PackageReference>
110
- </ItemGroup>
111
- <ItemGroup>
112
- <SDKReference Include="WindowsMobile, Version=10.0.14393.0">
113
- <Name>Windows Mobile Extensions for the UWP</Name>
114
- </SDKReference>
115
- </ItemGroup>
116
- <Import Project="..\CodePush.Shared\CodePush.Shared.projitems" Label="Shared" />
117
- <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
118
- <VisualStudioVersion>14.0</VisualStudioVersion>
119
- </PropertyGroup>
120
- <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
121
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
122
- Other similar extension points exist, see Microsoft.Common.targets.
123
- <Target Name="BeforeBuild">
124
- </Target>
125
- <Target Name="AfterBuild">
126
- </Target>
127
- -->
128
- </Project>
@@ -1,47 +0,0 @@
1
- using Newtonsoft.Json.Linq;
2
- using System;
3
- using System.Threading.Tasks;
4
- using Windows.Storage;
5
- using Windows.Storage.Streams;
6
- using Windows.System.Profile;
7
-
8
- namespace CodePush.ReactNative
9
- {
10
- internal partial class CodePushUtils
11
- {
12
- internal static string GetFileBundlePrefix()
13
- {
14
- return CodePushConstants.FileBundlePrefix;
15
- }
16
-
17
- internal async static Task<JObject> GetJObjectFromFileAsync(StorageFile file)
18
- {
19
- string jsonString = await FileIO.ReadTextAsync(file).AsTask().ConfigureAwait(false);
20
- if (jsonString.Length == 0)
21
- {
22
- return new JObject();
23
- }
24
-
25
- try
26
- {
27
- return JObject.Parse(jsonString);
28
- }
29
- catch (Exception)
30
- {
31
- return null;
32
- }
33
- }
34
-
35
- static string GetDeviceIdImpl()
36
- {
37
- HardwareToken token = HardwareIdentification.GetPackageSpecificToken(null);
38
- IBuffer hardwareId = token.Id;
39
- var dataReader = DataReader.FromBuffer(hardwareId);
40
-
41
- var bytes = new byte[hardwareId.Length];
42
- dataReader.ReadBytes(bytes);
43
-
44
- return BitConverter.ToString(bytes);
45
- }
46
- }
47
- }
@@ -1,40 +0,0 @@
1
- using System;
2
- using System.Threading.Tasks;
3
- using Windows.Storage;
4
-
5
- namespace CodePush.ReactNative
6
- {
7
- internal class FileUtils
8
- {
9
- internal async static Task MergeFoldersAsync(StorageFolder source, StorageFolder target)
10
- {
11
- foreach (StorageFile sourceFile in await source.GetFilesAsync().AsTask().ConfigureAwait(false))
12
- {
13
- await sourceFile.CopyAndReplaceAsync(await target.CreateFileAsync(sourceFile.Name, CreationCollisionOption.OpenIfExists).AsTask().ConfigureAwait(false)).AsTask().ConfigureAwait(false);
14
- }
15
-
16
- foreach (StorageFolder sourceDirectory in await source.GetFoldersAsync().AsTask().ConfigureAwait(false))
17
- {
18
- StorageFolder nextTargetSubDir = await target.CreateFolderAsync(sourceDirectory.Name, CreationCollisionOption.OpenIfExists).AsTask().ConfigureAwait(false);
19
- await MergeFoldersAsync(sourceDirectory, nextTargetSubDir).ConfigureAwait(false);
20
- }
21
- }
22
-
23
- internal async static Task ClearReactDevBundleCacheAsync()
24
- {
25
- var devBundleCacheFile = (StorageFile)await ApplicationData.Current.LocalFolder.TryGetItemAsync(CodePushConstants.ReactDevBundleCacheFileName).AsTask().ConfigureAwait(false);
26
- if (devBundleCacheFile != null)
27
- {
28
- await devBundleCacheFile.DeleteAsync().AsTask().ConfigureAwait(false);
29
- }
30
- }
31
-
32
- internal async static Task<long> GetBinaryResourcesModifiedTimeAsync(string fileName)
33
- {
34
- var assetJSBundleFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri(CodePushConstants.AssetsBundlePrefix + fileName)).AsTask().ConfigureAwait(false);
35
- var fileProperties = await assetJSBundleFile.GetBasicPropertiesAsync().AsTask().ConfigureAwait(false);
36
- return fileProperties.DateModified.ToUnixTimeMilliseconds();
37
- }
38
-
39
- }
40
- }
@@ -1,29 +0,0 @@
1
- using System.Reflection;
2
- using System.Runtime.CompilerServices;
3
- using System.Runtime.InteropServices;
4
-
5
- // General Information about an assembly is controlled through the following
6
- // set of attributes. Change these attribute values to modify the information
7
- // associated with an assembly.
8
- [assembly: AssemblyTitle("CodePush")]
9
- [assembly: AssemblyDescription("")]
10
- [assembly: AssemblyConfiguration("")]
11
- [assembly: AssemblyCompany("")]
12
- [assembly: AssemblyProduct("CodePush")]
13
- [assembly: AssemblyCopyright("Copyright © 2016")]
14
- [assembly: AssemblyTrademark("")]
15
- [assembly: AssemblyCulture("")]
16
-
17
- // Version information for an assembly consists of the following four values:
18
- //
19
- // Major Version
20
- // Minor Version
21
- // Build Number
22
- // Revision
23
- //
24
- // You can specify all the values or you can default the Build and Revision Numbers
25
- // by using the '*' as shown below:
26
- // [assembly: AssemblyVersion("1.0.*")]
27
- [assembly: AssemblyVersion("1.0.0.0")]
28
- [assembly: AssemblyFileVersion("1.0.0.0")]
29
- [assembly: ComVisible(false)]
@@ -1,33 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!--
3
- This file contains Runtime Directives, specifications about types your application accesses
4
- through reflection and other dynamic code patterns. Runtime Directives are used to control the
5
- .NET Native optimizer and ensure that it does not remove code accessed by your library. If your
6
- library does not do any reflection, then you generally do not need to edit this file. However,
7
- if your library reflects over types, especially types passed to it or derived from its types,
8
- then you should write Runtime Directives.
9
-
10
- The most common use of reflection in libraries is to discover information about types passed
11
- to the library. Runtime Directives have three ways to express requirements on types passed to
12
- your library.
13
-
14
- 1. Parameter, GenericParameter, TypeParameter, TypeEnumerableParameter
15
- Use these directives to reflect over types passed as a parameter.
16
-
17
- 2. SubTypes
18
- Use a SubTypes directive to reflect over types derived from another type.
19
-
20
- 3. AttributeImplies
21
- Use an AttributeImplies directive to indicate that your library needs to reflect over
22
- types or methods decorated with an attribute.
23
-
24
- For more information on writing Runtime Directives for libraries, please visit
25
- http://go.microsoft.com/fwlink/?LinkID=391919
26
- -->
27
- <Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
28
- <Library Name="CodePush">
29
-
30
- <!-- add directives for your library here -->
31
-
32
- </Library>
33
- </Directives>