@hawcx/react-native-sdk 1.0.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.
Files changed (100) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/HawcxReactNative.podspec +25 -0
  3. package/LICENSE +21 -0
  4. package/README.md +109 -0
  5. package/docs/RELEASE.md +119 -0
  6. package/example/README.md +59 -0
  7. package/example/android/app/build.gradle +126 -0
  8. package/example/android/app/debug.keystore +0 -0
  9. package/example/android/app/proguard-rules.pro +10 -0
  10. package/example/android/app/src/debug/AndroidManifest.xml +9 -0
  11. package/example/android/app/src/main/AndroidManifest.xml +27 -0
  12. package/example/android/app/src/main/java/com/hawcx/example/MainActivity.kt +22 -0
  13. package/example/android/app/src/main/java/com/hawcx/example/MainApplication.kt +45 -0
  14. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
  15. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  16. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  17. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  18. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  19. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  20. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  21. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  22. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  23. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  24. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  25. package/example/android/app/src/main/res/values/strings.xml +3 -0
  26. package/example/android/app/src/main/res/values/styles.xml +9 -0
  27. package/example/android/build.gradle +23 -0
  28. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  29. package/example/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  30. package/example/android/gradle.properties +41 -0
  31. package/example/android/gradlew +249 -0
  32. package/example/android/gradlew.bat +92 -0
  33. package/example/android/local.properties +2 -0
  34. package/example/android/settings.gradle +4 -0
  35. package/example/app.json +4 -0
  36. package/example/babel.config.js +3 -0
  37. package/example/e2e/README.md +17 -0
  38. package/example/e2e/hawcx-login.yaml +14 -0
  39. package/example/index.js +5 -0
  40. package/example/ios/.xcode.env +11 -0
  41. package/example/ios/HawcxExampleApp/AppDelegate.h +6 -0
  42. package/example/ios/HawcxExampleApp/AppDelegate.mm +31 -0
  43. package/example/ios/HawcxExampleApp/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  44. package/example/ios/HawcxExampleApp/Images.xcassets/Contents.json +6 -0
  45. package/example/ios/HawcxExampleApp/Info.plist +55 -0
  46. package/example/ios/HawcxExampleApp/LaunchScreen.storyboard +47 -0
  47. package/example/ios/HawcxExampleApp/PrivacyInfo.xcprivacy +37 -0
  48. package/example/ios/HawcxExampleApp/main.m +10 -0
  49. package/example/ios/HawcxExampleApp.xcodeproj/project.pbxproj +704 -0
  50. package/example/ios/HawcxExampleApp.xcodeproj/project.xcworkspace/xcuserdata/agambhullar.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  51. package/example/ios/HawcxExampleApp.xcodeproj/xcshareddata/xcschemes/HawcxExampleApp.xcscheme +90 -0
  52. package/example/ios/HawcxExampleApp.xcodeproj/xcuserdata/agambhullar.xcuserdatad/xcschemes/xcschememanagement.plist +16 -0
  53. package/example/ios/HawcxExampleApp.xcworkspace/contents.xcworkspacedata +10 -0
  54. package/example/ios/HawcxExampleAppTests/HawcxExampleAppTests.m +66 -0
  55. package/example/ios/HawcxExampleAppTests/Info.plist +24 -0
  56. package/example/ios/Podfile +55 -0
  57. package/example/ios/Podfile.lock +1290 -0
  58. package/example/metro.config.js +16 -0
  59. package/example/package-lock.json +13220 -0
  60. package/example/package.json +30 -0
  61. package/example/src/App.tsx +552 -0
  62. package/example/src/hawcx.config.ts +41 -0
  63. package/example/tsconfig.json +8 -0
  64. package/ios/Frameworks/.keep +0 -0
  65. package/ios/Frameworks/HawcxFramework.xcframework/Info.plist +44 -0
  66. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/HawcxFramework +0 -0
  67. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Headers/HawcxFramework.h +16 -0
  68. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Info.plist +0 -0
  69. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.abi.json +9794 -0
  70. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.private.swiftinterface +302 -0
  71. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  72. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios.swiftinterface +302 -0
  73. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64/HawcxFramework.framework/Modules/module.modulemap +6 -0
  74. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/HawcxFramework +0 -0
  75. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Headers/HawcxFramework.h +16 -0
  76. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Info.plist +0 -0
  77. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.abi.json +9794 -0
  78. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +302 -0
  79. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  80. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/arm64-apple-ios-simulator.swiftinterface +302 -0
  81. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.abi.json +9794 -0
  82. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +302 -0
  83. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  84. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/HawcxFramework.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +302 -0
  85. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/Modules/module.modulemap +6 -0
  86. package/ios/Frameworks/HawcxFramework.xcframework/ios-arm64_x86_64-simulator/HawcxFramework.framework/_CodeSignature/CodeResources +234 -0
  87. package/ios/HawcxReactNative.m +51 -0
  88. package/ios/HawcxReactNative.swift +311 -0
  89. package/lib/commonjs/index.js +404 -0
  90. package/lib/commonjs/index.js.map +1 -0
  91. package/lib/module/index.js +375 -0
  92. package/lib/module/index.js.map +1 -0
  93. package/lib/typescript/__tests__/index.test.d.ts +2 -0
  94. package/lib/typescript/__tests__/index.test.d.ts.map +1 -0
  95. package/lib/typescript/index.d.ts +151 -0
  96. package/lib/typescript/index.d.ts.map +1 -0
  97. package/package.json +72 -0
  98. package/react_mobile_sdk_plan.md +240 -0
  99. package/src/__tests__/index.test.ts +163 -0
  100. package/src/index.ts +518 -0
@@ -0,0 +1,3 @@
1
+ <resources>
2
+ <string name="app_name">HawcxExampleApp</string>
3
+ </resources>
@@ -0,0 +1,9 @@
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>
@@ -0,0 +1,23 @@
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"
@@ -0,0 +1,7 @@
1
+ distributionBase=GRADLE_USER_HOME
2
+ distributionPath=wrapper/dists
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
4
+ networkTimeout=10000
5
+ validateDistributionUrl=true
6
+ zipStoreBase=GRADLE_USER_HOME
7
+ zipStorePath=wrapper/dists
@@ -0,0 +1,41 @@
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
@@ -0,0 +1,249 @@
1
+ #!/bin/sh
2
+
3
+ #
4
+ # Copyright © 2015-2021 the original authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ ##############################################################################
20
+ #
21
+ # Gradle start up script for POSIX generated by Gradle.
22
+ #
23
+ # Important for running:
24
+ #
25
+ # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26
+ # noncompliant, but you have some other compliant shell such as ksh or
27
+ # bash, then to run this script, type that shell name before the whole
28
+ # command line, like:
29
+ #
30
+ # ksh Gradle
31
+ #
32
+ # Busybox and similar reduced shells will NOT work, because this script
33
+ # requires all of these POSIX shell features:
34
+ # * functions;
35
+ # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36
+ # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37
+ # * compound commands having a testable exit status, especially «case»;
38
+ # * various built-in commands including «command», «set», and «ulimit».
39
+ #
40
+ # Important for patching:
41
+ #
42
+ # (2) This script targets any POSIX shell, so it avoids extensions provided
43
+ # by Bash, Ksh, etc; in particular arrays are avoided.
44
+ #
45
+ # The "traditional" practice of packing multiple parameters into a
46
+ # space-separated string is a well documented source of bugs and security
47
+ # problems, so this is (mostly) avoided, by progressively accumulating
48
+ # options in "$@", and eventually passing that to Java.
49
+ #
50
+ # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51
+ # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52
+ # see the in-line comments for details.
53
+ #
54
+ # There are tweaks for specific operating systems such as AIX, CygWin,
55
+ # Darwin, MinGW, and NonStop.
56
+ #
57
+ # (3) This script is generated from the Groovy template
58
+ # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59
+ # within the Gradle project.
60
+ #
61
+ # You can find Gradle at https://github.com/gradle/gradle/.
62
+ #
63
+ ##############################################################################
64
+
65
+ # Attempt to set APP_HOME
66
+
67
+ # Resolve links: $0 may be a link
68
+ app_path=$0
69
+
70
+ # Need this for daisy-chained symlinks.
71
+ while
72
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73
+ [ -h "$app_path" ]
74
+ do
75
+ ls=$( ls -ld "$app_path" )
76
+ link=${ls#*' -> '}
77
+ case $link in #(
78
+ /*) app_path=$link ;; #(
79
+ *) app_path=$APP_HOME$link ;;
80
+ esac
81
+ done
82
+
83
+ # This is normally unused
84
+ # shellcheck disable=SC2034
85
+ APP_BASE_NAME=${0##*/}
86
+ # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87
+ APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
88
+
89
+ # Use the maximum available, or set MAX_FD != -1 to use that value.
90
+ MAX_FD=maximum
91
+
92
+ warn () {
93
+ echo "$*"
94
+ } >&2
95
+
96
+ die () {
97
+ echo
98
+ echo "$*"
99
+ echo
100
+ exit 1
101
+ } >&2
102
+
103
+ # OS specific support (must be 'true' or 'false').
104
+ cygwin=false
105
+ msys=false
106
+ darwin=false
107
+ nonstop=false
108
+ case "$( uname )" in #(
109
+ CYGWIN* ) cygwin=true ;; #(
110
+ Darwin* ) darwin=true ;; #(
111
+ MSYS* | MINGW* ) msys=true ;; #(
112
+ NONSTOP* ) nonstop=true ;;
113
+ esac
114
+
115
+ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
116
+
117
+
118
+ # Determine the Java command to use to start the JVM.
119
+ if [ -n "$JAVA_HOME" ] ; then
120
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
121
+ # IBM's JDK on AIX uses strange locations for the executables
122
+ JAVACMD=$JAVA_HOME/jre/sh/java
123
+ else
124
+ JAVACMD=$JAVA_HOME/bin/java
125
+ fi
126
+ if [ ! -x "$JAVACMD" ] ; then
127
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
128
+
129
+ Please set the JAVA_HOME variable in your environment to match the
130
+ location of your Java installation."
131
+ fi
132
+ else
133
+ JAVACMD=java
134
+ if ! command -v java >/dev/null 2>&1
135
+ then
136
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137
+
138
+ Please set the JAVA_HOME variable in your environment to match the
139
+ location of your Java installation."
140
+ fi
141
+ fi
142
+
143
+ # Increase the maximum file descriptors if we can.
144
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145
+ case $MAX_FD in #(
146
+ max*)
147
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148
+ # shellcheck disable=SC3045
149
+ MAX_FD=$( ulimit -H -n ) ||
150
+ warn "Could not query maximum file descriptor limit"
151
+ esac
152
+ case $MAX_FD in #(
153
+ '' | soft) :;; #(
154
+ *)
155
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156
+ # shellcheck disable=SC3045
157
+ ulimit -n "$MAX_FD" ||
158
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
159
+ esac
160
+ fi
161
+
162
+ # Collect all arguments for the java command, stacking in reverse order:
163
+ # * args from the command line
164
+ # * the main class name
165
+ # * -classpath
166
+ # * -D...appname settings
167
+ # * --module-path (only if needed)
168
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
169
+
170
+ # For Cygwin or MSYS, switch paths to Windows format before running java
171
+ if "$cygwin" || "$msys" ; then
172
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
173
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
174
+
175
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
176
+
177
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
178
+ for arg do
179
+ if
180
+ case $arg in #(
181
+ -*) false ;; # don't mess with options #(
182
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
183
+ [ -e "$t" ] ;; #(
184
+ *) false ;;
185
+ esac
186
+ then
187
+ arg=$( cygpath --path --ignore --mixed "$arg" )
188
+ fi
189
+ # Roll the args list around exactly as many times as the number of
190
+ # args, so each arg winds up back in the position where it started, but
191
+ # possibly modified.
192
+ #
193
+ # NB: a `for` loop captures its iteration list before it begins, so
194
+ # changing the positional parameters here affects neither the number of
195
+ # iterations, nor the values presented in `arg`.
196
+ shift # remove old arg
197
+ set -- "$@" "$arg" # push replacement arg
198
+ done
199
+ fi
200
+
201
+
202
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204
+
205
+ # Collect all arguments for the java command;
206
+ # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
207
+ # shell script including quotes and variable substitutions, so put them in
208
+ # double quotes to make sure that they get re-expanded; and
209
+ # * put everything else in single quotes, so that it's not re-expanded.
210
+
211
+ set -- \
212
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
213
+ -classpath "$CLASSPATH" \
214
+ org.gradle.wrapper.GradleWrapperMain \
215
+ "$@"
216
+
217
+ # Stop when "xargs" is not available.
218
+ if ! command -v xargs >/dev/null 2>&1
219
+ then
220
+ die "xargs is not available"
221
+ fi
222
+
223
+ # Use "xargs" to parse quoted args.
224
+ #
225
+ # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
226
+ #
227
+ # In Bash we could simply go:
228
+ #
229
+ # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
230
+ # set -- "${ARGS[@]}" "$@"
231
+ #
232
+ # but POSIX shell has neither arrays nor command substitution, so instead we
233
+ # post-process each arg (as a line of input to sed) to backslash-escape any
234
+ # character that might be a shell metacharacter, then use eval to reverse
235
+ # that process (while maintaining the separation between arguments), and wrap
236
+ # the whole thing up as a single "set" statement.
237
+ #
238
+ # This will of course break if any of these variables contains a newline or
239
+ # an unmatched quote.
240
+ #
241
+
242
+ eval "set -- $(
243
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
244
+ xargs -n1 |
245
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
246
+ tr '\n' ' '
247
+ )" '"$@"'
248
+
249
+ exec "$JAVACMD" "$@"
@@ -0,0 +1,92 @@
1
+ @rem
2
+ @rem Copyright 2015 the original author or authors.
3
+ @rem
4
+ @rem Licensed under the Apache License, Version 2.0 (the "License");
5
+ @rem you may not use this file except in compliance with the License.
6
+ @rem You may obtain a copy of the License at
7
+ @rem
8
+ @rem https://www.apache.org/licenses/LICENSE-2.0
9
+ @rem
10
+ @rem Unless required by applicable law or agreed to in writing, software
11
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
12
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ @rem See the License for the specific language governing permissions and
14
+ @rem limitations under the License.
15
+ @rem
16
+
17
+ @if "%DEBUG%"=="" @echo off
18
+ @rem ##########################################################################
19
+ @rem
20
+ @rem Gradle startup script for Windows
21
+ @rem
22
+ @rem ##########################################################################
23
+
24
+ @rem Set local scope for the variables with windows NT shell
25
+ if "%OS%"=="Windows_NT" setlocal
26
+
27
+ set DIRNAME=%~dp0
28
+ if "%DIRNAME%"=="" set DIRNAME=.
29
+ @rem This is normally unused
30
+ set APP_BASE_NAME=%~n0
31
+ set APP_HOME=%DIRNAME%
32
+
33
+ @rem Resolve any "." and ".." in APP_HOME to make it shorter.
34
+ for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35
+
36
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37
+ set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38
+
39
+ @rem Find java.exe
40
+ if defined JAVA_HOME goto findJavaFromJavaHome
41
+
42
+ set JAVA_EXE=java.exe
43
+ %JAVA_EXE% -version >NUL 2>&1
44
+ if %ERRORLEVEL% equ 0 goto execute
45
+
46
+ echo.
47
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48
+ echo.
49
+ echo Please set the JAVA_HOME variable in your environment to match the
50
+ echo location of your Java installation.
51
+
52
+ goto fail
53
+
54
+ :findJavaFromJavaHome
55
+ set JAVA_HOME=%JAVA_HOME:"=%
56
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57
+
58
+ if exist "%JAVA_EXE%" goto execute
59
+
60
+ echo.
61
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62
+ echo.
63
+ echo Please set the JAVA_HOME variable in your environment to match the
64
+ echo location of your Java installation.
65
+
66
+ goto fail
67
+
68
+ :execute
69
+ @rem Setup the command line
70
+
71
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72
+
73
+
74
+ @rem Execute Gradle
75
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76
+
77
+ :end
78
+ @rem End local scope for the variables with windows NT shell
79
+ if %ERRORLEVEL% equ 0 goto mainEnd
80
+
81
+ :fail
82
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83
+ rem the _cmd.exe /c_ return code!
84
+ set EXIT_CODE=%ERRORLEVEL%
85
+ if %EXIT_CODE% equ 0 set EXIT_CODE=1
86
+ if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87
+ exit /b %EXIT_CODE%
88
+
89
+ :mainEnd
90
+ if "%OS%"=="Windows_NT" endlocal
91
+
92
+ :omega
@@ -0,0 +1,2 @@
1
+ sdk.dir=/Users/agambhullar/Library/Android/sdk
2
+
@@ -0,0 +1,4 @@
1
+ rootProject.name = 'com.hawcx.example'
2
+ apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3
+ include ':app'
4
+ includeBuild('../node_modules/@react-native/gradle-plugin')
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "HawcxExampleApp",
3
+ "displayName": "Hawcx Example"
4
+ }
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ presets: ['module:metro-react-native-babel-preset'],
3
+ };
@@ -0,0 +1,17 @@
1
+ # E2E Harness
2
+
3
+ The `hawcx-login.yaml` Maestro script provides a starting point for automated flows:
4
+ 1. Launches the example app
5
+ 2. Enters a sample email address
6
+ 3. Taps Authenticate and waits for the OTP prompt
7
+
8
+ Customize the `appId`, selectors, and OTP behavior to match your test devices. This script is intentionally lightweight so it can be extended to cover push approvals, PIN validation, and error states.
9
+
10
+ Run it against any emulator/simulator:
11
+ ```bash
12
+ # iOS Simulator
13
+ maestro test hawcx-login.yaml
14
+
15
+ # Android emulator (replace with your device id)
16
+ maestro test --device emulator-5554 hawcx-login.yaml
17
+ ```
@@ -0,0 +1,14 @@
1
+ appId: com.hawcx.example
2
+ ---
3
+ - launchApp
4
+ - tapOn:
5
+ text: "Authenticate"
6
+ - inputText:
7
+ text: "test.user@example.com"
8
+ placeholder: "Email"
9
+ - tapOn:
10
+ text: "Authenticate"
11
+ - waitFor:
12
+ visible: "State:"
13
+ - assertVisible:
14
+ text: "State: otp"
@@ -0,0 +1,5 @@
1
+ import { AppRegistry } from 'react-native';
2
+ import App from './src/App';
3
+ import { name as appName } from './app.json';
4
+
5
+ AppRegistry.registerComponent(appName, () => App);
@@ -0,0 +1,11 @@
1
+ # This `.xcode.env` file is versioned and is used to source the environment
2
+ # used when running script phases inside Xcode.
3
+ # To customize your local environment, you can create an `.xcode.env.local`
4
+ # file that is not versioned.
5
+
6
+ # NODE_BINARY variable contains the PATH to the node executable.
7
+ #
8
+ # Customize the NODE_BINARY variable here.
9
+ # For example, to use nvm with brew, add the following line
10
+ # . "$(brew --prefix nvm)/nvm.sh" --no-use
11
+ export NODE_BINARY=$(command -v node)
@@ -0,0 +1,6 @@
1
+ #import <RCTAppDelegate.h>
2
+ #import <UIKit/UIKit.h>
3
+
4
+ @interface AppDelegate : RCTAppDelegate
5
+
6
+ @end
@@ -0,0 +1,31 @@
1
+ #import "AppDelegate.h"
2
+
3
+ #import <React/RCTBundleURLProvider.h>
4
+
5
+ @implementation AppDelegate
6
+
7
+ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
8
+ {
9
+ self.moduleName = @"HawcxExampleApp";
10
+ // You can add your custom initial props in the dictionary below.
11
+ // They will be passed down to the ViewController used by React Native.
12
+ self.initialProps = @{};
13
+
14
+ return [super application:application didFinishLaunchingWithOptions:launchOptions];
15
+ }
16
+
17
+ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18
+ {
19
+ return [self getBundleURL];
20
+ }
21
+
22
+ - (NSURL *)getBundleURL
23
+ {
24
+ #if DEBUG
25
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
26
+ #else
27
+ return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
28
+ #endif
29
+ }
30
+
31
+ @end
@@ -0,0 +1,53 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "idiom" : "iphone",
5
+ "scale" : "2x",
6
+ "size" : "20x20"
7
+ },
8
+ {
9
+ "idiom" : "iphone",
10
+ "scale" : "3x",
11
+ "size" : "20x20"
12
+ },
13
+ {
14
+ "idiom" : "iphone",
15
+ "scale" : "2x",
16
+ "size" : "29x29"
17
+ },
18
+ {
19
+ "idiom" : "iphone",
20
+ "scale" : "3x",
21
+ "size" : "29x29"
22
+ },
23
+ {
24
+ "idiom" : "iphone",
25
+ "scale" : "2x",
26
+ "size" : "40x40"
27
+ },
28
+ {
29
+ "idiom" : "iphone",
30
+ "scale" : "3x",
31
+ "size" : "40x40"
32
+ },
33
+ {
34
+ "idiom" : "iphone",
35
+ "scale" : "2x",
36
+ "size" : "60x60"
37
+ },
38
+ {
39
+ "idiom" : "iphone",
40
+ "scale" : "3x",
41
+ "size" : "60x60"
42
+ },
43
+ {
44
+ "idiom" : "ios-marketing",
45
+ "scale" : "1x",
46
+ "size" : "1024x1024"
47
+ }
48
+ ],
49
+ "info" : {
50
+ "author" : "xcode",
51
+ "version" : 1
52
+ }
53
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "info" : {
3
+ "version" : 1,
4
+ "author" : "xcode"
5
+ }
6
+ }
@@ -0,0 +1,55 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>en</string>
7
+ <key>CFBundleDisplayName</key>
8
+ <string>HawcxExampleApp</string>
9
+ <key>CFBundleExecutable</key>
10
+ <string>$(EXECUTABLE_NAME)</string>
11
+ <key>CFBundleIdentifier</key>
12
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13
+ <key>CFBundleInfoDictionaryVersion</key>
14
+ <string>6.0</string>
15
+ <key>CFBundleName</key>
16
+ <string>$(PRODUCT_NAME)</string>
17
+ <key>CFBundlePackageType</key>
18
+ <string>APPL</string>
19
+ <key>CFBundleShortVersionString</key>
20
+ <string>$(MARKETING_VERSION)</string>
21
+ <key>CFBundleSignature</key>
22
+ <string>????</string>
23
+ <key>CFBundleVersion</key>
24
+ <string>$(CURRENT_PROJECT_VERSION)</string>
25
+ <key>LSRequiresIPhoneOS</key>
26
+ <true/>
27
+ <key>NSAppTransportSecurity</key>
28
+ <dict>
29
+ <key>NSAllowsArbitraryLoads</key>
30
+ <false/>
31
+ <key>NSAllowsLocalNetworking</key>
32
+ <true/>
33
+ </dict>
34
+ <key>NSLocationWhenInUseUsageDescription</key>
35
+ <string>Location access lets us show where secure login requests originate.</string>
36
+ <key>UILaunchStoryboardName</key>
37
+ <string>LaunchScreen</string>
38
+ <key>UIRequiredDeviceCapabilities</key>
39
+ <array>
40
+ <string>armv7</string>
41
+ </array>
42
+ <key>UISupportedInterfaceOrientations</key>
43
+ <array>
44
+ <string>UIInterfaceOrientationPortrait</string>
45
+ </array>
46
+ <key>UISupportedInterfaceOrientations~ipad</key>
47
+ <array>
48
+ <string>UIInterfaceOrientationLandscapeLeft</string>
49
+ <string>UIInterfaceOrientationLandscapeRight</string>
50
+ <string>UIInterfaceOrientationPortrait</string>
51
+ </array>
52
+ <key>UIViewControllerBasedStatusBarAppearance</key>
53
+ <false/>
54
+ </dict>
55
+ </plist>