├── .azurepipelines ├── build-rn-code-push-1es.yml └── test-rn-code-push.yml ├── .config └── CredScanSuppressions.json ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE.md └── policies │ └── resourceManagement.yml ├── .gitignore ├── .npmignore ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── .watchmanconfig ├── AlertAdapter.js ├── CONTRIBUTING.md ├── CodePush.js ├── CodePush.podspec ├── Examples ├── CodePushDemoApp │ ├── .buckconfig │ ├── .editorconfig │ ├── .eslintrc.js │ ├── .flowconfig │ ├── .gitattributes │ ├── .gitignore │ ├── .prettierrc.js │ ├── .watchmanconfig │ ├── App.js │ ├── __tests__ │ │ └── App-test.js │ ├── android │ │ ├── app │ │ │ ├── BUCK │ │ │ ├── build.gradle │ │ │ ├── build_defs.bzl │ │ │ ├── debug.keystore │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── codepushdemoapp │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ │ └── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── images │ │ └── laptop_phone_howitworks.png │ ├── index.js │ ├── ios │ │ ├── CodePushDemoApp.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── CodePushDemoApp.xcscheme │ │ ├── CodePushDemoApp.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── CodePushDemoApp │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Images.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ └── main.m │ │ ├── CodePushDemoAppTests │ │ │ ├── CodePushDemoAppTests.m │ │ │ └── Info.plist │ │ ├── Podfile │ │ └── Podfile.lock │ ├── metro.config.js │ ├── package-lock.json │ └── package.json ├── CodePushDemoAppCpp │ ├── .buckconfig │ ├── .eslintrc.js │ ├── .flowconfig │ ├── .gitattributes │ ├── .gitignore │ ├── .prettierrc.js │ ├── .watchmanconfig │ ├── App.js │ ├── app.json │ ├── babel.config.js │ ├── images │ │ └── laptop_phone_howitworks.png │ ├── index.js │ ├── metro.config.js │ ├── package-lock.json │ ├── package.json │ └── windows │ │ ├── .gitignore │ │ ├── CodePushDemoAppCpp.sln │ │ └── CodePushDemoAppCpp │ │ ├── .gitignore │ │ ├── App.cpp │ │ ├── App.h │ │ ├── App.idl │ │ ├── App.xaml │ │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.png │ │ └── Wide310x150Logo.scale-200.png │ │ ├── AutolinkedNativeModules.g.cpp │ │ ├── AutolinkedNativeModules.g.h │ │ ├── AutolinkedNativeModules.g.targets │ │ ├── CodePushDemoAppCpp.vcxproj │ │ ├── CodePushDemoAppCpp.vcxproj.filters │ │ ├── CodePushDemoAppCpp_TemporaryKey.pfx │ │ ├── MainPage.cpp │ │ ├── MainPage.h │ │ ├── MainPage.idl │ │ ├── MainPage.xaml │ │ ├── Package.appxmanifest │ │ ├── PropertySheet.props │ │ ├── ReactPackageProvider.cpp │ │ ├── ReactPackageProvider.h │ │ ├── packages.config │ │ ├── pch.cpp │ │ └── pch.h ├── CodePushDemoAppNewArch │ ├── .bundle │ │ └── config │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc.js │ ├── .watchmanconfig │ ├── App.tsx │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.md │ ├── __tests__ │ │ └── App.test.tsx │ ├── android │ │ ├── app │ │ │ ├── build.gradle │ │ │ ├── debug.keystore │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── codepushdemoappnewarch │ │ │ │ │ ├── MainActivity.kt │ │ │ │ │ └── MainApplication.kt │ │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── index.js │ ├── ios │ │ ├── .xcode.env │ │ ├── CodePushDemoAppNewArch.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── CodePushDemoAppNewArch.xcscheme │ │ ├── CodePushDemoAppNewArch.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── CodePushDemoAppNewArch │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.mm │ │ │ ├── Images.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ ├── PrivacyInfo.xcprivacy │ │ │ └── main.m │ │ ├── CodePushDemoAppNewArchTests │ │ │ ├── CodePushDemoAppNewArchTests.m │ │ │ └── Info.plist │ │ ├── Podfile │ │ └── Podfile.lock │ ├── jest.config.js │ ├── metro.config.js │ ├── package-lock.json │ ├── package.json │ └── tsconfig.json ├── CodePushDemoSwiftNewArch │ ├── .bundle │ │ └── config │ ├── .eslintrc.js │ ├── .gitignore │ ├── .prettierrc.js │ ├── .watchmanconfig │ ├── App.tsx │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.md │ ├── __tests__ │ │ └── App.test.tsx │ ├── android │ │ ├── app │ │ │ ├── build.gradle │ │ │ ├── debug.keystore │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── codepushdemoswiftnewarch │ │ │ │ │ ├── MainActivity.kt │ │ │ │ │ └── MainApplication.kt │ │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── index.js │ ├── ios │ │ ├── .xcode.env │ │ ├── CodePushDemoSwiftNewArch.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ └── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── CodePushDemoSwiftNewArch.xcscheme │ │ ├── CodePushDemoSwiftNewArch.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── CodePushDemoSwiftNewArch │ │ │ ├── AppDelegate.swift │ │ │ ├── Images.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ └── PrivacyInfo.xcprivacy │ │ ├── Podfile │ │ └── Podfile.lock │ ├── jest.config.js │ ├── metro.config.js │ ├── package-lock.json │ ├── package.json │ └── tsconfig.json ├── create-app.js └── nexpect.js ├── LICENSE.md ├── README.md ├── Recipes ├── UpdateButton.ios.js └── UpdateOnStart.ios.js ├── SECURITY.md ├── android ├── app │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── microsoft │ │ └── codepush │ │ └── react │ │ ├── CodePush.java │ │ ├── CodePushConstants.java │ │ ├── CodePushDialog.java │ │ ├── CodePushInstallMode.java │ │ ├── CodePushInvalidPublicKeyException.java │ │ ├── CodePushInvalidUpdateException.java │ │ ├── CodePushMalformedDataException.java │ │ ├── CodePushNativeModule.java │ │ ├── CodePushNotInitializedException.java │ │ ├── CodePushTelemetryManager.java │ │ ├── CodePushUnknownException.java │ │ ├── CodePushUpdateManager.java │ │ ├── CodePushUpdateState.java │ │ ├── CodePushUpdateUtils.java │ │ ├── CodePushUtils.java │ │ ├── DownloadProgress.java │ │ ├── DownloadProgressCallback.java │ │ ├── FileUtils.java │ │ ├── ReactHostHolder.java │ │ ├── ReactInstanceHolder.java │ │ ├── SettingsManager.java │ │ └── TLSSocketFactory.java ├── build.gradle ├── codepush.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── code-push-plugin-testing-framework ├── package.json ├── script │ ├── index.js │ ├── platform.js │ ├── projectManager.js │ ├── serverUtil.js │ ├── test.js │ ├── testBuilder.js │ ├── testConfig.js │ └── testUtil.js └── typings │ └── code-push-plugin-testing-framework.d.ts ├── docs ├── api-android.md ├── api-ios.md ├── api-js.md ├── multi-deployment-testing-android.md ├── multi-deployment-testing-ios.md ├── setup-android.md ├── setup-ios.md └── setup-windows.md ├── ios ├── CodePush.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── CodePush │ ├── Base64 │ │ ├── Base64 │ │ │ ├── MF_Base64Additions.h │ │ │ └── MF_Base64Additions.m │ │ └── README.md │ ├── CodePush.h │ ├── CodePush.m │ ├── CodePushConfig.m │ ├── CodePushDownloadHandler.m │ ├── CodePushErrorUtils.m │ ├── CodePushPackage.m │ ├── CodePushTelemetryManager.m │ ├── CodePushUpdateUtils.m │ ├── CodePushUtils.m │ ├── JWT │ │ ├── Core │ │ │ ├── Algorithms │ │ │ │ ├── Base │ │ │ │ │ ├── JWTAlgorithm.h │ │ │ │ │ ├── JWTAlgorithmFactory.h │ │ │ │ │ ├── JWTAlgorithmFactory.m │ │ │ │ │ ├── JWTAlgorithmNone.h │ │ │ │ │ └── JWTAlgorithmNone.m │ │ │ │ ├── ESFamily │ │ │ │ │ ├── JWTAlgorithmESBase.h │ │ │ │ │ └── JWTAlgorithmESBase.m │ │ │ │ ├── HSFamily │ │ │ │ │ ├── JWTAlgorithmHSBase.h │ │ │ │ │ └── JWTAlgorithmHSBase.m │ │ │ │ ├── Holders │ │ │ │ │ ├── JWTAlgorithmDataHolder.h │ │ │ │ │ ├── JWTAlgorithmDataHolder.m │ │ │ │ │ ├── JWTAlgorithmDataHolderChain.h │ │ │ │ │ └── JWTAlgorithmDataHolderChain.m │ │ │ │ └── RSFamily │ │ │ │ │ ├── JWTAlgorithmRSBase.h │ │ │ │ │ ├── JWTAlgorithmRSBase.m │ │ │ │ │ ├── JWTRSAlgorithm.h │ │ │ │ │ └── RSKeys │ │ │ │ │ ├── JWTCryptoKey.h │ │ │ │ │ ├── JWTCryptoKey.m │ │ │ │ │ ├── JWTCryptoKeyExtractor.h │ │ │ │ │ ├── JWTCryptoKeyExtractor.m │ │ │ │ │ ├── JWTCryptoSecurity.h │ │ │ │ │ └── JWTCryptoSecurity.m │ │ │ ├── ClaimSet │ │ │ │ ├── JWTClaim.h │ │ │ │ ├── JWTClaim.m │ │ │ │ ├── JWTClaimsSet.h │ │ │ │ ├── JWTClaimsSet.m │ │ │ │ ├── JWTClaimsSetSerializer.h │ │ │ │ ├── JWTClaimsSetSerializer.m │ │ │ │ ├── JWTClaimsSetVerifier.h │ │ │ │ └── JWTClaimsSetVerifier.m │ │ │ ├── Coding │ │ │ │ ├── JWTCoding+ResultTypes.h │ │ │ │ ├── JWTCoding+ResultTypes.m │ │ │ │ ├── JWTCoding+VersionOne.h │ │ │ │ ├── JWTCoding+VersionOne.m │ │ │ │ ├── JWTCoding+VersionThree.h │ │ │ │ ├── JWTCoding+VersionThree.m │ │ │ │ ├── JWTCoding+VersionTwo.h │ │ │ │ ├── JWTCoding+VersionTwo.m │ │ │ │ ├── JWTCoding.h │ │ │ │ └── JWTCoding.m │ │ │ ├── FrameworkSupplement │ │ │ │ ├── JWT.h │ │ │ │ └── Map.modulemap │ │ │ └── Supplement │ │ │ │ ├── JWTBase64Coder.h │ │ │ │ ├── JWTBase64Coder.m │ │ │ │ ├── JWTDeprecations.h │ │ │ │ ├── JWTErrorDescription.h │ │ │ │ └── JWTErrorDescription.m │ │ ├── LICENSE │ │ └── README.md │ ├── RCTConvert+CodePushInstallMode.m │ ├── RCTConvert+CodePushUpdateState.m │ └── SSZipArchive │ │ ├── Info.plist │ │ ├── README.md │ │ ├── SSZipArchive.h │ │ ├── SSZipArchive.m │ │ ├── SSZipCommon.h │ │ ├── Supporting Files │ │ └── PrivacyInfo.xcprivacy │ │ ├── include │ │ └── ZipArchive.h │ │ └── minizip │ │ ├── LICENSE │ │ ├── mz.h │ │ ├── mz_compat.c │ │ ├── mz_compat.h │ │ ├── mz_crypt.c │ │ ├── mz_crypt.h │ │ ├── mz_crypt_apple.c │ │ ├── mz_os.c │ │ ├── mz_os.h │ │ ├── mz_os_posix.c │ │ ├── mz_strm.c │ │ ├── mz_strm.h │ │ ├── mz_strm_buf.c │ │ ├── mz_strm_buf.h │ │ ├── mz_strm_mem.c │ │ ├── mz_strm_mem.h │ │ ├── mz_strm_os.h │ │ ├── mz_strm_os_posix.c │ │ ├── mz_strm_pkcrypt.c │ │ ├── mz_strm_pkcrypt.h │ │ ├── mz_strm_split.c │ │ ├── mz_strm_split.h │ │ ├── mz_strm_wzaes.c │ │ ├── mz_strm_wzaes.h │ │ ├── mz_strm_zlib.c │ │ ├── mz_strm_zlib.h │ │ ├── mz_zip.c │ │ ├── mz_zip.h │ │ ├── mz_zip_rw.c │ │ └── mz_zip_rw.h └── PrivacyInfo.xcprivacy ├── logging.js ├── package-lock.json ├── package-mixins.js ├── package.json ├── react-native.config.js ├── request-fetch-adapter.js ├── scripts ├── generateBundledResourcesHash.js ├── getFilesInFolder.js ├── postlink │ ├── android │ │ └── postlink.js │ ├── ios │ │ └── postlink.js │ └── run.js ├── postunlink │ ├── android │ │ └── postunlink.js │ ├── ios │ │ └── postunlink.js │ └── run.js ├── recordFilesBeforeBundleCommand.js └── tools │ ├── linkToolsAndroid.js │ └── linkToolsIos.js ├── test ├── template │ ├── android │ │ └── app │ │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── testcodepush │ │ │ │ └── MainApplication.kt │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── codePushWrapper.js │ ├── index.js │ ├── ios │ │ ├── Podfile │ │ └── TestCodePush │ │ │ └── AppDelegate.swift │ └── scenarios │ │ ├── scenarioCheckForUpdate.js │ │ ├── scenarioCheckForUpdateCustomKey.js │ │ ├── scenarioDisallowRestartImmediate.js │ │ ├── scenarioDisallowRestartOnResume.js │ │ ├── scenarioDisallowRestartOnSuspend.js │ │ ├── scenarioDownloadUpdate.js │ │ ├── scenarioInstall.js │ │ ├── scenarioInstallOnRestartWithRevert.js │ │ ├── scenarioInstallOnResumeWithRevert.js │ │ ├── scenarioInstallOnSuspendWithRevert.js │ │ ├── scenarioInstallRestart2x.js │ │ ├── scenarioInstallWithRevert.js │ │ ├── scenarioRestart.js │ │ ├── scenarioRestart2x.js │ │ ├── scenarioSync.js │ │ ├── scenarioSync2x.js │ │ ├── scenarioSyncMandatoryDefault.js │ │ ├── scenarioSyncMandatoryRestart.js │ │ ├── scenarioSyncMandatoryResume.js │ │ ├── scenarioSyncMandatorySuspend.js │ │ ├── scenarioSyncRestartDelay.js │ │ ├── scenarioSyncResume.js │ │ ├── scenarioSyncResumeDelay.js │ │ ├── scenarioSyncSuspend.js │ │ ├── scenarioSyncSuspendDelay.js │ │ ├── updateDeviceReady.js │ │ ├── updateNARConditional.js │ │ ├── updateNotifyApplicationReady.js │ │ ├── updateSync.js │ │ └── updateSync2x.js └── test.ts ├── tsconfig.json ├── tslint.json ├── typings └── react-native-code-push.d.ts ├── windows-legacy ├── .gitignore ├── .npmignore ├── CodePush.Net46.Test │ ├── ApplicationDataContainerTest.cs │ ├── CodePush.Net46.Test.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── TelemetryManagerTest.cs │ ├── app.config │ └── packages.config ├── CodePush.Net46 │ ├── .gitignore │ ├── Adapters │ │ ├── Http │ │ │ └── HttpProgress.cs │ │ └── Storage │ │ │ └── ApplicationDataContainer.cs │ ├── CodePush.Net46.csproj │ ├── CodePushUtils.cs │ ├── FileUtils.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── UpdateManager.cs │ ├── UpdateUtils.cs │ └── packages.config ├── CodePush.Shared │ ├── CodePush.Shared.projitems │ ├── CodePush.Shared.shproj │ ├── CodePushConstants.cs │ ├── CodePushNativeModule.cs │ ├── CodePushReactPackage.cs │ ├── CodePushUtils.cs │ ├── InstallMode.cs │ ├── MinimumBackgroundListener.cs │ ├── SettingsManager.cs │ ├── TelemetryManager.cs │ └── UpdateState.cs └── CodePush │ ├── .gitignore │ ├── CodePush.csproj │ ├── CodePushUtils.cs │ ├── FileUtils.cs │ ├── Properties │ ├── AssemblyInfo.cs │ └── CodePush.rd.xml │ ├── UpdateManager.cs │ └── UpdateUtils.cs └── windows ├── .gitignore ├── .npmignore ├── CodePush ├── .npmignore ├── CodePush.def ├── CodePush.vcxproj ├── CodePush.vcxproj.filters ├── CodePushConfig.cpp ├── CodePushConfig.h ├── CodePushConfig.idl ├── CodePushDownloadHandler.cpp ├── CodePushDownloadHandler.h ├── CodePushNativeModule.cpp ├── CodePushNativeModule.h ├── CodePushPackage.cpp ├── CodePushPackage.h ├── CodePushTelemetryManager.cpp ├── CodePushTelemetryManager.h ├── CodePushUpdateUtils.cpp ├── CodePushUpdateUtils.h ├── CodePushUtils.cpp ├── CodePushUtils.h ├── FileUtils.cpp ├── FileUtils.h ├── PropertySheet.props ├── ReactPackageProvider.cpp ├── ReactPackageProvider.h ├── ReactPackageProvider.idl ├── miniz │ ├── LICENSE │ ├── miniz.c │ ├── miniz.h │ └── readme.md ├── packages.config ├── pch.cpp └── pch.h └── Directory.Build.props /.config/CredScanSuppressions.json: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @microsoft/appcenter-fte 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant): 2 | 3 | ### Steps to Reproduce 4 | 1. 5 | 2. 6 | 3. 7 | 8 | ### Expected Behavior 9 | What you expected to happen? 10 | 11 | ### Actual Behavior 12 | What actually happens? 13 | ``` 14 | STACK TRACE AND/OR SCREENSHOTS 15 | ``` 16 | 17 | ### Reproducible Demo 18 | 19 | * Download https://github.com/microsoft/react-native-code-push/archive/master.zip and unzip. From `Examples` folder run `node create-app.js appName react-native@0.71.19 react-native-code-push@9.0.1` command to generate plain CodePushified React Native app. Please see description on top of `create-app.js` file content if needed 20 | * If you can't reproduce the bug on it, provide us as much info as possible about your project 21 | 22 | ### Environment 23 | 24 | * react-native-code-push version: 25 | * react-native version: 26 | * iOS/Android/Windows version: 27 | * Does this reproduce on a debug build or release build? 28 | * Does this reproduce on a simulator, or only on a physical device? 29 | 30 | (The more info the faster we will be able to address it!) 31 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # node.js 25 | # 26 | node_modules/ 27 | npm-debug.log 28 | 29 | # Don't publish example apps 30 | Examples/ 31 | Recipes/ 32 | 33 | # Don't publish testing code 34 | bin/ 35 | test/ 36 | 37 | # Remove after this framework is published on NPM 38 | code-push-plugin-testing-framework/ 39 | 40 | # Android build artifacts and Android Studio bits 41 | android/app/build 42 | android/local.properties 43 | android/.gradle 44 | android/**/*.iml 45 | android/.idea 46 | 47 | 48 | # Windows 49 | windows/.vs/ 50 | windows/obj/ 51 | 52 | #Tests 53 | windows/CodePush.Net46.Test 54 | 55 | #Visual Studio files 56 | *.[Oo]bj 57 | *.user 58 | *.aps 59 | *.pch 60 | *.vspscc 61 | *.vssscc 62 | *_i.c 63 | *_p.c 64 | *.ncb 65 | *.suo 66 | *.tlb 67 | *.tlh 68 | *.bak 69 | *.[Cc]ache 70 | *.ilk 71 | *.log 72 | *.lib 73 | *.sbr 74 | *.sdf 75 | *.opensdf 76 | *.opendb 77 | *.unsuccessfulbuild 78 | ipch/ 79 | [Oo]bj/ 80 | [Bb]in 81 | [Dd]ebug*/ 82 | [Rr]elease*/ 83 | Ankh.NoLoad 84 | 85 | #NuGet 86 | packages/ 87 | *.nupkg 88 | 89 | # VSCode 90 | .vscode/ 91 | 92 | # IntelliJIDEA 93 | .idea/ 94 | 95 | 96 | # Github 97 | .github/ 98 | 99 | # Git 100 | .git/ 101 | 102 | .watchmanconfig 103 | 104 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Tests-android", 6 | "type": "node", 7 | "request": "launch", 8 | "preLaunchTask": "Setup-android", 9 | "runtimeExecutable": "npm", 10 | "runtimeArgs": [ 11 | "run", 12 | "test:debugger:android" 13 | ], 14 | "port": 9229, 15 | "stopOnEntry": false, 16 | "sourceMaps": true, 17 | "console": "internalConsole", 18 | "internalConsoleOptions": "openOnSessionStart", 19 | "autoAttachChildProcesses": true, 20 | "timeout": 100000 21 | }, 22 | { 23 | "name": "Tests-ios", 24 | "type": "node", 25 | "request": "launch", 26 | "preLaunchTask": "Setup-ios", 27 | "runtimeExecutable": "npm", 28 | "runtimeArgs": [ 29 | "run", 30 | "test:debugger:ios" 31 | ], 32 | "port": 9229, 33 | "stopOnEntry": false, 34 | "sourceMaps": true, 35 | "console": "internalConsole", 36 | "internalConsoleOptions": "openOnSessionStart", 37 | "autoAttachChildProcesses": true, 38 | "timeout": 100000 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "node_modules/typescript/lib" 3 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "type": "shell", 6 | "label": "Build", 7 | "command": "npm", 8 | "args": [ 9 | "run", 10 | "build:tests" 11 | ], 12 | "presentation": { 13 | "echo": false, 14 | "focus": false 15 | }, 16 | "problemMatcher": [ 17 | "$tsc" 18 | ] 19 | }, 20 | { 21 | "type": "shell", 22 | "label": "Setup-android", 23 | "dependsOn": "Build", 24 | "command": "npm", 25 | "args": [ 26 | "run", 27 | "test:setup:android" 28 | ], 29 | "presentation": { 30 | "echo": false, 31 | "focus": false 32 | }, 33 | "problemMatcher": [ 34 | "$tsc" 35 | ] 36 | }, 37 | { 38 | "type": "shell", 39 | "label": "Setup-ios", 40 | "dependsOn": "Build", 41 | "command": "npm", 42 | "args": [ 43 | "run", 44 | "test:setup:ios" 45 | ], 46 | "presentation": { 47 | "echo": false, 48 | "focus": false 49 | }, 50 | "problemMatcher": [ 51 | "$tsc" 52 | ] 53 | } 54 | ] 55 | } 56 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /AlertAdapter.js: -------------------------------------------------------------------------------- 1 | import React, { Platform } from "react-native"; 2 | let { Alert } = React; 3 | 4 | if (Platform.OS === "android") { 5 | const { NativeModules: { CodePushDialog } } = React; 6 | 7 | Alert = { 8 | alert(title, message, buttons) { 9 | if (buttons.length > 2) { 10 | throw "Can only show 2 buttons for Android dialog."; 11 | } 12 | 13 | const button1Text = buttons[0] ? buttons[0].text : null, 14 | button2Text = buttons[1] ? buttons[1].text : null; 15 | 16 | CodePushDialog.showDialog( 17 | title, message, button1Text, button2Text, 18 | (buttonId) => { buttons[buttonId].onPress && buttons[buttonId].onPress(); }, 19 | (error) => { throw error; }); 20 | } 21 | }; 22 | } 23 | 24 | module.exports = { Alert }; -------------------------------------------------------------------------------- /CodePush.podspec: -------------------------------------------------------------------------------- 1 | require 'json' 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = 'CodePush' 7 | s.version = package['version'].gsub(/v|-beta/, '') 8 | s.summary = package['description'] 9 | s.author = package['author'] 10 | s.license = package['license'] 11 | s.homepage = package['homepage'] 12 | s.source = { :git => 'https://github.com/CodePushNext/react-native-code-push.git', :tag => "v#{s.version}"} 13 | s.ios.deployment_target = '15.5' 14 | s.tvos.deployment_target = '15.5' 15 | s.preserve_paths = '*.js' 16 | s.library = 'z' 17 | s.source_files = 'ios/CodePush/*.{h,m}' 18 | s.public_header_files = ['ios/CodePush/CodePush.h'] 19 | s.pod_target_xcconfig = { "DEFINES_MODULE" => "YES" } 20 | 21 | # Note: Even though there are copy/pasted versions of some of these dependencies in the repo, 22 | # we explicitly let CocoaPods pull in the versions below so all dependencies are resolved and 23 | # linked properly at a parent workspace level. 24 | s.dependency 'React-Core' 25 | s.dependency 'SSZipArchive', '~> 2.5.5' 26 | s.dependency 'JWT', '~> 3.0.0-beta.12' 27 | s.dependency 'Base64', '~> 1.1' 28 | end 29 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/.editorconfig: -------------------------------------------------------------------------------- 1 | # Windows files 2 | [*.bat] 3 | end_of_line = crlf 4 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/.gitattributes: -------------------------------------------------------------------------------- 1 | # Windows files should use crlf line endings 2 | # https://help.github.com/articles/dealing-with-line-endings/ 3 | *.bat text eol=crlf 4 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | *.hprof 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | !debug.keystore 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://docs.fastlane.tools/best-practices/source-control/ 51 | 52 | */fastlane/report.xml 53 | */fastlane/Preview.html 54 | */fastlane/screenshots 55 | 56 | # Bundle artifact 57 | *.jsbundle 58 | 59 | # CocoaPods 60 | /ios/Pods/ 61 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | arrowParens: 'avoid', 7 | }; 8 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "com.codepushdemoapp", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.codepushdemoapp", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/android/app/debug.keystore -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/java/com/codepushdemoapp/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.codepushdemoapp; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "CodePushDemoApp"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | deployment-key-here 3 | CodePushDemoApp 4 | 5 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "30.0.2" 6 | minSdkVersion = 21 7 | compileSdkVersion = 30 8 | targetSdkVersion = 30 9 | ndkVersion = "21.4.7075529" 10 | } 11 | repositories { 12 | google() 13 | mavenCentral() 14 | } 15 | dependencies { 16 | classpath("com.android.tools.build:gradle:4.2.2") 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenCentral() 25 | mavenLocal() 26 | maven { 27 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 28 | url("$rootDir/../node_modules/react-native/android") 29 | } 30 | maven { 31 | // Android JSC is installed from npm 32 | url("$rootDir/../node_modules/jsc-android/dist") 33 | } 34 | 35 | google() 36 | maven { url 'https://www.jitpack.io' } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.99.0 29 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'CodePushDemoApp' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CodePushDemoApp", 3 | "displayName": "CodePushDemoApp" 4 | } -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/images/laptop_phone_howitworks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoApp/images/laptop_phone_howitworks.png -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import App from './App'; 3 | 4 | AppRegistry.registerComponent('CodePushDemoApp', () => App); 5 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/ios/CodePushDemoApp.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/ios/CodePushDemoApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/ios/CodePushDemoApp/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/ios/CodePushDemoApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/ios/CodePushDemoApp/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/ios/CodePushDemoApp/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/ios/CodePushDemoAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '11.0' 5 | 6 | target 'CodePushDemoApp' do 7 | config = use_native_modules! 8 | 9 | use_react_native!( 10 | :path => config[:reactNativePath], 11 | # to enable hermes on iOS, change `false` to `true` and then install pods 12 | :hermes_enabled => false 13 | ) 14 | 15 | target 'CodePushDemoAppTests' do 16 | inherit! :complete 17 | # Pods for testing 18 | end 19 | 20 | # Enables Flipper. 21 | # 22 | # Note that if you have use_frameworks! enabled, Flipper will not work and 23 | # you should disable the next line. 24 | use_flipper!() 25 | 26 | post_install do |installer| 27 | react_native_post_install(installer) 28 | __apply_Xcode_12_5_M1_post_install_workaround(installer) 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: true, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /Examples/CodePushDemoApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CodePushDemoApp", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "start": "react-native start", 9 | "test": "jest", 10 | "lint": "eslint ." 11 | }, 12 | "dependencies": { 13 | "react": "17.0.2", 14 | "react-native": "0.68.5", 15 | "@code-push-next/react-native-code-push": "8.1.0" 16 | }, 17 | "resolutions": { 18 | "strip-ansi": "^6.0.1", 19 | "ansi-regex": "^5.0.1" 20 | }, 21 | "devDependencies": { 22 | "@babel/core": "^7.15.8", 23 | "@babel/runtime": "^7.15.4", 24 | "@react-native-community/eslint-config": "^3.0.1", 25 | "babel-jest": "^27.2.5", 26 | "eslint": "^8.0.0", 27 | "jest": "^27.2.5", 28 | "metro-react-native-babel-preset": "^0.66.2", 29 | "react-test-renderer": "17.0.2" 30 | }, 31 | "jest": { 32 | "preset": "react-native" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # Visual Studio Code 33 | # 34 | .vscode/ 35 | 36 | # node.js 37 | # 38 | node_modules/ 39 | npm-debug.log 40 | yarn-error.log 41 | 42 | # BUCK 43 | buck-out/ 44 | \.buckd/ 45 | *.keystore 46 | !debug.keystore 47 | 48 | # fastlane 49 | # 50 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 51 | # screenshots whenever they are needed. 52 | # For more information about the recommended setup visit: 53 | # https://docs.fastlane.tools/best-practices/source-control/ 54 | 55 | */fastlane/report.xml 56 | */fastlane/Preview.html 57 | */fastlane/screenshots 58 | 59 | # Bundle artifact 60 | *.jsbundle 61 | 62 | # CocoaPods 63 | /ios/Pods/ 64 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | }; 7 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CodePushDemoAppCpp", 3 | "displayName": "CodePushDemoAppCpp" 4 | } 5 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/images/laptop_phone_howitworks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppCpp/images/laptop_phone_howitworks.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | const path = require('path'); 8 | const blacklist = require('metro-config/src/defaults/blacklist'); 9 | 10 | module.exports = { 11 | resolver: { 12 | blacklistRE: blacklist([ 13 | // This stops "react-native run-windows" from causing the metro server to crash if its already running 14 | new RegExp( 15 | `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`, 16 | ), 17 | // This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip 18 | /.*\.ProjectImports\.zip/, 19 | ]), 20 | }, 21 | transformer: { 22 | getTransformOptions: async () => ({ 23 | transform: { 24 | experimentalImportSupport: false, 25 | inlineRequires: false, 26 | }, 27 | }), 28 | }, 29 | }; 30 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CodePushDemoAppCpp", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "react-native start", 7 | "test": "jest", 8 | "lint": "eslint .", 9 | "windows": "react-native run-windows" 10 | }, 11 | "dependencies": { 12 | "react": "^17.0.2", 13 | "react-native": "^0.68.5", 14 | "@code-push-next/react-native-code-push": "^8.1.0", 15 | "react-native-windows": "^1.0.0" 16 | }, 17 | "resolutions": { 18 | "strip-ansi": "^6.0.1", 19 | "ansi-regex": "^5.0.1", 20 | "node-fetch": "^2.6.7" 21 | }, 22 | "devDependencies": { 23 | "@babel/core": "^7.8.4", 24 | "@babel/runtime": "^7.8.4", 25 | "@react-native-community/eslint-config": "^3.0.1", 26 | "appcenter-cli": "^2.14.0", 27 | "babel-jest": "^27.2.5", 28 | "eslint": "^8.0.0", 29 | "jest": "^27.2.5", 30 | "metro-react-native-babel-preset": "^0.66.2", 31 | "react-test-renderer": "17.0.2" 32 | }, 33 | "jest": { 34 | "preset": "react-native" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/.gitignore: -------------------------------------------------------------------------------- 1 | *AppPackages* 2 | *BundleArtifacts* 3 | 4 | #OS junk files 5 | [Tt]humbs.db 6 | *.DS_Store 7 | 8 | #Visual Studio files 9 | *.[Oo]bj 10 | *.user 11 | *.aps 12 | *.pch 13 | *.vspscc 14 | *.vssscc 15 | *_i.c 16 | *_p.c 17 | *.ncb 18 | *.suo 19 | *.tlb 20 | *.tlh 21 | *.bak 22 | *.[Cc]ache 23 | *.ilk 24 | *.log 25 | *.lib 26 | *.sbr 27 | *.sdf 28 | *.opensdf 29 | *.opendb 30 | *.unsuccessfulbuild 31 | ipch/ 32 | [Oo]bj/ 33 | [Bb]in 34 | [Dd]ebug*/ 35 | [Rr]elease*/ 36 | Ankh.NoLoad 37 | 38 | # Visual C++ cache files 39 | ipch/ 40 | *.aps 41 | *.ncb 42 | *.opendb 43 | *.opensdf 44 | *.sdf 45 | *.cachefile 46 | *.VC.db 47 | *.VC.VC.opendb 48 | 49 | #MonoDevelop 50 | *.pidb 51 | *.userprefs 52 | 53 | #Tooling 54 | _ReSharper*/ 55 | *.resharper 56 | [Tt]est[Rr]esult* 57 | *.sass-cache 58 | 59 | #Project files 60 | [Bb]uild/ 61 | 62 | #Subversion files 63 | .svn 64 | 65 | # Office Temp Files 66 | ~$* 67 | 68 | # vim Temp Files 69 | *~ 70 | 71 | #NuGet 72 | packages/ 73 | *.nupkg 74 | 75 | #ncrunch 76 | *ncrunch* 77 | *crunch*.local.xml 78 | 79 | # visual studio database projects 80 | *.dbmdl 81 | 82 | #Test files 83 | *.testsettings 84 | 85 | #Other files 86 | *.DotSettings 87 | .vs/ 88 | *project.lock.json 89 | 90 | #Files generated by the VS build 91 | **/Generated Files/** 92 | 93 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/.gitignore: -------------------------------------------------------------------------------- 1 | /Bundle 2 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/App.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "App.xaml.g.h" 4 | #include "winrt/Microsoft.ReactNative.h" 5 | 6 | namespace activation = winrt::Windows::ApplicationModel::Activation; 7 | 8 | namespace winrt::CodePushDemoAppCpp::implementation 9 | { 10 | struct App : AppT 11 | { 12 | App() noexcept; 13 | 14 | void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs const&); 15 | void OnSuspending(IInspectable const&, Windows::ApplicationModel::SuspendingEventArgs const&); 16 | void OnNavigationFailed(IInspectable const&, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs const&); 17 | 18 | winrt::Microsoft::ReactNative::ReactNativeHost& Host() noexcept { return m_host; } 19 | private: 20 | winrt::Microsoft::ReactNative::ReactNativeHost m_host; 21 | }; 22 | } // namespace winrt::CodePushDemoAppCpp::implementation 23 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/App.idl: -------------------------------------------------------------------------------- 1 | namespace CodePushDemoAppCpp 2 | { 3 | } 4 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/StoreLogo.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/AutolinkedNativeModules.g.cpp: -------------------------------------------------------------------------------- 1 | // AutolinkedNativeModules.g.cpp contents generated by "react-native autolink-windows" 2 | // clang-format off 3 | #include "pch.h" 4 | #include "AutolinkedNativeModules.g.h" 5 | 6 | // Includes from react-native-code-push-windows 7 | #include "winrt/Microsoft.CodePush.ReactNative.h" 8 | 9 | namespace winrt::Microsoft::ReactNative 10 | { 11 | 12 | void RegisterAutolinkedNativeModulePackages(winrt::Windows::Foundation::Collections::IVector const& packageProviders) 13 | { 14 | // IReactPackageProviders from react-native-code-push-windows 15 | packageProviders.Append(winrt::Microsoft::CodePush::ReactNative::ReactPackageProvider()); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/AutolinkedNativeModules.g.h: -------------------------------------------------------------------------------- 1 | // AutolinkedNativeModules.g.h contents generated by "react-native autolink-windows" 2 | 3 | #pragma once 4 | 5 | namespace winrt::Microsoft::ReactNative 6 | { 7 | 8 | void RegisterAutolinkedNativeModulePackages(winrt::Windows::Foundation::Collections::IVector const& packageProviders); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/AutolinkedNativeModules.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/CodePushDemoAppCpp_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/CodePushDemoAppCpp_TemporaryKey.pfx -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/MainPage.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "MainPage.h" 3 | #if __has_include("MainPage.g.cpp") 4 | #include "MainPage.g.cpp" 5 | #endif 6 | 7 | #include "App.h" 8 | 9 | 10 | 11 | using namespace winrt; 12 | using namespace Windows::UI::Xaml; 13 | 14 | namespace winrt::CodePushDemoAppCpp::implementation 15 | { 16 | MainPage::MainPage() 17 | { 18 | InitializeComponent(); 19 | auto app = Application::Current().as(); 20 | ReactRootView().ReactNativeHost(app->Host()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/MainPage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "MainPage.g.h" 3 | #include 4 | 5 | 6 | namespace winrt::CodePushDemoAppCpp::implementation 7 | { 8 | struct MainPage : MainPageT 9 | { 10 | MainPage(); 11 | }; 12 | } 13 | 14 | namespace winrt::CodePushDemoAppCpp::factory_implementation 15 | { 16 | struct MainPage : MainPageT 17 | { 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/MainPage.idl: -------------------------------------------------------------------------------- 1 | namespace CodePushDemoAppCpp 2 | { 3 | [default_interface] 4 | runtimeclass MainPage : Windows.UI.Xaml.Controls.Page 5 | { 6 | MainPage(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/MainPage.xaml: -------------------------------------------------------------------------------- 1 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/PropertySheet.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/ReactPackageProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "ReactPackageProvider.h" 3 | #include "NativeModules.h" 4 | 5 | 6 | using namespace winrt::Microsoft::ReactNative; 7 | 8 | namespace winrt::CodePushDemoAppCpp::implementation 9 | { 10 | 11 | void ReactPackageProvider::CreatePackage(IReactPackageBuilder const &packageBuilder) noexcept 12 | { 13 | AddAttributedModules(packageBuilder); 14 | } 15 | 16 | } // namespace winrt::CodePushDemoAppCpp::implementation 17 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/ReactPackageProvider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "winrt/Microsoft.ReactNative.h" 4 | 5 | namespace winrt::CodePushDemoAppCpp::implementation 6 | { 7 | struct ReactPackageProvider : winrt::implements 8 | { 9 | public: // IReactPackageProvider 10 | void CreatePackage(winrt::Microsoft::ReactNative::IReactPackageBuilder const &packageBuilder) noexcept; 11 | }; 12 | } // namespace winrt::CodePushDemoAppCpp::implementation 13 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppCpp/windows/CodePushDemoAppCpp/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define NOMINMAX 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native', 4 | }; 5 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | ios/.xcode.env.local 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | *.hprof 33 | .cxx/ 34 | 35 | # node.js 36 | # 37 | node_modules/ 38 | npm-debug.log 39 | yarn-error.log 40 | 41 | # BUCK 42 | buck-out/ 43 | \.buckd/ 44 | *.keystore 45 | !debug.keystore 46 | 47 | # fastlane 48 | # 49 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 50 | # screenshots whenever they are needed. 51 | # For more information about the recommended setup visit: 52 | # https://docs.fastlane.tools/best-practices/source-control/ 53 | 54 | **/fastlane/report.xml 55 | **/fastlane/Preview.html 56 | **/fastlane/screenshots 57 | **/fastlane/test_output 58 | 59 | # Bundle artifact 60 | *.jsbundle 61 | 62 | # Ruby / CocoaPods 63 | /ios/Pods/ 64 | /vendor/bundle/ -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | bracketSameLine: true, 4 | bracketSpacing: false, 5 | singleQuote: true, 6 | trailingComma: 'all', 7 | }; 8 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby ">= 2.6.10" 5 | 6 | # Exclude problematic versions of cocoapods and activesupport that causes build failures. 7 | gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' 8 | gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' 9 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/__tests__/App.test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: import explicitly to use the types shipped with jest. 10 | import {it} from '@jest/globals'; 11 | 12 | // Note: test renderer must be required after react-native. 13 | import renderer from 'react-test-renderer'; 14 | 15 | it('renders correctly', () => { 16 | renderer.create(); 17 | }); 18 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppNewArch/android/app/debug.keystore -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/java/com/codepushdemoappnewarch/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.codepushdemoappnewarch 2 | 3 | import com.facebook.react.ReactActivity 4 | import com.facebook.react.ReactActivityDelegate 5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled 6 | import com.facebook.react.defaults.DefaultReactActivityDelegate 7 | 8 | class MainActivity : ReactActivity() { 9 | 10 | /** 11 | * Returns the name of the main component registered from JavaScript. This is used to schedule 12 | * rendering of the component. 13 | */ 14 | override fun getMainComponentName(): String = "CodePushDemoAppNewArch" 15 | 16 | /** 17 | * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] 18 | * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] 19 | */ 20 | override fun createReactActivityDelegate(): ReactActivityDelegate = 21 | DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) 22 | } 23 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppNewArch/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | CodePushDemoAppNewArch 3 | DeploymentKey 4 | 5 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | buildToolsVersion = "35.0.0" 4 | minSdkVersion = 24 5 | compileSdkVersion = 35 6 | targetSdkVersion = 34 7 | ndkVersion = "26.1.10909125" 8 | kotlinVersion = "1.9.24" 9 | } 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle") 16 | classpath("com.facebook.react:react-native-gradle-plugin") 17 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") 18 | } 19 | } 20 | 21 | apply plugin: "com.facebook.react.rootproject" 22 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoAppNewArch/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") } 2 | plugins { id("com.facebook.react.settings") } 3 | extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } 4 | rootProject.name = 'CodePushDemoAppNewArch' 5 | include ':app' 6 | includeBuild('../node_modules/@react-native/gradle-plugin') 7 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CodePushDemoAppNewArch", 3 | "displayName": "CodePushDemoAppNewArch" 4 | } 5 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:@react-native/babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/ios/CodePushDemoAppNewArch.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/ios/CodePushDemoAppNewArch/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : RCTAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/ios/CodePushDemoAppNewArch/AppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import 3 | 4 | #import 5 | 6 | @implementation AppDelegate 7 | 8 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 9 | { 10 | self.moduleName = @"CodePushDemoAppNewArch"; 11 | // You can add your custom initial props in the dictionary below. 12 | // They will be passed down to the ViewController used by React Native. 13 | self.initialProps = @{}; 14 | 15 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 16 | } 17 | 18 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 19 | { 20 | return [self bundleURL]; 21 | } 22 | 23 | - (NSURL *)bundleURL 24 | { 25 | #if DEBUG 26 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; 27 | #else 28 | return [CodePush bundleURL]; 29 | #endif 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/ios/CodePushDemoAppNewArch/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/ios/CodePushDemoAppNewArch/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/ios/CodePushDemoAppNewArch/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyAccessedAPITypes 6 | 7 | 8 | NSPrivacyAccessedAPIType 9 | NSPrivacyAccessedAPICategoryFileTimestamp 10 | NSPrivacyAccessedAPITypeReasons 11 | 12 | C617.1 13 | 14 | 15 | 16 | NSPrivacyAccessedAPIType 17 | NSPrivacyAccessedAPICategoryUserDefaults 18 | NSPrivacyAccessedAPITypeReasons 19 | 20 | CA92.1 21 | 22 | 23 | 24 | NSPrivacyAccessedAPIType 25 | NSPrivacyAccessedAPICategorySystemBootTime 26 | NSPrivacyAccessedAPITypeReasons 27 | 28 | 35F9.1 29 | 30 | 31 | 32 | NSPrivacyCollectedDataTypes 33 | 34 | NSPrivacyTracking 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/ios/CodePushDemoAppNewArch/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/ios/CodePushDemoAppNewArchTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Resolve react_native_pods.rb with node to allow for hoisting 2 | require Pod::Executable.execute_command('node', ['-p', 3 | 'require.resolve( 4 | "react-native/scripts/react_native_pods.rb", 5 | {paths: [process.argv[1]]}, 6 | )', __dir__]).strip 7 | 8 | platform :ios, min_ios_version_supported 9 | prepare_react_native_project! 10 | 11 | linkage = ENV['USE_FRAMEWORKS'] 12 | if linkage != nil 13 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green 14 | use_frameworks! :linkage => linkage.to_sym 15 | end 16 | 17 | target 'CodePushDemoAppNewArch' do 18 | config = use_native_modules! 19 | 20 | use_react_native!( 21 | :path => config[:reactNativePath], 22 | # An absolute path to your application root. 23 | :app_path => "#{Pod::Config.instance.installation_root}/.." 24 | ) 25 | 26 | target 'CodePushDemoAppNewArchTests' do 27 | inherit! :complete 28 | # Pods for testing 29 | end 30 | 31 | post_install do |installer| 32 | # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 33 | react_native_post_install( 34 | installer, 35 | config[:reactNativePath], 36 | :mac_catalyst_enabled => false, 37 | # :ccache_enabled => true 38 | ) 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'react-native', 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/metro.config.js: -------------------------------------------------------------------------------- 1 | const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); 2 | 3 | /** 4 | * Metro configuration 5 | * https://reactnative.dev/docs/metro 6 | * 7 | * @type {import('metro-config').MetroConfig} 8 | */ 9 | const config = {}; 10 | 11 | module.exports = mergeConfig(getDefaultConfig(__dirname), config); 12 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CodePushDemoAppNewArch", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "lint": "eslint .", 9 | "start": "react-native start", 10 | "test": "jest" 11 | }, 12 | "dependencies": { 13 | "react": "18.3.1", 14 | "react-native": "0.76.0", 15 | "@code-push-next/react-native-code-push": "file:../.." 16 | }, 17 | "devDependencies": { 18 | "@babel/core": "^7.25.2", 19 | "@babel/preset-env": "^7.25.3", 20 | "@babel/runtime": "^7.25.0", 21 | "@react-native-community/cli": "15.0.0-alpha.2", 22 | "@react-native-community/cli-platform-android": "15.0.0-alpha.2", 23 | "@react-native-community/cli-platform-ios": "15.0.0-alpha.2", 24 | "@react-native/babel-preset": "0.76.0", 25 | "@react-native/eslint-config": "0.76.0", 26 | "@react-native/metro-config": "0.76.0", 27 | "@react-native/typescript-config": "0.76.0", 28 | "@types/react": "^18.2.6", 29 | "@types/react-test-renderer": "^18.0.0", 30 | "babel-jest": "^29.6.3", 31 | "eslint": "^8.19.0", 32 | "jest": "^29.6.3", 33 | "prettier": "2.8.8", 34 | "react-test-renderer": "18.3.1", 35 | "typescript": "5.0.4" 36 | }, 37 | "engines": { 38 | "node": ">=18" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Examples/CodePushDemoAppNewArch/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@react-native/typescript-config/tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native', 4 | }; 5 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | **/.xcode.env.local 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | *.hprof 33 | .cxx/ 34 | *.keystore 35 | !debug.keystore 36 | 37 | # node.js 38 | # 39 | node_modules/ 40 | npm-debug.log 41 | yarn-error.log 42 | 43 | # fastlane 44 | # 45 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 46 | # screenshots whenever they are needed. 47 | # For more information about the recommended setup visit: 48 | # https://docs.fastlane.tools/best-practices/source-control/ 49 | 50 | **/fastlane/report.xml 51 | **/fastlane/Preview.html 52 | **/fastlane/screenshots 53 | **/fastlane/test_output 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # Ruby / CocoaPods 59 | **/Pods/ 60 | /vendor/bundle/ 61 | 62 | # Temporary files created by Metro to check the health of the file watcher 63 | .metro-health-check* 64 | 65 | # testing 66 | /coverage 67 | 68 | # Yarn 69 | .yarn/* 70 | !.yarn/patches 71 | !.yarn/plugins 72 | !.yarn/releases 73 | !.yarn/sdks 74 | !.yarn/versions 75 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | bracketSameLine: true, 4 | bracketSpacing: false, 5 | singleQuote: true, 6 | trailingComma: 'all', 7 | }; 8 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby ">= 2.6.10" 5 | 6 | # Exclude problematic versions of cocoapods and activesupport that causes build failures. 7 | gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' 8 | gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' 9 | gem 'xcodeproj', '< 1.26.0' 10 | gem 'concurrent-ruby', '< 1.3.4' 11 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/__tests__/App.test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import React from 'react'; 6 | import ReactTestRenderer from 'react-test-renderer'; 7 | import App from '../App'; 8 | 9 | test('renders correctly', async () => { 10 | await ReactTestRenderer.act(() => { 11 | ReactTestRenderer.create(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoSwiftNewArch/android/app/debug.keystore -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/java/com/codepushdemoswiftnewarch/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.codepushdemoswiftnewarch 2 | 3 | import com.facebook.react.ReactActivity 4 | import com.facebook.react.ReactActivityDelegate 5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled 6 | import com.facebook.react.defaults.DefaultReactActivityDelegate 7 | 8 | class MainActivity : ReactActivity() { 9 | 10 | /** 11 | * Returns the name of the main component registered from JavaScript. This is used to schedule 12 | * rendering of the component. 13 | */ 14 | override fun getMainComponentName(): String = "CodePushDemoSwiftNewArch" 15 | 16 | /** 17 | * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] 18 | * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] 19 | */ 20 | override fun createReactActivityDelegate(): ReactActivityDelegate = 21 | DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) 22 | } 23 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | CodePushDemoSwiftNewArch 3 | DeploymentKey 4 | 5 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | buildToolsVersion = "35.0.0" 4 | minSdkVersion = 24 5 | compileSdkVersion = 35 6 | targetSdkVersion = 34 7 | ndkVersion = "27.1.12297006" 8 | kotlinVersion = "2.0.21" 9 | } 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle") 16 | classpath("com.facebook.react:react-native-gradle-plugin") 17 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") 18 | } 19 | } 20 | 21 | apply plugin: "com.facebook.react.rootproject" 22 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/Examples/CodePushDemoSwiftNewArch/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") } 2 | plugins { id("com.facebook.react.settings") } 3 | extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } 4 | rootProject.name = 'CodePushDemoSwiftNewArch' 5 | include ':app' 6 | includeBuild('../node_modules/@react-native/gradle-plugin') 7 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CodePushDemoSwiftNewArch", 3 | "displayName": "CodePushDemoSwiftNewArch" 4 | } 5 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:@react-native/babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/ios/CodePushDemoSwiftNewArch.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/ios/CodePushDemoSwiftNewArch.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/ios/CodePushDemoSwiftNewArch/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import React 3 | import React_RCTAppDelegate 4 | import ReactAppDependencyProvider 5 | import CodePush 6 | 7 | @main 8 | class AppDelegate: RCTAppDelegate { 9 | override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { 10 | self.moduleName = "CodePushDemoSwiftNewArch" 11 | self.dependencyProvider = RCTAppDependencyProvider() 12 | 13 | // You can add your custom initial props in the dictionary below. 14 | // They will be passed down to the ViewController used by React Native. 15 | self.initialProps = [:] 16 | 17 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 18 | } 19 | 20 | override func sourceURL(for bridge: RCTBridge) -> URL? { 21 | self.bundleURL() 22 | } 23 | 24 | override func bundleURL() -> URL? { 25 | #if DEBUG 26 | RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") 27 | #else 28 | CodePush.bundleURL() 29 | #endif 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/ios/CodePushDemoSwiftNewArch/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/ios/CodePushDemoSwiftNewArch/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/ios/CodePushDemoSwiftNewArch/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyAccessedAPITypes 6 | 7 | 8 | NSPrivacyAccessedAPIType 9 | NSPrivacyAccessedAPICategoryFileTimestamp 10 | NSPrivacyAccessedAPITypeReasons 11 | 12 | C617.1 13 | 14 | 15 | 16 | NSPrivacyAccessedAPIType 17 | NSPrivacyAccessedAPICategoryUserDefaults 18 | NSPrivacyAccessedAPITypeReasons 19 | 20 | CA92.1 21 | 22 | 23 | 24 | NSPrivacyAccessedAPIType 25 | NSPrivacyAccessedAPICategorySystemBootTime 26 | NSPrivacyAccessedAPITypeReasons 27 | 28 | 35F9.1 29 | 30 | 31 | 32 | NSPrivacyCollectedDataTypes 33 | 34 | NSPrivacyTracking 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Resolve react_native_pods.rb with node to allow for hoisting 2 | require Pod::Executable.execute_command('node', ['-p', 3 | 'require.resolve( 4 | "react-native/scripts/react_native_pods.rb", 5 | {paths: [process.argv[1]]}, 6 | )', __dir__]).strip 7 | 8 | platform :ios, '15.5' 9 | prepare_react_native_project! 10 | 11 | linkage = ENV['USE_FRAMEWORKS'] 12 | if linkage != nil 13 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green 14 | use_frameworks! :linkage => linkage.to_sym 15 | end 16 | 17 | target 'CodePushDemoSwiftNewArch' do 18 | config = use_native_modules! 19 | 20 | use_react_native!( 21 | :path => config[:reactNativePath], 22 | # An absolute path to your application root. 23 | :app_path => "#{Pod::Config.instance.installation_root}/.." 24 | ) 25 | 26 | post_install do |installer| 27 | # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 28 | react_native_post_install( 29 | installer, 30 | config[:reactNativePath], 31 | :mac_catalyst_enabled => false, 32 | # :ccache_enabled => true 33 | ) 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'react-native', 3 | }; 4 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/metro.config.js: -------------------------------------------------------------------------------- 1 | const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); 2 | 3 | /** 4 | * Metro configuration 5 | * https://reactnative.dev/docs/metro 6 | * 7 | * @type {import('@react-native/metro-config').MetroConfig} 8 | */ 9 | const config = {}; 10 | 11 | module.exports = mergeConfig(getDefaultConfig(__dirname), config); 12 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CodePushDemoSwiftNewArch", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "lint": "eslint .", 9 | "start": "react-native start", 10 | "test": "jest" 11 | }, 12 | "dependencies": { 13 | "@code-push-next/react-native-code-push": "^10.0.0-beta.1", 14 | "react": "18.3.1", 15 | "react-native": "0.77.1" 16 | }, 17 | "devDependencies": { 18 | "@babel/core": "^7.25.2", 19 | "@babel/preset-env": "^7.25.3", 20 | "@babel/runtime": "^7.25.0", 21 | "@react-native-community/cli": "15.0.1", 22 | "@react-native-community/cli-platform-android": "15.0.1", 23 | "@react-native-community/cli-platform-ios": "15.0.1", 24 | "@react-native/babel-preset": "0.77.1", 25 | "@react-native/eslint-config": "0.77.1", 26 | "@react-native/metro-config": "0.77.1", 27 | "@react-native/typescript-config": "0.77.1", 28 | "@types/jest": "^29.5.13", 29 | "@types/react": "^18.2.6", 30 | "@types/react-test-renderer": "^18.0.0", 31 | "eslint": "^8.19.0", 32 | "jest": "^29.6.3", 33 | "prettier": "2.8.8", 34 | "react-test-renderer": "18.3.1", 35 | "typescript": "5.0.4" 36 | }, 37 | "engines": { 38 | "node": ">=18" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Examples/CodePushDemoSwiftNewArch/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@react-native/typescript-config/tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Microsoft CodePush Plugin for React Native 2 | 3 | Copyright (c) Microsoft Corporation 4 | 5 | All rights reserved. 6 | 7 | MIT License 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Recipes/UpdateButton.ios.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var pkg = require('./package'); 4 | var React = require('react-native'); 5 | var { 6 | AppRegistry, 7 | StyleSheet, 8 | Text, 9 | View, 10 | } = React; 11 | var Button = require('react-native-button'); 12 | 13 | var CodePush = require('react-native-code-push'); 14 | 15 | var UpdateButton = React.createClass({ 16 | getInitialState: function() { 17 | return {}; 18 | }, 19 | componentDidMount: function() { 20 | CodePush.checkForUpdate().done((update) => { 21 | if (update && !update.downloadURL) { 22 | this.setState({ 23 | update: update 24 | }); 25 | } 26 | }); 27 | }, 28 | update: function() { 29 | this.state.update.download().done((newPackage) => { 30 | newPackage.install(); 31 | }); 32 | }, 33 | render: function() { 34 | var updateButton = null; 35 | if (this.state.update) { 36 | updateButton = ; 37 | } 38 | 39 | return ( 40 | 41 | 42 | Welcome to {pkg.name} {pkg.version}! 43 | 44 | {updateButton} 45 | 46 | ); 47 | } 48 | }); 49 | 50 | var styles = StyleSheet.create({ 51 | container: { 52 | flex: 1, 53 | justifyContent: 'center', 54 | alignItems: 'center', 55 | backgroundColor: '#F5FCFF', 56 | } 57 | }); 58 | 59 | AppRegistry.registerComponent('UpdateButton', () => UpdateButton); 60 | -------------------------------------------------------------------------------- /Recipes/UpdateOnStart.ios.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var pkg = require('./package'); 4 | var React = require('react-native'); 5 | var { 6 | AppRegistry, 7 | StyleSheet, 8 | Text, 9 | View, 10 | } = React; 11 | 12 | var CodePush = require('react-native-code-push'); 13 | 14 | var UpdateOnStart = React.createClass({ 15 | componentDidMount: function() { 16 | CodePush.checkForUpdate().done((update) => { 17 | if (update && update.downloadUrl) { 18 | update.download().done((newPackage) => { 19 | newPackage.install(); 20 | }); 21 | } 22 | }); 23 | }, 24 | render: function() { 25 | return ( 26 | 27 | 28 | Welcome to {pkg.name} {pkg.version}! 29 | 30 | 31 | ); 32 | } 33 | }); 34 | 35 | var styles = StyleSheet.create({ 36 | container: { 37 | flex: 1, 38 | justifyContent: 'center', 39 | alignItems: 'center', 40 | backgroundColor: '#F5FCFF', 41 | } 42 | }); 43 | 44 | AppRegistry.registerComponent('UpdateOnStart', () => UpdateOnStart); 45 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Invoked via reflection, when setting js bundle. 20 | -keepclassmembers class com.facebook.react.ReactInstanceManager { 21 | private final ** mBundleLoader; 22 | } 23 | 24 | -keepclassmembers class com.facebook.react.runtime.ReactHostImpl { 25 | private final ** mReactHostDelegate; 26 | } 27 | 28 | -keep interface com.facebook.react.runtime.ReactHostDelegate { *; } 29 | 30 | -keep class * implements com.facebook.react.runtime.ReactHostDelegate { *; } 31 | 32 | # Can't find referenced class org.bouncycastle.** 33 | -dontwarn com.nimbusds.jose.** 34 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/microsoft/codepush/react/CodePushInstallMode.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.codepush.react; 2 | 3 | public enum CodePushInstallMode { 4 | IMMEDIATE(0), 5 | ON_NEXT_RESTART(1), 6 | ON_NEXT_RESUME(2), 7 | ON_NEXT_SUSPEND(3); 8 | 9 | private final int value; 10 | CodePushInstallMode(int value) { 11 | this.value = value; 12 | } 13 | public int getValue() { 14 | return this.value; 15 | } 16 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidPublicKeyException.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.codepush.react; 2 | 3 | class CodePushInvalidPublicKeyException extends RuntimeException { 4 | 5 | public CodePushInvalidPublicKeyException(String message, Throwable cause) { 6 | super(message, cause); 7 | } 8 | 9 | public CodePushInvalidPublicKeyException(String message) { 10 | super(message); 11 | } 12 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidUpdateException.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.codepush.react; 2 | 3 | public class CodePushInvalidUpdateException extends RuntimeException { 4 | public CodePushInvalidUpdateException(String message) { 5 | super(message); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/microsoft/codepush/react/CodePushMalformedDataException.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.codepush.react; 2 | 3 | import java.net.MalformedURLException; 4 | 5 | public class CodePushMalformedDataException extends RuntimeException { 6 | public CodePushMalformedDataException(String path, Throwable cause) { 7 | super("Unable to parse contents of " + path + ", the file may be corrupted.", cause); 8 | } 9 | public CodePushMalformedDataException(String url, MalformedURLException cause) { 10 | super("The package has an invalid downloadUrl: " + url, cause); 11 | } 12 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/microsoft/codepush/react/CodePushNotInitializedException.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.codepush.react; 2 | 3 | public final class CodePushNotInitializedException extends RuntimeException { 4 | 5 | public CodePushNotInitializedException(String message, Throwable cause) { 6 | super(message, cause); 7 | } 8 | 9 | public CodePushNotInitializedException(String message) { 10 | super(message); 11 | } 12 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/microsoft/codepush/react/CodePushUnknownException.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.codepush.react; 2 | 3 | class CodePushUnknownException extends RuntimeException { 4 | 5 | public CodePushUnknownException(String message, Throwable cause) { 6 | super(message, cause); 7 | } 8 | 9 | public CodePushUnknownException(String message) { 10 | super(message); 11 | } 12 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateState.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.codepush.react; 2 | 3 | public enum CodePushUpdateState { 4 | RUNNING(0), 5 | PENDING(1), 6 | LATEST(2); 7 | 8 | private final int value; 9 | CodePushUpdateState(int value) { 10 | this.value = value; 11 | } 12 | public int getValue() { 13 | return this.value; 14 | } 15 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/microsoft/codepush/react/DownloadProgress.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.codepush.react; 2 | 3 | import com.facebook.react.bridge.WritableMap; 4 | import com.facebook.react.bridge.WritableNativeMap; 5 | 6 | class DownloadProgress { 7 | private long mTotalBytes; 8 | private long mReceivedBytes; 9 | 10 | public DownloadProgress (long totalBytes, long receivedBytes){ 11 | mTotalBytes = totalBytes; 12 | mReceivedBytes = receivedBytes; 13 | } 14 | 15 | public WritableMap createWritableMap() { 16 | WritableMap map = new WritableNativeMap(); 17 | if (mTotalBytes < Integer.MAX_VALUE) { 18 | map.putInt("totalBytes", (int) mTotalBytes); 19 | map.putInt("receivedBytes", (int) mReceivedBytes); 20 | } else { 21 | map.putDouble("totalBytes", mTotalBytes); 22 | map.putDouble("receivedBytes", mReceivedBytes); 23 | } 24 | return map; 25 | } 26 | 27 | public boolean isCompleted() { 28 | return mTotalBytes == mReceivedBytes; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/microsoft/codepush/react/DownloadProgressCallback.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.codepush.react; 2 | 3 | interface DownloadProgressCallback { 4 | void call(DownloadProgress downloadProgress); 5 | } 6 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/microsoft/codepush/react/ReactHostHolder.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.codepush.react; 2 | 3 | import com.facebook.react.ReactHost; 4 | import com.facebook.react.runtime.ReactHostDelegate; 5 | 6 | /** 7 | * Provides access to a {@link ReactHostDelegate} 8 | */ 9 | public interface ReactHostHolder { 10 | ReactHost getReactHost(); 11 | } -------------------------------------------------------------------------------- /android/app/src/main/java/com/microsoft/codepush/react/ReactInstanceHolder.java: -------------------------------------------------------------------------------- 1 | package com.microsoft.codepush.react; 2 | 3 | import com.facebook.react.ReactInstanceManager; 4 | 5 | /** 6 | * Provides access to a {@link ReactInstanceManager}. 7 | * 8 | * ReactNativeHost already implements this interface, if you make use of that react-native 9 | * component (just add `implements ReactInstanceHolder`). 10 | */ 11 | public interface ReactInstanceHolder { 12 | 13 | /** 14 | * Get the current {@link ReactInstanceManager} instance. May return null. 15 | */ 16 | ReactInstanceManager getReactInstanceManager(); 17 | 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | google() 6 | mavenCentral() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:1.3.0' 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | android { 18 | namespace "com.microsoft.codepush.react" 19 | } 20 | repositories { 21 | mavenLocal() 22 | mavenCentral() 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' -------------------------------------------------------------------------------- /code-push-plugin-testing-framework/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "code-push-plugin-testing-framework", 3 | "version": "0.0.1", 4 | "description": "Plugin Testing Framework for CodePush Plugins", 5 | "main": "script/index.js", 6 | "scripts": { 7 | "test": "gulp" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/microsoft/code-push.git" 12 | }, 13 | "author": { 14 | "name": "Microsoft Corporation" 15 | }, 16 | "license": "MIT", 17 | "homepage": "https://microsoft.github.io/code-push", 18 | "dependencies": { 19 | "@types/uuid": "^8.3.1", 20 | "base-64": "^1.0.0", 21 | "mocha": "latest", 22 | "mocha-junit-reporter": "latest", 23 | "q": "^1.5.1", 24 | "replace": "latest", 25 | "superagent": "^6.1.0", 26 | "superagent-proxy": "^3.0.0", 27 | "uuid": "^8.3.2" 28 | }, 29 | "bugs": { 30 | "url": "https://github.com/microsoft/code-push/issues" 31 | }, 32 | "readme": "ERROR: No README data found!", 33 | "_id": "code-push-plugin-testing-framework@0.0.1", 34 | "_shasum": "6ea33a661710628af266d714949fe95f88d71f0d", 35 | "_from": "../code-push/plugin-testing-framework/bin", 36 | "_resolved": "file:../code-push/plugin-testing-framework/bin" 37 | } 38 | -------------------------------------------------------------------------------- /code-push-plugin-testing-framework/script/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var Platform = require("./platform"); 3 | exports.Platform = Platform; 4 | var PluginTestingFramework = require("./test"); 5 | exports.PluginTestingFramework = PluginTestingFramework; 6 | var projectManager_1 = require("./projectManager"); 7 | exports.ProjectManager = projectManager_1.ProjectManager; 8 | exports.setupTestRunScenario = projectManager_1.setupTestRunScenario; 9 | exports.setupUpdateScenario = projectManager_1.setupUpdateScenario; 10 | var ServerUtil = require("./serverUtil"); 11 | exports.ServerUtil = ServerUtil; 12 | var testBuilder_1 = require("./testBuilder"); 13 | exports.TestBuilder = testBuilder_1.TestBuilder; 14 | var TestConfig = require("./testConfig"); 15 | exports.TestConfig = TestConfig; 16 | var testUtil_1 = require("./testUtil"); 17 | exports.TestUtil = testUtil_1.TestUtil; 18 | -------------------------------------------------------------------------------- /ios/CodePush.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/CodePush.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/CodePush/Base64/Base64/MF_Base64Additions.h: -------------------------------------------------------------------------------- 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 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 35 | -------------------------------------------------------------------------------- /ios/CodePush/Base64/README.md: -------------------------------------------------------------------------------- 1 | [![CI Status](https://travis-ci.org/ekscrypto/Base64.svg?branch=master)](https://github.com/ekscrypto/Base64) 2 | 3 | Base64 Additions for Objective-C on Mac OS X and iOS 4 | ======= 5 | 6 | 7 | Usage 8 | ---- 9 | Open the Xcode project file, and drag MF_Base64Additions.m/.h into your project. 10 | 11 | In files where you want to use Base64 encoding/decoding, simply include the header file and use one of the provided NSData or NSString additions. 12 | 13 | Example use: 14 | #import "MF_Base64Additions.h" 15 | 16 | NSString *helloWorld = @"Hello World"; 17 | NSString *helloInBase64 = [helloWorld base64String]; 18 | NSString *helloDecoded = [NSString stringFromBase64String:helloInBase64]; 19 | 20 | 21 | 22 | 23 | Performance 24 | ---- 25 | * Encoding: Approximately 4 to 5 times faster than using the equivalent SecTransform. 26 | * Encoding: 30% faster than https://github.com/l4u/NSData-Base64 27 | * Decoding: 5% faster than using the equivalent SecTransform. 28 | * Decoding: 5% faster than https://github.com/l4u/NSData-Base64 29 | 30 | 31 | 32 | Requirements 33 | ----- 34 | * Compile with Automatic Reference Counting 35 | * Compatible with Mac OSX 10.6+ and iOS 4.0+ 36 | 37 | 38 | 39 | Implementation 40 | ---- 41 | * Implemented as per RFC 4648, see http://www.ietf.org/rfc/rfc4648.txt for more details. 42 | 43 | 44 | 45 | Licensing 46 | ---- 47 | * Public Domain 48 | -------------------------------------------------------------------------------- /ios/CodePush/CodePushErrorUtils.m: -------------------------------------------------------------------------------- 1 | #import "CodePush.h" 2 | 3 | @implementation CodePushErrorUtils 4 | 5 | static NSString *const CodePushErrorDomain = @"CodePushError"; 6 | static const int CodePushErrorCode = -1; 7 | 8 | + (NSError *)errorWithMessage:(NSString *)errorMessage 9 | { 10 | return [NSError errorWithDomain:CodePushErrorDomain 11 | code:CodePushErrorCode 12 | userInfo:@{ NSLocalizedDescriptionKey: NSLocalizedString(errorMessage, nil) }]; 13 | } 14 | 15 | + (BOOL)isCodePushError:(NSError *)err 16 | { 17 | return err != nil && [CodePushErrorDomain isEqualToString:err.domain]; 18 | } 19 | 20 | @end -------------------------------------------------------------------------------- /ios/CodePush/CodePushUtils.m: -------------------------------------------------------------------------------- 1 | #import "CodePush.h" 2 | 3 | void CPLog(NSString *formatString, ...) { 4 | va_list args; 5 | va_start(args, formatString); 6 | NSString *prependedFormatString = [NSString stringWithFormat:@"\n[CodePush] %@", formatString]; 7 | NSLogv(prependedFormatString, args); 8 | va_end(args); 9 | } -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTAlgorithmFactory.h 3 | // JWT 4 | // 5 | // Created by Lobanov Dmitry on 07.10.15. 6 | // Copyright © 2015 Karma. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JWTAlgorithm.h" 11 | @interface JWTAlgorithmFactory : NSObject 12 | 13 | + (NSArray *)algorithms; 14 | + (id)algorithmByName:(NSString *)name; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.m: -------------------------------------------------------------------------------- 1 | // 2 | // JWTAlgorithmFactory.m 3 | // JWT 4 | // 5 | // Created by Lobanov Dmitry on 07.10.15. 6 | // Copyright © 2015 Karma. All rights reserved. 7 | // 8 | 9 | #import "JWTAlgorithmFactory.h" 10 | #import "JWTAlgorithmHSBase.h" 11 | #import "JWTAlgorithmRSBase.h" 12 | #import "JWTAlgorithmNone.h" 13 | 14 | // not implemented. 15 | NSString *const JWTAlgorithmNameES256 = @"ES256"; 16 | NSString *const JWTAlgorithmNameES384 = @"ES384"; 17 | NSString *const JWTAlgorithmNameES512 = @"ES512"; 18 | 19 | @implementation JWTAlgorithmFactory 20 | 21 | + (NSArray *)algorithms { 22 | return @[ 23 | [JWTAlgorithmNone new], 24 | [JWTAlgorithmHSBase algorithm256], 25 | [JWTAlgorithmHSBase algorithm384], 26 | [JWTAlgorithmHSBase algorithm512], 27 | [JWTAlgorithmRSBase algorithm256], 28 | [JWTAlgorithmRSBase algorithm384], 29 | [JWTAlgorithmRSBase algorithm512] 30 | ]; 31 | 32 | } 33 | 34 | + (id)algorithmByName:(NSString *)name { 35 | id algorithm = nil; 36 | 37 | NSString *algName = [name copy]; 38 | 39 | NSUInteger index = [[self algorithms] indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) { 40 | // lowercase comparison 41 | return [obj.name.lowercaseString isEqualToString:algName.lowercaseString]; 42 | }]; 43 | 44 | if (index != NSNotFound) { 45 | algorithm = [self algorithms][index]; 46 | } 47 | 48 | return algorithm; 49 | } 50 | 51 | @end -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTAlgorithmNone.h 3 | // JWT 4 | // 5 | // Created by Lobanov Dmitry on 16.10.15. 6 | // Copyright © 2015 Karma. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JWTAlgorithm.h" 11 | extern NSString *const JWTAlgorithmNameNone; 12 | 13 | @interface JWTAlgorithmNone : NSObject 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTAlgorithmESBase.h 3 | // Pods 4 | // 5 | // Created by Lobanov Dmitry on 12.02.17. 6 | // 7 | // 8 | 9 | #import 10 | #import "JWTRSAlgorithm.h" 11 | extern NSString *const JWTAlgorithmNameES256; 12 | extern NSString *const JWTAlgorithmNameES384; 13 | extern NSString *const JWTAlgorithmNameES512; 14 | @interface JWTAlgorithmESBase : NSObject @end 15 | 16 | @interface JWTAlgorithmESBase (JWTAsymmetricKeysAlgorithm) @end 17 | 18 | @interface JWTAlgorithmESBase (Create) 19 | 20 | + (instancetype)algorithm256; 21 | + (instancetype)algorithm384; 22 | + (instancetype)algorithm512; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.m: -------------------------------------------------------------------------------- 1 | // 2 | // JWTAlgorithmESBase.m 3 | // Pods 4 | // 5 | // Created by Lobanov Dmitry on 12.02.17. 6 | // 7 | // 8 | 9 | #import "JWTAlgorithmESBase.h" 10 | #import 11 | @interface JWTAlgorithmESBase () 12 | 13 | @end 14 | @implementation JWTAlgorithmESBase 15 | @synthesize keyExtractorType; 16 | @synthesize signKey; 17 | @synthesize verifyKey; 18 | @end 19 | 20 | // thanks! https://github.com/soyersoyer/SwCrypt 21 | @interface JWTAlgorithmESBase (ImportKeys) 22 | - (void)importKey; 23 | //importKey(publicKey, format: .importKeyBinary, keyType: .keyPublic) 24 | @end 25 | @implementation JWTAlgorithmESBase (ImportKeys) 26 | - (void)importKey { 27 | return; 28 | } 29 | @end 30 | 31 | @implementation JWTAlgorithmESBase (JWTAsymmetricKeysAlgorithm) 32 | - (NSString *)name { 33 | return @"ESBase"; 34 | } 35 | - (NSData *)signHash:(NSData *)hash key:(NSData *)key error:(NSError *__autoreleasing *)error { 36 | return nil; 37 | } 38 | - (BOOL)verifyHash:(NSData *)hash signature:(NSData *)signature key:(NSData *)key error:(NSError *__autoreleasing *)error { 39 | return NO; 40 | } 41 | @end 42 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTAlgorithmHSBase.h 3 | // JWT 4 | // 5 | // Created by Lobanov Dmitry on 13.03.16. 6 | // Copyright © 2016 Karma. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JWTAlgorithm.h" 11 | extern NSString *const JWTAlgorithmNameHS256; 12 | extern NSString *const JWTAlgorithmNameHS384; 13 | extern NSString *const JWTAlgorithmNameHS512; 14 | 15 | @interface JWTAlgorithmHSBase : NSObject 16 | 17 | @property (assign, nonatomic, readonly) size_t ccSHANumberDigestLength; 18 | @property (assign, nonatomic, readonly) uint32_t ccHmacAlgSHANumber; 19 | 20 | @end 21 | 22 | @interface JWTAlgorithmHSBase (Create) 23 | 24 | + (instancetype)algorithm256; 25 | + (instancetype)algorithm384; 26 | + (instancetype)algorithm512; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTAlgorithmDataHolderChain.h 3 | // JWT 4 | // 5 | // Created by Lobanov Dmitry on 02.10.16. 6 | // Copyright © 2016 Karma. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JWTAlgorithmDataHolder.h" 11 | 12 | @interface JWTAlgorithmDataHolderChain : NSObject 13 | 14 | @property (strong, nonatomic, readonly) NSArray *holders; 15 | 16 | #pragma mark - Initialization 17 | - (instancetype)initWithHolders:(NSArray *)holders; 18 | - (instancetype)initWithHolder:(id)holder; 19 | 20 | #pragma mark - Appending 21 | - (instancetype)chainByAppendingChain:(JWTAlgorithmDataHolderChain *)chain; 22 | - (instancetype)chainByAppendingHolders:(NSArray *)holders; 23 | - (instancetype)chainByAppendingHolder:(id)holder; 24 | 25 | #pragma mark - Create 26 | + (instancetype)chainWithHolders:(NSArray *)holders; 27 | + (instancetype)chainWithHolder:(id)holder; 28 | @end 29 | 30 | @interface JWTAlgorithmDataHolderChain (HoldersPopulation) 31 | - (NSArray *)singleAlgorithm:(id)algorithm withManySecretData:(NSArray *)secretsData; 32 | - (NSArray *)singleSecretData:(NSData *)secretData withManyAlgorithms:(NSArray *)algorithms; 33 | 34 | - (instancetype)chainByPopulatingAlgorithm:(id)algorithm withManySecretData:(NSArray *)secretsData; 35 | - (instancetype)chainByPopulatingSecretData:(NSData *)secretData withManyAlgorithms:(NSArray *)algorithms; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTAlgorithmRSBase.h 3 | // JWT 4 | // 5 | // Created by Lobanov Dmitry on 13.03.16. 6 | // Copyright © 2016 Karma. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JWTRSAlgorithm.h" 11 | extern NSString *const JWTAlgorithmNameRS256; 12 | extern NSString *const JWTAlgorithmNameRS384; 13 | extern NSString *const JWTAlgorithmNameRS512; 14 | 15 | @interface JWTAlgorithmRSBase : NSObject 16 | 17 | @property (assign, nonatomic, readonly) size_t ccSHANumberDigestLength; 18 | @property (assign, nonatomic, readonly) uint32_t secPaddingPKCS1SHANumber; 19 | - (unsigned char *)CC_SHANumberWithData:(const void *)data withLength:(uint32_t)len withHashBytes:(unsigned char *)hashBytes; 20 | 21 | @end 22 | 23 | @interface JWTAlgorithmRSBase (Create) 24 | 25 | + (instancetype)algorithm256; 26 | + (instancetype)algorithm384; 27 | + (instancetype)algorithm512; 28 | + (instancetype)mutableAlgorithm __deprecated; 29 | 30 | @end 31 | 32 | /* 33 | // when you can't live without mutability, uncomment. 34 | @class JWTAlgorithmRSFamilyMemberMutable; 35 | */ -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTRSAlgorithm.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Marcelo Schroeder on 12/03/2016. 3 | // Copyright (c) 2016 Karma. All rights reserved. 4 | // 5 | 6 | #import 7 | #import "JWTAlgorithm.h" 8 | @protocol JWTCryptoKeyProtocol; 9 | 10 | @protocol JWTAsymmetricKeysAlgorithm 11 | 12 | @optional 13 | @property(nonatomic, readwrite, copy) NSString *keyExtractorType; 14 | @property(nonatomic, readwrite, strong) id signKey; 15 | @property(nonatomic, readwrite, strong) id verifyKey; 16 | 17 | @end 18 | 19 | @protocol JWTRSAlgorithm 20 | 21 | @required 22 | @property(nonatomic, readwrite, copy) NSString *privateKeyCertificatePassphrase; 23 | @end 24 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTCryptoKeyExtractor.h 3 | // JWT 4 | // 5 | // Created by Lobanov Dmitry on 04.02.17. 6 | // Copyright © 2017 JWTIO. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @protocol JWTCryptoKeyProtocol; 13 | @protocol JWTCryptoKeyExtractorProtocol 14 | @optional 15 | - (id)keyFromString:(NSString *)string parameters:(NSDictionary *)parameters error:(NSError *__autoreleasing*)error; 16 | - (id)keyFromData:(NSData *)data parameters:(NSDictionary *)parameters error:(NSError *__autoreleasing*)error; 17 | @end 18 | 19 | @interface JWTCryptoKeyExtractor : NSObject 20 | @property (copy, nonatomic, readonly) NSString *type; 21 | + (NSString *)type; 22 | + (NSString *)parametersKeyCertificatePassphrase; 23 | @end 24 | 25 | @interface JWTCryptoKeyExtractor (ClassCluster) 26 | + (instancetype)publicKeyWithCertificate; 27 | + (instancetype)privateKeyInP12; 28 | + (instancetype)publicKeyWithPEMBase64; 29 | + (instancetype)privateKeyWithPEMBase64; 30 | + (instancetype)createWithType:(NSString *)type; 31 | @end 32 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/ClaimSet/JWTClaim.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTClaim.h 3 | // JWT 4 | // 5 | // Created by Lobanov Dmitry on 13.02.16. 6 | // Copyright © 2016 Karma. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JWTClaim : NSObject 12 | 13 | + (NSString *)name; 14 | + (instancetype)claimByName:(NSString *)name; 15 | + (BOOL)verifyValue:(NSObject *)value withTrustedValue:(NSObject *)trustedValue; 16 | - (BOOL)verifyValue:(NSObject *)value withTrustedValue:(NSObject *)trustedValue; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTClaimsSet.h 3 | // JWT 4 | // 5 | // Created by Klaas Pieter Annema on 31-05-13. 6 | // Copyright (c) 2013 Karma. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JWTClaimsSet : NSObject 12 | 13 | @property (nonatomic, readwrite, copy) NSString *issuer; 14 | @property (nonatomic, readwrite, copy) NSString *subject; 15 | @property (nonatomic, readwrite, copy) NSString *audience; 16 | @property (nonatomic, readwrite, copy) NSDate *expirationDate; 17 | @property (nonatomic, readwrite, copy) NSDate *notBeforeDate; 18 | @property (nonatomic, readwrite, copy) NSDate *issuedAt; 19 | @property (nonatomic, readwrite, copy) NSString *identifier; 20 | @property (nonatomic, readwrite, copy) NSString *type; 21 | @property (nonatomic, readwrite, copy) NSString *scope; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.m: -------------------------------------------------------------------------------- 1 | // 2 | // JWTClaimsSet.m 3 | // JWT 4 | // 5 | // Created by Klaas Pieter Annema on 31-05-13. 6 | // Copyright (c) 2013 Karma. All rights reserved. 7 | // 8 | 9 | #import "JWTClaimsSet.h" 10 | 11 | @implementation JWTClaimsSet 12 | 13 | - (id)copyWithZone:(NSZone *)zone { 14 | JWTClaimsSet *newClaimsSet = [[self.class alloc] init]; 15 | 16 | newClaimsSet.issuer = self.issuer; 17 | newClaimsSet.subject = self.subject; 18 | newClaimsSet.audience = self.audience; 19 | newClaimsSet.expirationDate = self.expirationDate; 20 | newClaimsSet.notBeforeDate = self.notBeforeDate; 21 | newClaimsSet.issuedAt = self.issuedAt; 22 | newClaimsSet.identifier = self.identifier; 23 | newClaimsSet.type = self.type; 24 | newClaimsSet.scope = self.scope; 25 | 26 | return newClaimsSet; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTClaimsSetSerializer.h 3 | // JWT 4 | // 5 | // Created by Klaas Pieter Annema on 31-05-13. 6 | // Copyright (c) 2013 Karma. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "JWTClaimsSet.h" 12 | 13 | @interface JWTClaimsSetSerializer : NSObject 14 | 15 | + (NSArray *)claimsSetKeys; 16 | + (NSDictionary *)dictionaryWithClaimsSet:(JWTClaimsSet *)theClaimsSet; 17 | + (JWTClaimsSet *)claimsSetWithDictionary:(NSDictionary *)theDictionary; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTClaimsSetVerifier.h 3 | // JWT 4 | // 5 | // Created by Lobanov Dmitry on 13.02.16. 6 | // Copyright © 2016 Karma. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JWTClaimsSet.h" 11 | 12 | @interface JWTClaimsSetVerifier : NSObject 13 | 14 | + (BOOL)verifyClaimsSet:(JWTClaimsSet *)theClaimsSet withTrustedClaimsSet:(JWTClaimsSet *)trustedClaimsSet; 15 | 16 | + (BOOL)verifyClaimsSetDictionary:(NSDictionary *)theClaimsSetDictionary withTrustedClaimsSet:(JWTClaimsSet *)trustedClaimsSet; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Coding/JWTCoding.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWT.h 3 | // JWT 4 | // 5 | // Created by Klaas Pieter Annema on 31-05-13. 6 | // Copyright (c) 2013 Karma. All rights reserved. 7 | // 8 | 9 | #import 10 | /** 11 | @discussion JWT is a general interface for decoding and encoding. 12 | Now it is to complex and fat to support. 13 | Possible solution: split interface into several pieces. 14 | 15 | JWT_1_0 -> JWT with plain old functions. 16 | JWT_2_0 -> JWT with builder usage. 17 | JWT_3_0 -> JWT with splitted apart algorithm data and payload data. 18 | */ 19 | @interface JWT : NSObject @end 20 | 21 | typedef NS_OPTIONS(NSInteger, JWTCodingDecodingOptions) { 22 | JWTCodingDecodingOptionsNone = 0, 23 | JWTCodingDecodingOptionsSkipVerification = 1 24 | }; 25 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Coding/JWTCoding.m: -------------------------------------------------------------------------------- 1 | // 2 | // JWT.m 3 | // JWT 4 | // 5 | // Created by Klaas Pieter Annema on 31-05-13. 6 | // Copyright (c) 2013 Karma. All rights reserved. 7 | // 8 | 9 | #import "JWTCoding.h" 10 | 11 | @implementation JWT @end 12 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/FrameworkSupplement/JWT.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWT.h 3 | // JWT 4 | // 5 | // Created by Lobanov Dmitry on 23.10.16. 6 | // Copyright © 2016 Karma. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for JWT. 12 | FOUNDATION_EXPORT double JWTVersionNumber; 13 | 14 | //! Project version string for JWT. 15 | FOUNDATION_EXPORT const unsigned char JWTVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | // Coding 20 | #import 21 | #import 22 | #import 23 | #import 24 | #import 25 | 26 | // Algorithms 27 | #import 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | 34 | // Holders 35 | #import 36 | #import 37 | 38 | // Claims 39 | #import 40 | #import 41 | #import 42 | #import 43 | 44 | // Supplement 45 | #import 46 | #import 47 | #import 48 | 49 | // Crypto 50 | #import 51 | #import 52 | #import 53 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/FrameworkSupplement/Map.modulemap: -------------------------------------------------------------------------------- 1 | framework module JWT { 2 | umbrella header "JWT.h" 3 | export * 4 | module * { export * } 5 | } -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTBase64Coder.h 3 | // Pods 4 | // 5 | // Created by Lobanov Dmitry on 05.10.16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @protocol JWTStringCoder__Protocol 12 | - (NSString *)stringWithData:(NSData *)data; 13 | - (NSData *)dataWithString:(NSString *)string; 14 | @end 15 | 16 | @interface JWTBase64Coder : NSObject 17 | + (NSString *)base64UrlEncodedStringWithData:(NSData *)data; 18 | + (NSData *)dataWithBase64UrlEncodedString:(NSString *)urlEncodedString; 19 | @end 20 | 21 | @interface JWTBase64Coder (JWTStringCoder__Protocol) @end 22 | 23 | 24 | @interface JWTStringCoder__For__Encoding : NSObject 25 | @property (assign, nonatomic, readwrite) NSStringEncoding stringEncoding; 26 | + (instancetype)utf8Encoding; 27 | @end 28 | @interface JWTStringCoder__For__Encoding (JWTStringCoder__Protocol) @end 29 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Supplement/JWTDeprecations.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTDeprecations.h 3 | // JWT 4 | // 5 | // Created by Lobanov Dmitry on 31.08.16. 6 | // Copyright © 2016 Karma. All rights reserved. 7 | // 8 | 9 | #ifndef JWTDeprecations_h 10 | #define JWTDeprecations_h 11 | 12 | #define STR(str) #str 13 | #define JWTVersion_2_1_0 2.1 14 | #define JWTVersion_2_2_0 2.2 15 | #define JWTVersion_3_0_0 3.0 16 | #define __first_deprecated_in_release_version(version) __deprecated_msg("first deprecated in release version: " STR(version)) 17 | #define __deprecated_and_will_be_removed_in_release_version(version) __deprecated_msg("deprecated. will be removed in release version: "STR(version)) 18 | #define __available_in_release_version(version) __deprecated_msg("will be introduced in release version: " STR(version)) 19 | 20 | #define __jwt_technical_debt(debt) __deprecated_msg("Don't forget to inspect it later." STR(debt)) 21 | 22 | #endif /* JWTDeprecations_h */ 23 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // JWTErrorDescription.h 3 | // JWT 4 | // 5 | // Created by Lobanov Dmitry on 27.11.16. 6 | // Copyright © 2016 JWTIO. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern NSString *JWTErrorDomain; 12 | 13 | typedef NS_ENUM(NSInteger, JWTError) { 14 | JWTInvalidFormatError = -100, 15 | JWTUnsupportedAlgorithmError, 16 | JWTAlgorithmNameMismatchError, 17 | JWTInvalidSignatureError, 18 | JWTNoPayloadError, 19 | JWTNoHeaderError, 20 | JWTEncodingHeaderError, 21 | JWTEncodingPayloadError, 22 | JWTEncodingSigningError, 23 | JWTClaimsSetVerificationFailed, 24 | JWTInvalidSegmentSerializationError, 25 | JWTUnspecifiedAlgorithmError, 26 | JWTBlacklistedAlgorithmError, 27 | JWTDecodingHeaderError, 28 | JWTDecodingPayloadError, 29 | JWTDecodingHoldersChainEmptyError 30 | }; 31 | 32 | @interface JWTErrorDescription : NSObject 33 | + (NSError *)errorWithCode:(JWTError)code; 34 | @end 35 | -------------------------------------------------------------------------------- /ios/CodePush/JWT/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Karma Mobility, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /ios/CodePush/RCTConvert+CodePushInstallMode.m: -------------------------------------------------------------------------------- 1 | #import "CodePush.h" 2 | 3 | #if __has_include() 4 | #import 5 | #else 6 | #import "RCTConvert.h" 7 | #endif 8 | 9 | // Extending the RCTConvert class allows the React Native 10 | // bridge to handle args of type "CodePushInstallMode" 11 | @implementation RCTConvert (CodePushInstallMode) 12 | 13 | RCT_ENUM_CONVERTER(CodePushInstallMode, (@{ @"codePushInstallModeImmediate": @(CodePushInstallModeImmediate), 14 | @"codePushInstallModeOnNextRestart": @(CodePushInstallModeOnNextRestart), 15 | @"codePushInstallModeOnNextResume": @(CodePushInstallModeOnNextResume), 16 | @"codePushInstallModeOnNextSuspend": @(CodePushInstallModeOnNextSuspend) }), 17 | CodePushInstallModeImmediate, // Default enum value 18 | integerValue) 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ios/CodePush/RCTConvert+CodePushUpdateState.m: -------------------------------------------------------------------------------- 1 | #import "CodePush.h" 2 | 3 | #if __has_include() 4 | #import 5 | #else 6 | #import "RCTConvert.h" 7 | #endif 8 | 9 | // Extending the RCTConvert class allows the React Native 10 | // bridge to handle args of type "CodePushUpdateState" 11 | @implementation RCTConvert (CodePushUpdateState) 12 | 13 | RCT_ENUM_CONVERTER(CodePushUpdateState, (@{ @"codePushUpdateStateRunning": @(CodePushUpdateStateRunning), 14 | @"codePushUpdateStatePending": @(CodePushUpdateStatePending), 15 | @"codePushUpdateStateLatest": @(CodePushUpdateStateLatest) 16 | }), 17 | CodePushUpdateStateRunning, // Default enum value 18 | integerValue) 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ios/CodePush/SSZipArchive/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/CodePush/SSZipArchive/README.md: -------------------------------------------------------------------------------- 1 | The source code in this folder is taken from [https://github.com/ZipArchive/ZipArchive/tree/2.5.5/SSZipArchive](https://github.com/ZipArchive/ZipArchive/tree/2.5.5/SSZipArchive) which is [MIT licensed](https://github.com/ZipArchive/ZipArchive/blob/2.5.5/LICENSE.txt). -------------------------------------------------------------------------------- /ios/CodePush/SSZipArchive/Supporting Files/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyTracking 6 | 7 | NSPrivacyCollectedDataTypes 8 | 9 | NSPrivacyTrackingDomains 10 | 11 | NSPrivacyAccessedAPITypes 12 | 13 | 14 | NSPrivacyAccessedAPIType 15 | NSPrivacyAccessedAPICategoryFileTimestamp 16 | NSPrivacyAccessedAPITypeReasons 17 | 18 | C617.1 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ios/CodePush/SSZipArchive/include/ZipArchive.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZipArchive.h 3 | // ZipArchive 4 | // 5 | // Created by Serhii Mumriak on 12/1/15. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for ZipArchive. 11 | FOUNDATION_EXPORT double ZipArchiveVersionNumber; 12 | 13 | //! Project version string for ZipArchive. 14 | FOUNDATION_EXPORT const unsigned char ZipArchiveVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | // This is to account for the many different ways this library gets imported. 19 | #if __has_include() 20 | #import 21 | #elif __has_include("../SSZipArchive.h") 22 | #import "../SSZipArchive.h" 23 | #else 24 | #import "SSZipArchive.h" 25 | #endif 26 | -------------------------------------------------------------------------------- /ios/CodePush/SSZipArchive/minizip/LICENSE: -------------------------------------------------------------------------------- 1 | Condition of use and distribution are the same as zlib: 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgement in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | -------------------------------------------------------------------------------- /ios/CodePush/SSZipArchive/minizip/mz_strm_buf.h: -------------------------------------------------------------------------------- 1 | /* mz_strm_buf.h -- Stream for buffering reads/writes 2 | part of the minizip-ng project 3 | 4 | This version of ioapi is designed to buffer IO. 5 | 6 | Copyright (C) Nathan Moinvaziri 7 | https://github.com/zlib-ng/minizip-ng 8 | 9 | This program is distributed under the terms of the same license as zlib. 10 | See the accompanying LICENSE file for the full text of the license. 11 | */ 12 | 13 | #ifndef MZ_STREAM_BUFFERED_H 14 | #define MZ_STREAM_BUFFERED_H 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | /***************************************************************************/ 21 | 22 | int32_t mz_stream_buffered_open(void *stream, const char *path, int32_t mode); 23 | int32_t mz_stream_buffered_is_open(void *stream); 24 | int32_t mz_stream_buffered_read(void *stream, void *buf, int32_t size); 25 | int32_t mz_stream_buffered_write(void *stream, const void *buf, int32_t size); 26 | int64_t mz_stream_buffered_tell(void *stream); 27 | int32_t mz_stream_buffered_seek(void *stream, int64_t offset, int32_t origin); 28 | int32_t mz_stream_buffered_close(void *stream); 29 | int32_t mz_stream_buffered_error(void *stream); 30 | 31 | void* mz_stream_buffered_create(void **stream); 32 | void mz_stream_buffered_delete(void **stream); 33 | 34 | void* mz_stream_buffered_get_interface(void); 35 | 36 | /***************************************************************************/ 37 | 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /ios/CodePush/SSZipArchive/minizip/mz_strm_os.h: -------------------------------------------------------------------------------- 1 | /* mz_sstrm_os.h -- Stream for filesystem access 2 | part of the minizip-ng project 3 | 4 | Copyright (C) Nathan Moinvaziri 5 | https://github.com/zlib-ng/minizip-ng 6 | 7 | This program is distributed under the terms of the same license as zlib. 8 | See the accompanying LICENSE file for the full text of the license. 9 | */ 10 | 11 | #ifndef MZ_STREAM_OS_H 12 | #define MZ_STREAM_OS_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | /***************************************************************************/ 19 | 20 | int32_t mz_stream_os_open(void *stream, const char *path, int32_t mode); 21 | int32_t mz_stream_os_is_open(void *stream); 22 | int32_t mz_stream_os_read(void *stream, void *buf, int32_t size); 23 | int32_t mz_stream_os_write(void *stream, const void *buf, int32_t size); 24 | int64_t mz_stream_os_tell(void *stream); 25 | int32_t mz_stream_os_seek(void *stream, int64_t offset, int32_t origin); 26 | int32_t mz_stream_os_close(void *stream); 27 | int32_t mz_stream_os_error(void *stream); 28 | 29 | void* mz_stream_os_create(void **stream); 30 | void mz_stream_os_delete(void **stream); 31 | 32 | void* mz_stream_os_get_interface(void); 33 | 34 | /***************************************************************************/ 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /ios/CodePush/SSZipArchive/minizip/mz_strm_split.h: -------------------------------------------------------------------------------- 1 | /* mz_strm_split.h -- Stream for split files 2 | part of the minizip-ng project 3 | 4 | Copyright (C) Nathan Moinvaziri 5 | https://github.com/zlib-ng/minizip-ng 6 | 7 | This program is distributed under the terms of the same license as zlib. 8 | See the accompanying LICENSE file for the full text of the license. 9 | */ 10 | 11 | #ifndef MZ_STREAM_SPLIT_H 12 | #define MZ_STREAM_SPLIT_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | /***************************************************************************/ 19 | 20 | int32_t mz_stream_split_open(void *stream, const char *filename, int32_t mode); 21 | int32_t mz_stream_split_is_open(void *stream); 22 | int32_t mz_stream_split_read(void *stream, void *buf, int32_t size); 23 | int32_t mz_stream_split_write(void *stream, const void *buf, int32_t size); 24 | int64_t mz_stream_split_tell(void *stream); 25 | int32_t mz_stream_split_seek(void *stream, int64_t offset, int32_t origin); 26 | int32_t mz_stream_split_close(void *stream); 27 | int32_t mz_stream_split_error(void *stream); 28 | 29 | int32_t mz_stream_split_get_prop_int64(void *stream, int32_t prop, int64_t *value); 30 | int32_t mz_stream_split_set_prop_int64(void *stream, int32_t prop, int64_t value); 31 | 32 | void* mz_stream_split_create(void **stream); 33 | void mz_stream_split_delete(void **stream); 34 | 35 | void* mz_stream_split_get_interface(void); 36 | 37 | /***************************************************************************/ 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.h: -------------------------------------------------------------------------------- 1 | /* mz_strm_zlib.h -- Stream for zlib inflate/deflate 2 | part of the minizip-ng project 3 | 4 | Copyright (C) Nathan Moinvaziri 5 | https://github.com/zlib-ng/minizip-ng 6 | 7 | This program is distributed under the terms of the same license as zlib. 8 | See the accompanying LICENSE file for the full text of the license. 9 | */ 10 | 11 | #ifndef MZ_STREAM_ZLIB_H 12 | #define MZ_STREAM_ZLIB_H 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | /***************************************************************************/ 19 | 20 | int32_t mz_stream_zlib_open(void *stream, const char *filename, int32_t mode); 21 | int32_t mz_stream_zlib_is_open(void *stream); 22 | int32_t mz_stream_zlib_read(void *stream, void *buf, int32_t size); 23 | int32_t mz_stream_zlib_write(void *stream, const void *buf, int32_t size); 24 | int64_t mz_stream_zlib_tell(void *stream); 25 | int32_t mz_stream_zlib_seek(void *stream, int64_t offset, int32_t origin); 26 | int32_t mz_stream_zlib_close(void *stream); 27 | int32_t mz_stream_zlib_error(void *stream); 28 | 29 | int32_t mz_stream_zlib_get_prop_int64(void *stream, int32_t prop, int64_t *value); 30 | int32_t mz_stream_zlib_set_prop_int64(void *stream, int32_t prop, int64_t value); 31 | 32 | void* mz_stream_zlib_create(void **stream); 33 | void mz_stream_zlib_delete(void **stream); 34 | 35 | void* mz_stream_zlib_get_interface(void); 36 | 37 | /***************************************************************************/ 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /ios/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyTracking 6 | 7 | NSPrivacyCollectedDataTypes 8 | 9 | NSPrivacyTrackingDomains 10 | 11 | NSPrivacyAccessedAPITypes 12 | 13 | 14 | NSPrivacyAccessedAPIType 15 | NSPrivacyAccessedAPICategoryFileTimestamp 16 | NSPrivacyAccessedAPITypeReasons 17 | 18 | 0A2A.1 19 | 20 | 21 | 22 | NSPrivacyAccessedAPIType 23 | NSPrivacyAccessedAPICategoryUserDefaults 24 | NSPrivacyAccessedAPITypeReasons 25 | 26 | CA92.1 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /logging.js: -------------------------------------------------------------------------------- 1 | /* Logs messages to console with the [CodePush] prefix */ 2 | function log(message) { 3 | console.log(`[CodePush] ${message}`); 4 | } 5 | 6 | module.exports = log; 7 | -------------------------------------------------------------------------------- /react-native.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | dependency: { 3 | platforms: { 4 | android: { 5 | packageInstance: 6 | "CodePush.getInstance(getResources().getString(R.string.CodePushDeploymentKey), getApplicationContext(), BuildConfig.DEBUG)", 7 | sourceDir: './android/app', 8 | } 9 | } 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /request-fetch-adapter.js: -------------------------------------------------------------------------------- 1 | const packageJson = require("./package.json"); 2 | 3 | module.exports = { 4 | async request(verb, url, requestBody, callback) { 5 | if (typeof requestBody === "function") { 6 | callback = requestBody; 7 | requestBody = null; 8 | } 9 | 10 | const headers = { 11 | "Accept": "application/json", 12 | "Content-Type": "application/json", 13 | "X-CodePush-Plugin-Name": packageJson.name, 14 | "X-CodePush-Plugin-Version": packageJson.version, 15 | "X-CodePush-SDK-Version": packageJson.dependencies["code-push"] 16 | }; 17 | 18 | if (requestBody && typeof requestBody === "object") { 19 | requestBody = JSON.stringify(requestBody); 20 | } 21 | 22 | try { 23 | const response = await fetch(url, { 24 | method: getHttpMethodName(verb), 25 | headers: headers, 26 | body: requestBody 27 | }); 28 | 29 | const statusCode = response.status; 30 | const body = await response.text(); 31 | callback(null, { statusCode, body }); 32 | } catch (err) { 33 | callback(err); 34 | } 35 | } 36 | }; 37 | 38 | function getHttpMethodName(verb) { 39 | // Note: This should stay in sync with the enum definition in 40 | // https://github.com/microsoft/code-push/blob/master/sdk/script/acquisition-sdk.ts#L6 41 | return [ 42 | "GET", 43 | "HEAD", 44 | "POST", 45 | "PUT", 46 | "DELETE", 47 | "TRACE", 48 | "OPTIONS", 49 | "CONNECT", 50 | "PATCH" 51 | ][verb]; 52 | } -------------------------------------------------------------------------------- /scripts/getFilesInFolder.js: -------------------------------------------------------------------------------- 1 | var fs = require("fs"); 2 | var path = require("path"); 3 | 4 | // Utility function that collects the stats of every file in a directory 5 | // as well as in its subdirectories. 6 | function getFilesInFolder(folderName, fileList) { 7 | var folderFiles = fs.readdirSync(folderName); 8 | folderFiles.forEach(function(file) { 9 | var fileStats = fs.statSync(path.join(folderName, file)); 10 | if (fileStats.isDirectory()) { 11 | getFilesInFolder(path.join(folderName, file), fileList); 12 | } else { 13 | fileStats.path = path.join(folderName, file); 14 | fileList.push(fileStats); 15 | } 16 | }); 17 | } 18 | 19 | module.exports = getFilesInFolder; -------------------------------------------------------------------------------- /scripts/postlink/run.js: -------------------------------------------------------------------------------- 1 | var postlinks = [ 2 | require("./android/postlink"), 3 | require("./ios/postlink") 4 | ]; 5 | 6 | //run them sequentially 7 | postlinks 8 | .reduce((p, fn) => p.then(fn), Promise.resolve()) 9 | .catch((err) => { 10 | console.error(err.message); 11 | }); -------------------------------------------------------------------------------- /scripts/postunlink/run.js: -------------------------------------------------------------------------------- 1 | var postunlinks = [ 2 | require("./ios/postunlink"), 3 | require("./android/postunlink") 4 | ]; 5 | 6 | //run them sequentially 7 | postunlinks 8 | .reduce((p, fn) => p.then(fn), Promise.resolve()) 9 | .catch((err) => { 10 | console.error(err.message); 11 | }); 12 | -------------------------------------------------------------------------------- /scripts/recordFilesBeforeBundleCommand.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This script creates a snapshot of the contents in the resource directory 3 | * by creating a map with the modified time of all the files in the directory 4 | * and saving it to a temp file. This snapshot is later referenced in 5 | * "generatePackageHash.js" to figure out which files have changed or were 6 | * newly generated by the "react-native bundle" command. 7 | */ 8 | 9 | var fs = require("fs"); 10 | var path = require("path"); 11 | 12 | var getFilesInFolder = require("./getFilesInFolder"); 13 | 14 | 15 | var resourcesDir = process.argv[2]; 16 | var tempFileName = process.argv[3]; 17 | 18 | var tempFileLocalPath = path.join(require("os").tmpdir(), tempFileName); 19 | var resourceFiles = []; 20 | 21 | try { 22 | getFilesInFolder(resourcesDir, resourceFiles); 23 | } catch(error) { 24 | var targetPathNotFoundExceptionMessage = "\nResources directory path does not exist.\n"; 25 | targetPathNotFoundExceptionMessage += "Unable to find '" + resourcesDir; 26 | targetPathNotFoundExceptionMessage += "' directory. Please check version of Android Plugin for Gradle."; 27 | error.message += targetPathNotFoundExceptionMessage; 28 | throw error; 29 | } 30 | 31 | var fileToModifiedTimeMap = {}; 32 | 33 | resourceFiles.forEach(function(resourceFile) { 34 | fileToModifiedTimeMap[resourceFile.path.substring(resourcesDir.length)] = resourceFile.mtime.getTime(); 35 | }); 36 | 37 | fs.writeFile(tempFileLocalPath, JSON.stringify(fileToModifiedTimeMap), function(err) { 38 | if (err) { 39 | throw err; 40 | } 41 | }); -------------------------------------------------------------------------------- /test/template/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | TestCodePush 3 | CODE_PUSH_ANDROID_DEPLOYMENT_KEY 4 | CODE_PUSH_SERVER_URL 5 | 6 | -------------------------------------------------------------------------------- /test/template/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Resolve react_native_pods.rb with node to allow for hoisting 2 | require Pod::Executable.execute_command('node', ['-p', 3 | 'require.resolve( 4 | "react-native/scripts/react_native_pods.rb", 5 | {paths: [process.argv[1]]}, 6 | )', __dir__]).strip 7 | 8 | platform :ios, '15.5' 9 | prepare_react_native_project! 10 | 11 | linkage = ENV['USE_FRAMEWORKS'] 12 | if linkage != nil 13 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green 14 | use_frameworks! :linkage => linkage.to_sym 15 | end 16 | 17 | target 'TestCodePush' do 18 | config = use_native_modules! 19 | 20 | use_react_native!( 21 | :path => config[:reactNativePath], 22 | # An absolute path to your application root. 23 | :app_path => "#{Pod::Config.instance.installation_root}/.." 24 | ) 25 | 26 | post_install do |installer| 27 | # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 28 | react_native_post_install( 29 | installer, 30 | config[:reactNativePath], 31 | :mac_catalyst_enabled => false, 32 | # :ccache_enabled => true 33 | ) 34 | end 35 | end -------------------------------------------------------------------------------- /test/template/ios/TestCodePush/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import React 3 | import React_RCTAppDelegate 4 | import ReactAppDependencyProvider 5 | import CodePush 6 | 7 | @main 8 | class AppDelegate: RCTAppDelegate { 9 | override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { 10 | self.moduleName = "TestCodePush" 11 | self.dependencyProvider = RCTAppDependencyProvider() 12 | 13 | // You can add your custom initial props in the dictionary below. 14 | // They will be passed down to the ViewController used by React Native. 15 | self.initialProps = [:] 16 | 17 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 18 | } 19 | 20 | override func sourceURL(for bridge: RCTBridge) -> URL? { 21 | self.bundleURL() 22 | } 23 | 24 | override func bundleURL() -> URL? { 25 | #if DEBUG 26 | RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") 27 | #else 28 | CodePush.bundleURL(); 29 | #endif 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /test/template/scenarios/scenarioCheckForUpdate.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | 3 | module.exports = { 4 | startTest: function (testApp) { 5 | CodePushWrapper.checkForUpdate(testApp); 6 | }, 7 | 8 | getScenarioName: function () { 9 | return "Check for Update"; 10 | } 11 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioCheckForUpdateCustomKey.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | 3 | module.exports = { 4 | startTest: function (testApp) { 5 | CodePushWrapper.checkForUpdate(testApp, undefined, undefined, "CUSTOM-DEPLOYMENT-KEY"); 6 | }, 7 | 8 | getScenarioName: function () { 9 | return "Check for Update Custom Key"; 10 | } 11 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioDisallowRestartImmediate.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePush.disallowRestart(); 7 | CodePushWrapper.checkAndInstall(testApp, 8 | () => { 9 | CodePush.allowRestart(); 10 | }, 11 | undefined, 12 | CodePush.InstallMode.IMMEDIATE, 13 | undefined, 14 | true 15 | ); 16 | }, 17 | 18 | getScenarioName: function () { 19 | return "disallowRestart"; 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /test/template/scenarios/scenarioDisallowRestartOnResume.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePush.disallowRestart(); 7 | CodePushWrapper.checkAndInstall(testApp, 8 | undefined, 9 | undefined, 10 | CodePush.InstallMode.ON_NEXT_RESUME, 11 | undefined, 12 | true 13 | ); 14 | }, 15 | 16 | getScenarioName: function () { 17 | return "disallowRestart"; 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /test/template/scenarios/scenarioDisallowRestartOnSuspend.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePush.disallowRestart(); 7 | CodePushWrapper.checkAndInstall(testApp, 8 | undefined, 9 | undefined, 10 | CodePush.InstallMode.ON_NEXT_SUSPEND, 11 | undefined, 12 | true 13 | ); 14 | }, 15 | 16 | getScenarioName: function () { 17 | return "disallowRestart"; 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /test/template/scenarios/scenarioDownloadUpdate.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | 3 | module.exports = { 4 | startTest: function (testApp) { 5 | CodePushWrapper.checkForUpdate(testApp, 6 | CodePushWrapper.download.bind(undefined, testApp, undefined, undefined)); 7 | }, 8 | 9 | getScenarioName: function () { 10 | return "Download Update"; 11 | } 12 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioInstall.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.checkAndInstall(testApp, undefined, undefined, CodePush.InstallMode.IMMEDIATE); 7 | }, 8 | 9 | getScenarioName: function () { 10 | return "Install"; 11 | } 12 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioInstallOnRestartWithRevert.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.checkAndInstall(testApp, undefined, undefined, CodePush.InstallMode.ON_NEXT_RESTART); 7 | }, 8 | 9 | getScenarioName: function () { 10 | return "Install on Restart with Revert"; 11 | } 12 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioInstallOnResumeWithRevert.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.checkAndInstall(testApp, undefined, undefined, CodePush.InstallMode.ON_NEXT_RESUME); 7 | }, 8 | 9 | getScenarioName: function () { 10 | return "Install on Resume with Revert"; 11 | } 12 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioInstallOnSuspendWithRevert.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.checkAndInstall(testApp, undefined, undefined, CodePush.InstallMode.ON_NEXT_SUSPEND); 7 | }, 8 | 9 | getScenarioName: function () { 10 | return "Install on Suspend with Revert"; 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /test/template/scenarios/scenarioInstallRestart2x.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.checkAndInstall(testApp, 7 | () => { 8 | CodePush.restartApp(); 9 | CodePush.restartApp(); 10 | } 11 | ); 12 | }, 13 | 14 | getScenarioName: function () { 15 | return "Install and Restart 2x"; 16 | } 17 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioInstallWithRevert.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.checkAndInstall(testApp, undefined, undefined, CodePush.InstallMode.IMMEDIATE); 7 | }, 8 | 9 | getScenarioName: function () { 10 | return "Install with Revert"; 11 | } 12 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioRestart.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | testApp.sendCurrentAndPendingPackage() 7 | .then(() => { 8 | CodePushWrapper.sync(testApp, (status) => { 9 | if (status === CodePush.SyncStatus.UPDATE_INSTALLED) { 10 | testApp.sendCurrentAndPendingPackage().then(CodePush.restartApp); 11 | } 12 | }, undefined, { installMode: CodePush.InstallMode.ON_NEXT_RESTART }); 13 | }); 14 | }, 15 | 16 | getScenarioName: function () { 17 | return "Restart"; 18 | } 19 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioRestart2x.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePush.restartApp(true); 7 | CodePushWrapper.checkAndInstall(testApp, 8 | () => { 9 | CodePush.restartApp(true); 10 | } 11 | ); 12 | }, 13 | 14 | getScenarioName: function () { 15 | return "Restart2x"; 16 | } 17 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioSync.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.sync(testApp, undefined, undefined, { installMode: CodePush.InstallMode.IMMEDIATE }); 7 | }, 8 | 9 | getScenarioName: function () { 10 | return "Sync"; 11 | } 12 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioSync2x.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.sync(testApp, undefined, undefined, { installMode: CodePush.InstallMode.IMMEDIATE }); 7 | CodePushWrapper.sync(testApp, undefined, undefined, { installMode: CodePush.InstallMode.IMMEDIATE }); 8 | }, 9 | 10 | getScenarioName: function () { 11 | return "Sync 2x"; 12 | } 13 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioSyncMandatoryDefault.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.sync(testApp, undefined, undefined, { installMode: CodePush.InstallMode.ON_NEXT_RESTART }); 7 | }, 8 | 9 | getScenarioName: function () { 10 | return "Sync Mandatory Default"; 11 | } 12 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioSyncMandatoryRestart.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.sync(testApp, undefined, undefined, 7 | { 8 | installMode: CodePush.InstallMode.IMMEDIATE, 9 | mandatoryInstallMode: CodePush.InstallMode.ON_NEXT_RESTART 10 | }); 11 | }, 12 | 13 | getScenarioName: function () { 14 | return "Sync Mandatory Restart"; 15 | } 16 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioSyncMandatoryResume.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.sync(testApp, undefined, undefined, 7 | { 8 | installMode: CodePush.InstallMode.ON_NEXT_RESTART, 9 | mandatoryInstallMode: CodePush.InstallMode.ON_NEXT_RESUME 10 | }); 11 | }, 12 | 13 | getScenarioName: function () { 14 | return "Sync Mandatory Resume"; 15 | } 16 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioSyncMandatorySuspend.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.sync(testApp, undefined, undefined, 7 | { 8 | installMode: CodePush.InstallMode.IMMEDIATE, 9 | mandatoryInstallMode: CodePush.InstallMode.ON_NEXT_SUSPEND 10 | }); 11 | }, 12 | 13 | getScenarioName: function () { 14 | return "Sync Mandatory Suspend"; 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /test/template/scenarios/scenarioSyncRestartDelay.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.sync(testApp, undefined, undefined, 7 | { 8 | installMode: CodePush.InstallMode.ON_NEXT_RESTART, 9 | minimumBackgroundDuration: 15 10 | }); 11 | }, 12 | 13 | getScenarioName: function () { 14 | return "Sync Restart Delay"; 15 | } 16 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioSyncResume.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.sync(testApp, undefined, undefined, 7 | { installMode: CodePush.InstallMode.ON_NEXT_RESUME }); 8 | }, 9 | 10 | getScenarioName: function () { 11 | return "Sync Resume"; 12 | } 13 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioSyncResumeDelay.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.sync(testApp, undefined, undefined, 7 | { 8 | installMode: CodePush.InstallMode.ON_NEXT_RESUME, 9 | minimumBackgroundDuration: 5 10 | }); 11 | }, 12 | 13 | getScenarioName: function () { 14 | return "Sync Resume Delay"; 15 | } 16 | }; -------------------------------------------------------------------------------- /test/template/scenarios/scenarioSyncSuspend.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.sync(testApp, undefined, undefined, 7 | { installMode: CodePush.InstallMode.ON_NEXT_SUSPEND }); 8 | }, 9 | 10 | getScenarioName: function () { 11 | return "Sync Suspend"; 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /test/template/scenarios/scenarioSyncSuspendDelay.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | CodePushWrapper.sync(testApp, undefined, undefined, 7 | { 8 | installMode: CodePush.InstallMode.ON_NEXT_SUSPEND, 9 | minimumBackgroundDuration: 5 10 | }); 11 | }, 12 | 13 | getScenarioName: function () { 14 | return "Sync Suspend Delay"; 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /test/template/scenarios/updateDeviceReady.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | 3 | module.exports = { 4 | startTest: function (testApp) { 5 | testApp.readyAfterUpdate(); 6 | }, 7 | 8 | getScenarioName: function () { 9 | return "Bad Update"; 10 | } 11 | }; -------------------------------------------------------------------------------- /test/template/scenarios/updateNARConditional.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | testApp.readyAfterUpdate((responseBody) => { 7 | if (responseBody !== "SKIP_NOTIFY_APPLICATION_READY") { 8 | CodePush.notifyAppReady(); 9 | CodePushWrapper.checkAndInstall(testApp, undefined, undefined, CodePush.InstallMode.ON_NEXT_RESTART); 10 | } else { 11 | testApp.setStateAndSendMessage("Skipping notifyApplicationReady!", "SKIPPED_NOTIFY_APPLICATION_READY"); 12 | } 13 | }); 14 | }, 15 | 16 | getScenarioName: function () { 17 | return "Conditional Update"; 18 | } 19 | }; -------------------------------------------------------------------------------- /test/template/scenarios/updateNotifyApplicationReady.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | import CodePush from "@code-push-next/react-native-code-push"; 3 | 4 | module.exports = { 5 | startTest: function (testApp) { 6 | testApp.readyAfterUpdate(); 7 | CodePush.notifyAppReady(); 8 | }, 9 | 10 | getScenarioName: function () { 11 | return "Good Update"; 12 | } 13 | }; -------------------------------------------------------------------------------- /test/template/scenarios/updateSync.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | 3 | module.exports = { 4 | startTest: function (testApp) { 5 | testApp.readyAfterUpdate(); 6 | CodePushWrapper.sync(testApp); 7 | }, 8 | 9 | getScenarioName: function () { 10 | return "Good Update (w/ Sync)"; 11 | } 12 | }; -------------------------------------------------------------------------------- /test/template/scenarios/updateSync2x.js: -------------------------------------------------------------------------------- 1 | var CodePushWrapper = require("../codePushWrapper.js"); 2 | 3 | module.exports = { 4 | startTest: function (testApp) { 5 | testApp.readyAfterUpdate(); 6 | CodePushWrapper.sync(testApp); 7 | CodePushWrapper.sync(testApp); 8 | }, 9 | 10 | getScenarioName: function () { 11 | return "Good Update (w/ Sync 2x)"; 12 | } 13 | }; -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 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 | } 18 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 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 | } 33 | -------------------------------------------------------------------------------- /windows-legacy/.gitignore: -------------------------------------------------------------------------------- 1 | *AppPackages* 2 | *BundleArtifacts* 3 | *ReactAssets* 4 | 5 | #OS junk files 6 | [Tt]humbs.db 7 | *.DS_Store 8 | 9 | #Visual Studio files 10 | *.[Oo]bj 11 | *.user 12 | *.aps 13 | *.pch 14 | *.vspscc 15 | *.vssscc 16 | *_i.c 17 | *_p.c 18 | *.ncb 19 | *.suo 20 | *.tlb 21 | *.tlh 22 | *.bak 23 | *.[Cc]ache 24 | *.ilk 25 | *.log 26 | *.lib 27 | *.sbr 28 | *.sdf 29 | *.opensdf 30 | *.opendb 31 | *.unsuccessfulbuild 32 | ipch/ 33 | [Oo]bj/ 34 | [Bb]in 35 | [Dd]ebug*/ 36 | [Rr]elease*/ 37 | Ankh.NoLoad 38 | 39 | #MonoDevelop 40 | *.pidb 41 | *.userprefs 42 | 43 | #Tooling 44 | _ReSharper*/ 45 | *.resharper 46 | [Tt]est[Rr]esult* 47 | *.sass-cache 48 | 49 | #Project files 50 | [Bb]uild/ 51 | 52 | #Subversion files 53 | .svn 54 | 55 | # Office Temp Files 56 | ~$* 57 | 58 | # vim Temp Files 59 | *~ 60 | 61 | #NuGet 62 | packages/ 63 | *.nupkg 64 | 65 | #ncrunch 66 | *ncrunch* 67 | *crunch*.local.xml 68 | 69 | # visual studio database projects 70 | *.dbmdl 71 | 72 | #Test files 73 | *.testsettings 74 | 75 | #Other files 76 | *.DotSettings 77 | .vs/ 78 | *project.lock.json 79 | -------------------------------------------------------------------------------- /windows-legacy/.npmignore: -------------------------------------------------------------------------------- 1 | # Make sure we don't publish build artifacts to NPM 2 | ARM/ 3 | Debug/ 4 | x64/ 5 | x86/ 6 | bin/ 7 | obj/ 8 | .vs/ 9 | -------------------------------------------------------------------------------- /windows-legacy/CodePush.Net46.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 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.Net46.Test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("CodePush.Net46.Test")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("bbb48f0b-af6f-4a14-afa4-306d3fb0b7cf")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /windows-legacy/CodePush.Net46.Test/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /windows-legacy/CodePush.Net46.Test/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /windows-legacy/CodePush.Net46/Adapters/Http/HttpProgress.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace CodePush.Net46.Adapters.Http 4 | { 5 | public enum HttpProgressStage 6 | { 7 | None = 0, 8 | DetectingProxy = 10, 9 | ResolvingName = 20, 10 | ConnectingToServer = 30, 11 | NegotiatingSsl = 40, 12 | SendingHeaders = 50, 13 | SendingContent = 60, 14 | WaitingForResponse = 70, 15 | ReceivingHeaders = 80, 16 | ReceivingContent = 90 17 | } 18 | 19 | public struct HttpProgress 20 | { 21 | public UInt64 BytesReceived; 22 | public UInt64 BytesSent; 23 | public UInt32 Retries; 24 | public HttpProgressStage Stage; 25 | public UInt64? TotalBytesToReceive; 26 | public UInt64? TotalBytesToSend; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /windows-legacy/CodePush.Net46/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 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.Net46")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("CodePush.Net46")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4dfe3f9f-5e15-4f17-8fd4-33ff0519348e")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /windows-legacy/CodePush.Net46/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /windows-legacy/CodePush.Shared/CodePush.Shared.projitems: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | true 6 | 4ad4c826-cc26-4f1d-b60d-b97b22f52e90 7 | 8 | 9 | CodePush.Shared 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /windows-legacy/CodePush.Shared/CodePush.Shared.shproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 4ad4c826-cc26-4f1d-b60d-b97b22f52e90 5 | 14.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /windows-legacy/CodePush.Shared/InstallMode.cs: -------------------------------------------------------------------------------- 1 | namespace CodePush.ReactNative 2 | { 3 | enum InstallMode 4 | { 5 | Immediate, 6 | OnNextRestart, 7 | OnNextResume 8 | } 9 | } -------------------------------------------------------------------------------- /windows-legacy/CodePush.Shared/MinimumBackgroundListener.cs: -------------------------------------------------------------------------------- 1 | using ReactNative.Bridge; 2 | using System; 3 | 4 | namespace CodePush.ReactNative 5 | { 6 | internal class MinimumBackgroundListener : ILifecycleEventListener 7 | { 8 | private DateTimeOffset? _lastSuspendDate; 9 | private Action _resumeAction; 10 | 11 | internal int MinimumBackgroundDuration { get; set; } 12 | 13 | internal MinimumBackgroundListener(Action resumeAction, int minimumBackgroundDuration) 14 | { 15 | _resumeAction = resumeAction; 16 | MinimumBackgroundDuration = minimumBackgroundDuration; 17 | } 18 | 19 | public void OnDestroy() 20 | { 21 | } 22 | 23 | public void OnResume() 24 | { 25 | if (_lastSuspendDate != null) 26 | { 27 | // Determine how long the app was in the background and ensure 28 | // that it meets the minimum duration amount of time. 29 | double durationInBackground = (DateTimeOffset.Now - _lastSuspendDate.Value).TotalSeconds; 30 | if (durationInBackground >= MinimumBackgroundDuration) 31 | { 32 | _resumeAction.Invoke(); 33 | } 34 | } 35 | } 36 | 37 | public void OnSuspend() 38 | { 39 | // Save the current time so that when the app is later 40 | // resumed, we can detect how long it was in the background. 41 | _lastSuspendDate = DateTimeOffset.Now; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /windows-legacy/CodePush.Shared/UpdateState.cs: -------------------------------------------------------------------------------- 1 | namespace CodePush.ReactNative 2 | { 3 | enum UpdateState 4 | { 5 | Running, 6 | Pending, 7 | Latest 8 | } 9 | } -------------------------------------------------------------------------------- /windows-legacy/CodePush/CodePushUtils.cs: -------------------------------------------------------------------------------- 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 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 | } 48 | -------------------------------------------------------------------------------- /windows-legacy/CodePush/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 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)] -------------------------------------------------------------------------------- /windows/.npmignore: -------------------------------------------------------------------------------- 1 | # Make sure we don't publish build artifacts to NPM 2 | ARM/ 3 | Debug/ 4 | x64/ 5 | x86/ 6 | bin/ 7 | obj/ 8 | .vs/ 9 | 10 | # Don't publish settings used for developement 11 | Directory.Build.props 12 | -------------------------------------------------------------------------------- /windows/CodePush/.npmignore: -------------------------------------------------------------------------------- 1 | # Make sure we don't publish build artifacts to NPM 2 | .vs/ 3 | ARM/ 4 | ARM64/ 5 | x64/ 6 | x86/ 7 | Debug/ 8 | Release/ 9 | bin/ 10 | obj/ 11 | Generated Files/ 12 | -------------------------------------------------------------------------------- /windows/CodePush/CodePush.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE 3 | DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE 4 | -------------------------------------------------------------------------------- /windows/CodePush/CodePushConfig.idl: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | namespace Microsoft.CodePush.ReactNative 5 | { 6 | [webhosthidden] 7 | [default_interface] 8 | runtimeclass CodePushConfig { 9 | static void Init(IMap configMap); 10 | static void SetHost(Microsoft.ReactNative.ReactNativeHost host); 11 | }; 12 | } // namespace CppModule 13 | -------------------------------------------------------------------------------- /windows/CodePush/CodePushDownloadHandler.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #pragma once 5 | 6 | #include "winrt/Windows.Storage.h" 7 | #include "winrt/Windows.Foundation.h" 8 | #include "winrt/Windows.Data.Json.h" 9 | #include 10 | #include 11 | 12 | namespace Microsoft::CodePush::ReactNative 13 | { 14 | struct CodePushDownloadHandler 15 | { 16 | winrt::Windows::Storage::StorageFile downloadFile; 17 | int64_t expectedContentLength; 18 | int64_t receivedContentLength; 19 | std::function progressCallback; 20 | std::wstring_view downloadUrl; 21 | 22 | CodePushDownloadHandler( 23 | winrt::Windows::Storage::StorageFile downloadFile, 24 | std::function progressCallback); 25 | 26 | // Returns true if the downloaded file is a zip file 27 | winrt::Windows::Foundation::IAsyncOperation Download(std::wstring_view url); 28 | 29 | private: 30 | static constexpr uint32_t BufferSize{ 256 * 1024 }; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /windows/CodePush/CodePushNativeModule.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/windows/CodePush/CodePushNativeModule.cpp -------------------------------------------------------------------------------- /windows/CodePush/CodePushNativeModule.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodePushNext/react-native-code-push/b0234e851d8657d66723460c1994e70c1de56dda/windows/CodePush/CodePushNativeModule.h -------------------------------------------------------------------------------- /windows/CodePush/CodePushTelemetryManager.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #pragma once 5 | 6 | #include "winrt/Windows.Data.Json.h" 7 | #include 8 | 9 | namespace Microsoft::CodePush::ReactNative 10 | { 11 | struct CodePushTelemetryManager 12 | { 13 | static winrt::Windows::Data::Json::JsonObject GetBinaryUpdateReport(std::wstring_view appVersion); 14 | static winrt::Windows::Data::Json::JsonObject GetRetryStatusReport(); 15 | static winrt::Windows::Data::Json::JsonObject GetRollbackReport(const winrt::Windows::Data::Json::JsonObject& lastFailedPackage); 16 | static winrt::Windows::Data::Json::JsonObject GetUpdateReport(const winrt::Windows::Data::Json::JsonObject& currentPackage); 17 | static void RecordStatusReported(const winrt::Windows::Data::Json::JsonObject& statusReport); 18 | static void SaveStatusReportForRetry(const winrt::Windows::Data::Json::JsonObject& statusReport); 19 | 20 | private: 21 | static void ClearRetryStatusReport(); 22 | static std::wstring_view GetDeploymentKeyFromStatusReportIdentifier(std::wstring_view statusReportIdentifier); 23 | static winrt::hstring GetPackageStatusReportIdentifier(const winrt::Windows::Data::Json::JsonObject& package); 24 | static winrt::hstring GetPreviousStatusReportIdentifier(); 25 | static std::wstring_view GetVersionLabelFromStatusReportIdentifier(std::wstring_view statusReportIdentifier); 26 | static bool IsStatusReportIdentifierCodePushLabel(std::wstring_view statusReportIdentifier); 27 | static void SaveStatusReportedForIdentifier(std::wstring_view appVersionOrPackageIdentifier); 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /windows/CodePush/CodePushUtils.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #include "pch.h" 5 | #include "CodePushUtils.h" 6 | 7 | namespace Microsoft::CodePush::ReactNative 8 | { 9 | using namespace winrt::Windows::Storage; 10 | 11 | /*static*/ void CodePushUtils::Log(winrt::hstring message) 12 | { 13 | OutputDebugStringW(L"[CodePush] "); 14 | OutputDebugStringW(message.c_str()); 15 | OutputDebugStringW(L"\n"); 16 | } 17 | 18 | /*static*/ void CodePushUtils::Log(const winrt::hresult_error& ex) 19 | { 20 | OutputDebugStringW(L"[CodePush] Exception "); 21 | OutputDebugStringW(ex.message().c_str()); 22 | OutputDebugStringW(L"\n"); 23 | } 24 | 25 | /*static*/ void CodePushUtils::LogBundleUrl(const IStorageFile& bundle) 26 | { 27 | CodePushUtils::Log(L"Loading JS bundle from \"" + bundle.Path() + L"\""); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /windows/CodePush/CodePushUtils.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #pragma once 5 | 6 | #include "winrt/base.h" 7 | #include "winrt/Windows.Storage.h" 8 | #include 9 | 10 | namespace Microsoft::CodePush::ReactNative 11 | { 12 | struct CodePushUtils 13 | { 14 | static void Log(winrt::hstring message); 15 | static void Log(const winrt::hresult_error& ex); 16 | static void LogBundleUrl(const winrt::Windows::Storage::IStorageFile& bundle); 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /windows/CodePush/FileUtils.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #pragma once 5 | 6 | #include "winrt/Windows.Storage.h" 7 | #include "winrt/Windows.Foundation.h" 8 | 9 | #include 10 | #include 11 | 12 | namespace Microsoft::CodePush::ReactNative 13 | { 14 | struct FileUtils 15 | { 16 | static winrt::Windows::Foundation::IAsyncOperation CreateFileFromPathAsync( 17 | winrt::Windows::Storage::StorageFolder rootFolder, 18 | const std::filesystem::path& relativePath); 19 | 20 | static winrt::Windows::Foundation::IAsyncOperation FindFilePathAsync( 21 | const winrt::Windows::Storage::StorageFolder& rootFolder, 22 | std::wstring_view fileName); 23 | 24 | static winrt::Windows::Foundation::IAsyncAction UnzipAsync( 25 | const winrt::Windows::Storage::StorageFile& zipFile, 26 | const winrt::Windows::Storage::StorageFolder& destination); 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /windows/CodePush/PropertySheet.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /windows/CodePush/ReactPackageProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "ReactPackageProvider.h" 3 | #include "ReactPackageProvider.g.cpp" 4 | 5 | #include "CodePushNativeModule.h" 6 | 7 | using namespace winrt::Microsoft::ReactNative; 8 | 9 | namespace winrt::Microsoft::CodePush::ReactNative::implementation { 10 | 11 | void ReactPackageProvider::CreatePackage(IReactPackageBuilder const &packageBuilder) noexcept { 12 | AddAttributedModules(packageBuilder); 13 | } 14 | 15 | } // namespace winrt::Microsoft::CodePush::ReactNative::implementation 16 | -------------------------------------------------------------------------------- /windows/CodePush/ReactPackageProvider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "winrt/Microsoft.CodePush.ReactNative.h" 3 | 4 | #include "ReactPackageProvider.g.h" 5 | 6 | using namespace winrt::Microsoft::ReactNative; 7 | 8 | namespace winrt::Microsoft::CodePush::ReactNative::implementation { 9 | 10 | struct ReactPackageProvider : ReactPackageProviderT { 11 | ReactPackageProvider() = default; 12 | 13 | void CreatePackage(IReactPackageBuilder const &packageBuilder) noexcept; 14 | }; 15 | 16 | } // namespace winrt::RNFS::implementation 17 | 18 | namespace winrt::Microsoft::CodePush::ReactNative::factory_implementation { 19 | 20 | struct ReactPackageProvider : ReactPackageProviderT {}; 21 | 22 | } // namespace winrt::RNFS::factory_implementation 23 | -------------------------------------------------------------------------------- /windows/CodePush/ReactPackageProvider.idl: -------------------------------------------------------------------------------- 1 | namespace Microsoft.CodePush.ReactNative 2 | { 3 | [webhosthidden] 4 | [default_interface] 5 | runtimeclass ReactPackageProvider 6 | : Microsoft.ReactNative.IReactPackageProvider { 7 | ReactPackageProvider(); 8 | }; 9 | } // namespace CppModule 10 | -------------------------------------------------------------------------------- /windows/CodePush/miniz/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2013-2014 RAD Game Tools and Valve Software 2 | Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC 3 | 4 | All Rights Reserved. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /windows/CodePush/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /windows/CodePush/pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | -------------------------------------------------------------------------------- /windows/CodePush/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | -------------------------------------------------------------------------------- /windows/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $([MSBuild]::NormalizeDirectory('$(SolutionDir)\..\node_modules\react-native-windows\')) 6 | 7 | 8 | --------------------------------------------------------------------------------