Skip to content

Commit 65b8321

Browse files
authored
Merge pull request #195 from proyecto26/develop
Release v3.5.0
2 parents 6ebc3e7 + 85911ad commit 65b8321

File tree

28 files changed

+3766
-3658
lines changed

28 files changed

+3766
-3658
lines changed

.flowconfig

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -31,49 +31,33 @@ node_modules/warning/.*
3131
[include]
3232

3333
[libs]
34-
node_modules/react-native/Libraries/react-native/react-native-interface.js
34+
node_modules/react-native/interface.js
3535
node_modules/react-native/flow/
3636

37+
[declarations]
38+
<PROJECT_ROOT>/node_modules
39+
3740
[options]
3841
emoji=true
3942

40-
esproposal.optional_chaining=enable
41-
esproposal.nullish_coalescing=enable
43+
exact_by_default=true
4244

4345
module.file_ext=.js
4446
module.file_ext=.json
4547
module.file_ext=.ios.js
4648

47-
module.system=haste
48-
module.system.haste.use_name_reducers=true
49-
# get basename
50-
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
51-
# strip .js or .js.flow suffix
52-
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
53-
# strip .ios suffix
54-
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
55-
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
56-
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
57-
module.system.haste.paths.blacklist=.*/__tests__/.*
58-
module.system.haste.paths.blacklist=.*/__mocks__/.*
59-
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
60-
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
61-
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
62-
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
63-
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
64-
6549
munge_underscores=true
6650

51+
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/index.js'
52+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
6753
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
6854

6955
suppress_type=$FlowIssue
7056
suppress_type=$FlowFixMe
7157
suppress_type=$FlowFixMeProps
7258
suppress_type=$FlowFixMeState
7359

74-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
75-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
76-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
60+
experimental.abstract_locations=true
7761

7862
[lints]
7963
sketchy-null-number=warn
@@ -83,19 +67,16 @@ untyped-type-import=warn
8367
nonstrict-import=warn
8468
deprecated-type=warn
8569
unsafe-getters-setters=warn
86-
inexact-spread=warn
8770
unnecessary-invariant=warn
8871
signature-verification-failure=warn
89-
deprecated-utility=error
9072

9173
[strict]
9274
deprecated-type
9375
nonstrict-import
94-
sketchy-null
9576
unclear-type
9677
unsafe-getters-setters
9778
untyped-import
9879
untyped-type-import
9980

10081
[version]
101-
^0.98.0
82+
^0.135.0

CHANGELOG.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,28 @@ in case of vulnerabilities.
2222

2323
## [Unreleased]
2424

25+
## [3.5.0] - 2020-10-16
26+
27+
### Added
28+
- Added `hasBackButton` option to sets a back arrow instead of the default X icon to close the custom tab by [@aitorct](https://github.com/aitorct) ([#109](https://github.com/proyecto26/react-native-inappbrowser/pull/109)).
29+
- Added default browser configuration for custom tab if any by [@thuongtv-vn](https://github.com/thuongtv-vn) ([#177](https://github.com/proyecto26/react-native-inappbrowser/pull/177)).
30+
- Added `browserPackage` option to use a Package name of a browser to be used to handle Custom Tabs.
31+
- Added `showInRecents` option to determine whether browsed website should be shown as separate entry in Android recents/multitasking view.
32+
33+
### Fixed
34+
- Android `isAvailable` method checks **Custom Tab** support by [@aitorct](https://github.com/aitorct) ([#108](https://github.com/proyecto26/react-native-inappbrowser/pull/108)).
35+
- Added a null check for `redirectResolve` in `safariViewControllerDidFinish` by [@ssuchanowski](https://github.com/ssuchanowski) ([#160](https://github.com/proyecto26/react-native-inappbrowser/pull/160)).
36+
- Fixed **README** updating `modalPresentationStyle` to **fullscreen** by [@Thomazella](https://github.com/Thomazella) ([#161](https://github.com/proyecto26/react-native-inappbrowser/pull/161)).
37+
- Fixed `AppStateActiveOnce` event listener by [@logangouget](https://github.com/logangouget) ([#179](https://github.com/proyecto26/react-native-inappbrowser/pull/179)).
38+
2539
## [3.4.0] - 2020-04-08
2640

2741
### Added
2842
- Added `ephemeralWebSession` option to supports `ephemeralWebBrowserSession` on iOS 13 by [@avenner](https://github.com/avenner) ([#141](https://github.com/proyecto26/react-native-inappbrowser/pull/141)).
29-
- Add `@ReactModule` annotation by [@janicduplessis](https://github.com/janicduplessis) ([#94](https://github.com/proyecto26/react-native-inappbrowser/pull/94)).
43+
- Added `@ReactModule` annotation by [@janicduplessis](https://github.com/janicduplessis) ([#94](https://github.com/proyecto26/react-native-inappbrowser/pull/94)).
3044

3145
### Fixed
32-
- Remove listener of `openAuth` when `closeAuth` is called.
46+
- Removed listener of `openAuth` when `closeAuth` is called.
3347

3448
## [3.3.4] - 2020-01-07
3549

@@ -39,7 +53,7 @@ in case of vulnerabilities.
3953
## [3.3.3] - 2019-11-25
4054

4155
### Fixed
42-
- Remove build warnings with **iOS** 13 using [Pragmas](https://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas).
56+
- Removed build warnings with **iOS** 13 using [Pragmas](https://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas).
4357

4458
## [3.3.2] - 2019-11-15
4559

@@ -91,7 +105,7 @@ in case of vulnerabilities.
91105
- Activating Open Collective ([#80](https://github.com/proyecto26/react-native-inappbrowser/pull/80)) and Create **CONTRIBUTING.md** to see how to contribute.
92106
- Added `animated`, `modalPresentationStyle` and `modalTransitionStyle` properties for iOS options ([86f7238](https://github.com/proyecto26/react-native-inappbrowser/commit/86f7238d8eb856b28fae9981ca7bb42b12c43e18)).
93107
- Present the **SafariViewController** modally or as push instead using the `modalEnabled` property ([4a0d57c](https://github.com/proyecto26/react-native-inappbrowser/commit/4a0d57c73eccaaf45a212853c50aa41520b550c8)).
94-
- Add workaround to dismiss **SafariViewController** without animation.
108+
- Added workaround to dismiss **SafariViewController** without animation.
95109

96110
### Removed
97111
- **com.facebook.infer.annotation** dependency is not required anymore to build for **Android** ([dcbfaef](https://github.com/proyecto26/react-native-inappbrowser/commit/dcbfaef49fa04fdabc281cd2c61124a11c6a7d29#diff-7ae5a9093507568eabbf35c3b0665732)).
@@ -115,7 +129,7 @@ in case of vulnerabilities.
115129
- README now contains the different options to open the browser.
116130

117131
### Fixed
118-
- Add `customTabsIntent.startAnimationBundle` when the `ChromeTabsManagerActivity` intent is created to fix **Android** animations by [@miktolon](https://github.com/miktolon) ([3f0cb35](https://github.com/proyecto26/react-native-inappbrowser/commit/3f0cb356733832a4578ebf1cb45377aa0d8d2806)).
132+
- Added `customTabsIntent.startAnimationBundle` when the `ChromeTabsManagerActivity` intent is created to fix **Android** animations by [@miktolon](https://github.com/miktolon) ([3f0cb35](https://github.com/proyecto26/react-native-inappbrowser/commit/3f0cb356733832a4578ebf1cb45377aa0d8d2806)).
119133

120134
### Changed
121135
- Using **Android** `AssertionError` instead of use `Assertion` lib of Facebook by [@SnaiNeR](https://github.com/SnaiNeR) ([e9a54d3](https://github.com/proyecto26/react-native-inappbrowser/commit/e9a54d3fe759380f992aa1ed7fbcf5d1299a7d73)).
@@ -146,15 +160,16 @@ Missing tags for previous versions 🤷‍♂
146160
- Include **supportLibVersion** definition to avoid collisions by [@maestor](https://github.com/maestor) ([332ceef](https://github.com/proyecto26/react-native-inappbrowser/commit/332ceefeba4e729237412954b8b941654263bfbd)).
147161
- Fix the repository URL for podspec file by [@adammcarth](https://github.com/adammcarth) ([7e4038c](https://github.com/proyecto26/react-native-inappbrowser/commit/7e4038c19a7e1a44ab01e9dcd762709ab854eb85)).
148162
- Provide example how to restore old status bar style by [@MrLoh](https://github.com/MrLoh) ([8cb9e75](https://github.com/proyecto26/react-native-inappbrowser/commit/8cb9e7535a3edb0d9919eab7813bf5f136f455ff)).
149-
- Add `com.facebook.infer.annotation` dependecy to fix build error by [Artem Emelyanov](mailto:[email protected]) ([80ff313](https://github.com/proyecto26/react-native-inappbrowser/commit/80ff313c36911d4d82d2885ad8424d7f0f72de29)).
163+
- Added `com.facebook.infer.annotation` dependecy to fix build error by [Artem Emelyanov](mailto:[email protected]) ([80ff313](https://github.com/proyecto26/react-native-inappbrowser/commit/80ff313c36911d4d82d2885ad8424d7f0f72de29)).
150164
- Clear `mOpenBrowserPromise` after sending a cancel by [@rbscott](https://github.com/rbscott) ([d9cc2a3](https://github.com/proyecto26/react-native-inappbrowser/commit/d9cc2a3183f84790deb22bf01f4f7658d67bc8ca)).
151165
- Fix README to import native package in `MainApplication` instead of `MainActivity` by [@mammad2c](https://github.com/mammad2c) ([ce3f5a9](https://github.com/proyecto26/react-native-inappbrowser/commit/ce3f5a93812a1a2dd7293092bb4a2972f4943268)).
152166
- Update the `isAvailable` method to return a boolean instead by [@kikketer](https://github.com/kikketer) ([1d75810](https://github.com/proyecto26/react-native-inappbrowser/commit/1d75810881cc6fd5a6913fbef986f897d366cdb9)).
153167
- Fix **TypeScript** typings by [@petekp](https://github.com/petekp) ([e0e99a5](https://github.com/proyecto26/react-native-inappbrowser/commit/e0e99a523d9a2df99263ffbed3f2738afd05b46b)).
154168
- Fix `EventBusException` on **Android** by [@Almouro](https://github.com/Almouro) ([9cf4cbb](https://github.com/proyecto26/react-native-inappbrowser/commit/9cf4cbb58d55c8b534dabac6791e6a2a5428253f)).
155169

156170

157-
[Unreleased]: https://github.com/proyecto26/react-native-inappbrowser/compare/v3.4.0...HEAD
171+
[Unreleased]: https://github.com/proyecto26/react-native-inappbrowser/compare/v3.5.0...HEAD
172+
[3.5.0]: https://github.com/proyecto26/react-native-inappbrowser/compare/v3.4.0...v3.5.0
158173
[3.4.0]: https://github.com/proyecto26/react-native-inappbrowser/compare/v3.3.4...v3.4.0
159174
[3.3.4]: https://github.com/proyecto26/react-native-inappbrowser/compare/v3.3.3...v3.3.4
160175
[3.3.3]: https://github.com/proyecto26/react-native-inappbrowser/compare/v3.3.2...v3.3.3

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
</p>
2727

2828
<h1 align="center">InAppBrowser for React Native</h1>
29+
<h3 align="center">Provides access to the system's web browser and supports handling redirects</h3>
2930
<h4 align="center"><a href="https://developer.chrome.com/multidevice/android/customtabs#whatarethey">Chrome Custom Tabs</a> for Android & <a href="https://developer.apple.com/documentation/safariservices">SafariServices</a>/<a href="https://developer.apple.com/documentation/authenticationservices">AuthenticationServices</a> for iOS.</h4>
3031

3132
<p align="center">
@@ -150,20 +151,22 @@ Property | Description
150151
Property | Description
151152
-------------- | ------
152153
`showTitle` (Boolean) | Sets whether the title should be shown in the custom tab. [`true`/`false`]
153-
`hasBackButton` (Boolean) | Sets a back arrow instead of the default X icon to close the custom tab. [`true`/`false`]
154154
`toolbarColor` (String) | Sets the toolbar color. [`gray`/`#808080`]
155155
`secondaryToolbarColor` (String) | Sets the color of the secondary toolbar. [`white`/`#FFFFFF`]
156156
`enableUrlBarHiding` (Boolean) | Enables the url bar to hide as the user scrolls down on the page. [`true`/`false`]
157157
`enableDefaultShare` (Boolean) | Adds a default share item to the menu. [`true`/`false`]
158158
`animations` (Object) | Sets the start and exit animations. [`{ startEnter, startExit, endEnter, endExit }`]
159159
`headers` (Object) | The data are key/value pairs, they will be sent in the HTTP request headers for the provided url. [`{ 'Authorization': 'Bearer ...' }`]
160160
`forceCloseOnRedirection` (Boolean) | Open Custom Tab in a new task to avoid issues redirecting back to app scheme. [`true`/`false`]
161+
`hasBackButton` (Boolean) | Sets a back arrow instead of the default `X` icon to close the custom tab. [`true`/`false`]
162+
`browserPackage` (String) | Package name of a browser to be used to handle Custom Tabs.
163+
`showInRecents` (Boolean) | Determining whether browsed website should be shown as separate entry in Android recents/multitasking view. [`true`/`false`]
161164
162165
### Demo
163166
164167
```javascript
165168
import { Linking } from 'react-native'
166-
import InAppBrowser from 'react-native-inappbrowser-reborn'
169+
import { InAppBrowser } from 'react-native-inappbrowser-reborn'
167170
168171
...
169172
async openLink() {
@@ -178,7 +181,7 @@ import InAppBrowser from 'react-native-inappbrowser-reborn'
178181
readerMode: false,
179182
animated: true,
180183
modalPresentationStyle: 'fullScreen',
181-
modalTransitionStyle: 'partialCurl',
184+
modalTransitionStyle: 'coverVertical',
182185
modalEnabled: true,
183186
enableBarCollapsing: false,
184187
// Android Properties
@@ -287,7 +290,7 @@ const Main = createStackNavigator(
287290
- LoginComponent
288291
```javascript
289292
import { Linking } from 'react-native'
290-
import InAppBrowser from 'react-native-inappbrowser-reborn'
293+
import { InAppBrowser } from 'react-native-inappbrowser-reborn'
291294
import { getDeepLink } from './utilities'
292295
...
293296
async onLogin() {

RNInAppBrowser.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
1919
s.source_files = 'ios/**/*.{h,m}'
2020
s.exclude_files = 'android/**/*'
2121

22-
s.dependency "React"
22+
s.dependency "React-Core"
2323
#s.dependency "others"
2424

2525
end

android/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ android {
3838
lintOptions {
3939
abortOnError false
4040
}
41+
compileOptions {
42+
sourceCompatibility JavaVersion.VERSION_1_8
43+
targetCompatibility JavaVersion.VERSION_1_8
44+
}
4145
}
4246

4347
repositories {

0 commit comments

Comments
 (0)