Commit Graph

221 Commits

Author SHA1 Message Date
Andrew Jack
1adad0df29 Fix proguard error in Android build (#1018) 2017-09-27 10:37:40 +03:00
Ruslan Bikkinin
e1cdd90e4e Add double hash checking support for code signing (#1005)
Add double hash checking support for code signing for both android and ios SDK
2017-09-18 13:37:44 +03:00
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
Mike Lambert
658e81add1 Fix dependency issue (#902)
Fix this crash I see when building for android:
```
:app:generateBundledResourcesHashDebug
module.js:471
    throw err;
    ^

Error: Cannot find module '/var/folders/94/wngs1jw91_n2_jjjrfljtqrc0000gn/T/CodePushResourcesMap-1b95774b.json'
```

Looks like these two tasks (`recordFileBeforeBundleCommand` and `generateBundledResourcesHash`) run in parallel, which create problems because one depends on a file generated by the other. Not sure why others don't have this issue, though, but I suspect this is exactly the issue reported in https://github.com/Microsoft/react-native-code-push/issues/836
2017-06-26 11:10:19 +03:00
Sergey Akhalkov
66cf73fe06 Fix typo while configuring resourcesDirConfigName path in codepush.gradle (#876) 2017-06-16 13:47:58 +03:00
Andrew Jack
09cbedc3f0 Remove support for legacy React Native versions (#845) 2017-06-05 17:44:03 +03:00
Sergey Akhalkov
088503d970 Use project.ext.react root prop to specify node_modules path (#869) 2017-06-02 17:14:13 +03:00
Andrew Jack
bb0e206149 If current package folder is null don't delete (#870) 2017-06-02 11:32:34 +03: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
Iacopo Pazzaglia
3761d9ece0 Allow custom node path(#773) (#860) 2017-05-26 11:50:10 +03:00
oliversommer
55749ab622 improved gradle temp file naming strategy to allow concurrent android builds (#857) 2017-05-24 10:10:59 +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
Igor Borges
c794c36dfd Allow output directory of CodePushHash.json to be customized (#712)
Remove `assetsDir` variable, as `generateBundledResourcesHash.js` should output `CodePushHash.json` to `jsBundleDir${targetName}` folder, and not the hardcoded `$buildDir/intermediates/assets/${targetPath}` one.
2017-02-24 18:46:41 -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
Sergey Akhalkov
294b46cb0f Support build for 'Android Plugin for Gradle' versions lower than 1.3.0 (#651)
In case version of 'Android Plugin for Gradle'' is lower than 1.3.0
'$buildDir' has slightly different structure - 'merged' folder
does not exists so '${targetPath}' folder contains directly in 'res' folder.

Fix issue https://github.com/Microsoft/react-native-code-push/issues/584
2017-01-18 17:10:30 -08: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
27029c82f3 Remove the project name from settings.gradle (#567)
As mentioned in #558, this line may override the original app's own project name.
2016-10-17 16:46:04 -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
f8a50d4482 allow node modules path to be overridden 2016-09-02 00:40:44 -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