Commit Graph

208 Commits

Author SHA1 Message Date
Sergey Akhalkov
32f82e6050 Fix dex index overflow exception (#1007)
fix DexIndexOverflowException due to com.auth0.jwt #1002

use another lib - nimbus-jose-jwt
2017-09-18 12:49:16 +03:00
Ruslan Bikkinin
5e332bbe83 Implement code signing for client android SDK (#966)
* Add new optional way to create CodePush instance based on builder pattern
Add constructor with additional option PublicKeyFilePath

* Adapt changes from old code-signing branch

Add `com.auth0:java-jwt:3.2.0` to deps
Adapt changes from code-signing branch
Fix errors appeared due to jwt library update.

* Non-breaking change of CodePush constructor, downgrade jwt library

Replace publicKey by publicKeyResourceDescriptor in CodePush constructor
Downgrade jwt library to 2.2.2 due to issue with base64 decoding

* Make code signing optional

* Add small improvements

Replace CodePushUnknownException catch with
CodePushInvalidPublicKeyException in certain places
Make mPublicKey static
Add additional log for applying updates

* Rename method verifyJWT with verifyAndDecodeJWT

* Add minor fixes

Add additional checking for potential problems with code-signing
integration
Fix Public Key parsing from strings.xml

* Fix constructors

* Fix constructors bug

* Fix log messages
2017-09-13 12:08:17 +03:00
Andrew Jack
d37ee85620 check if package metadata is null (#992) 2017-09-12 10:56:12 +03:00
Kevin Cooper
d78956bc65 Restore compatibility with RN v0.46 (#980)
* Revert "Remove overriden createJSModules"

This reverts commit dff9f47a4b8b31e9ad4bfe36acf57fff8291163d.

* Remove @Override annotation to support RN v0.47
2017-09-05 10:19:43 -07:00
Ruslan Bikkinin
416af9b738 Fix incorrect long value restoration from strings.xml (#956)
Fix potencial incorrect long value restoration from strings.xml (please,
see https://github.com/Microsoft/cordova-plugin-code-push/issues/264)
2017-08-08 16:22:55 +03:00
Tomas Roos
dfe154de5c Remove overriden createJSModules (#895)
Since of recently in master the unused createJSModules has been removed and ReactPackage's no longer contain the definition of createJSModules. There for it must be removed in order to not yield a compile error. This is breaking change.

ce6fb337a1
2017-08-02 12:46:28 +03:00
Andrew Jack
e6936b3aa0 Prevent Rollback crash when binary was updated. (#924)
* Prevent Rollback crash when binary was updated.

* Self review
2017-07-17 17:29:56 +03:00
Sergey Akhalkov
9bc0770845 add support for RN 0.46.x (#905) 2017-07-07 13:05:40 +03:00
Sergey Akhalkov
d62f3df4bf add support for RN 0.45.x (#901)
* add support for RN 0.45.x

* add support for RN 0.45.x

* to last

* remove additional calls

* remove support for RN 0.46.x that has been added due to as of now it is not compatibale with RN 0.45.x
2017-06-26 11:37:37 +03:00
max-mironov
a2e17a88bc Merge branch 'remove_unsupported_rn_versions' of https://github.com/AndrewJack/react-native-code-push 2017-06-02 15:35:25 +03:00
Andrew Jack
bb0e206149 If current package folder is null don't delete (#870) 2017-06-02 11:32:34 +03:00
Andrew Jack
c6310363be Remove support for legacy React Native versions 2017-06-01 17:27:16 +01:00
Max
bb997f01d8 Fix return value for get update metadata (#864)
* Fixed issue with error on parsing plist path

See https://github.com/Microsoft/react-native-code-push/issues/534#issuecomment-302069326 for details

* Changed return value to null for getUpdateMetadata instead of empty string

In accordance with docs and https://github.com/Microsoft/react-native-code-push/issues/862
2017-06-01 14:12:07 +03:00
Max
b8bd4a021c Fixed issue with [Android] restartApp() throwing exception w/ release build (#861)
* Fixed issue with error on parsing plist path

See https://github.com/Microsoft/react-native-code-push/issues/534#issuecomment-302069326 for details

* Fixed issue with [Android] restartApp() throwing exception w/ release build

https://github.com/Microsoft/react-native-code-push/issues/847

* Changed return value to null for getUpdateMetadata instead of empty string

In accordance with docs and https://github.com/Microsoft/react-native-code-push/issues/862

* Code refactoring: moved variable assignment out of loop
2017-06-01 14:10:33 +03:00
Sergey Akhalkov
54351dbe19 installModes: implement new ON_NEXT_SUSPEND install mode (#770)
Restart the app _while_ it is in the background, but only after it has been in the background for "minimumBackgroundDuration" seconds (0 by default), so that user context isn't lost unless the app suspension is long enough to not matter.
2017-04-11 12:52:18 +03:00
Neo
300a8358e3 [android] RN0.43 capacity (#735)
Fixed android project build issues that have place due to the following breaking changes: 
facebook/react-native#12329
facebook/react-native#12396
2017-03-23 13:24:54 +03:00
Sergey Akhalkov
2b02ce90ef Flow type checking fix: use "CodePushHash" file name instead of "CodePushHash.json" (#763)
`CodePushHash.json` file name breaks flow type checking.
To fix the issue we need to delete `CodePushHash.json` file and
use `CodePushHash` file name instead to store the hash value.
Relates to https://github.com/Microsoft/react-native-code-push/issues/577
2017-03-22 13:27:37 -07:00
Sergey Akhalkov
1c5f4a1a15 build.gradle: set Android SDK Build Tools version to 23.0.1 (#747)
`react-native-code-push@1.17.1-beta` release introduces Android SDK Build Tools inconsistency between React Native app and react-native-code-push Module.
It's convenient to have the same version of Android SDK Build Tools both for React Native app and react-native-code-push module, due to https://github.com/facebook/react-native/pull/11422#issuecomment-266814770
2017-03-08 00:53:11 +03:00
BO KANG
cf4c72cc4e revert back the android API bundle support from 25 to 23 2017-03-03 12:22:33 -08:00
Ray Vafa
4180f9cd6c Update Android SDK to 25.0.2 (#725) 2017-02-27 17:48:43 -08:00
Christian Meunier
73f0984689 Update Android SDK to 23.0.3 (#710)
Fixes #709
2017-02-21 18:06:11 -08:00
Sergey Akhalkov
341a205a1d codePushNativeModule: launch async tasks in parallel (#693)
AsyncTasks are executed on a single thread to avoid common application errors caused by parallel execution.
So to make it possible to use tools like AsyncStorage while CodePush downloading an update we should use
`asyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);` code instead of `asyncTask.execute()`
2017-02-09 11:44:03 +03:00
Sergey Akhalkov
4df7235dd4 CodePush: changed implementation of getBinaryResourcesModifiedTime method (#683)
Due to “the last modified date on all files in an apk now have the time stamp of 'Fri, Nov 30 1979 00:00:00'”
(https://code.google.com/p/android/issues/detail?id=220039) we have to store apk build time value in
`app/src/main/res/values/strings.xml` file and use it further in `getBinaryResourcesModifiedTime` method

Fix https://github.com/Microsoft/react-native-code-push/issues/650
2017-02-09 11:40:31 +03:00
Richard Hua
d9a85c87f3 Support React Native 0.36.0 and 0.37.0 (#602)
* Upgrade example app to react-native@0.37.0
* Fix crash on restart caused by loadBundle() being called twice
2016-11-14 22:40:36 -08:00
Martin Konicek
ae0d35244f [Android] Let npm take care of versioning (#589) 2016-11-11 17:52:10 -08:00
Swordsman-Inaction
5bcea7be35 Fix comparison method in setJSBundle (#587) 2016-10-31 22:30:11 -07:00
Richard Hua
3dce59f36e Ignore OSX metadata when hashing updates (#561)
On Android, prevent hash mismatches by ensuring the hashing algorithm ignores OS X metadata (.DS_Store and __MACOSX). This addresses #472, and mirrors #471, which is the iOS side of the fix.
2016-10-11 10:49:40 -07:00
Richard Hua
22d2a146d2 Support RN 0.34 (#557)
* Upgrade example app to RN 0.34.1
* Fix Android reflection logic to support RN 0.34 (as reported in #536), while maintaining backward compatibility
* Bump package.json and update supported RN versions in README
2016-10-06 16:18:07 -07:00
Connor McEwen
30b27337d3 Check that the previous package is not null 2016-09-28 13:41:20 +01:00
Felipe Lima
8c4c8046c6 Remove unnecessary config from AndroidManifest
This was causing some manifest merging issues for us, however it seems
like this stuff is completely unnecessary, especially for an android
library, so I'm removing it all.
2016-09-21 10:46:38 -07:00
Geoffrey Goh
1846018d26 fix android import regression 2016-08-31 17:24:46 -07:00
Geoffrey Goh
c376c301d5 Merge pull request #491 from igrayson/patch-1
[Android] Support React instances with no Activity
2016-08-30 13:05:54 -07:00
Ian Grayson
f6ea4ec00d [Android] Support React instances with no Activity
This change aims to support applications which run React Native's catalyst instance in the background, sometimes without an activity.

We're using this change today in an RN 0.27 application, which overrides `ReactActivity#createReactInstanceManager` to afford us control of the instance's lifecycle, so that we may run and launch without an `Activity` (i.e., in response to push notifications and other triggers).

If we agree with this approach, I'll update this PR with documentation/etc.
2016-08-29 13:52:28 -07:00
Geoffrey Goh
b743d07ecf fix 0.32 compat 2016-08-26 14:26:20 -07:00
Geoffrey Goh
c11560f697 fix 0.32 compat 2016-08-26 14:23:21 -07:00
Ian Grayson
167eabd289 Proguard rules 2016-08-25 15:50:23 -07:00
Geoffrey Goh
235450604f fix reflection not getting field from superclass 2016-08-17 18:08:40 -07:00
Geoffrey Goh
807f4cfc36 remove ReactActivity dependency 2016-08-17 13:00:58 -07:00
Geoffrey Goh
f006821bdb remove soloader 2016-08-09 10:56:31 -07:00
Richard Hua
07e270da9b Merge pull request #447 from Microsoft/override-app-version
Allow an app's binary version to be manually specified
2016-08-01 18:28:29 -07:00
Richard Hua
23e7b18f3f Refactor app version into single variable 2016-08-01 18:23:45 -07:00
Richard Hua
1a1004ee8b Allow the binary version to be specified independently of the app version 2016-08-01 17:02:12 -07:00
Richard Hua
9299748f2e Refactoring - remove deleteDirectory() function 2016-07-29 18:28:00 -07:00
Richard Hua
b20d56f8f2 Do not attempt to remove a directory before its children have been deleted 2016-07-29 18:07:11 -07:00
Geoffrey Goh
516f5cac64 Update CodePushDialog.java 2016-07-28 14:40:47 -07:00
Geoffrey Goh
20370fa3ca fix NPE when showing dialog while app is backgrounded 2016-07-28 10:52:29 -07:00
Geoffrey Goh
cdbb8dbd49 fix NPE when showing dialog while app is backgrounded 2016-07-28 10:48:15 -07:00
Geoffrey Goh
337a03e859 Merge pull request #424 from Microsoft/add-resume-listener-immediate
Add resume listener for immediate installs
2016-07-11 16:52:14 -07:00
Geoffrey Goh
3ce96e9433 ignore minimumBackgroundDuration for immediate installs 2016-07-11 16:51:27 -07:00
Geoffrey Goh
538db291ec Add resume listener for immediate installs, no-op loadBundle if currentActivity is null 2016-07-11 15:57:04 -07:00