@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.
- package/CodePush.js +22 -19
- package/CodePush.podspec +3 -3
- package/LICENSE.md +1 -1
- package/README.md +159 -296
- package/android/app/.gradle/config.properties +2 -0
- package/android/app/build.gradle +2 -0
- package/android/app/local.properties +8 -0
- package/android/app/src/main/AndroidManifest.xml +1 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java +27 -21
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +5 -5
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushConstants.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInstallMode.java +2 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidPublicKeyException.java +2 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidUpdateException.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushMalformedDataException.java +2 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +5 -5
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNotInitializedException.java +2 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushTelemetryManager.java +14 -14
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUnknownException.java +2 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateManager.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateState.java +2 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java +16 -9
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUtils.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/DownloadProgress.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/DownloadProgressCallback.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/FileUtils.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/ReactInstanceHolder.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/SettingsManager.java +1 -1
- package/android/app/src/main/java/com/microsoft/codepush/react/TLSSocketFactory.java +1 -1
- package/android/build.gradle +3 -0
- package/android/codepush.gradle +3 -3
- package/docs/advanced-usage.md +56 -0
- package/docs/api-android.md +12 -75
- package/docs/api-ios.md +5 -17
- package/docs/api-js.md +18 -55
- package/docs/setup-android.md +15 -397
- package/docs/setup-ios.md +24 -198
- package/docs/setup-windows.md +7 -74
- package/ios/CodePush/CodePush.h +4 -4
- package/ios/CodePush/CodePush.m +10 -9
- package/ios/CodePush/CodePushConfig.m +14 -11
- package/ios/CodePush/CodePushPackage.m +60 -60
- package/ios/CodePush/CodePushTelemetryManager.m +13 -13
- package/ios/CodePush.xcodeproj/project.pbxproj +24 -470
- package/ios/PrivacyInfo.xcprivacy +31 -0
- package/package.json +27 -24
- package/react-native.config.js +1 -1
- package/scripts/generateBundledResourcesHash.js +1 -1
- package/scripts/getFilesInFolder.js +1 -1
- package/scripts/recordFilesBeforeBundleCommand.js +1 -1
- package/typings/react-native-code-push.d.ts +22 -22
- package/windows/CodePush/CodePushConfig.cpp +3 -3
- package/windows/CodePush/CodePushConfig.h +3 -3
- package/windows/CodePush/CodePushNativeModule.cpp +27 -27
- package/windows/CodePush/CodePushNativeModule.h +4 -4
- package/windows/CodePush/CodePushTelemetryManager.cpp +12 -12
- package/windows/CodePush/CodePushTelemetryManager.h +1 -1
- package/.azurepipelines/build-rn-code-push-1es.yml +0 -104
- package/.azurepipelines/test-rn-code-push.yml +0 -94
- package/.config/CredScanSuppressions.json +0 -14
- package/SECURITY.md +0 -41
- package/docs/multi-deployment-testing-android.md +0 -148
- package/docs/multi-deployment-testing-ios.md +0 -59
- package/ios/CodePush/Base64/Base64/MF_Base64Additions.h +0 -34
- package/ios/CodePush/Base64/Base64/MF_Base64Additions.m +0 -252
- package/ios/CodePush/Base64/README.md +0 -47
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithm.h +0 -69
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.h +0 -16
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.m +0 -51
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.h +0 -15
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.m +0 -55
- package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.h +0 -24
- package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.m +0 -41
- package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.h +0 -28
- package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.m +0 -205
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.h +0 -103
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.m +0 -322
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.h +0 -37
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.m +0 -145
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.h +0 -35
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.m +0 -551
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTRSAlgorithm.h +0 -23
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.h +0 -43
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.m +0 -230
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.h +0 -31
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.m +0 -113
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.h +0 -38
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.m +0 -500
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.h +0 -18
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.m +0 -214
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.h +0 -23
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.m +0 -29
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.h +0 -19
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.m +0 -68
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.h +0 -18
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.m +0 -72
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.h +0 -67
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.m +0 -111
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.h +0 -119
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.m +0 -307
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.h +0 -94
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.m +0 -619
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.h +0 -164
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.m +0 -514
- package/ios/CodePush/JWT/Core/Coding/JWTCoding.h +0 -24
- package/ios/CodePush/JWT/Core/Coding/JWTCoding.m +0 -11
- package/ios/CodePush/JWT/Core/FrameworkSupplement/JWT.h +0 -52
- package/ios/CodePush/JWT/Core/FrameworkSupplement/Map.modulemap +0 -5
- package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.h +0 -28
- package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.m +0 -70
- package/ios/CodePush/JWT/Core/Supplement/JWTDeprecations.h +0 -22
- package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.h +0 -34
- package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.m +0 -73
- package/ios/CodePush/JWT/LICENSE +0 -19
- package/ios/CodePush/JWT/README.md +0 -489
- package/ios/CodePush/SSZipArchive/Common.h +0 -81
- package/ios/CodePush/SSZipArchive/README.md +0 -1
- package/ios/CodePush/SSZipArchive/SSZipArchive.h +0 -76
- package/ios/CodePush/SSZipArchive/SSZipArchive.m +0 -691
- package/ios/CodePush/SSZipArchive/aes/aes.h +0 -198
- package/ios/CodePush/SSZipArchive/aes/aes_via_ace.h +0 -541
- package/ios/CodePush/SSZipArchive/aes/aescrypt.c +0 -294
- package/ios/CodePush/SSZipArchive/aes/aeskey.c +0 -548
- package/ios/CodePush/SSZipArchive/aes/aesopt.h +0 -739
- package/ios/CodePush/SSZipArchive/aes/aestab.c +0 -391
- package/ios/CodePush/SSZipArchive/aes/aestab.h +0 -173
- package/ios/CodePush/SSZipArchive/aes/brg_endian.h +0 -126
- package/ios/CodePush/SSZipArchive/aes/brg_types.h +0 -219
- package/ios/CodePush/SSZipArchive/aes/entropy.c +0 -54
- package/ios/CodePush/SSZipArchive/aes/entropy.h +0 -16
- package/ios/CodePush/SSZipArchive/aes/fileenc.c +0 -144
- package/ios/CodePush/SSZipArchive/aes/fileenc.h +0 -121
- package/ios/CodePush/SSZipArchive/aes/hmac.c +0 -145
- package/ios/CodePush/SSZipArchive/aes/hmac.h +0 -103
- package/ios/CodePush/SSZipArchive/aes/prng.c +0 -155
- package/ios/CodePush/SSZipArchive/aes/prng.h +0 -82
- package/ios/CodePush/SSZipArchive/aes/pwd2key.c +0 -103
- package/ios/CodePush/SSZipArchive/aes/pwd2key.h +0 -57
- package/ios/CodePush/SSZipArchive/aes/sha1.c +0 -258
- package/ios/CodePush/SSZipArchive/aes/sha1.h +0 -73
- package/ios/CodePush/SSZipArchive/minizip/crypt.h +0 -130
- package/ios/CodePush/SSZipArchive/minizip/ioapi.c +0 -369
- package/ios/CodePush/SSZipArchive/minizip/ioapi.h +0 -175
- package/ios/CodePush/SSZipArchive/minizip/mztools.c +0 -284
- package/ios/CodePush/SSZipArchive/minizip/mztools.h +0 -31
- package/ios/CodePush/SSZipArchive/minizip/unzip.c +0 -1839
- package/ios/CodePush/SSZipArchive/minizip/unzip.h +0 -248
- package/ios/CodePush/SSZipArchive/minizip/zip.c +0 -1910
- package/ios/CodePush/SSZipArchive/minizip/zip.h +0 -202
- package/scripts/postlink/android/postlink.js +0 -87
- package/scripts/postlink/ios/postlink.js +0 -116
- package/scripts/postlink/run.js +0 -11
- package/scripts/postunlink/android/postunlink.js +0 -74
- package/scripts/postunlink/ios/postunlink.js +0 -87
- package/scripts/postunlink/run.js +0 -11
- package/scripts/tools/linkToolsAndroid.js +0 -57
- package/scripts/tools/linkToolsIos.js +0 -130
- package/windows-legacy/CodePush/CodePush.csproj +0 -128
- package/windows-legacy/CodePush/CodePushUtils.cs +0 -47
- package/windows-legacy/CodePush/FileUtils.cs +0 -40
- package/windows-legacy/CodePush/Properties/AssemblyInfo.cs +0 -29
- package/windows-legacy/CodePush/Properties/CodePush.rd.xml +0 -33
- package/windows-legacy/CodePush/UpdateManager.cs +0 -305
- package/windows-legacy/CodePush/UpdateUtils.cs +0 -46
- package/windows-legacy/CodePush.Net46/Adapters/Http/HttpProgress.cs +0 -28
- package/windows-legacy/CodePush.Net46/Adapters/Storage/ApplicationDataContainer.cs +0 -106
- package/windows-legacy/CodePush.Net46/CodePush.Net46.csproj +0 -103
- package/windows-legacy/CodePush.Net46/CodePushUtils.cs +0 -158
- package/windows-legacy/CodePush.Net46/FileUtils.cs +0 -55
- package/windows-legacy/CodePush.Net46/Properties/AssemblyInfo.cs +0 -36
- package/windows-legacy/CodePush.Net46/UpdateManager.cs +0 -330
- package/windows-legacy/CodePush.Net46/UpdateUtils.cs +0 -70
- package/windows-legacy/CodePush.Net46/packages.config +0 -5
- package/windows-legacy/CodePush.Net46.Test/ApplicationDataContainerTest.cs +0 -105
- package/windows-legacy/CodePush.Net46.Test/CodePush.Net46.Test.csproj +0 -137
- package/windows-legacy/CodePush.Net46.Test/Properties/AssemblyInfo.cs +0 -36
- package/windows-legacy/CodePush.Net46.Test/TelemetryManagerTest.cs +0 -117
- package/windows-legacy/CodePush.Net46.Test/app.config +0 -11
- package/windows-legacy/CodePush.Net46.Test/packages.config +0 -4
- package/windows-legacy/CodePush.Shared/CodePush.Shared.projitems +0 -22
- package/windows-legacy/CodePush.Shared/CodePush.Shared.shproj +0 -13
- package/windows-legacy/CodePush.Shared/CodePushConstants.cs +0 -35
- package/windows-legacy/CodePush.Shared/CodePushNativeModule.cs +0 -329
- package/windows-legacy/CodePush.Shared/CodePushReactPackage.cs +0 -235
- package/windows-legacy/CodePush.Shared/CodePushUtils.cs +0 -70
- package/windows-legacy/CodePush.Shared/InstallMode.cs +0 -9
- package/windows-legacy/CodePush.Shared/MinimumBackgroundListener.cs +0 -44
- package/windows-legacy/CodePush.Shared/SettingsManager.cs +0 -148
- package/windows-legacy/CodePush.Shared/TelemetryManager.cs +0 -250
- package/windows-legacy/CodePush.Shared/UpdateState.cs +0 -9
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
trigger:
|
|
2
|
-
- master
|
|
3
|
-
|
|
4
|
-
pr:
|
|
5
|
-
- master
|
|
6
|
-
|
|
7
|
-
resources:
|
|
8
|
-
repositories:
|
|
9
|
-
- repository: 1ESPipelineTemplates
|
|
10
|
-
type: git
|
|
11
|
-
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
|
12
|
-
ref: refs/tags/release
|
|
13
|
-
name: $(Build.SourceBranchName)_$(date:yyyyMMdd)$(rev:.r)
|
|
14
|
-
|
|
15
|
-
extends:
|
|
16
|
-
${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
|
|
17
|
-
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
|
|
18
|
-
${{ else }}:
|
|
19
|
-
template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates
|
|
20
|
-
parameters:
|
|
21
|
-
pool:
|
|
22
|
-
name: 1ES-PT-CBL-Mariner-2.0-Gen2
|
|
23
|
-
os: linux
|
|
24
|
-
customBuildTags:
|
|
25
|
-
- ES365AIMigrationTooling-BulkMigrated
|
|
26
|
-
sdl:
|
|
27
|
-
sourceAnalysisPool: 1ES-PT-Windows-2022
|
|
28
|
-
credscan:
|
|
29
|
-
suppressionsFile: $(Build.SourcesDirectory)/.config/CredScanSuppressions.json
|
|
30
|
-
stages:
|
|
31
|
-
- stage: Stage
|
|
32
|
-
jobs:
|
|
33
|
-
- job: HostJob
|
|
34
|
-
templateContext:
|
|
35
|
-
outputs:
|
|
36
|
-
- output: pipelineArtifact
|
|
37
|
-
displayName: "Publish Artifact: artifacts"
|
|
38
|
-
path: '$(Build.ArtifactStagingDirectory)/npm'
|
|
39
|
-
artifactName: npm
|
|
40
|
-
|
|
41
|
-
steps:
|
|
42
|
-
- task: NodeTool@0
|
|
43
|
-
inputs:
|
|
44
|
-
versionSpec: '14.x'
|
|
45
|
-
displayName: 'Install Node.js'
|
|
46
|
-
|
|
47
|
-
- script: |
|
|
48
|
-
npm pack
|
|
49
|
-
npm install -g react-native-code-push*.tgz
|
|
50
|
-
displayName: 'Package react-native-code-push'
|
|
51
|
-
workingDirectory: $(Build.SourcesDirectory)
|
|
52
|
-
|
|
53
|
-
- task: DeleteFiles@1
|
|
54
|
-
inputs:
|
|
55
|
-
contents: node_modules
|
|
56
|
-
displayName: 'Delete node_modules'
|
|
57
|
-
|
|
58
|
-
- task: ArchiveFiles@2
|
|
59
|
-
inputs:
|
|
60
|
-
rootFolderOrFile: '$(Build.SourcesDirectory)'
|
|
61
|
-
includeRootFolder: false
|
|
62
|
-
archiveType: 'tar'
|
|
63
|
-
archiveFile: '$(Build.ArtifactStagingDirectory)/npm/$(Build.BuildId).tgz'
|
|
64
|
-
replaceExistingArchive: true
|
|
65
|
-
verbose: true
|
|
66
|
-
displayName: 'Prepare npm artifact'
|
|
67
|
-
|
|
68
|
-
- stage: APIScan
|
|
69
|
-
dependsOn: Stage
|
|
70
|
-
pool:
|
|
71
|
-
name: 1ES-PT-Windows-2022
|
|
72
|
-
os: windows
|
|
73
|
-
variables:
|
|
74
|
-
"agent.source.skip": true
|
|
75
|
-
jobs:
|
|
76
|
-
- job: APIScan
|
|
77
|
-
steps:
|
|
78
|
-
- task: DownloadPipelineArtifact@2
|
|
79
|
-
displayName: Download Build Artifacts for APIScan
|
|
80
|
-
inputs:
|
|
81
|
-
artifactName: npm
|
|
82
|
-
targetPath: '$(Agent.BuildDirectory)/npm'
|
|
83
|
-
- task: ExtractFiles@1
|
|
84
|
-
inputs:
|
|
85
|
-
archiveFilePatterns: '$(Agent.BuildDirectory)/npm/*.tgz'
|
|
86
|
-
destinationFolder: '$(Agent.BuildDirectory)/npm_extracted'
|
|
87
|
-
- task: AzureKeyVault@2
|
|
88
|
-
inputs:
|
|
89
|
-
azureSubscription: 'AC - Dev Infra & Build Pool'
|
|
90
|
-
KeyVaultName: 'mobile-center-sdk'
|
|
91
|
-
SecretsFilter: 'appcenter-sdk-managed-identity-clientid'
|
|
92
|
-
RunAsPreJob: false
|
|
93
|
-
- task: APIScan@2
|
|
94
|
-
displayName: 'Run APIScan'
|
|
95
|
-
inputs:
|
|
96
|
-
softwareFolder: '$(Agent.BuildDirectory)\npm_extracted'
|
|
97
|
-
softwareName: 'react-native-code-push'
|
|
98
|
-
softwareVersionNum: '$(Build.BuildId)'
|
|
99
|
-
isLargeApp: false
|
|
100
|
-
toolVersion: 'Latest'
|
|
101
|
-
verbosityLevel: verbose
|
|
102
|
-
condition: and(succeeded(), ne(variables['DisableAPIScan'], 'true'))
|
|
103
|
-
env:
|
|
104
|
-
AzureServicesAuthConnectionString: 'runAs=App;AppId=$(appcenter-sdk-managed-identity-clientid)'
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
trigger:
|
|
2
|
-
- master
|
|
3
|
-
|
|
4
|
-
pr:
|
|
5
|
-
- master
|
|
6
|
-
|
|
7
|
-
variables:
|
|
8
|
-
- name: api-level
|
|
9
|
-
value: '27'
|
|
10
|
-
|
|
11
|
-
pool:
|
|
12
|
-
vmImage: 'macOS-12'
|
|
13
|
-
|
|
14
|
-
stages:
|
|
15
|
-
- stage: RunTests
|
|
16
|
-
displayName: 'Run Android & IOS tests'
|
|
17
|
-
jobs:
|
|
18
|
-
- job: TestAndroid
|
|
19
|
-
timeoutInMinutes: 120
|
|
20
|
-
displayName: 'Test android'
|
|
21
|
-
steps:
|
|
22
|
-
|
|
23
|
-
- script: |
|
|
24
|
-
adb devices
|
|
25
|
-
displayName: 'Start adb server'
|
|
26
|
-
|
|
27
|
-
- script: |
|
|
28
|
-
$ANDROID_HOME/tools/bin/sdkmanager "system-images;android-$(api-level);google_apis;x86"
|
|
29
|
-
displayName: 'Download system image'
|
|
30
|
-
|
|
31
|
-
- script: |
|
|
32
|
-
$ANDROID_HOME/tools/bin/avdmanager create avd --force --name TestEmulator --abi google_apis/x86 --package 'system-images;android-$(api-level);google_apis;x86' --device "Nexus 6P"
|
|
33
|
-
displayName: 'Creating Android emulator'
|
|
34
|
-
|
|
35
|
-
- script: |
|
|
36
|
-
$ANDROID_HOME/emulator/emulator -avd TestEmulator -noaudio -no-window -no-snapshot-save -no-boot-anim -memory 6144 &
|
|
37
|
-
displayName: 'Start Android emulator'
|
|
38
|
-
|
|
39
|
-
- script: |
|
|
40
|
-
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done'
|
|
41
|
-
displayName: 'Wait for emulator to boot'
|
|
42
|
-
|
|
43
|
-
- script: |
|
|
44
|
-
adb shell settings put global window_animation_scale 0.0
|
|
45
|
-
displayName: 'Disable animations and transitions'
|
|
46
|
-
|
|
47
|
-
- script: |
|
|
48
|
-
adb shell settings put global transition_animation_scale 0.0
|
|
49
|
-
displayName: 'Disable animations and transitions'
|
|
50
|
-
|
|
51
|
-
- script: |
|
|
52
|
-
adb shell settings put global animator_duration_scale 0.0
|
|
53
|
-
displayName: 'Disable animations and transitions'
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- task: JavaToolInstaller@0
|
|
57
|
-
inputs:
|
|
58
|
-
versionSpec: '11'
|
|
59
|
-
jdkArchitectureOption: 'x64'
|
|
60
|
-
jdkSourceOption: 'PreInstalled'
|
|
61
|
-
displayName: 'Change Java version'
|
|
62
|
-
|
|
63
|
-
- script: |
|
|
64
|
-
npm install
|
|
65
|
-
displayName: 'Package Installation'
|
|
66
|
-
|
|
67
|
-
- script: |
|
|
68
|
-
npm run build:tests && npm run test:setup:android
|
|
69
|
-
displayName: 'Setup Android tests'
|
|
70
|
-
|
|
71
|
-
- script: |
|
|
72
|
-
npm run test:fast:android
|
|
73
|
-
displayName: 'Run Android test'
|
|
74
|
-
|
|
75
|
-
- job: TestIOS
|
|
76
|
-
timeoutInMinutes: 120
|
|
77
|
-
displayName: 'Test IOS'
|
|
78
|
-
steps:
|
|
79
|
-
|
|
80
|
-
- script: |
|
|
81
|
-
npm install
|
|
82
|
-
displayName: 'Install dependencies'
|
|
83
|
-
|
|
84
|
-
- script: |
|
|
85
|
-
npm run build:tests && npm run test:setup:ios
|
|
86
|
-
displayName: 'Setup iOS tests'
|
|
87
|
-
|
|
88
|
-
- script: |
|
|
89
|
-
npm run test:fast:ios
|
|
90
|
-
displayName: 'Run tests'
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tool": "Credential Scanner",
|
|
3
|
-
"suppressions": [
|
|
4
|
-
{
|
|
5
|
-
"file": "/Examples/CodePushDemoApp/android/app/debug.keystore",
|
|
6
|
-
"_justification": "Used only in DemoApp"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"file": "/Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/CodePushDemoAppCpp_TemporaryKey.pfx",
|
|
10
|
-
"_justification": "Used only in DemoApp"
|
|
11
|
-
}
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
|
package/SECURITY.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
|
|
2
|
-
|
|
3
|
-
## Security
|
|
4
|
-
|
|
5
|
-
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
|
|
6
|
-
|
|
7
|
-
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
|
|
8
|
-
|
|
9
|
-
## Reporting Security Issues
|
|
10
|
-
|
|
11
|
-
**Please do not report security vulnerabilities through public GitHub issues.**
|
|
12
|
-
|
|
13
|
-
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
|
|
14
|
-
|
|
15
|
-
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
|
|
16
|
-
|
|
17
|
-
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
|
|
18
|
-
|
|
19
|
-
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
|
20
|
-
|
|
21
|
-
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
|
22
|
-
* Full paths of source file(s) related to the manifestation of the issue
|
|
23
|
-
* The location of the affected source code (tag/branch/commit or direct URL)
|
|
24
|
-
* Any special configuration required to reproduce the issue
|
|
25
|
-
* Step-by-step instructions to reproduce the issue
|
|
26
|
-
* Proof-of-concept or exploit code (if possible)
|
|
27
|
-
* Impact of the issue, including how an attacker might exploit the issue
|
|
28
|
-
|
|
29
|
-
This information will help us triage your report more quickly.
|
|
30
|
-
|
|
31
|
-
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
|
|
32
|
-
|
|
33
|
-
## Preferred Languages
|
|
34
|
-
|
|
35
|
-
We prefer all communications to be in English.
|
|
36
|
-
|
|
37
|
-
## Policy
|
|
38
|
-
|
|
39
|
-
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
|
|
40
|
-
|
|
41
|
-
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
### Android
|
|
2
|
-
|
|
3
|
-
> NOTE
|
|
4
|
-
>
|
|
5
|
-
> Complete demo configured with "multi-deployment testing" feature is [here](https://github.com/microsoft/react-native-code-push/files/1314118/rncp1004.zip).
|
|
6
|
-
|
|
7
|
-
The [Android Gradle plugin](https://google.github.io/android-gradle-dsl/current/index.html) allows you to define custom config settings for each "build type" (like debug, release). This mechanism allows you to easily configure your debug builds to use your CodePush staging deployment key and your release builds to use your CodePush production deployment key.
|
|
8
|
-
|
|
9
|
-
*NOTE: As a reminder, you can retrieve these keys by running `appcenter codepush deployment list -a <ownerName>/<appName> -k` from your terminal.*
|
|
10
|
-
|
|
11
|
-
To set this up, perform the following steps:
|
|
12
|
-
|
|
13
|
-
**For React Native >= v0.60**
|
|
14
|
-
|
|
15
|
-
1. Open the project's app level `build.gradle` file (for example `android/app/build.gradle` in standard React Native projects)
|
|
16
|
-
|
|
17
|
-
2. Find the `android { buildTypes {} }` section and define `resValue` entries for both your `debug` and `release` build types, which reference your `Staging` and `Production` deployment keys respectively.
|
|
18
|
-
|
|
19
|
-
```groovy
|
|
20
|
-
android {
|
|
21
|
-
...
|
|
22
|
-
buildTypes {
|
|
23
|
-
debug {
|
|
24
|
-
...
|
|
25
|
-
// Note: CodePush updates should not be tested in Debug mode as they are overriden by the RN packager. However, because CodePush checks for updates in all modes, we must supply a key.
|
|
26
|
-
resValue "string", "CodePushDeploymentKey", '""'
|
|
27
|
-
...
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
releaseStaging {
|
|
31
|
-
...
|
|
32
|
-
resValue "string", "CodePushDeploymentKey", '"<INSERT_STAGING_KEY>"'
|
|
33
|
-
|
|
34
|
-
// Note: It is a good idea to provide matchingFallbacks for the new buildType you create to prevent build issues
|
|
35
|
-
// Add the following line if not already there
|
|
36
|
-
matchingFallbacks = ['release']
|
|
37
|
-
...
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
release {
|
|
41
|
-
...
|
|
42
|
-
resValue "string", "CodePushDeploymentKey", '"<INSERT_PRODUCTION_KEY>"'
|
|
43
|
-
...
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
...
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
*NOTE: Remember to remove the key from `strings.xml` if you are configuring the deployment key in the build process*
|
|
51
|
-
|
|
52
|
-
*NOTE: The naming convention for `releaseStaging` is significant due to [this line](https://github.com/facebook/react-native/blob/e083f9a139b3f8c5552528f8f8018529ef3193b9/react.gradle#L79).*
|
|
53
|
-
|
|
54
|
-
**For React Native v0.29 - v0.59**
|
|
55
|
-
|
|
56
|
-
1. Open up your `MainApplication.java` file and make the following changes:
|
|
57
|
-
|
|
58
|
-
```java
|
|
59
|
-
@Override
|
|
60
|
-
protected List<ReactPackage> getPackages() {
|
|
61
|
-
return Arrays.<ReactPackage>asList(
|
|
62
|
-
...
|
|
63
|
-
new CodePush(BuildConfig.CODEPUSH_KEY, MainApplication.this, BuildConfig.DEBUG), // Add/change this line.
|
|
64
|
-
...
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
2. Open your app's `build.gradle` file (for example `android/app/build.gradle` in standard React Native projects)
|
|
70
|
-
|
|
71
|
-
3. Find the `android { buildTypes {} }` section and define `buildConfigField` entries for both your `debug` and `release` build types, which reference your `Staging` and `Production` deployment keys respectively. If you prefer, you can define the key literals in your `gradle.properties` file, and then reference them here. Either way will work, and it's just a matter of personal preference.
|
|
72
|
-
|
|
73
|
-
```groovy
|
|
74
|
-
android {
|
|
75
|
-
...
|
|
76
|
-
buildTypes {
|
|
77
|
-
debug {
|
|
78
|
-
...
|
|
79
|
-
// Note: CodePush updates should not be tested in Debug mode as they are overriden by the RN packager. However, because CodePush checks for updates in all modes, we must supply a key.
|
|
80
|
-
buildConfigField "String", "CODEPUSH_KEY", '""'
|
|
81
|
-
...
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
releaseStaging {
|
|
85
|
-
...
|
|
86
|
-
buildConfigField "String", "CODEPUSH_KEY", '"<INSERT_STAGING_KEY>"'
|
|
87
|
-
// Note: It is a good idea to provide matchingFallbacks for the new buildType you create to prevent build issues
|
|
88
|
-
// Add the following line if not already there
|
|
89
|
-
matchingFallbacks = ['release']
|
|
90
|
-
...
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
release {
|
|
94
|
-
...
|
|
95
|
-
buildConfigField "String", "CODEPUSH_KEY", '"<INSERT_PRODUCTION_KEY>"'
|
|
96
|
-
...
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
...
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
*NOTE: The naming convention for `releaseStaging` is significant due to [this line](https://github.com/facebook/react-native/blob/e083f9a139b3f8c5552528f8f8018529ef3193b9/react.gradle#L79).*
|
|
104
|
-
|
|
105
|
-
4. Pass the deployment key to the `CodePush` constructor via the build config you defined, as opposed to a string literal.
|
|
106
|
-
|
|
107
|
-
**For React Native v0.19 - v0.28**
|
|
108
|
-
|
|
109
|
-
Open up your `MainActivity.java` file and make the following changes:
|
|
110
|
-
|
|
111
|
-
```java
|
|
112
|
-
@Override
|
|
113
|
-
protected List<ReactPackage> getPackages() {
|
|
114
|
-
return Arrays.<ReactPackage>asList(
|
|
115
|
-
...
|
|
116
|
-
new CodePush(BuildConfig.CODEPUSH_KEY, this, BuildConfig.DEBUG), // Add/change this line.
|
|
117
|
-
...
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
*Note: If you gave your build setting a different name in your Gradle file, simply make sure to reflect that in your Java code.*
|
|
123
|
-
|
|
124
|
-
And that's it! Now when you run or build your app, your debug builds will automatically be configured to sync with your `Staging` deployment, and your release builds will be configured to sync with your `Production` deployment.
|
|
125
|
-
|
|
126
|
-
*NOTE: By default, the `react-native run-android` command builds and deploys the debug version of your app, so if you want to test out a release/production build, simply run `react-native run-android --variant release. Refer to the [React Native docs](http://facebook.github.io/react-native/docs/signed-apk-android.html#conten) for details about how to configure and create release builds for your Android apps.*
|
|
127
|
-
|
|
128
|
-
If you want to be able to install both debug and release builds simultaneously on the same device (highly recommended!), then you need to ensure that your debug build has a unique identity and icon from your release build. Otherwise, neither the OS nor you will be able to differentiate between the two. You can achieve this by performing the following steps:
|
|
129
|
-
|
|
130
|
-
1. In your `build.gradle` file, specify the [`applicationIdSuffix`](http://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.BuildType.html#com.android.build.gradle.internal.dsl.BuildType:applicationIdSuffix) field for your debug build type, which gives your debug build a unique identity for the OS (like `com.foo` vs. `com.foo.debug`).
|
|
131
|
-
|
|
132
|
-
```groovy
|
|
133
|
-
buildTypes {
|
|
134
|
-
debug {
|
|
135
|
-
applicationIdSuffix ".debug"
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
2. Create the `app/src/debug/res` directory structure in your app, which allows overriding resources (like strings, icons, layouts) for your debug builds
|
|
141
|
-
|
|
142
|
-
3. Create a `values` directory underneath the debug res directory created in #2, and copy the existing `strings.xml` file from the `app/src/main/res/values` directory
|
|
143
|
-
|
|
144
|
-
4. Open up the new debug `strings.xml` file and change the `<string name="app_name">` element's value to something else (like `foo-debug`). This ensures that your debug build now has a distinct display name, so that you can differentiate it from your release build.
|
|
145
|
-
|
|
146
|
-
5. Optionally, create "mirrored" directories in the `app/src/debug/res` directory for all of your app's icons that you want to change for your debug build. This part isn't technically critical, but it can make it easier to quickly spot your debug builds on a device if its icon is noticeable different.
|
|
147
|
-
|
|
148
|
-
And that's it! View [here](http://tools.android.com/tech-docs/new-build-system/resource-merging) for more details on how resource merging works in Android.
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
### iOS
|
|
2
|
-
|
|
3
|
-
> NOTE
|
|
4
|
-
>
|
|
5
|
-
> Complete demos configured with "multi-deployment testing" feature are [here]:
|
|
6
|
-
> * **without using cocoa pods**: [link](https://github.com/microsoft/react-native-code-push/files/1259957/rncp976.copy.zip)
|
|
7
|
-
> * **using cocoa pods**: [link](https://github.com/microsoft/react-native-code-push/files/1172217/rncp893.copy.zip)
|
|
8
|
-
|
|
9
|
-
Xcode allows you to define custom build settings for each "configuration" (like debug, release), which can then be referenced as the value of keys within the `Info.plist` file (like the `CodePushDeploymentKey` setting). This mechanism allows you to easily configure your builds to produce binaries, which are configured to synchronize with different CodePush deployments.
|
|
10
|
-
|
|
11
|
-
To set this up, perform the following steps:
|
|
12
|
-
|
|
13
|
-
1. Open up your Xcode project and select your project in the `Project navigator` window
|
|
14
|
-
|
|
15
|
-
2. Ensure the project node is selected, as opposed to one of your targets
|
|
16
|
-
|
|
17
|
-
3. Select the `Info` tab
|
|
18
|
-
|
|
19
|
-
4. Click the `+` button within the `Configurations` section and select `Duplicate "Release" Configuration`
|
|
20
|
-
|
|
21
|
-

|
|
22
|
-
|
|
23
|
-
5. Name the new configuration `Staging` (or whatever you prefer)
|
|
24
|
-
|
|
25
|
-
6. Select the `Build Settings` tab
|
|
26
|
-
|
|
27
|
-
7. Click the `+` button on the toolbar and select `Add User-Defined Setting`
|
|
28
|
-
|
|
29
|
-

|
|
30
|
-
|
|
31
|
-
Name this new setting something like `Multi_Deployment_Config`. Go to the setting and add value `$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)` for Release. After that add value `$(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)` for Staging
|
|
32
|
-
|
|
33
|
-

|
|
34
|
-
|
|
35
|
-
*NOTE: For Xcode 10 and lower version: Go to Build Location -> Per-configuration Build Products Path -> Staging and change Staging value from $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) to $(BUILD_DIR)/Release$(EFFECTIVE_PLATFORM_NAME)*
|
|
36
|
-
|
|
37
|
-

|
|
38
|
-
|
|
39
|
-
*NOTE: Due to https://github.com/facebook/react-native/issues/11813, we have to do this step to make it possible to use other configurations than Debug or Release on RN 0.40.0 or higher.*
|
|
40
|
-
|
|
41
|
-
8. Click the `+` button again on the toolbar and select `Add User-Defined Setting`
|
|
42
|
-
|
|
43
|
-
Name this new setting something like `CODEPUSH_KEY`, expand it, and specify your `Staging` deployment key for the `Staging` config and your `Production` deployment key for the `Release` config.
|
|
44
|
-
|
|
45
|
-

|
|
46
|
-
|
|
47
|
-
*NOTE: As a reminder, you can retrieve these keys by running `appcenter codepush deployment list -a <ownerName>/<appName> -k` from your terminal.*
|
|
48
|
-
|
|
49
|
-
9. Open your project's `Info.plist` file and change the value of your `CodePushDeploymentKey` entry to `$(CODEPUSH_KEY)`
|
|
50
|
-
|
|
51
|
-

|
|
52
|
-
|
|
53
|
-
And that's it! Now when you run or build your app, your staging builds will automatically be configured to sync with your `Staging` deployment, and your release builds will be configured to sync with your `Production` deployment.
|
|
54
|
-
|
|
55
|
-
*NOTE: CocoaPods users may need to run `pod install` before building with their new release configuration.*
|
|
56
|
-
|
|
57
|
-
*Note: If you encounter the error message `ld: library not found for ...`, please consult [this issue](https://github.com/microsoft/react-native-code-push/issues/426) for a possible solution.*
|
|
58
|
-
|
|
59
|
-
Additionally, if you want to give them seperate names and/or icons, you can modify the `Product Bundle Identifier`, `Product Name` and `Asset Catalog App Icon Set Name` build settings, which will allow your staging builds to be distinguishable from release builds when installed on the same device.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// MF_Base64Additions.h
|
|
3
|
-
// Base64 -- RFC 4648 compatible implementation
|
|
4
|
-
// see http://www.ietf.org/rfc/rfc4648.txt for more details
|
|
5
|
-
//
|
|
6
|
-
// Designed to be compiled with Automatic Reference Counting
|
|
7
|
-
//
|
|
8
|
-
// Created by Dave Poirier on 2012-06-14.
|
|
9
|
-
// Public Domain
|
|
10
|
-
// Hosted at https://github.com/ekscrypto/Base64
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
#import <Foundation/Foundation.h>
|
|
14
|
-
|
|
15
|
-
@interface NSString (Base64Addition)
|
|
16
|
-
+(NSString *)stringFromBase64String:(NSString *)base64String;
|
|
17
|
-
+(NSString *)stringFromBase64UrlEncodedString:(NSString *)base64UrlEncodedString;
|
|
18
|
-
-(NSString *)base64String;
|
|
19
|
-
-(NSString *)base64UrlEncodedString;
|
|
20
|
-
@end
|
|
21
|
-
|
|
22
|
-
@interface NSData (Base64Addition)
|
|
23
|
-
+(NSData *)dataWithBase64String:(NSString *)base64String;
|
|
24
|
-
+(NSData *)dataWithBase64UrlEncodedString:(NSString *)base64UrlEncodedString;
|
|
25
|
-
-(NSString *)base64String;
|
|
26
|
-
-(NSString *)base64UrlEncodedString;
|
|
27
|
-
@end
|
|
28
|
-
|
|
29
|
-
@interface MF_Base64Codec : NSObject
|
|
30
|
-
+(NSData *)dataFromBase64String:(NSString *)base64String;
|
|
31
|
-
+(NSString *)base64StringFromData:(NSData *)data;
|
|
32
|
-
+(NSString *)base64UrlEncodedStringFromBase64String:(NSString *)base64String;
|
|
33
|
-
+(NSString *)base64StringFromBase64UrlEncodedString:(NSString *)base64UrlEncodedString;
|
|
34
|
-
@end
|