Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 881dc89

Browse files
Dynamics SDK for React Native v12.0
- added support for BlackBerry Dynamics SDK for iOS v12.0, Launcher v12 - added support for BlackBerry Dynamics SDK for Android v12.0, Launcher v12 - added support for React Native 0.70, 0.71, 0.72 versions - deprecated support for React Native 0.66 - 0.69 versions - sample apps are updated to v0.70.0 RN - implemented secure file download in WebView UI component - upgraded core for forked modules to use 0.70 as base version: Clipboard, Networking, AsyncStorage, SQLite, FileSystem, - upgraded core for forked ui-components to use 0.70 as base version: WebView, Text, TextInput - updated steps how to integrate PlayIntegrity feature - added fix for issue: RN BBD Android 'Edit File Service' not receiving event AppKinetics when Annotate Service is enabled - added other minor improvements and defect fixes
1 parent a464543 commit 881dc89

File tree

379 files changed

+19504
-10856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

379 files changed

+19504
-10856
lines changed
-189 KB
Binary file not shown.

README.md

+129-24
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

SampleApplications/AppKinetics/.flowconfig

+10-43
Original file line numberDiff line numberDiff line change
@@ -5,74 +5,44 @@
55
; Ignore "BUCK" generated dirs
66
<PROJECT_ROOT>/\.buckd/
77

8-
; Ignore unexpected extra "@providesModule"
9-
.*/node_modules/.*/node_modules/fbjs/.*
10-
11-
; Ignore duplicate module providers
12-
; For RN Apps installed via npm, "Libraries" folder is inside
13-
; "node_modules/react-native" but in the source repo it is in the root
14-
node_modules/react-native/Libraries/react-native/React.js
15-
168
; Ignore polyfills
179
node_modules/react-native/Libraries/polyfills/.*
1810

19-
; These should not be required directly
20-
; require from fbjs/lib instead: require('fbjs/lib/warning')
21-
node_modules/warning/.*
22-
2311
; Flow doesn't support platforms
24-
.*/Libraries/Utilities/HMRLoadingView.js
12+
.*/Libraries/Utilities/LoadingView.js
13+
14+
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
2515

2616
[untyped]
2717
.*/node_modules/@react-native-community/cli/.*/.*
2818

2919
[include]
3020

3121
[libs]
32-
node_modules/react-native/Libraries/react-native/react-native-interface.js
22+
node_modules/react-native/interface.js
3323
node_modules/react-native/flow/
3424

3525
[options]
3626
emoji=true
3727

38-
esproposal.optional_chaining=enable
39-
esproposal.nullish_coalescing=enable
28+
exact_by_default=true
29+
30+
format.bracket_spacing=false
4031

4132
module.file_ext=.js
4233
module.file_ext=.json
4334
module.file_ext=.ios.js
4435

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

65-
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'
38+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
39+
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\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
6640

6741
suppress_type=$FlowIssue
6842
suppress_type=$FlowFixMe
6943
suppress_type=$FlowFixMeProps
7044
suppress_type=$FlowFixMeState
7145

72-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
73-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
74-
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
75-
7646
[lints]
7747
sketchy-null-number=warn
7848
sketchy-null-mixed=warn
@@ -81,10 +51,7 @@ untyped-type-import=warn
8151
nonstrict-import=warn
8252
deprecated-type=warn
8353
unsafe-getters-setters=warn
84-
inexact-spread=warn
8554
unnecessary-invariant=warn
86-
signature-verification-failure=warn
87-
deprecated-utility=error
8855

8956
[strict]
9057
deprecated-type
@@ -96,4 +63,4 @@ untyped-import
9663
untyped-type-import
9764

9865
[version]
99-
^0.98.0
66+
^0.182.0

SampleApplications/AppKinetics/.gitattributes

-1
This file was deleted.

SampleApplications/AppKinetics/.gitignore

+10-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
project.xcworkspace
23+
ios/.xcode.env.local
2424

2525
# Android/IntelliJ
2626
#
@@ -29,6 +29,8 @@ build/
2929
.gradle
3030
local.properties
3131
*.iml
32+
*.hprof
33+
.cxx/
3234

3335
# node.js
3436
#
@@ -40,6 +42,7 @@ yarn-error.log
4042
buck-out/
4143
\.buckd/
4244
*.keystore
45+
!debug.keystore
4346

4447
# fastlane
4548
#
@@ -48,12 +51,14 @@ buck-out/
4851
# For more information about the recommended setup visit:
4952
# https://docs.fastlane.tools/best-practices/source-control/
5053

51-
*/fastlane/report.xml
52-
*/fastlane/Preview.html
53-
*/fastlane/screenshots
54+
**/fastlane/report.xml
55+
**/fastlane/Preview.html
56+
**/fastlane/screenshots
57+
**/fastlane/test_output
5458

5559
# Bundle artifact
5660
*.jsbundle
5761

58-
# CocoaPods
62+
# Ruby / CocoaPods
5963
/ios/Pods/
64+
/vendor/bundle/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
24
bracketSpacing: false,
3-
jsxBracketSameLine: true,
45
singleQuote: true,
56
trailingComma: 'all',
67
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.7.5
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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.7.5'
5+
6+
gem 'cocoapods', '~> 1.11', '>= 1.11.2'

SampleApplications/AppKinetics/README.md

+59-26
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,23 @@ Open the sample app directory in Terminal window:
4444
Install dependencies:
4545
`$ yarn`
4646

47-
NOTE: AppKinetics sample is based on `0.66.4` version of React Native. There is a possibility to upgrade to `0.67.x` or `0.68.x` versions (`0.67.0` - `0.67.4`, `0.68.0` - `0.68.2`) by running one of following commands:
48-
`$ react-native upgrade 0.6x.x`
47+
> NOTE: AppKinetics sample is based on `0.70.0` version of React Native. There is a possibility to upgrade to `0.70.x`, `0.71.x`, `0.72.x` versions (`0.70.1` - `0.70.10`, `0.71.0` - `0.71.13`, `0.72.0` - `0.72.4`) by running one of following commands:
48+
`$ npx react-native upgrade 0.70.x`
4949
for example:
50-
`$ react-native upgrade 0.67.4`
50+
`$ npx react-native upgrade 0.70.10`
5151
or
52-
`$ react-native upgrade 0.68.2`
52+
`$ npx react-native upgrade 0.71.13`
53+
or
54+
`$ npx react-native upgrade 0.72.4`
5355

5456
Generate ios and android directories:
55-
`$ react-native eject`
57+
`$ npx react-native eject`
5658

5759
Generate ios and android directories:
58-
`$ react-native eject`
60+
`$ npx react-native eject`
61+
62+
> There is a known issue with loading Metro server on `0.72.0` and `0.72.1` versions when the error message is displayed during app load in Metro server: "Cannot read properties of undefined (reading 'addHelper')". The issue can be fixed by adding the following devDependency to the project:
63+
`$ yarn add @babel/[email protected] --dev`
5964

6065
## Install Dynamics modules
6166
#### Prerequisites
@@ -76,17 +81,23 @@ It is suggested to use **`com.blackberry.bbd.example.cdv.appkinetics.server`** h
7681
$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-AppKinetics
7782

7883
##### iOS
84+
Different `ruby` versions might be install on the machine. Especially it is related to React Native v`0.70.x` projects.
85+
Depending on your Mac configuration following error can occur when running `pod install` command:
86+
```
87+
Traceback (most recent call last):
88+
4: from /Users/vtaliar/.rvm/gems/ruby-2.7.5/bin/ruby_executable_hooks:22:in `<main>'
89+
3: from /Users/vtaliar/.rvm/gems/ruby-2.7.5/bin/ruby_executable_hooks:22:in `eval'
90+
2: from /Users/vtaliar/.rvm/gems/ruby-2.7.5/bin/pod:23:in `<main>'
91+
1: from /Users/vtaliar/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems.rb:296:in `activate_bin_path'
92+
/Users/vtaliar/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/rubygems.rb:277:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) with executable pod (Gem::GemNotFoundException)
93+
```
94+
More details can be found [here](https://medium.com/@pk60905/bundle-install-and-bundle-update-80f3d6f52214).
95+
96+
`$ bundle install` - needed on some `0.70.x` versions to fix the issue above
7997
`$ cd ios`
8098
`$ pod install`
8199
`$ cd ..`
82100

83-
#### How to run application
84-
##### iOS
85-
`$ react-native run-ios`
86-
87-
##### Android
88-
`$ react-native run-android`
89-
90101
#### How to secure FileSystem
91102
$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-FileSystem
92103

@@ -101,10 +112,10 @@ It is suggested to use **`com.blackberry.bbd.example.cdv.appkinetics.server`** h
101112

102113
#### How to run application
103114
##### iOS
104-
`$ react-native run-ios`
115+
`$ npx react-native run-ios`
105116

106117
##### Android
107-
`$ react-native run-android`
118+
`$ npx react-native run-android`
108119

109120
## Prepare files that will be sent to other app
110121
In order to send files to other Dynamics applications files need to be stored in appropriate location.
@@ -136,29 +147,51 @@ Native Dynamics AppKinetics sample is a service provider of **`transfer-file`**
136147
4. Install and activate
137148

138149
## Examples of usage
139-
##### 0.66.4
150+
##### 0.70.0
140151
`$ cd <path>/SampleApplications/AppKinetics`
141152
`$ yarn`
142-
`$ react-native eject`
153+
`$ git init`
154+
`$ npx react-native eject`
143155
`$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-Base`
144156
`$ yarn set-bundle-id`
145157
It is suggested to use **`com.blackberry.bbd.example.cdv.appkinetics.client`** here. An app with this ID is already configured on UEM as a service provider of **`transfer-file`** service, so it can both send and receive files.
146158
`$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-AppKinetics`
147159
`$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-FileSystem`
148160
`$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-Networking`
149-
For iOS:
161+
For iOS:
162+
`$ bundle install`
163+
`$ cd ios`
164+
`$ pod install`
165+
`$ cd ..`
166+
`$ npx react-native run-ios`
167+
For Android:
168+
`$ npx react-native run-android`
169+
##### 0.70.10
170+
`$ cd <path>/SampleApplications/AppKinetics`
171+
`$ yarn`
172+
`$ git init`
173+
`$ npx react-native upgrade 0.70.10`
174+
`$ npx react-native eject`
175+
`$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-Base`
176+
`$ yarn set-bundle-id`
177+
It is suggested to use **`com.blackberry.bbd.example.cdv.appkinetics.client`** here. An app with this ID is already configured on UEM as a service provider of **`transfer-file`** service, so it can both send and receive files.
178+
`$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-AppKinetics`
179+
`$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-FileSystem`
180+
`$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-Networking`
181+
For iOS:
150182
`$ cd ios`
151183
`$ pod install`
152184
`$ cd ..`
153-
`$ react-native run-ios`
185+
`$ npx react-native run-ios`
154186
For Android:
155-
`$ react-native run-android`
156-
##### 0.68.2
187+
`$ npx react-native run-android`
188+
##### 0.72.0
157189
`$ cd <path>/SampleApplications/AppKinetics`
158190
`$ yarn`
159-
`$ cd .. ; git init ; cd AppKinetics`
160-
`$ react-native upgrade 0.68.2`
161-
`$ react-native eject`
191+
`$ yarn add @babel/[email protected] --dev` - OPTIONAL: needed on `0.72.0`, `0.72.1` versions to fix the error mentioned above in Metro server
192+
`$ git init`
193+
`$ npx react-native upgrade 0.72.0`
194+
`$ npx react-native eject`
162195
`$ yarn add <path>/modules/BlackBerry-Dynamics-for-React-Native-Base`
163196
`$ yarn set-bundle-id`
164197
It is suggested to use **`com.blackberry.bbd.example.cdv.appkinetics.client`** here. An app with this ID is already configured on UEM as a service provider of **`transfer-file`** service, so it can both send and receive files.
@@ -169,6 +202,6 @@ For iOS:
169202
`$ cd ios`
170203
`$ pod install`
171204
`$ cd ..`
172-
`$ react-native run-ios`
205+
`$ npx react-native run-ios`
173206
For Android:
174-
`$ react-native run-android`
207+
`$ npx react-native run-android`

SampleApplications/AppKinetics/package.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,20 @@
1212
"@fortawesome/fontawesome-svg-core": "^1.2.34",
1313
"@fortawesome/free-solid-svg-icons": "^5.15.2",
1414
"@fortawesome/react-native-fontawesome": "^0.2.6",
15-
"react": "17.0.2",
16-
"react-native": "0.66.4",
15+
"react": "18.1.0",
16+
"react-native": "0.70.0",
1717
"react-native-svg": "^12.1.0"
1818
},
1919
"devDependencies": {
2020
"@babel/core": "^7.12.9",
2121
"@babel/runtime": "^7.12.5",
2222
"@react-native-community/eslint-config": "^2.0.0",
2323
"babel-jest": "^26.6.3",
24-
"eslint": "7.14.0",
24+
"eslint": "^7.32.0",
2525
"jest": "^26.6.3",
26-
"metro-react-native-babel-preset": "^0.66.2",
27-
"react-test-renderer": "17.0.2",
28-
"react-native-eject": "^0.1.2",
29-
"react-native-codegen": "^0.0.7"
26+
"metro-react-native-babel-preset": "^0.72.1",
27+
"react-native-eject": "^0.2.0",
28+
"react-test-renderer": "18.1.0"
3029
},
3130
"license": "SEE LICENSE IN LICENSE",
3231
"jest": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

0 commit comments

Comments
 (0)