@hawcx/react-native-sdk 1.0.8 → 1.1.0
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 +3 -0
- package/HawcxReactNative.podspec +2 -2
- package/README.md +327 -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_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/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/_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
|
Binary file
|
package/example/ios/HawcxExampleApp.xcodeproj/xcshareddata/xcschemes/HawcxExampleApp.xcscheme
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<Scheme
|
|
3
|
-
LastUpgradeVersion = "2600"
|
|
4
|
-
version = "1.7">
|
|
5
|
-
<BuildAction
|
|
6
|
-
parallelizeBuildables = "YES"
|
|
7
|
-
buildImplicitDependencies = "YES"
|
|
8
|
-
buildArchitectures = "Automatic">
|
|
9
|
-
<BuildActionEntries>
|
|
10
|
-
<BuildActionEntry
|
|
11
|
-
buildForTesting = "YES"
|
|
12
|
-
buildForRunning = "YES"
|
|
13
|
-
buildForProfiling = "YES"
|
|
14
|
-
buildForArchiving = "YES"
|
|
15
|
-
buildForAnalyzing = "YES">
|
|
16
|
-
<BuildableReference
|
|
17
|
-
BuildableIdentifier = "primary"
|
|
18
|
-
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
|
19
|
-
BuildableName = "HawcxExampleApp.app"
|
|
20
|
-
BlueprintName = "HawcxExampleApp"
|
|
21
|
-
ReferencedContainer = "container:HawcxExampleApp.xcodeproj">
|
|
22
|
-
</BuildableReference>
|
|
23
|
-
</BuildActionEntry>
|
|
24
|
-
</BuildActionEntries>
|
|
25
|
-
</BuildAction>
|
|
26
|
-
<TestAction
|
|
27
|
-
buildConfiguration = "Debug"
|
|
28
|
-
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
29
|
-
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
30
|
-
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
31
|
-
shouldAutocreateTestPlan = "YES">
|
|
32
|
-
<Testables>
|
|
33
|
-
<TestableReference
|
|
34
|
-
skipped = "NO">
|
|
35
|
-
<BuildableReference
|
|
36
|
-
BuildableIdentifier = "primary"
|
|
37
|
-
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
|
38
|
-
BuildableName = "HawcxExampleAppTests.xctest"
|
|
39
|
-
BlueprintName = "HawcxExampleAppTests"
|
|
40
|
-
ReferencedContainer = "container:HawcxExampleApp.xcodeproj">
|
|
41
|
-
</BuildableReference>
|
|
42
|
-
</TestableReference>
|
|
43
|
-
</Testables>
|
|
44
|
-
</TestAction>
|
|
45
|
-
<LaunchAction
|
|
46
|
-
buildConfiguration = "Debug"
|
|
47
|
-
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
48
|
-
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
49
|
-
launchStyle = "0"
|
|
50
|
-
useCustomWorkingDirectory = "NO"
|
|
51
|
-
ignoresPersistentStateOnLaunch = "NO"
|
|
52
|
-
debugDocumentVersioning = "YES"
|
|
53
|
-
debugServiceExtension = "internal"
|
|
54
|
-
allowLocationSimulation = "YES">
|
|
55
|
-
<BuildableProductRunnable
|
|
56
|
-
runnableDebuggingMode = "0">
|
|
57
|
-
<BuildableReference
|
|
58
|
-
BuildableIdentifier = "primary"
|
|
59
|
-
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
|
60
|
-
BuildableName = "HawcxExampleApp.app"
|
|
61
|
-
BlueprintName = "HawcxExampleApp"
|
|
62
|
-
ReferencedContainer = "container:HawcxExampleApp.xcodeproj">
|
|
63
|
-
</BuildableReference>
|
|
64
|
-
</BuildableProductRunnable>
|
|
65
|
-
</LaunchAction>
|
|
66
|
-
<ProfileAction
|
|
67
|
-
buildConfiguration = "Release"
|
|
68
|
-
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
69
|
-
savedToolIdentifier = ""
|
|
70
|
-
useCustomWorkingDirectory = "NO"
|
|
71
|
-
debugDocumentVersioning = "YES">
|
|
72
|
-
<BuildableProductRunnable
|
|
73
|
-
runnableDebuggingMode = "0">
|
|
74
|
-
<BuildableReference
|
|
75
|
-
BuildableIdentifier = "primary"
|
|
76
|
-
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
|
77
|
-
BuildableName = "HawcxExampleApp.app"
|
|
78
|
-
BlueprintName = "HawcxExampleApp"
|
|
79
|
-
ReferencedContainer = "container:HawcxExampleApp.xcodeproj">
|
|
80
|
-
</BuildableReference>
|
|
81
|
-
</BuildableProductRunnable>
|
|
82
|
-
</ProfileAction>
|
|
83
|
-
<AnalyzeAction
|
|
84
|
-
buildConfiguration = "Debug">
|
|
85
|
-
</AnalyzeAction>
|
|
86
|
-
<ArchiveAction
|
|
87
|
-
buildConfiguration = "Release"
|
|
88
|
-
revealArchiveInOrganizer = "YES">
|
|
89
|
-
</ArchiveAction>
|
|
90
|
-
</Scheme>
|
|
@@ -1,16 +0,0 @@
|
|
|
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>SchemeUserState</key>
|
|
6
|
-
<dict>
|
|
7
|
-
<key>HawcxExampleApp.xcscheme_^#shared#^_</key>
|
|
8
|
-
<dict>
|
|
9
|
-
<key>orderHint</key>
|
|
10
|
-
<integer>0</integer>
|
|
11
|
-
</dict>
|
|
12
|
-
</dict>
|
|
13
|
-
<key>SuppressBuildableAutocreation</key>
|
|
14
|
-
<dict/>
|
|
15
|
-
</dict>
|
|
16
|
-
</plist>
|
|
@@ -1,66 +0,0 @@
|
|
|
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 HawcxExampleAppTests : XCTestCase
|
|
11
|
-
|
|
12
|
-
@end
|
|
13
|
-
|
|
14
|
-
@implementation HawcxExampleAppTests
|
|
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,24 +0,0 @@
|
|
|
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>
|
package/example/ios/Podfile
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Resolve react_native_pods.rb with node to allow for hoisting
|
|
2
|
-
require Pod::Executable.execute_command('node', ['-p',
|
|
3
|
-
'require.resolve(
|
|
4
|
-
"react-native/scripts/react_native_pods.rb",
|
|
5
|
-
{paths: [process.argv[1]]},
|
|
6
|
-
)', __dir__]).strip
|
|
7
|
-
require 'fileutils'
|
|
8
|
-
require 'pathname'
|
|
9
|
-
require 'tmpdir'
|
|
10
|
-
|
|
11
|
-
platform :ios, '17.5'
|
|
12
|
-
prepare_react_native_project!
|
|
13
|
-
|
|
14
|
-
pre_install do |_installer|
|
|
15
|
-
local_xcframework = File.expand_path('../../ios/Frameworks/HawcxFramework.xcframework', __dir__)
|
|
16
|
-
pod_xcframework = File.expand_path('../node_modules/@hawcx/react-native-sdk/ios/Frameworks/HawcxFramework.xcframework', __dir__)
|
|
17
|
-
|
|
18
|
-
unless File.exist?(local_xcframework)
|
|
19
|
-
Pod::UI.warn "Local HawcxFramework not found at #{local_xcframework}; using packaged release."
|
|
20
|
-
next
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
Pod::UI.puts "🔄 Syncing local HawcxFramework.xcframework into node_modules copy"
|
|
24
|
-
temp_dir = Dir.mktmpdir('hawcx-framework-copy')
|
|
25
|
-
temp_framework = File.join(temp_dir, 'HawcxFramework.xcframework')
|
|
26
|
-
|
|
27
|
-
FileUtils.cp_r(Pathname.new(local_xcframework).realpath.to_s, temp_framework)
|
|
28
|
-
FileUtils.rm_rf(pod_xcframework)
|
|
29
|
-
FileUtils.mkdir_p(File.dirname(pod_xcframework))
|
|
30
|
-
FileUtils.cp_r(temp_framework, pod_xcframework)
|
|
31
|
-
ensure
|
|
32
|
-
FileUtils.rm_rf(temp_dir) if defined?(temp_dir) && temp_dir && Dir.exist?(temp_dir)
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
|
|
36
|
-
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
|
|
37
|
-
#
|
|
38
|
-
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
|
|
39
|
-
# ```js
|
|
40
|
-
# module.exports = {
|
|
41
|
-
# dependencies: {
|
|
42
|
-
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
|
|
43
|
-
# ```
|
|
44
|
-
flipper_config = FlipperConfiguration.disabled
|
|
45
|
-
|
|
46
|
-
linkage = ENV['USE_FRAMEWORKS']
|
|
47
|
-
if linkage != nil
|
|
48
|
-
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
|
|
49
|
-
use_frameworks! :linkage => linkage.to_sym
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
target 'HawcxExampleApp' do
|
|
53
|
-
config = use_native_modules!
|
|
54
|
-
|
|
55
|
-
use_react_native!(
|
|
56
|
-
:path => config[:reactNativePath],
|
|
57
|
-
# Enables Flipper.
|
|
58
|
-
#
|
|
59
|
-
# Note that if you have use_frameworks! enabled, Flipper will not work and
|
|
60
|
-
# you should disable the next line.
|
|
61
|
-
:flipper_configuration => flipper_config,
|
|
62
|
-
# An absolute path to your application root.
|
|
63
|
-
:app_path => "#{Pod::Config.instance.installation_root}/.."
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
target 'HawcxExampleAppTests' do
|
|
67
|
-
inherit! :complete
|
|
68
|
-
# Pods for testing
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
post_install do |installer|
|
|
72
|
-
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
|
|
73
|
-
react_native_post_install(
|
|
74
|
-
installer,
|
|
75
|
-
config[:reactNativePath],
|
|
76
|
-
:mac_catalyst_enabled => false
|
|
77
|
-
)
|
|
78
|
-
end
|
|
79
|
-
end
|