@turbopush/react-native-code-push 10.2.5 → 10.3.0-rc.1

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 (87) hide show
  1. package/LICENSE.md +3 -1
  2. package/README.md +118 -39
  3. package/android/app/src/debug/AndroidManifest.xml +9 -0
  4. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +33 -21
  5. package/package.json +15 -12
  6. package/request-fetch-adapter.js +35 -15
  7. package/.azurepipelines/build-rn-code-push-1es.yml +0 -104
  8. package/.azurepipelines/test-rn-code-push.yml +0 -94
  9. package/.config/CredScanSuppressions.json +0 -14
  10. package/.gitconfig +0 -6
  11. package/CONTRIBUTING.md +0 -134
  12. package/SECURITY.md +0 -41
  13. package/docs/api-android.md +0 -52
  14. package/docs/api-ios.md +0 -31
  15. package/docs/api-js.md +0 -592
  16. package/docs/multi-deployment-testing-android.md +0 -55
  17. package/docs/multi-deployment-testing-ios.md +0 -59
  18. package/docs/setup-android.md +0 -92
  19. package/docs/setup-ios.md +0 -138
  20. package/docs/setup-windows.md +0 -121
  21. package/expo.js +0 -324
  22. package/tsconfig.json +0 -17
  23. package/tslint.json +0 -32
  24. package/windows/CodePush/CodePush.def +0 -3
  25. package/windows/CodePush/CodePush.vcxproj +0 -198
  26. package/windows/CodePush/CodePush.vcxproj.filters +0 -91
  27. package/windows/CodePush/CodePushConfig.cpp +0 -104
  28. package/windows/CodePush/CodePushConfig.h +0 -66
  29. package/windows/CodePush/CodePushConfig.idl +0 -12
  30. package/windows/CodePush/CodePushDownloadHandler.cpp +0 -73
  31. package/windows/CodePush/CodePushDownloadHandler.h +0 -32
  32. package/windows/CodePush/CodePushNativeModule.cpp +0 -934
  33. package/windows/CodePush/CodePushNativeModule.h +0 -247
  34. package/windows/CodePush/CodePushPackage.cpp +0 -456
  35. package/windows/CodePush/CodePushPackage.h +0 -49
  36. package/windows/CodePush/CodePushTelemetryManager.cpp +0 -213
  37. package/windows/CodePush/CodePushTelemetryManager.h +0 -29
  38. package/windows/CodePush/CodePushUpdateUtils.cpp +0 -86
  39. package/windows/CodePush/CodePushUpdateUtils.h +0 -38
  40. package/windows/CodePush/CodePushUtils.cpp +0 -29
  41. package/windows/CodePush/CodePushUtils.h +0 -18
  42. package/windows/CodePush/FileUtils.cpp +0 -131
  43. package/windows/CodePush/FileUtils.h +0 -28
  44. package/windows/CodePush/PropertySheet.props +0 -16
  45. package/windows/CodePush/ReactPackageProvider.cpp +0 -15
  46. package/windows/CodePush/ReactPackageProvider.h +0 -22
  47. package/windows/CodePush/ReactPackageProvider.idl +0 -9
  48. package/windows/CodePush/miniz/LICENSE +0 -22
  49. package/windows/CodePush/miniz/miniz.c +0 -7657
  50. package/windows/CodePush/miniz/miniz.h +0 -1338
  51. package/windows/CodePush/miniz/readme.md +0 -37
  52. package/windows/CodePush/packages.config +0 -4
  53. package/windows/CodePush/pch.cpp +0 -1
  54. package/windows/CodePush/pch.h +0 -4
  55. package/windows-legacy/CodePush/CodePush.csproj +0 -128
  56. package/windows-legacy/CodePush/CodePushUtils.cs +0 -47
  57. package/windows-legacy/CodePush/FileUtils.cs +0 -40
  58. package/windows-legacy/CodePush/Properties/AssemblyInfo.cs +0 -29
  59. package/windows-legacy/CodePush/Properties/CodePush.rd.xml +0 -33
  60. package/windows-legacy/CodePush/UpdateManager.cs +0 -305
  61. package/windows-legacy/CodePush/UpdateUtils.cs +0 -46
  62. package/windows-legacy/CodePush.Net46/Adapters/Http/HttpProgress.cs +0 -28
  63. package/windows-legacy/CodePush.Net46/Adapters/Storage/ApplicationDataContainer.cs +0 -106
  64. package/windows-legacy/CodePush.Net46/CodePush.Net46.csproj +0 -103
  65. package/windows-legacy/CodePush.Net46/CodePushUtils.cs +0 -158
  66. package/windows-legacy/CodePush.Net46/FileUtils.cs +0 -55
  67. package/windows-legacy/CodePush.Net46/Properties/AssemblyInfo.cs +0 -36
  68. package/windows-legacy/CodePush.Net46/UpdateManager.cs +0 -330
  69. package/windows-legacy/CodePush.Net46/UpdateUtils.cs +0 -70
  70. package/windows-legacy/CodePush.Net46/packages.config +0 -5
  71. package/windows-legacy/CodePush.Net46.Test/ApplicationDataContainerTest.cs +0 -105
  72. package/windows-legacy/CodePush.Net46.Test/CodePush.Net46.Test.csproj +0 -137
  73. package/windows-legacy/CodePush.Net46.Test/Properties/AssemblyInfo.cs +0 -36
  74. package/windows-legacy/CodePush.Net46.Test/TelemetryManagerTest.cs +0 -117
  75. package/windows-legacy/CodePush.Net46.Test/app.config +0 -11
  76. package/windows-legacy/CodePush.Net46.Test/packages.config +0 -4
  77. package/windows-legacy/CodePush.Shared/CodePush.Shared.projitems +0 -22
  78. package/windows-legacy/CodePush.Shared/CodePush.Shared.shproj +0 -13
  79. package/windows-legacy/CodePush.Shared/CodePushConstants.cs +0 -35
  80. package/windows-legacy/CodePush.Shared/CodePushNativeModule.cs +0 -329
  81. package/windows-legacy/CodePush.Shared/CodePushReactPackage.cs +0 -235
  82. package/windows-legacy/CodePush.Shared/CodePushUtils.cs +0 -70
  83. package/windows-legacy/CodePush.Shared/InstallMode.cs +0 -9
  84. package/windows-legacy/CodePush.Shared/MinimumBackgroundListener.cs +0 -44
  85. package/windows-legacy/CodePush.Shared/SettingsManager.cs +0 -148
  86. package/windows-legacy/CodePush.Shared/TelemetryManager.cs +0 -250
  87. package/windows-legacy/CodePush.Shared/UpdateState.cs +0 -9
package/expo.js DELETED
@@ -1,324 +0,0 @@
1
- const {
2
- withAppDelegate,
3
- withInfoPlist,
4
- withStringsXml,
5
- withAppBuildGradle,
6
- withMainApplication, // Using the safer, higher-level helper
7
- WarningAggregator,
8
- } = require('@expo/config-plugins');
9
- const fs = require('fs');
10
- const path = require('path');
11
-
12
- //================ iOS (Unchanged) ================
13
- function addImportIOS(content) {
14
- const lines = content.split('\n');
15
- const importIndices = lines
16
- .map((line, idx) => (line.trim().startsWith('import ') || line.trim().startsWith('#import ') ? idx : -1))
17
- .filter(idx => idx !== -1);
18
- if (content.includes('import CodePush') || content.includes('#import <CodePush/CodePush.h>')) {
19
- return content;
20
- }
21
- const codePushImport = 'import CodePush';
22
- if (importIndices.length > 0) {
23
- const lastImportIdx = importIndices[importIndices.length - 1];
24
- lines.splice(lastImportIdx + 1, 0, codePushImport);
25
- return lines.join('\n');
26
- } else {
27
- const swiftClassRegex = /class\s+AppDelegate\s*:\s*RCTAppDelegate\s*\{/m;
28
- if (swiftClassRegex.test(content)) {
29
- return content.replace(swiftClassRegex, `$&\n${codePushImport}`);
30
- }
31
- return codePushImport + '\n' + content;
32
- }
33
- }
34
-
35
- function ensureBundleURLMethodIOS(content) {
36
- const methodRegexOld = /-\s*\(NSURL\s*\*\s*\)\s*bundleURL\s*\{[^}]*\}/s;
37
- const methodRegexSwift = /override func bundleURL\(\) -> URL\? \{[^}]*\}/s;
38
- const newMethodBodyObjC = `- (NSURL *)bundleURL
39
- {
40
- #if DEBUG
41
- return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@".expo/.virtual-metro-entry"];
42
- #else
43
- return [CodePush bundleURL];
44
- #endif
45
- }`;
46
- const newMethodBodySwift = `override func bundleURL() -> URL? {
47
- #if DEBUG
48
- return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: ".expo/.virtual-metro-entry")
49
- #else
50
- return CodePush.bundleURL()
51
- #endif
52
- }`;
53
-
54
- if (methodRegexSwift.test(content)) {
55
- return content.replace(methodRegexSwift, newMethodBodySwift);
56
- } else if (methodRegexOld.test(content)) {
57
- return content.replace(methodRegexOld, newMethodBodyObjC);
58
- } else {
59
- const appDelegateEndRegexObjC = /\@end/m;
60
- const appDelegateEndRegexSwift = /\}\s*$/m;
61
- if (appDelegateEndRegexObjC.test(content)) {
62
- return content.replace(appDelegateEndRegexObjC, `\n${newMethodBodyObjC}\n\n@end`);
63
- } else if (appDelegateEndRegexSwift.test(content)) {
64
- const lastBraceIndex = content.lastIndexOf('}');
65
- if (lastBraceIndex !== -1) {
66
- return content.substring(0, lastBraceIndex) + `\n ${newMethodBodySwift}\n` + content.substring(lastBraceIndex);
67
- }
68
- }
69
- }
70
- WarningAggregator.addWarningIOS('codepush-plugin', 'Could not find a suitable place to insert bundleURL() method in AppDelegate.');
71
- return content;
72
- }
73
-
74
- const withCodePushAppDelegate = (config) => {
75
- return withAppDelegate(config, (config) => {
76
- let content = config.modResults.contents;
77
- content = addImportIOS(content);
78
- content = ensureBundleURLMethodIOS(content);
79
- config.modResults.contents = content;
80
- return config;
81
- });
82
- };
83
-
84
- const withCodePushInfoPlist = (config, options = {}) => {
85
- return withInfoPlist(config, (config) => {
86
- if (options.ios && options.ios.CodePushDeploymentKey) {
87
- config.modResults.CodePushDeploymentKey = options.ios.CodePushDeploymentKey;
88
- }
89
- if (options.ios && options.ios.CodePushServerURL) {
90
- config.modResults.CodePushServerURL = options.ios.CodePushServerURL;
91
- }
92
- return config;
93
- });
94
- };
95
-
96
- //================ Android (Refactored to use withMainApplication) ================
97
-
98
- const withAndroidMainApplication = (config) => {
99
- return withMainApplication(config, (modConfig) => {
100
- // Check for Kotlin
101
- if (modConfig.modResults.language !== 'kt') {
102
- WarningAggregator.addWarningAndroid(
103
- 'codepush-plugin',
104
- `The CodePush plugin is skipping modifications to 'MainApplication' because it is not a Kotlin file. Your project must be configured to use Kotlin for Android.`
105
- );
106
- return modConfig;
107
- }
108
-
109
- let content = modConfig.modResults.contents;
110
- const packageName = config.android.package;
111
-
112
- // --- 1. Add Imports ---
113
- const requiredImports = [
114
- 'import com.microsoft.codepush.react.CodePush',
115
- `import ${packageName}.R`,
116
- 'import android.util.Log',
117
- ];
118
- // Simple import adder
119
- const lines = content.split('\n');
120
- let lastImportIndex = -1;
121
- const existingImports = new Set();
122
- lines.forEach((line, index) => {
123
- if (line.trim().startsWith('import ')) {
124
- lastImportIndex = index;
125
- existingImports.add(line.trim());
126
- }
127
- });
128
- const importsToAdd = requiredImports.filter(imp => !existingImports.has(imp));
129
- if (importsToAdd.length > 0) {
130
- lines.splice(lastImportIndex + 1, 0, ...importsToAdd);
131
- }
132
- content = lines.join('\n');
133
-
134
- // --- 2. Modify onCreate method ---
135
- const onCreateRegex = /(override fun onCreate\(\)\s*\{)([\s\S]*?)(\n\s*\})/m;
136
- const onCreateInjection = `
137
- // CodePush: Initialize instance on app startup.
138
- try {
139
- Log.d("CodePushDebug", "Attempting to pre-initialize CodePush in onCreate...");
140
- val deploymentKey = getString(R.string.CodePushDeploymentKey);
141
- val isDebugMode = BuildConfig.DEBUG;
142
- CodePush.getInstance(deploymentKey, this, isDebugMode);
143
- Log.d("CodePushDebug", "CodePush.getInstance() called in onCreate()");
144
- } catch (e: Exception) {
145
- Log.e("CodePushDebug", "Error pre-initializing CodePush in onCreate: " + e.message, e);
146
- }
147
- `;
148
- if (onCreateRegex.test(content) && !content.includes('CodePush.getInstance(deploymentKey, this, isDebugMode)')) {
149
- content = content.replace(onCreateRegex, (match, onCreateStart, onCreateContent, onCreateEnd) => {
150
- const soLoaderInitLineRegex = /^\s*SoLoader\.init\(this,.*\)/m;
151
- const superOnCreateLineRegex = /^\s*super\.onCreate\(\)/m;
152
-
153
- if (soLoaderInitLineRegex.test(onCreateContent)) {
154
- // Found SoLoader.init(), insert after it
155
- const modifiedContent = onCreateContent.replace(soLoaderInitLineRegex, `$&${onCreateInjection}`);
156
- return `${onCreateStart}${modifiedContent}${onCreateEnd}`;
157
- } else if (superOnCreateLineRegex.test(onCreateContent)) {
158
- // SoLoader.init() not found, insert after super.onCreate()
159
- const modifiedContent = onCreateContent.replace(superOnCreateLineRegex, `$&${onCreateInjection}`);
160
- WarningAggregator.addWarningAndroid('codepush-plugin', 'SoLoader.init() not found in onCreate(). Placing CodePush initialization after super.onCreate().');
161
- return `${onCreateStart}${modifiedContent}${onCreateEnd}`;
162
- } else {
163
- // Neither found, inject at the start of the method
164
- WarningAggregator.addWarningAndroid('codepush-plugin', 'Could not find super.onCreate() or SoLoader.init() in onCreate(). CodePush initialization may be misplaced.');
165
- return `${onCreateStart}${onCreateInjection}${onCreateContent}${onCreateEnd}`;
166
- }
167
- });
168
- }
169
-
170
- // --- 3. Modify getPackages method ---
171
- const getPackagesRegex = /override fun getPackages\(\): List<ReactPackage>\s*\{/m;
172
- const originalPackagesLineRegex = /val\s+packages\s*=\s*PackageList\(this\)\.packages/m;
173
- const mutablePackagesLine = "val packages: MutableList<ReactPackage> = PackageList(this).packages.toMutableList()";
174
- const packagesInjection = `
175
- try {
176
- val codePushInstance = CodePush.getInstance(getString(R.string.CodePushDeploymentKey), this@MainApplication, BuildConfig.DEBUG);
177
- if (!packages.contains(codePushInstance)) {
178
- packages.add(codePushInstance);
179
- Log.d("CodePushDebug", "CodePush instance added to packages.");
180
- } else {
181
- Log.d("CodePushDebug", "CodePush instance was already present in packages list; not adding again.");
182
- }
183
- } catch (e: Exception) {
184
- Log.e("CodePushDebug", "Error adding CodePush to packages list: " + e.message, e);
185
- }
186
- `;
187
- if (getPackagesRegex.test(content) && !content.includes('CodePush.getInstance(getString(R.string.CodePushDeploymentKey)')) {
188
- if (originalPackagesLineRegex.test(content)) {
189
- content = content.replace(originalPackagesLineRegex, mutablePackagesLine);
190
- content = content.replace(/(\n\s*return\s+packages)/m, `\n${packagesInjection}$1`);
191
- } else {
192
- WarningAggregator.addWarningAndroid('codepush-plugin', 'Could not find standard packages list initialization in getPackages(). CodePush package not registered.');
193
- }
194
- }
195
-
196
- // --- 4. Add getJSBundleFile method ---
197
- const getJSBundleFileMethodString = `
198
- override fun getJSBundleFile(): String {
199
- return CodePush.getJSBundleFile()
200
- }`;
201
- const hermesEnabledAnchor = /(override\s+val\s+isHermesEnabled:\s*Boolean\s*=\s*BuildConfig\.IS_HERMES_ENABLED)\s*\n/m;
202
-
203
- if (!content.includes("override fun getJSBundleFile(): String")) {
204
- if (hermesEnabledAnchor.test(content)) {
205
- content = content.replace(hermesEnabledAnchor, `$1\n${getJSBundleFileMethodString}\n`);
206
- } else {
207
- WarningAggregator.addWarningAndroid('codepush-plugin', 'Could not find `isHermesEnabled` property to anchor `getJSBundleFile()` insertion. Please review `MainApplication.kt`.');
208
- }
209
- }
210
-
211
- modConfig.modResults.contents = content;
212
- return modConfig;
213
- });
214
- };
215
-
216
- const withAndroidGradle = (config) => {
217
- return withAppBuildGradle(config, (modConfig) => {
218
- if (modConfig.modResults.language === 'groovy') {
219
- let content = modConfig.modResults.contents;
220
-
221
- // This part adds the codepush.gradle apply line and is correct.
222
- const codePushApplyLine = 'apply from: "../../node_modules/@turbopush/react-native-code-push/android/codepush.gradle"';
223
- if (!content.includes(codePushApplyLine)) {
224
- content += `\n${codePushApplyLine}\n`;
225
- }
226
-
227
- const debugConfigFieldLine = 'buildConfigField "boolean", "DEBUG", "true"';
228
- const releaseConfigFieldLine = 'buildConfigField "boolean", "DEBUG", "false"';
229
- const indent = ' ';
230
-
231
- /**
232
- * A robust function to add a configuration field to a specific build type.
233
- * It operates on the entire gradle content to ensure context is never lost.
234
- * @param {string} gradleContent The entire content of the build.gradle file.
235
- * @param {string} buildType The name of the build type (e.g., "debug").
236
- * @param {string} field The configuration line to add.
237
- * @returns {string} The modified gradle content.
238
- */
239
- const addFieldToBuildType = (gradleContent, buildType, field) => {
240
- // Regex to find a specific buildType block that is inside the buildTypes block
241
- const buildTypeRegex = new RegExp(`(buildTypes\\s*\\{[\\s\\S]*?${buildType}\\s*\\{)([\\s\\S]*?)(\\n\\s*\\})`, 'm');
242
-
243
- if (buildTypeRegex.test(gradleContent)) {
244
- // The build type block (e.g., debug {}) already exists.
245
- return gradleContent.replace(buildTypeRegex, (match, startBlock, innerContent, endBlock) => {
246
- if (innerContent.includes(field.trim())) {
247
- return match; // Field already exists, no changes needed.
248
- }
249
- // Add the field to the existing block.
250
- const newInnerContent = innerContent.trim() ? `${innerContent.trim()}\n${indent}${field.trim()}` : `\n${indent}${field.trim()}`;
251
- return `${startBlock}${newInnerContent}\n ${endBlock}`;
252
- });
253
- } else {
254
- // The build type block does not exist, so we need to add it.
255
- const buildTypesRegex = /(buildTypes\s*\{)([\s\S]*?)(\n\s*\})/m;
256
- if (buildTypesRegex.test(gradleContent)) {
257
- // The buildTypes block exists, so add the new build type to it.
258
- return gradleContent.replace(buildTypesRegex, (match, startBlock, innerContent, endBlock) => {
259
- const newBlock = `\n ${buildType} {\n${indent}${field.trim()}\n }`;
260
- return `${startBlock}${innerContent.trim()}${newBlock}${endBlock}`;
261
- });
262
- } else {
263
- // The buildTypes block itself doesn't exist, a rare edge case.
264
- // Expo projects should always have a buildTypes block.
265
- WarningAggregator.addWarningAndroid('codepush-plugin', `Could not find buildTypes { ... } block in app/build.gradle to add the '${buildType}' configuration.`);
266
- return gradleContent;
267
- }
268
- }
269
- };
270
-
271
- // Apply the modifications for debug and release builds sequentially.
272
- // Each function call operates on the full, updated content, preventing nesting errors.
273
- content = addFieldToBuildType(content, 'debug', debugConfigFieldLine);
274
- content = addFieldToBuildType(content, 'release', releaseConfigFieldLine);
275
-
276
- modConfig.modResults.contents = content;
277
- } else {
278
- WarningAggregator.addWarningAndroid('codepush-plugin', 'Cannot apply build.gradle modifications because it is not a groovy file.');
279
- }
280
- return modConfig;
281
- });
282
- };
283
-
284
- const withAndroidStrings = (config, options) => {
285
- return withStringsXml(config, (config) => {
286
- if (!config.modResults.resources) config.modResults.resources = {};
287
- if (!config.modResults.resources.string) config.modResults.resources.string = [];
288
- const strings = config.modResults.resources.string;
289
-
290
- const setString = (name, value) => {
291
- const existing = strings.find(s => s.$.name === name);
292
- if (existing) {
293
- existing._ = value;
294
- } else {
295
- strings.push({$: { name, translatable: 'false' }, _: value });
296
- }
297
- };
298
- if (options.android?.CodePushDeploymentKey) {
299
- setString('CodePushDeploymentKey', options.android.CodePushDeploymentKey);
300
- }
301
- if (options.android?.CodePushServerURL) {
302
- setString('CodePushServerUrl', options.android.CodePushServerURL);
303
- }
304
- return config;
305
- });
306
- };
307
-
308
- // --- CORRECTED EXPORT BLOCK ---
309
- module.exports = (config, options = {}) => {
310
- if (!options) options = {};
311
-
312
- if (options.ios) {
313
- config = withCodePushAppDelegate(config, options);
314
- config = withCodePushInfoPlist(config, options);
315
- }
316
-
317
- if (options.android) {
318
- config = withAndroidStrings(config, options);
319
- // Correctly call the wrapper functions we defined
320
- config = withAndroidMainApplication(config);
321
- config = withAndroidGradle(config);
322
- }
323
- return config;
324
- };
package/tsconfig.json DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES5",
4
- "module": "commonjs",
5
- "lib": ["es6"],
6
- "noImplicitAny": true,
7
- "noEmitOnError": true,
8
- "moduleResolution": "node",
9
- "sourceMap": true,
10
- "rootDir": "test",
11
- "outDir": "bin",
12
- "removeComments": true
13
- },
14
- "exclude": [
15
- "Examples"
16
- ]
17
- }
package/tslint.json DELETED
@@ -1,32 +0,0 @@
1
- {
2
- "defaultSeverity": "error",
3
- "rules": {
4
- "class-name": true,
5
- "comment-format": [true,
6
- "check-space"
7
- ],
8
- "indent": [true,
9
- "spaces"
10
- ],
11
- "one-line": [true,
12
- "check-open-brace"
13
- ],
14
- "quotemark": [true,
15
- "double"
16
- ],
17
- "semicolon": true,
18
- "whitespace": [true,
19
- "check-branch",
20
- "check-operator",
21
- "check-separator",
22
- "check-type"
23
- ],
24
- "typedef-whitespace": [true, {
25
- "call-signature": "nospace",
26
- "index-signature": "nospace",
27
- "parameter": "nospace",
28
- "property-declaration": "nospace",
29
- "variable-declaration": "nospace"
30
- }]
31
- }
32
- }
@@ -1,3 +0,0 @@
1
- EXPORTS
2
- DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
3
- DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
@@ -1,198 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <Import Project="$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props')" />
4
- <PropertyGroup Label="Globals">
5
- <CppWinRTOptimized>true</CppWinRTOptimized>
6
- <CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
7
- <CppWinRTGenerateWindowsMetadata>true</CppWinRTGenerateWindowsMetadata>
8
- <MinimalCoreWin>true</MinimalCoreWin>
9
- <ProjectGuid>{a6b6216e-fa3f-45e2-9c8e-40023cce9132}</ProjectGuid>
10
- <ProjectName>CodePush</ProjectName>
11
- <RootNamespace>Microsoft.CodePush.ReactNative</RootNamespace>
12
- <DefaultLanguage>en-US</DefaultLanguage>
13
- <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
14
- <AppContainerApplication>true</AppContainerApplication>
15
- <ApplicationType>Windows Store</ApplicationType>
16
- <ApplicationTypeRevision>10.0</ApplicationTypeRevision>
17
- <WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0</WindowsTargetPlatformVersion>
18
- <WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
19
- </PropertyGroup>
20
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
21
- <PropertyGroup Label="ReactNativeWindowsProps">
22
- <ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
23
- </PropertyGroup>
24
- <ItemGroup Label="ProjectConfigurations">
25
- <ProjectConfiguration Include="Debug|ARM">
26
- <Configuration>Debug</Configuration>
27
- <Platform>ARM</Platform>
28
- </ProjectConfiguration>
29
- <ProjectConfiguration Include="Debug|ARM64">
30
- <Configuration>Debug</Configuration>
31
- <Platform>ARM64</Platform>
32
- </ProjectConfiguration>
33
- <ProjectConfiguration Include="Debug|Win32">
34
- <Configuration>Debug</Configuration>
35
- <Platform>Win32</Platform>
36
- </ProjectConfiguration>
37
- <ProjectConfiguration Include="Debug|x64">
38
- <Configuration>Debug</Configuration>
39
- <Platform>x64</Platform>
40
- </ProjectConfiguration>
41
- <ProjectConfiguration Include="Release|ARM">
42
- <Configuration>Release</Configuration>
43
- <Platform>ARM</Platform>
44
- </ProjectConfiguration>
45
- <ProjectConfiguration Include="Release|ARM64">
46
- <Configuration>Release</Configuration>
47
- <Platform>ARM64</Platform>
48
- </ProjectConfiguration>
49
- <ProjectConfiguration Include="Release|Win32">
50
- <Configuration>Release</Configuration>
51
- <Platform>Win32</Platform>
52
- </ProjectConfiguration>
53
- <ProjectConfiguration Include="Release|x64">
54
- <Configuration>Release</Configuration>
55
- <Platform>x64</Platform>
56
- </ProjectConfiguration>
57
- </ItemGroup>
58
- <PropertyGroup Label="Configuration">
59
- <ConfigurationType>DynamicLibrary</ConfigurationType>
60
- <PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
61
- <PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
62
- <CharacterSet>Unicode</CharacterSet>
63
- <GenerateManifest>false</GenerateManifest>
64
- </PropertyGroup>
65
- <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
66
- <UseDebugLibraries>true</UseDebugLibraries>
67
- <LinkIncremental>true</LinkIncremental>
68
- </PropertyGroup>
69
- <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
70
- <UseDebugLibraries>false</UseDebugLibraries>
71
- <WholeProgramOptimization>true</WholeProgramOptimization>
72
- <LinkIncremental>false</LinkIncremental>
73
- </PropertyGroup>
74
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
75
- <ImportGroup Label="ExtensionSettings">
76
- </ImportGroup>
77
- <ImportGroup Label="Shared">
78
- </ImportGroup>
79
- <ImportGroup Label="PropertySheets">
80
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
81
- </ImportGroup>
82
- <ImportGroup Label="PropertySheets">
83
- <Import Project="PropertySheet.props" />
84
- </ImportGroup>
85
- <ImportGroup Label="ReactNativeWindowsPropertySheets">
86
- <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" />
87
- </ImportGroup>
88
- <PropertyGroup Label="UserMacros" />
89
- <PropertyGroup />
90
- <ItemDefinitionGroup>
91
- <ClCompile>
92
- <PrecompiledHeader>Use</PrecompiledHeader>
93
- <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
94
- <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
95
- <WarningLevel>Level4</WarningLevel>
96
- <AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
97
- <!--Temporarily disable cppwinrt heap enforcement to work around xaml compiler generated std::shared_ptr use -->
98
- <AdditionalOptions Condition="'$(CppWinRTHeapEnforcement)'==''">/DWINRT_NO_MAKE_DETECTION %(AdditionalOptions)</AdditionalOptions>
99
- <DisableSpecificWarnings>
100
- </DisableSpecificWarnings>
101
- <PreprocessorDefinitions>_WINRT_DLL;WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
102
- <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
103
- </ClCompile>
104
- <Link>
105
- <SubSystem>Console</SubSystem>
106
- <GenerateWindowsMetadata>true</GenerateWindowsMetadata>
107
- <ModuleDefinitionFile>CodePush.def</ModuleDefinitionFile>
108
- </Link>
109
- </ItemDefinitionGroup>
110
- <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
111
- <ClCompile>
112
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
113
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
114
- </ClCompile>
115
- </ItemDefinitionGroup>
116
- <ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
117
- <ClCompile>
118
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
119
- </ClCompile>
120
- <Link>
121
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
122
- <OptimizeReferences>true</OptimizeReferences>
123
- </Link>
124
- </ItemDefinitionGroup>
125
- <ItemGroup>
126
- <ClInclude Include="CodePushConfig.h" />
127
- <ClInclude Include="CodePushDownloadHandler.h" />
128
- <ClInclude Include="CodePushNativeModule.h" />
129
- <ClInclude Include="CodePushPackage.h" />
130
- <ClInclude Include="CodePushTelemetryManager.h" />
131
- <ClInclude Include="CodePushUpdateUtils.h" />
132
- <ClInclude Include="CodePushUtils.h" />
133
- <ClInclude Include="FileUtils.h" />
134
- <ClInclude Include="miniz\miniz.h" />
135
- <ClInclude Include="pch.h" />
136
- <ClInclude Include="ReactPackageProvider.h">
137
- <DependentUpon>ReactPackageProvider.idl</DependentUpon>
138
- </ClInclude>
139
- </ItemGroup>
140
- <ItemGroup>
141
- <ClCompile Include="CodePushConfig.cpp" />
142
- <ClCompile Include="CodePushDownloadHandler.cpp" />
143
- <ClCompile Include="CodePushNativeModule.cpp" />
144
- <ClCompile Include="CodePushPackage.cpp" />
145
- <ClCompile Include="CodePushTelemetryManager.cpp" />
146
- <ClCompile Include="CodePushUpdateUtils.cpp" />
147
- <ClCompile Include="CodePushUtils.cpp" />
148
- <ClCompile Include="FileUtils.cpp" />
149
- <ClCompile Include="miniz\miniz.c">
150
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
151
- </ClCompile>
152
- <ClCompile Include="pch.cpp">
153
- <PrecompiledHeader>Create</PrecompiledHeader>
154
- </ClCompile>
155
- <ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
156
- <ClCompile Include="ReactPackageProvider.cpp">
157
- <DependentUpon>ReactPackageProvider.idl</DependentUpon>
158
- </ClCompile>
159
- </ItemGroup>
160
- <ItemGroup>
161
- <Midl Include="CodePushConfig.idl" />
162
- <Midl Include="ReactPackageProvider.idl" />
163
- </ItemGroup>
164
- <ItemGroup>
165
- <None Include="CodePush.def" />
166
- </ItemGroup>
167
- <ItemGroup>
168
- <None Include="packages.config" />
169
- <None Include="PropertySheet.props" />
170
- </ItemGroup>
171
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
172
- <ImportGroup Label="ReactNativeWindowsTargets">
173
- <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" />
174
- </ImportGroup>
175
- <Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild">
176
- <PropertyGroup>
177
- <ErrorText>This project references targets in your node_modules\react-native-windows folder that are missing. The missing file is {0}.</ErrorText>
178
- </PropertyGroup>
179
- <Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props'))" />
180
- <Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets'))" />
181
- </Target>
182
- <ImportGroup Label="ExtensionTargets">
183
- <Import Project="$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets')" />
184
- </ImportGroup>
185
- <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
186
- <PropertyGroup>
187
- <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
188
- </PropertyGroup>
189
- <Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props'))" />
190
- <Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets'))" />
191
- </Target>
192
- <ItemGroup>
193
- <ProjectReference Update="$(ReactNativeWindowsDir)\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj">
194
- <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
195
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
196
- </ProjectReference>
197
- </ItemGroup>
198
- </Project>
@@ -1,91 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <ItemGroup>
4
- <Filter Include="Resources">
5
- <UniqueIdentifier>accd3aa8-1ba0-4223-9bbe-0c431709210b</UniqueIdentifier>
6
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms</Extensions>
7
- </Filter>
8
- <Filter Include="CodePush">
9
- <UniqueIdentifier>{c2eae772-39a8-4b12-aad7-60e9ca2072ef}</UniqueIdentifier>
10
- </Filter>
11
- <Filter Include="miniz">
12
- <UniqueIdentifier>{53513ea0-fe7c-4f69-8d3e-c1a9efbb7333}</UniqueIdentifier>
13
- </Filter>
14
- </ItemGroup>
15
- <ItemGroup>
16
- <ClCompile Include="pch.cpp" />
17
- <ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
18
- <ClCompile Include="miniz\miniz.c">
19
- <Filter>miniz</Filter>
20
- </ClCompile>
21
- <ClCompile Include="CodePushConfig.cpp">
22
- <Filter>CodePush</Filter>
23
- </ClCompile>
24
- <ClCompile Include="CodePushDownloadHandler.cpp">
25
- <Filter>CodePush</Filter>
26
- </ClCompile>
27
- <ClCompile Include="CodePushNativeModule.cpp">
28
- <Filter>CodePush</Filter>
29
- </ClCompile>
30
- <ClCompile Include="CodePushPackage.cpp">
31
- <Filter>CodePush</Filter>
32
- </ClCompile>
33
- <ClCompile Include="CodePushTelemetryManager.cpp">
34
- <Filter>CodePush</Filter>
35
- </ClCompile>
36
- <ClCompile Include="CodePushUpdateUtils.cpp">
37
- <Filter>CodePush</Filter>
38
- </ClCompile>
39
- <ClCompile Include="CodePushUtils.cpp">
40
- <Filter>CodePush</Filter>
41
- </ClCompile>
42
- <ClCompile Include="FileUtils.cpp">
43
- <Filter>CodePush</Filter>
44
- </ClCompile>
45
- <ClCompile Include="ReactPackageProvider.cpp" />
46
- </ItemGroup>
47
- <ItemGroup>
48
- <ClInclude Include="pch.h" />
49
- <ClInclude Include="miniz\miniz.h">
50
- <Filter>miniz</Filter>
51
- </ClInclude>
52
- <ClInclude Include="CodePushConfig.h">
53
- <Filter>CodePush</Filter>
54
- </ClInclude>
55
- <ClInclude Include="CodePushDownloadHandler.h">
56
- <Filter>CodePush</Filter>
57
- </ClInclude>
58
- <ClInclude Include="CodePushNativeModule.h">
59
- <Filter>CodePush</Filter>
60
- </ClInclude>
61
- <ClInclude Include="CodePushPackage.h">
62
- <Filter>CodePush</Filter>
63
- </ClInclude>
64
- <ClInclude Include="CodePushTelemetryManager.h">
65
- <Filter>CodePush</Filter>
66
- </ClInclude>
67
- <ClInclude Include="CodePushUpdateUtils.h">
68
- <Filter>CodePush</Filter>
69
- </ClInclude>
70
- <ClInclude Include="CodePushUtils.h">
71
- <Filter>CodePush</Filter>
72
- </ClInclude>
73
- <ClInclude Include="FileUtils.h">
74
- <Filter>CodePush</Filter>
75
- </ClInclude>
76
- <ClInclude Include="ReactPackageProvider.h" />
77
- </ItemGroup>
78
- <ItemGroup>
79
- <None Include="CodePush.def" />
80
- <None Include="packages.config" />
81
- </ItemGroup>
82
- <ItemGroup>
83
- <None Include="PropertySheet.props" />
84
- </ItemGroup>
85
- <ItemGroup>
86
- <Midl Include="ReactPackageProvider.idl" />
87
- <Midl Include="CodePushConfig.idl">
88
- <Filter>CodePush</Filter>
89
- </Midl>
90
- </ItemGroup>
91
- </Project>