reactnative-plugin-appice 1.7.25 → 1.7.27

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 (106) hide show
  1. package/README.md +37 -37
  2. package/android/README.md +14 -14
  3. package/android/build.gradle +158 -158
  4. package/android/gitignore +47 -47
  5. package/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  6. package/android/gradlew +234 -234
  7. package/android/local.properties +8 -8
  8. package/android/src/main/AndroidManifest.xml +138 -164
  9. package/android/src/main/java/com/reactlibrary/AppICEUtils.java +274 -274
  10. package/android/src/main/java/com/reactlibrary/AppIceReactPluginModule.java +778 -778
  11. package/android/src/main/java/com/reactlibrary/AppIceReactPluginPackage.java +28 -28
  12. package/android/src/main/java/com/reactlibrary/CampaignCampsReceiver.java +56 -56
  13. package/android/src/main/java/com/reactlibrary/EnumConstants.java +282 -282
  14. package/android/src/main/java/com/reactlibrary/NotificationEventService.java +59 -59
  15. package/android/src/main/java/com/reactlibrary/StringConstants.java +24 -24
  16. package/campaign.js +25 -25
  17. package/example/App.js +332 -332
  18. package/example/Gemfile +6 -6
  19. package/example/PageA.tsx +15 -15
  20. package/example/__tests__/App-test.js +14 -14
  21. package/example/ancilliary.js +486 -486
  22. package/example/android/app/_BUCK +55 -55
  23. package/example/android/app/build.gradle +320 -320
  24. package/example/android/app/build_defs.bzl +19 -19
  25. package/example/android/app/proguard-rules.pro +10 -10
  26. package/example/android/app/src/debug/AndroidManifest.xml +13 -13
  27. package/example/android/app/src/debug/java/com/example/ReactNativeFlipper.java +73 -73
  28. package/example/android/app/src/main/AndroidManifest.xml +72 -72
  29. package/example/android/app/src/main/java/com/example/MainActivity.java +48 -48
  30. package/example/android/app/src/main/java/com/example/MainApplication.java +91 -91
  31. package/example/android/app/src/main/java/com/example/newarchitecture/MainApplicationReactNativeHost.java +116 -116
  32. package/example/android/app/src/main/java/com/example/newarchitecture/components/MainComponentsRegistry.java +36 -36
  33. package/example/android/app/src/main/java/com/example/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -48
  34. package/example/android/app/src/main/jni/Android.mk +48 -48
  35. package/example/android/app/src/main/jni/MainApplicationModuleProvider.cpp +24 -24
  36. package/example/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -16
  37. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -45
  38. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -38
  39. package/example/android/app/src/main/jni/MainComponentsRegistry.cpp +61 -61
  40. package/example/android/app/src/main/jni/MainComponentsRegistry.h +32 -32
  41. package/example/android/app/src/main/jni/OnLoad.cpp +11 -11
  42. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -36
  43. package/example/android/app/src/main/res/values/strings.xml +3 -3
  44. package/example/android/app/src/main/res/values/styles.xml +9 -9
  45. package/example/android/build.gradle +73 -73
  46. package/example/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  47. package/example/android/gradle.properties +40 -40
  48. package/example/android/gradlew +234 -234
  49. package/example/android/settings.gradle +11 -11
  50. package/example/app.json +3 -3
  51. package/example/babel.config.js +3 -3
  52. package/example/index.js +9 -9
  53. package/example/ios/Podfile +44 -44
  54. package/example/ios/Podfile.lock +561 -561
  55. package/example/ios/_xcode.env +11 -11
  56. package/example/ios/example/AppDelegate.h +8 -8
  57. package/example/ios/example/AppDelegate.mm +174 -174
  58. package/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json +53 -53
  59. package/example/ios/example/Images.xcassets/Contents.json +6 -6
  60. package/example/ios/example/Info.plist +62 -62
  61. package/example/ios/example/LaunchScreen.storyboard +47 -47
  62. package/example/ios/example/example.entitlements +8 -8
  63. package/example/ios/example/main.m +10 -10
  64. package/example/ios/example.xcodeproj/project.pbxproj +712 -712
  65. package/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme +88 -88
  66. package/example/ios/example.xcworkspace/contents.xcworkspacedata +10 -10
  67. package/example/ios/example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
  68. package/example/ios/exampleTests/Info.plist +24 -24
  69. package/example/ios/exampleTests/exampleTests.m +66 -66
  70. package/example/metro.config.js +17 -17
  71. package/example/package.json +36 -36
  72. package/example/yarn.lock +7176 -7176
  73. package/index.js +590 -590
  74. package/ios/AppICEReactEvent.h +23 -23
  75. package/ios/AppICEReactEvent.m +86 -86
  76. package/ios/AppIceReactPlugin.h +65 -65
  77. package/ios/AppIceReactPlugin.m +683 -683
  78. package/ios/AppIceReactPlugin.xcodeproj/project.pbxproj +364 -364
  79. package/ios/AppIceReactPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -4
  80. package/ios/AppIceReactPlugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
  81. package/ios/AppIceReactPlugin.xcodeproj/xcuserdata/Adi.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
  82. package/ios/AppIceReactPlugin.xcodeproj/xcuserdata/artherajesh.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
  83. package/ios/AppIceReactPlugin.xcworkspace/contents.xcworkspacedata +10 -10
  84. package/ios/AppIceReactPlugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
  85. package/ios/Podfile +10 -10
  86. package/ios/Podfile.lock +3 -3
  87. package/ios/Pods/Manifest.lock +3 -3
  88. package/ios/Pods/Pods.xcodeproj/project.pbxproj +395 -395
  89. package/ios/Pods/Pods.xcodeproj/xcuserdata/Adi.xcuserdatad/xcschemes/Pods-AppIceReactPlugin.xcscheme +58 -58
  90. package/ios/Pods/Pods.xcodeproj/xcuserdata/Adi.xcuserdatad/xcschemes/xcschememanagement.plist +18 -18
  91. package/ios/Pods/Pods.xcodeproj/xcuserdata/artherajesh.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
  92. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-Info.plist +26 -26
  93. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-acknowledgements.markdown +3 -3
  94. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-acknowledgements.plist +29 -29
  95. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-dummy.m +5 -5
  96. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-umbrella.h +16 -16
  97. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin.debug.xcconfig +6 -6
  98. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin.modulemap +6 -6
  99. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin.release.xcconfig +6 -6
  100. package/package.json +42 -42
  101. package/reactnative-plugin-appice.podspec +30 -30
  102. package/example/android/.gradle/7.3.3/checksums/checksums.lock +0 -0
  103. package/example/android/.gradle/7.3.3/fileChanges/last-build.bin +0 -0
  104. package/example/android/.gradle/7.3.3/fileHashes/fileHashes.lock +0 -0
  105. package/example/android/.gradle/7.3.3/gc.properties +0 -0
  106. package/example/android/.gradle/vcs-1/gc.properties +0 -0
@@ -1,88 +1,88 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Scheme
3
- LastUpgradeVersion = "1210"
4
- version = "1.3">
5
- <BuildAction
6
- parallelizeBuildables = "YES"
7
- buildImplicitDependencies = "YES">
8
- <BuildActionEntries>
9
- <BuildActionEntry
10
- buildForTesting = "YES"
11
- buildForRunning = "YES"
12
- buildForProfiling = "YES"
13
- buildForArchiving = "YES"
14
- buildForAnalyzing = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = "primary"
17
- BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
18
- BuildableName = "example.app"
19
- BlueprintName = "example"
20
- ReferencedContainer = "container:example.xcodeproj">
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- buildConfiguration = "Debug"
27
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
- shouldUseLaunchSchemeArgsEnv = "YES">
30
- <Testables>
31
- <TestableReference
32
- skipped = "NO">
33
- <BuildableReference
34
- BuildableIdentifier = "primary"
35
- BlueprintIdentifier = "00E356ED1AD99517003FC87E"
36
- BuildableName = "exampleTests.xctest"
37
- BlueprintName = "exampleTests"
38
- ReferencedContainer = "container:example.xcodeproj">
39
- </BuildableReference>
40
- </TestableReference>
41
- </Testables>
42
- </TestAction>
43
- <LaunchAction
44
- buildConfiguration = "Debug"
45
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
46
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
47
- launchStyle = "0"
48
- useCustomWorkingDirectory = "NO"
49
- ignoresPersistentStateOnLaunch = "NO"
50
- debugDocumentVersioning = "YES"
51
- debugServiceExtension = "internal"
52
- allowLocationSimulation = "YES">
53
- <BuildableProductRunnable
54
- runnableDebuggingMode = "0">
55
- <BuildableReference
56
- BuildableIdentifier = "primary"
57
- BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
58
- BuildableName = "example.app"
59
- BlueprintName = "example"
60
- ReferencedContainer = "container:example.xcodeproj">
61
- </BuildableReference>
62
- </BuildableProductRunnable>
63
- </LaunchAction>
64
- <ProfileAction
65
- buildConfiguration = "Release"
66
- shouldUseLaunchSchemeArgsEnv = "YES"
67
- savedToolIdentifier = ""
68
- useCustomWorkingDirectory = "NO"
69
- debugDocumentVersioning = "YES">
70
- <BuildableProductRunnable
71
- runnableDebuggingMode = "0">
72
- <BuildableReference
73
- BuildableIdentifier = "primary"
74
- BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
75
- BuildableName = "example.app"
76
- BlueprintName = "example"
77
- ReferencedContainer = "container:example.xcodeproj">
78
- </BuildableReference>
79
- </BuildableProductRunnable>
80
- </ProfileAction>
81
- <AnalyzeAction
82
- buildConfiguration = "Debug">
83
- </AnalyzeAction>
84
- <ArchiveAction
85
- buildConfiguration = "Release"
86
- revealArchiveInOrganizer = "YES">
87
- </ArchiveAction>
88
- </Scheme>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ LastUpgradeVersion = "1210"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "YES"
7
+ buildImplicitDependencies = "YES">
8
+ <BuildActionEntries>
9
+ <BuildActionEntry
10
+ buildForTesting = "YES"
11
+ buildForRunning = "YES"
12
+ buildForProfiling = "YES"
13
+ buildForArchiving = "YES"
14
+ buildForAnalyzing = "YES">
15
+ <BuildableReference
16
+ BuildableIdentifier = "primary"
17
+ BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
18
+ BuildableName = "example.app"
19
+ BlueprintName = "example"
20
+ ReferencedContainer = "container:example.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ </BuildActionEntries>
24
+ </BuildAction>
25
+ <TestAction
26
+ buildConfiguration = "Debug"
27
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
+ shouldUseLaunchSchemeArgsEnv = "YES">
30
+ <Testables>
31
+ <TestableReference
32
+ skipped = "NO">
33
+ <BuildableReference
34
+ BuildableIdentifier = "primary"
35
+ BlueprintIdentifier = "00E356ED1AD99517003FC87E"
36
+ BuildableName = "exampleTests.xctest"
37
+ BlueprintName = "exampleTests"
38
+ ReferencedContainer = "container:example.xcodeproj">
39
+ </BuildableReference>
40
+ </TestableReference>
41
+ </Testables>
42
+ </TestAction>
43
+ <LaunchAction
44
+ buildConfiguration = "Debug"
45
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
46
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
47
+ launchStyle = "0"
48
+ useCustomWorkingDirectory = "NO"
49
+ ignoresPersistentStateOnLaunch = "NO"
50
+ debugDocumentVersioning = "YES"
51
+ debugServiceExtension = "internal"
52
+ allowLocationSimulation = "YES">
53
+ <BuildableProductRunnable
54
+ runnableDebuggingMode = "0">
55
+ <BuildableReference
56
+ BuildableIdentifier = "primary"
57
+ BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
58
+ BuildableName = "example.app"
59
+ BlueprintName = "example"
60
+ ReferencedContainer = "container:example.xcodeproj">
61
+ </BuildableReference>
62
+ </BuildableProductRunnable>
63
+ </LaunchAction>
64
+ <ProfileAction
65
+ buildConfiguration = "Release"
66
+ shouldUseLaunchSchemeArgsEnv = "YES"
67
+ savedToolIdentifier = ""
68
+ useCustomWorkingDirectory = "NO"
69
+ debugDocumentVersioning = "YES">
70
+ <BuildableProductRunnable
71
+ runnableDebuggingMode = "0">
72
+ <BuildableReference
73
+ BuildableIdentifier = "primary"
74
+ BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
75
+ BuildableName = "example.app"
76
+ BlueprintName = "example"
77
+ ReferencedContainer = "container:example.xcodeproj">
78
+ </BuildableReference>
79
+ </BuildableProductRunnable>
80
+ </ProfileAction>
81
+ <AnalyzeAction
82
+ buildConfiguration = "Debug">
83
+ </AnalyzeAction>
84
+ <ArchiveAction
85
+ buildConfiguration = "Release"
86
+ revealArchiveInOrganizer = "YES">
87
+ </ArchiveAction>
88
+ </Scheme>
@@ -1,10 +1,10 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- <FileRef
5
- location = "group:example.xcodeproj">
6
- </FileRef>
7
- <FileRef
8
- location = "group:Pods/Pods.xcodeproj">
9
- </FileRef>
10
- </Workspace>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "group:example.xcodeproj">
6
+ </FileRef>
7
+ <FileRef
8
+ location = "group:Pods/Pods.xcodeproj">
9
+ </FileRef>
10
+ </Workspace>
@@ -1,8 +1,8 @@
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>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
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>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+ </dict>
8
+ </plist>
@@ -1,24 +1,24 @@
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>CFBundleExecutable</key>
8
- <string>$(EXECUTABLE_NAME)</string>
9
- <key>CFBundleIdentifier</key>
10
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
- <key>CFBundleInfoDictionaryVersion</key>
12
- <string>6.0</string>
13
- <key>CFBundleName</key>
14
- <string>$(PRODUCT_NAME)</string>
15
- <key>CFBundlePackageType</key>
16
- <string>BNDL</string>
17
- <key>CFBundleShortVersionString</key>
18
- <string>1.0</string>
19
- <key>CFBundleSignature</key>
20
- <string>????</string>
21
- <key>CFBundleVersion</key>
22
- <string>1</string>
23
- </dict>
24
- </plist>
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>CFBundleExecutable</key>
8
+ <string>$(EXECUTABLE_NAME)</string>
9
+ <key>CFBundleIdentifier</key>
10
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
+ <key>CFBundleInfoDictionaryVersion</key>
12
+ <string>6.0</string>
13
+ <key>CFBundleName</key>
14
+ <string>$(PRODUCT_NAME)</string>
15
+ <key>CFBundlePackageType</key>
16
+ <string>BNDL</string>
17
+ <key>CFBundleShortVersionString</key>
18
+ <string>1.0</string>
19
+ <key>CFBundleSignature</key>
20
+ <string>????</string>
21
+ <key>CFBundleVersion</key>
22
+ <string>1</string>
23
+ </dict>
24
+ </plist>
@@ -1,66 +1,66 @@
1
- #import <UIKit/UIKit.h>
2
- #import <XCTest/XCTest.h>
3
-
4
- #import <React/RCTLog.h>
5
- #import <React/RCTRootView.h>
6
-
7
- #define TIMEOUT_SECONDS 600
8
- #define TEXT_TO_LOOK_FOR @"Welcome to React"
9
-
10
- @interface exampleTests : XCTestCase
11
-
12
- @end
13
-
14
- @implementation exampleTests
15
-
16
- - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
17
- {
18
- if (test(view)) {
19
- return YES;
20
- }
21
- for (UIView *subview in [view subviews]) {
22
- if ([self findSubviewInView:subview matching:test]) {
23
- return YES;
24
- }
25
- }
26
- return NO;
27
- }
28
-
29
- - (void)testRendersWelcomeScreen
30
- {
31
- UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32
- NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33
- BOOL foundElement = NO;
34
-
35
- __block NSString *redboxError = nil;
36
- #ifdef DEBUG
37
- RCTSetLogFunction(
38
- ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39
- if (level >= RCTLogLevelError) {
40
- redboxError = message;
41
- }
42
- });
43
- #endif
44
-
45
- while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46
- [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47
- [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48
-
49
- foundElement = [self findSubviewInView:vc.view
50
- matching:^BOOL(UIView *view) {
51
- if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52
- return YES;
53
- }
54
- return NO;
55
- }];
56
- }
57
-
58
- #ifdef DEBUG
59
- RCTSetLogFunction(RCTDefaultLogFunction);
60
- #endif
61
-
62
- XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63
- XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64
- }
65
-
66
- @end
1
+ #import <UIKit/UIKit.h>
2
+ #import <XCTest/XCTest.h>
3
+
4
+ #import <React/RCTLog.h>
5
+ #import <React/RCTRootView.h>
6
+
7
+ #define TIMEOUT_SECONDS 600
8
+ #define TEXT_TO_LOOK_FOR @"Welcome to React"
9
+
10
+ @interface exampleTests : XCTestCase
11
+
12
+ @end
13
+
14
+ @implementation exampleTests
15
+
16
+ - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
17
+ {
18
+ if (test(view)) {
19
+ return YES;
20
+ }
21
+ for (UIView *subview in [view subviews]) {
22
+ if ([self findSubviewInView:subview matching:test]) {
23
+ return YES;
24
+ }
25
+ }
26
+ return NO;
27
+ }
28
+
29
+ - (void)testRendersWelcomeScreen
30
+ {
31
+ UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32
+ NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33
+ BOOL foundElement = NO;
34
+
35
+ __block NSString *redboxError = nil;
36
+ #ifdef DEBUG
37
+ RCTSetLogFunction(
38
+ ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39
+ if (level >= RCTLogLevelError) {
40
+ redboxError = message;
41
+ }
42
+ });
43
+ #endif
44
+
45
+ while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46
+ [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47
+ [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48
+
49
+ foundElement = [self findSubviewInView:vc.view
50
+ matching:^BOOL(UIView *view) {
51
+ if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52
+ return YES;
53
+ }
54
+ return NO;
55
+ }];
56
+ }
57
+
58
+ #ifdef DEBUG
59
+ RCTSetLogFunction(RCTDefaultLogFunction);
60
+ #endif
61
+
62
+ XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63
+ XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64
+ }
65
+
66
+ @end
@@ -1,17 +1,17 @@
1
- /**
2
- * Metro configuration for React Native
3
- * https://github.com/facebook/react-native
4
- *
5
- * @format
6
- */
7
-
8
- module.exports = {
9
- transformer: {
10
- getTransformOptions: async () => ({
11
- transform: {
12
- experimentalImportSupport: false,
13
- inlineRequires: true,
14
- },
15
- }),
16
- },
17
- };
1
+ /**
2
+ * Metro configuration for React Native
3
+ * https://github.com/facebook/react-native
4
+ *
5
+ * @format
6
+ */
7
+
8
+ module.exports = {
9
+ transformer: {
10
+ getTransformOptions: async () => ({
11
+ transform: {
12
+ experimentalImportSupport: false,
13
+ inlineRequires: true,
14
+ },
15
+ }),
16
+ },
17
+ };
@@ -1,36 +1,36 @@
1
- {
2
- "name": "example",
3
- "version": "0.0.1",
4
- "private": true,
5
- "scripts": {
6
- "android": "react-native run-android",
7
- "ios": "react-native run-ios",
8
- "start": "react-native start",
9
- "test": "jest",
10
- "lint": "eslint ."
11
- },
12
- "dependencies": {
13
- "@react-native-async-storage/async-storage": "^1.23.1",
14
- "@react-native-firebase/app": "^15.3.0",
15
- "@react-native-firebase/messaging": "^15.3.0",
16
- "@react-navigation/native-stack": "^6.7.0",
17
- "install": "^0.13.0",
18
- "react": "18.0.0",
19
- "react-native": "0.69.4",
20
- "reactnative-plugin-appice": "1.7.25",
21
- "react-native-mmkv": "2.12.2"
22
- },
23
- "devDependencies": {
24
- "@babel/core": "^7.12.9",
25
- "@babel/runtime": "^7.12.5",
26
- "@react-native-community/eslint-config": "^2.0.0",
27
- "babel-jest": "^26.6.3",
28
- "eslint": "^7.32.0",
29
- "jest": "^26.6.3",
30
- "metro-react-native-babel-preset": "^0.70.3",
31
- "react-test-renderer": "18.0.0"
32
- },
33
- "jest": {
34
- "preset": "react-native"
35
- }
36
- }
1
+ {
2
+ "name": "example",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "scripts": {
6
+ "android": "react-native run-android",
7
+ "ios": "react-native run-ios",
8
+ "start": "react-native start",
9
+ "test": "jest",
10
+ "lint": "eslint ."
11
+ },
12
+ "dependencies": {
13
+ "@react-native-async-storage/async-storage": "^1.23.1",
14
+ "@react-native-firebase/app": "^15.3.0",
15
+ "@react-native-firebase/messaging": "^15.3.0",
16
+ "@react-navigation/native-stack": "^6.7.0",
17
+ "install": "^0.13.0",
18
+ "react": "18.0.0",
19
+ "react-native": "0.69.4",
20
+ "reactnative-plugin-appice": "1.7.25",
21
+ "react-native-mmkv": "2.12.2"
22
+ },
23
+ "devDependencies": {
24
+ "@babel/core": "^7.12.9",
25
+ "@babel/runtime": "^7.12.5",
26
+ "@react-native-community/eslint-config": "^2.0.0",
27
+ "babel-jest": "^26.6.3",
28
+ "eslint": "^7.32.0",
29
+ "jest": "^26.6.3",
30
+ "metro-react-native-babel-preset": "^0.70.3",
31
+ "react-test-renderer": "18.0.0"
32
+ },
33
+ "jest": {
34
+ "preset": "react-native"
35
+ }
36
+ }