@hawcx/react-native-sdk 1.0.8 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -1
- package/HawcxReactNative.podspec +2 -2
- package/README.md +325 -109
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/hawcx/reactnative/HawcxEventDispatcher.kt +4 -0
- package/android/src/main/java/com/hawcx/reactnative/HawcxReactNativeModule.kt +324 -1
- package/android/src/main/java/com/hawcx/reactnative/v6/HawcxV6Bridge.kt +402 -0
- package/ios/Frameworks/HawcxFramework.xcframework/Info.plist +5 -5
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/HawcxFramework +0 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Info.plist +0 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.abi.json +22145 -2
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.private.swiftinterface +628 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.swiftinterface +628 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/HawcxFramework +0 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Info.plist +0 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.abi.json +22145 -2
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +628 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.swiftinterface +628 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.abi.json +22145 -2
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +628 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +628 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.swiftmodule +0 -0
- package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/_CodeSignature/CodeResources +21 -21
- package/ios/HawcxReactNative.m +56 -0
- package/ios/HawcxReactNative.swift +380 -1
- package/ios/HawcxV6BridgeSupport.swift +468 -0
- package/lib/commonjs/index.js +326 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/v6Normalization.js +325 -0
- package/lib/commonjs/v6Normalization.js.map +1 -0
- package/lib/commonjs/v6State.js +186 -0
- package/lib/commonjs/v6State.js.map +1 -0
- package/lib/commonjs/v6Types.js +2 -0
- package/lib/commonjs/v6Types.js.map +1 -0
- package/lib/commonjs/v6WebLogin.js +101 -0
- package/lib/commonjs/v6WebLogin.js.map +1 -0
- package/lib/module/index.js +287 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/v6Normalization.js +318 -0
- package/lib/module/v6Normalization.js.map +1 -0
- package/lib/module/v6State.js +173 -0
- package/lib/module/v6State.js.map +1 -0
- package/lib/module/v6Types.js +2 -0
- package/lib/module/v6Types.js.map +1 -0
- package/lib/module/v6WebLogin.js +92 -0
- package/lib/module/v6WebLogin.js.map +1 -0
- package/lib/typescript/index.d.ts +83 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/v6Normalization.d.ts +3 -0
- package/lib/typescript/v6Normalization.d.ts.map +1 -0
- package/lib/typescript/v6State.d.ts +13 -0
- package/lib/typescript/v6State.d.ts.map +1 -0
- package/lib/typescript/v6Types.d.ts +157 -0
- package/lib/typescript/v6Types.d.ts.map +1 -0
- package/lib/typescript/v6WebLogin.d.ts +32 -0
- package/lib/typescript/v6WebLogin.d.ts.map +1 -0
- package/package.json +21 -9
- package/src/index.ts +477 -0
- package/src/v6Normalization.ts +356 -0
- package/src/v6State.ts +238 -0
- package/src/v6Types.ts +194 -0
- package/src/v6WebLogin.ts +154 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -2
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/android/gradlew +0 -185
- package/android/gradlew.bat +0 -89
- package/android/libs/hawcx-5.1.4.aar +0 -0
- package/docs/RELEASE.md +0 -129
- package/example/README.md +0 -59
- package/example/android/app/build.gradle +0 -126
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +0 -10
- package/example/android/app/src/debug/AndroidManifest.xml +0 -9
- package/example/android/app/src/main/AndroidManifest.xml +0 -27
- package/example/android/app/src/main/java/com/hawcx/example/MainActivity.kt +0 -22
- package/example/android/app/src/main/java/com/hawcx/example/MainApplication.kt +0 -45
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +0 -3
- package/example/android/app/src/main/res/values/styles.xml +0 -9
- package/example/android/build.gradle +0 -35
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/example/android/gradle.properties +0 -41
- package/example/android/gradlew +0 -249
- package/example/android/gradlew.bat +0 -92
- package/example/android/local.properties +0 -2
- package/example/android/settings.gradle +0 -38
- package/example/app.json +0 -4
- package/example/babel.config.js +0 -3
- package/example/e2e/README.md +0 -17
- package/example/e2e/hawcx-login.yaml +0 -14
- package/example/index.js +0 -5
- package/example/ios/.xcode.env +0 -11
- package/example/ios/HawcxExampleApp/AppDelegate.h +0 -6
- package/example/ios/HawcxExampleApp/AppDelegate.mm +0 -31
- package/example/ios/HawcxExampleApp/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/example/ios/HawcxExampleApp/Images.xcassets/Contents.json +0 -6
- package/example/ios/HawcxExampleApp/Info.plist +0 -55
- package/example/ios/HawcxExampleApp/LaunchScreen.storyboard +0 -47
- package/example/ios/HawcxExampleApp/PrivacyInfo.xcprivacy +0 -37
- package/example/ios/HawcxExampleApp/main.m +0 -10
- package/example/ios/HawcxExampleApp.xcodeproj/project.pbxproj +0 -704
- package/example/ios/HawcxExampleApp.xcodeproj/project.xcworkspace/xcuserdata/agambhullar.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/HawcxExampleApp.xcodeproj/xcshareddata/xcschemes/HawcxExampleApp.xcscheme +0 -90
- package/example/ios/HawcxExampleApp.xcodeproj/xcuserdata/agambhullar.xcuserdatad/xcschemes/xcschememanagement.plist +0 -16
- package/example/ios/HawcxExampleApp.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/ios/HawcxExampleAppTests/HawcxExampleAppTests.m +0 -66
- package/example/ios/HawcxExampleAppTests/Info.plist +0 -24
- package/example/ios/Podfile +0 -79
- package/example/ios/Podfile.lock +0 -1290
- package/example/metro.config.js +0 -16
- package/example/package-lock.json +0 -13220
- package/example/package.json +0 -30
- package/example/src/App.tsx +0 -755
- package/example/src/hawcx.config.ts +0 -25
- package/example/tsconfig.json +0 -8
- package/ios/Frameworks/.keep +0 -0
- package/lib/typescript/__tests__/index.test.d.ts +0 -2
- package/lib/typescript/__tests__/index.test.d.ts.map +0 -1
- package/react_mobile_sdk_plan.md +0 -242
- package/src/__tests__/index.test.ts +0 -206
package/docs/RELEASE.md
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# Hawcx React Native SDK Release Guide
|
|
2
|
-
|
|
3
|
-
This document outlines every command, directory, and deliverable required to publish `@hawcx/react-native-sdk` to npm and CocoaPods, tag the release, and hand it off to a customer.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
- **npm access**
|
|
7
|
-
1. Create or use your npmjs.com account.
|
|
8
|
-
2. Ask an org admin to invite that account to the Hawcx org.
|
|
9
|
-
3. In the repo root run `npm login` and enter the same username/password + OTP.
|
|
10
|
-
4. Verify the session any time with `npm whoami`.
|
|
11
|
-
- **CocoaPods trunk access**
|
|
12
|
-
1. Ensure CocoaPods is installed (`sudo gem install cocoapods`).
|
|
13
|
-
2. Register once: `pod trunk register you@hawcx.com "Your Name" --description='Hawcx laptop'`.
|
|
14
|
-
3. Click the verification email from CocoaPods.
|
|
15
|
-
4. Confirm you’re logged in with `pod trunk me` (shows your sessions).
|
|
16
|
-
- Local environment with Xcode, npm, CocoaPods, and the Hawcx backend dev environment.
|
|
17
|
-
- Clean working tree (`git status` should show no uncommitted changes apart from the release bump you are making).
|
|
18
|
-
|
|
19
|
-
> All commands are run from the repo root (`~/dev_react`) unless a different directory is explicitly mentioned.
|
|
20
|
-
|
|
21
|
-
## Step-by-step Release Process
|
|
22
|
-
|
|
23
|
-
1. **Sync and verify**
|
|
24
|
-
```bash
|
|
25
|
-
git checkout main
|
|
26
|
-
git pull origin main
|
|
27
|
-
git status
|
|
28
|
-
```
|
|
29
|
-
Ensure only intentional release edits are showing as modified.
|
|
30
|
-
|
|
31
|
-
2. **Run quality gates (repo root)**
|
|
32
|
-
```bash
|
|
33
|
-
npm install # ensures deps are fresh
|
|
34
|
-
npm run lint
|
|
35
|
-
npm run typecheck
|
|
36
|
-
npm test
|
|
37
|
-
npm run build # produces lib/
|
|
38
|
-
./gradlew -p android clean lintRelease testReleaseUnitTest assembleRelease publishToMavenLocal
|
|
39
|
-
Ensure to udpate api("api.hawcx:hawcx:5.1.1") version in dev_react/android/build.gradle if android aar file version changed
|
|
40
|
-
Then run ./gradlew clean assembleRelease --refresh-dependencies to test if android picks up new aar maven release
|
|
41
|
-
pod lib lint HawcxReactNative.podspec
|
|
42
|
-
```
|
|
43
|
-
- `./gradlew … publishToMavenLocal` validates the Android bridge (with the bundled Hawcx AAR) builds and can be published.
|
|
44
|
-
- `pod lib lint` confirms the Podspec + `HawcxFramework.xcframework` remain valid.
|
|
45
|
-
|
|
46
|
-
3. **Update version + changelog (repo root)**
|
|
47
|
-
- Edit `package.json` → bump `version` (run `npm install` afterward so `package-lock.json` picks up the new number).
|
|
48
|
-
- Update `android/build.gradle`’s fallback `version` string and `example/package.json` (re-run `npm install` inside `example/` so its lockfile updates).
|
|
49
|
-
- Run `pod install` in `example/ios/` to refresh `Podfile.lock` with the new pod version.
|
|
50
|
-
- Update `CHANGELOG.md` with a new entry (features, fixes, dates, links).
|
|
51
|
-
- Commit these edits once testing passes:
|
|
52
|
-
```bash
|
|
53
|
-
git add package.json package-lock.json android/build.gradle example/package.json example/package-lock.json example/ios/Podfile.lock CHANGELOG.md
|
|
54
|
-
git commit -m "chore: release vX.Y.Z"
|
|
55
|
-
```
|
|
56
|
-
Include refreshed native artifacts (`ios/Frameworks/*.xcframework`, `android/libs/*.aar`) in the same commit when they change.
|
|
57
|
-
|
|
58
|
-
4. **Smoke test the example app**
|
|
59
|
-
|
|
60
|
-
rm -rf ~/Library/Developer/Xcode/DerivedData/HawcxExampleApp*
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
cd example
|
|
64
|
-
npm install
|
|
65
|
-
For ios:
|
|
66
|
-
cd example/ios: pod install
|
|
67
|
-
cd ..
|
|
68
|
-
npm run ios or npm run ios -- --no-packager
|
|
69
|
-
For android:
|
|
70
|
-
cd example/android: ./gradlew clean
|
|
71
|
-
npm run android
|
|
72
|
-
# Use your dev credentials in example/src/hawcx.config.ts
|
|
73
|
-
cd ..
|
|
74
|
-
```
|
|
75
|
-
- For Android push validation, drop `google-services.json` under `example/android/app/` and use the push harness card to approve/decline a login request.
|
|
76
|
-
- Resolve any runtime issues before publishing.
|
|
77
|
-
|
|
78
|
-
5. **Publish to npm (repo root)**
|
|
79
|
-
```bash
|
|
80
|
-
npm publish --access public
|
|
81
|
-
```
|
|
82
|
-
Share the published version number with the team.
|
|
83
|
-
|
|
84
|
-
6. **Publish CocoaPods spec (repo root)**
|
|
85
|
-
```bash
|
|
86
|
-
pod trunk push HawcxReactNative.podspec --allow-warnings
|
|
87
|
-
```
|
|
88
|
-
Ensure the command finishes without validation errors. If you have trouble with trunk authentication, re-run `pod trunk register`.
|
|
89
|
-
|
|
90
|
-
7. **Tag and push the release (repo root)**
|
|
91
|
-
```bash
|
|
92
|
-
git tag vX.Y.Z
|
|
93
|
-
git push origin main
|
|
94
|
-
git push origin vX.Y.Z
|
|
95
|
-
```
|
|
96
|
-
This creates a signed reference for future diffs.
|
|
97
|
-
|
|
98
|
-
8. **Customer handoff checklist**
|
|
99
|
-
- Provide the npm version (`@hawcx/react-native-sdk@X.Y.Z`).
|
|
100
|
-
- For iOS, instruct them to run `pod install` after adding the dependency (Podspec is available once trunk syncs).
|
|
101
|
-
- For Android, emphasize that the Hawcx AAR ships inside the npm package—no manual drag/drop is needed. Running `npx pod-install` / Gradle sync is sufficient.
|
|
102
|
-
- Share `README.md` + `example/src/hawcx.config.ts` as guidance for wiring their project key + OAuth values.
|
|
103
|
-
- **Maintainer note:** if the native SDKs change, rebuild and copy the binaries before releasing:
|
|
104
|
-
- **iOS:** rebuild `HawcxFramework.xcframework`, copy it into `ios/Frameworks/`, bump the Podspec version if required, and re-run this release flow.
|
|
105
|
-
- **Android:** assemble the new `hawcx-*.aar` (`dev_android/android_sdk`), copy it into `android/libs/`, update docs/plan, then re-run this release flow.
|
|
106
|
-
|
|
107
|
-
## Future updates / redeployments
|
|
108
|
-
- Follow the same steps above for each change: bump the version, re-run quality gates, update changelog, publish to npm + trunk, tag, and notify.
|
|
109
|
-
- If the native iOS SDK is updated (new `HawcxFramework.xcframework`), copy it into `ios/Frameworks/`, update `HawcxReactNative.podspec` if needed, and repeat the release flow.
|
|
110
|
-
- Keep `react_mobile_sdk_plan.md` updated with new tasks/decisions so the next engineer understands why the release was cut.
|
|
111
|
-
|
|
112
|
-
## How customers consume the SDK
|
|
113
|
-
1. **npm**
|
|
114
|
-
In their React Native project root:
|
|
115
|
-
```bash
|
|
116
|
-
npm install @hawcx/react-native-sdk@X.Y.Z
|
|
117
|
-
```
|
|
118
|
-
2. **iOS pods**
|
|
119
|
-
In their `ios/` folder (after installing npm deps):
|
|
120
|
-
```bash
|
|
121
|
-
cd ios
|
|
122
|
-
pod install
|
|
123
|
-
```
|
|
124
|
-
3. **Initialize the bridge**
|
|
125
|
-
Copy the pattern from `example/src/hawcx.config.ts` to pass their project API key + OAuth config into `initialize()`. The README in this repo explains every exported API (`initialize`, hooks, push helpers, etc.).
|
|
126
|
-
|
|
127
|
-
Following this doc from top to bottom ensures the SDK release, npm publish, Podspec publish, git tagging, and customer delivery are handled consistently.
|
|
128
|
-
|
|
129
|
-
Capture any issues in the changelog and notify the team once the release is live.
|
package/example/README.md
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Hawcx React Native SDK Example
|
|
2
|
-
|
|
3
|
-
This example demonstrates the cross-platform APIs exported by `@hawcx/react-native-sdk`. It mirrors the flows in the native reference apps (email/OTP login, web PIN validation, and manual push approvals) so you can validate your Hawcx project keys on both iOS and Android.
|
|
4
|
-
|
|
5
|
-
## Getting Started
|
|
6
|
-
|
|
7
|
-
1. Install dependencies:
|
|
8
|
-
```bash
|
|
9
|
-
cd example
|
|
10
|
-
npm install
|
|
11
|
-
```
|
|
12
|
-
2. Configure credentials in `src/hawcx.config.ts`. The file ships with dev defaults—replace the API key **and** `HAWCX_BASE_URL` host with your tenant’s values.
|
|
13
|
-
3. **iOS only:** install pods:
|
|
14
|
-
```bash
|
|
15
|
-
cd ios && pod install && cd ..
|
|
16
|
-
```
|
|
17
|
-
4. **Android (optional push support):**
|
|
18
|
-
- Create a Firebase project and enable Cloud Messaging.
|
|
19
|
-
- Download `google-services.json` and drop it into `android/app/`. The Gradle script automatically applies the Google Services plugin when this file exists.
|
|
20
|
-
- If you want to drive push approvals end-to-end, wire your push provider to send Hawcx payloads (see the push harness card in the app for the expected fields).
|
|
21
|
-
5. Launch the app:
|
|
22
|
-
```bash
|
|
23
|
-
npm run ios
|
|
24
|
-
# or
|
|
25
|
-
npm run android
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## What It Demonstrates
|
|
29
|
-
- `initialize()` via `hawcx.config.ts` so you can flip credentials without editing the UI.
|
|
30
|
-
- `useHawcxAuth` hook for login + OTP entry.
|
|
31
|
-
- `useHawcxWebLogin` to validate QR/PIN flows.
|
|
32
|
-
- Manual push harness that lets you:
|
|
33
|
-
- Register APNs bytes (iOS) or an FCM token (Android) via `setPushDeviceToken`.
|
|
34
|
-
- Forward arbitrary push payload JSON to the native SDK and see emitted `hawcx.push.event` logs.
|
|
35
|
-
- Approve or decline login requests by submitting the `request_id`.
|
|
36
|
-
- Logging card with an on/off switch so you can inspect auth/session/push events directly in the UI.
|
|
37
|
-
|
|
38
|
-
## Push Harness Tips
|
|
39
|
-
- On Android, paste the FCM token string and tap **Register Token** followed by **Notify Authenticated** once the user completes login. This calls `setFcmToken` + `userDidAuthenticate` so Hawcx can register for approvals.
|
|
40
|
-
- On iOS, enter the APNs device token as a comma-separated list of byte values (e.g., `42, 13, 255, ...`). The helper converts it into the byte array expected by `setApnsDeviceToken`.
|
|
41
|
-
- Use the payload editor to paste the JSON delivered by Hawcx push notifications—at minimum it must include `request_id`, `ip_address`, `deviceInfo`, and `timestamp`.
|
|
42
|
-
|
|
43
|
-
## E2E Harness (Maestro)
|
|
44
|
-
`e2e/hawcx-login.yaml` is a starting point for automated smoke tests:
|
|
45
|
-
1. Launches the sample app (`appId: com.hawcx.example`)
|
|
46
|
-
2. Types an email address
|
|
47
|
-
3. Taps **Authenticate**
|
|
48
|
-
4. Waits for the OTP prompt to appear
|
|
49
|
-
|
|
50
|
-
Run it on either platform:
|
|
51
|
-
```bash
|
|
52
|
-
# iOS Simulator example
|
|
53
|
-
maestro test e2e/hawcx-login.yaml
|
|
54
|
-
|
|
55
|
-
# Android emulator example
|
|
56
|
-
maestro test --device emulator-5554 e2e/hawcx-login.yaml
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Customize the selectors, credentials, and OTP handling to match your environment. This same flow can be extended to cover push approvals, PIN validation, and regression checks on error states.
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
apply plugin: "com.android.application"
|
|
2
|
-
apply plugin: "org.jetbrains.kotlin.android"
|
|
3
|
-
apply plugin: "com.facebook.react"
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* This is the configuration block to customize your React Native Android app.
|
|
7
|
-
* By default you don't need to apply any configuration, just uncomment the lines you need.
|
|
8
|
-
*/
|
|
9
|
-
react {
|
|
10
|
-
/* Folders */
|
|
11
|
-
// The root of your project, i.e. where "package.json" lives. Default is '..'
|
|
12
|
-
// root = file("../")
|
|
13
|
-
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
|
|
14
|
-
// reactNativeDir = file("../node_modules/react-native")
|
|
15
|
-
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
|
|
16
|
-
// codegenDir = file("../node_modules/@react-native/codegen")
|
|
17
|
-
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
|
|
18
|
-
// cliFile = file("../node_modules/react-native/cli.js")
|
|
19
|
-
|
|
20
|
-
/* Variants */
|
|
21
|
-
// The list of variants to that are debuggable. For those we're going to
|
|
22
|
-
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
|
|
23
|
-
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
|
|
24
|
-
// debuggableVariants = ["liteDebug", "prodDebug"]
|
|
25
|
-
|
|
26
|
-
/* Bundling */
|
|
27
|
-
// A list containing the node command and its flags. Default is just 'node'.
|
|
28
|
-
// nodeExecutableAndArgs = ["node"]
|
|
29
|
-
//
|
|
30
|
-
// The command to run when bundling. By default is 'bundle'
|
|
31
|
-
// bundleCommand = "ram-bundle"
|
|
32
|
-
//
|
|
33
|
-
// The path to the CLI configuration file. Default is empty.
|
|
34
|
-
// bundleConfig = file(../rn-cli.config.js)
|
|
35
|
-
//
|
|
36
|
-
// The name of the generated asset file containing your JS bundle
|
|
37
|
-
// bundleAssetName = "MyApplication.android.bundle"
|
|
38
|
-
//
|
|
39
|
-
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
|
|
40
|
-
// entryFile = file("../js/MyApplication.android.js")
|
|
41
|
-
//
|
|
42
|
-
// A list of extra flags to pass to the 'bundle' commands.
|
|
43
|
-
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
|
44
|
-
// extraPackagerArgs = []
|
|
45
|
-
|
|
46
|
-
/* Hermes Commands */
|
|
47
|
-
// The hermes compiler command to run. By default it is 'hermesc'
|
|
48
|
-
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
|
|
49
|
-
//
|
|
50
|
-
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
|
51
|
-
// hermesFlags = ["-O", "-output-source-map"]
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
|
56
|
-
*/
|
|
57
|
-
def enableProguardInReleaseBuilds = false
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* The preferred build flavor of JavaScriptCore (JSC)
|
|
61
|
-
*
|
|
62
|
-
* For example, to use the international variant, you can use:
|
|
63
|
-
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
|
64
|
-
*
|
|
65
|
-
* The international variant includes ICU i18n library and necessary data
|
|
66
|
-
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
|
67
|
-
* give correct results when using with locales other than en-US. Note that
|
|
68
|
-
* this variant is about 6MiB larger per architecture than default.
|
|
69
|
-
*/
|
|
70
|
-
def jscFlavor = 'org.webkit:android-jsc:+'
|
|
71
|
-
|
|
72
|
-
android {
|
|
73
|
-
ndkVersion rootProject.ext.ndkVersion
|
|
74
|
-
buildToolsVersion rootProject.ext.buildToolsVersion
|
|
75
|
-
compileSdk rootProject.ext.compileSdkVersion
|
|
76
|
-
|
|
77
|
-
namespace "com.hawcx.example"
|
|
78
|
-
defaultConfig {
|
|
79
|
-
applicationId "com.hawcx.example"
|
|
80
|
-
minSdkVersion rootProject.ext.minSdkVersion
|
|
81
|
-
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
82
|
-
versionCode 1
|
|
83
|
-
versionName "1.0"
|
|
84
|
-
}
|
|
85
|
-
signingConfigs {
|
|
86
|
-
debug {
|
|
87
|
-
storeFile file('debug.keystore')
|
|
88
|
-
storePassword 'android'
|
|
89
|
-
keyAlias 'androiddebugkey'
|
|
90
|
-
keyPassword 'android'
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
buildTypes {
|
|
94
|
-
debug {
|
|
95
|
-
signingConfig signingConfigs.debug
|
|
96
|
-
}
|
|
97
|
-
release {
|
|
98
|
-
// Caution! In production, you need to generate your own keystore file.
|
|
99
|
-
// see https://reactnative.dev/docs/signed-apk-android.
|
|
100
|
-
signingConfig signingConfigs.debug
|
|
101
|
-
minifyEnabled enableProguardInReleaseBuilds
|
|
102
|
-
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
dependencies {
|
|
108
|
-
// The version of react-native is set by the React Native Gradle Plugin
|
|
109
|
-
implementation("com.facebook.react:react-android")
|
|
110
|
-
implementation("com.facebook.react:flipper-integration")
|
|
111
|
-
implementation(platform("com.google.firebase:firebase-bom:33.1.1"))
|
|
112
|
-
implementation("com.google.firebase:firebase-messaging")
|
|
113
|
-
|
|
114
|
-
if (hermesEnabled.toBoolean()) {
|
|
115
|
-
implementation("com.facebook.react:hermes-android")
|
|
116
|
-
} else {
|
|
117
|
-
implementation jscFlavor
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
|
122
|
-
|
|
123
|
-
def googleServicesFile = file("$projectDir/google-services.json")
|
|
124
|
-
if (googleServicesFile.exists()) {
|
|
125
|
-
apply plugin: "com.google.gms.google-services"
|
|
126
|
-
}
|
|
Binary file
|
|
@@ -1,10 +0,0 @@
|
|
|
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:
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
-
xmlns:tools="http://schemas.android.com/tools">
|
|
4
|
-
|
|
5
|
-
<application
|
|
6
|
-
android:usesCleartextTraffic="true"
|
|
7
|
-
tools:targetApi="28"
|
|
8
|
-
tools:ignore="GoogleAppIndexingWarning"/>
|
|
9
|
-
</manifest>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
-
xmlns:tools="http://schemas.android.com/tools">
|
|
3
|
-
|
|
4
|
-
<uses-permission android:name="android.permission.INTERNET" />
|
|
5
|
-
|
|
6
|
-
<application
|
|
7
|
-
android:name=".MainApplication"
|
|
8
|
-
android:label="@string/app_name"
|
|
9
|
-
android:icon="@mipmap/ic_launcher"
|
|
10
|
-
android:roundIcon="@mipmap/ic_launcher_round"
|
|
11
|
-
android:allowBackup="false"
|
|
12
|
-
android:theme="@style/AppTheme"
|
|
13
|
-
tools:replace="android:allowBackup,android:theme">
|
|
14
|
-
<activity
|
|
15
|
-
android:name=".MainActivity"
|
|
16
|
-
android:label="@string/app_name"
|
|
17
|
-
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
|
|
18
|
-
android:launchMode="singleTask"
|
|
19
|
-
android:windowSoftInputMode="adjustResize"
|
|
20
|
-
android:exported="true">
|
|
21
|
-
<intent-filter>
|
|
22
|
-
<action android:name="android.intent.action.MAIN" />
|
|
23
|
-
<category android:name="android.intent.category.LAUNCHER" />
|
|
24
|
-
</intent-filter>
|
|
25
|
-
</activity>
|
|
26
|
-
</application>
|
|
27
|
-
</manifest>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
package com.hawcx.example
|
|
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 = "HawcxExampleApp"
|
|
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
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
package com.hawcx.example
|
|
2
|
-
|
|
3
|
-
import android.app.Application
|
|
4
|
-
import com.facebook.react.PackageList
|
|
5
|
-
import com.facebook.react.ReactApplication
|
|
6
|
-
import com.facebook.react.ReactHost
|
|
7
|
-
import com.facebook.react.ReactNativeHost
|
|
8
|
-
import com.facebook.react.ReactPackage
|
|
9
|
-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
|
|
10
|
-
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
|
|
11
|
-
import com.facebook.react.defaults.DefaultReactNativeHost
|
|
12
|
-
import com.facebook.react.flipper.ReactNativeFlipper
|
|
13
|
-
import com.facebook.soloader.SoLoader
|
|
14
|
-
|
|
15
|
-
class MainApplication : Application(), ReactApplication {
|
|
16
|
-
|
|
17
|
-
override val reactNativeHost: ReactNativeHost =
|
|
18
|
-
object : DefaultReactNativeHost(this) {
|
|
19
|
-
override fun getPackages(): List<ReactPackage> =
|
|
20
|
-
PackageList(this).packages.apply {
|
|
21
|
-
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
22
|
-
// add(MyReactNativePackage())
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
override fun getJSMainModuleName(): String = "index"
|
|
26
|
-
|
|
27
|
-
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
|
|
28
|
-
|
|
29
|
-
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
|
|
30
|
-
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
override val reactHost: ReactHost
|
|
34
|
-
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
|
|
35
|
-
|
|
36
|
-
override fun onCreate() {
|
|
37
|
-
super.onCreate()
|
|
38
|
-
SoLoader.init(this, false)
|
|
39
|
-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
40
|
-
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
41
|
-
load()
|
|
42
|
-
}
|
|
43
|
-
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Copyright (C) 2014 The Android Open Source Project
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
-->
|
|
16
|
-
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
|
17
|
-
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
|
|
18
|
-
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
|
|
19
|
-
android:insetTop="@dimen/abc_edit_text_inset_top_material"
|
|
20
|
-
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
|
|
21
|
-
|
|
22
|
-
<selector>
|
|
23
|
-
<!--
|
|
24
|
-
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
|
|
25
|
-
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
|
|
26
|
-
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
|
|
27
|
-
|
|
28
|
-
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
29
|
-
|
|
30
|
-
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
|
|
31
|
-
-->
|
|
32
|
-
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
33
|
-
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
|
|
34
|
-
</selector>
|
|
35
|
-
|
|
36
|
-
</inset>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<resources>
|
|
2
|
-
|
|
3
|
-
<!-- Base application theme. -->
|
|
4
|
-
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
|
5
|
-
<!-- Customize your theme here. -->
|
|
6
|
-
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
|
|
7
|
-
</style>
|
|
8
|
-
|
|
9
|
-
</resources>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
buildscript {
|
|
2
|
-
ext {
|
|
3
|
-
buildToolsVersion = "34.0.0"
|
|
4
|
-
minSdkVersion = 26
|
|
5
|
-
compileSdkVersion = 34
|
|
6
|
-
targetSdkVersion = 34
|
|
7
|
-
ndkVersion = "25.1.8937393"
|
|
8
|
-
kotlinVersion = "2.0.0"
|
|
9
|
-
googleServicesVersion = "4.4.2"
|
|
10
|
-
}
|
|
11
|
-
repositories {
|
|
12
|
-
google()
|
|
13
|
-
mavenCentral()
|
|
14
|
-
}
|
|
15
|
-
dependencies {
|
|
16
|
-
classpath("com.android.tools.build:gradle")
|
|
17
|
-
classpath("com.facebook.react:react-native-gradle-plugin")
|
|
18
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
|
19
|
-
classpath("com.google.gms:google-services:$googleServicesVersion")
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
apply plugin: "com.facebook.react.rootproject"
|
|
24
|
-
|
|
25
|
-
subprojects { subproject ->
|
|
26
|
-
subproject.configurations.all { config ->
|
|
27
|
-
config.resolutionStrategy.eachDependency { details ->
|
|
28
|
-
if (details.requested.group == "androidx.core" &&
|
|
29
|
-
(details.requested.name == "core" || details.requested.name == "core-ktx")) {
|
|
30
|
-
details.useVersion("1.13.1")
|
|
31
|
-
details.because("core-ktx 1.16.0 requires compileSdk/AGP 35+, but the demo targets 34/AGP 8.1.1")
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
Binary file
|
|
@@ -1,41 +0,0 @@
|
|
|
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: -Xmx512m -XX:MaxMetaspaceSize=256m
|
|
13
|
-
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
|
|
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
|
-
# Use this property to specify which architecture you want to build.
|
|
28
|
-
# You can also override it from the CLI using
|
|
29
|
-
# ./gradlew <task> -PreactNativeArchitectures=x86_64
|
|
30
|
-
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
|
31
|
-
|
|
32
|
-
# Use this property to enable support to the new architecture.
|
|
33
|
-
# This will allow you to use TurboModules and the Fabric render in
|
|
34
|
-
# your application. You should enable this flag either if you want
|
|
35
|
-
# to write custom TurboModules/Fabric components OR use libraries that
|
|
36
|
-
# are providing them.
|
|
37
|
-
newArchEnabled=false
|
|
38
|
-
|
|
39
|
-
# Use this property to enable or disable the Hermes JS engine.
|
|
40
|
-
# If set to false, you will be using JSC instead.
|
|
41
|
-
hermesEnabled=true
|