From 884a31df3756998d995fdd98f3f6671cdf6d353e Mon Sep 17 00:00:00 2001 From: Sergei Kamakov Date: Fri, 29 Aug 2025 18:30:33 +0300 Subject: [PATCH 1/3] Integrate ios sdk SPM library 4.0.0 + Update android sdk to 3.9.1 --- CHANGELOG.md | 1 + android/build.gradle | 2 +- .../msdkreactnative/MsdkReactNativeModule.kt | 30 +-- .../project.pbxproj | 203 +++++++----------- .../xcschemes/MsdkReactNativeExample.xcscheme | 12 -- example/ios/MsdkReactNativeExample/Info.plist | 3 +- .../MsdkReactNativeExampleTests/Info.plist | 24 --- .../MsdkReactNativeExampleTests.m | 66 ------ example/ios/Podfile | 8 +- example/node_modules | 0 example/package.json | 13 +- example/src/App.tsx | 22 +- ios/Models/PluginAdditionalField.swift | 2 +- ios/Models/PluginPaymentInfo.swift | 2 +- ios/Models/PluginPaymentOptions.swift | 13 +- ios/Models/PluginRecipientInfo.swift | 2 +- ios/Models/PluginRecurrentData.swift | 14 +- ios/Models/PluginResult.swift | 2 +- ios/MsdkReactNative.mm | 1 - ios/MsdkReactNative.swift | 4 +- msdk-react-native.podspec | 13 +- package.json | 35 ++- 22 files changed, 163 insertions(+), 309 deletions(-) delete mode 100644 example/ios/MsdkReactNativeExampleTests/Info.plist delete mode 100644 example/ios/MsdkReactNativeExampleTests/MsdkReactNativeExampleTests.m mode change 120000 => 100644 example/node_modules diff --git a/CHANGELOG.md b/CHANGELOG.md index 5898314..aa431ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ ## [0.2.0] Initial release with working Android and iOS examples ## [0.2.1] Update internal SDK libraries to android 3.8.8 and iOS 3.8.5 ## [0.2.2] Update internal SDK libraries to android 3.8.9 and iOS 3.8.8. Upgrade React Native version +## [0.3.0] Update internal SDK libraries to android 3.9.1 and iOS 4.0.0. Change ios integration to SPM diff --git a/android/build.gradle b/android/build.gradle index 36efefd..6aed97e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -96,7 +96,7 @@ def kotlin_version = getExtOrDefault("kotlinVersion") dependencies { coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.3") - implementation "com.ecommpay:msdk-ui:3.8.9" + implementation "com.ecommpay:msdk-ui:3.9.1" implementation "com.facebook.react:react-native:+" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" diff --git a/android/src/main/java/com/msdkreactnative/MsdkReactNativeModule.kt b/android/src/main/java/com/msdkreactnative/MsdkReactNativeModule.kt index 2abf4ff..69657e8 100644 --- a/android/src/main/java/com/msdkreactnative/MsdkReactNativeModule.kt +++ b/android/src/main/java/com/msdkreactnative/MsdkReactNativeModule.kt @@ -6,7 +6,7 @@ import android.util.Log import com.ecommpay.msdk.ui.EcmpActionType import com.ecommpay.msdk.ui.EcmpAdditionalField import com.ecommpay.msdk.ui.EcmpPaymentOptions -import com.ecommpay.msdk.ui.EcmpPaymentSDK +import com.ecommpay.msdk.ui.Ecommpay import com.ecommpay.msdk.ui.EcmpScreenDisplayMode import com.facebook.react.bridge.ActivityEventListener import com.facebook.react.bridge.Arguments @@ -40,7 +40,7 @@ class MsdkReactNativeModule(reactContext: ReactApplicationContext) : params: ReadableMap, promise: Promise, ) { - val currentActivity = currentActivity ?: return + val currentActivity = reactApplicationContext.currentActivity ?: return val ecmpPaymentInfo = params.getMap("paymentInfo")?.let { it.buildPaymentInfo() } @@ -84,18 +84,22 @@ class MsdkReactNativeModule(reactContext: ReactApplicationContext) : isTestEnvironment = params.safeGetBoolean("googleIsTestEnvironment") // Brand customization - params.getString("brandColor")?.let { colorString -> - brandColor = colorString + params.getString("primaryBrandColor")?.let { colorString -> + primaryBrandColor = colorString + } + + params.getString("secondaryBrandColor")?.let { colorString -> + secondaryBrandColor = colorString } // Stored card type storedCardType = params.safeGetInt("storedCardType") } - val mockMode = EcmpPaymentSDK.EcmpMockModeType.entries[params.getInt("mockModeType")] + val mockMode = Ecommpay.EcmpMockModeType.entries[params.getInt("mockModeType")] // Initialize SDK and open payment form - val sdk = EcmpPaymentSDK(currentActivity.applicationContext, paymentOptions, mockMode) + val sdk = Ecommpay(currentActivity.applicationContext, paymentOptions, mockMode) paymentPromise = promise @@ -121,23 +125,23 @@ class MsdkReactNativeModule(reactContext: ReactApplicationContext) : } override fun onActivityResult( - activity: Activity?, + activity: Activity, requestCode: Int, resultCode: Int, data: Intent?, ) { when (resultCode) { - EcmpPaymentSDK.RESULT_SUCCESS -> { - val paymentJson = data?.getStringExtra(EcmpPaymentSDK.EXTRA_PAYMENT) + Ecommpay.RESULT_SUCCESS -> { + val paymentJson = data?.getStringExtra(Ecommpay.EXTRA_PAYMENT) val resultMap = Arguments.createMap() resultMap.putString("paymentJson", paymentJson) resultMap.putInt("resultCode", resultCode) paymentPromise?.resolve(resultMap) } - EcmpPaymentSDK.RESULT_ERROR -> { - val errorCode = data?.getStringExtra(EcmpPaymentSDK.EXTRA_ERROR_CODE) - val errorMessage = data?.getStringExtra(EcmpPaymentSDK.EXTRA_ERROR_MESSAGE) + Ecommpay.RESULT_ERROR -> { + val errorCode = data?.getStringExtra(Ecommpay.EXTRA_ERROR_CODE) + val errorMessage = data?.getStringExtra(Ecommpay.EXTRA_ERROR_MESSAGE) val resultMap = Arguments.createMap() resultMap.putString("errorCode", errorCode) resultMap.putString("errorMessage", errorMessage) @@ -151,6 +155,6 @@ class MsdkReactNativeModule(reactContext: ReactApplicationContext) : paymentPromise = null } - override fun onNewIntent(data: Intent?) {} + override fun onNewIntent(data: Intent) {} } diff --git a/example/ios/MsdkReactNativeExample.xcodeproj/project.pbxproj b/example/ios/MsdkReactNativeExample.xcodeproj/project.pbxproj index 41619ad..bcec418 100644 --- a/example/ios/MsdkReactNativeExample.xcodeproj/project.pbxproj +++ b/example/ios/MsdkReactNativeExample.xcodeproj/project.pbxproj @@ -7,17 +7,15 @@ objects = { /* Begin PBXBuildFile section */ - 0C80B921A6F3F58F76C31292 /* libPods-MsdkReactNativeExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-MsdkReactNativeExample.a */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; + 9994C017EB0EF86A8D2DD962 /* Pods_MsdkReactNativeExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C636C9F10A3C259045F42AB /* Pods_MsdkReactNativeExample.framework */; }; ED315D7B9A26DFB8535D6560 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 044B26A852C377199855C725 /* PrivacyInfo.xcprivacy */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* MsdkReactNativeExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MsdkReactNativeExampleTests.m; sourceTree = ""; }; 044B26A852C377199855C725 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = MsdkReactNativeExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* MsdkReactNativeExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MsdkReactNativeExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = MsdkReactNativeExample/AppDelegate.h; sourceTree = ""; }; @@ -26,13 +24,10 @@ 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = MsdkReactNativeExample/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = MsdkReactNativeExample/main.m; sourceTree = ""; }; 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = MsdkReactNativeExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-MsdkReactNativeExample-MsdkReactNativeExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MsdkReactNativeExample-MsdkReactNativeExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3B4392A12AC88292D35C810B /* Pods-MsdkReactNativeExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MsdkReactNativeExample.debug.xcconfig"; path = "Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample.debug.xcconfig"; sourceTree = ""; }; - 5709B34CF0A7D63546082F79 /* Pods-MsdkReactNativeExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MsdkReactNativeExample.release.xcconfig"; path = "Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample.release.xcconfig"; sourceTree = ""; }; - 5B7EB9410499542E8C5724F5 /* Pods-MsdkReactNativeExample-MsdkReactNativeExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MsdkReactNativeExample-MsdkReactNativeExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-MsdkReactNativeExample-MsdkReactNativeExampleTests/Pods-MsdkReactNativeExample-MsdkReactNativeExampleTests.debug.xcconfig"; sourceTree = ""; }; - 5DCACB8F33CDC322A6C60F78 /* libPods-MsdkReactNativeExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MsdkReactNativeExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 26EBB139B5DD09E24500DC9B /* Pods-MsdkReactNativeExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MsdkReactNativeExample.release.xcconfig"; path = "Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample.release.xcconfig"; sourceTree = ""; }; + 4BCF33B8B6FD87581F6E9AF7 /* Pods-MsdkReactNativeExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MsdkReactNativeExample.debug.xcconfig"; path = "Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample.debug.xcconfig"; sourceTree = ""; }; + 5C636C9F10A3C259045F42AB /* Pods_MsdkReactNativeExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MsdkReactNativeExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = MsdkReactNativeExample/LaunchScreen.storyboard; sourceTree = ""; }; - 89C6BE57DB24E9ADA2F236DE /* Pods-MsdkReactNativeExample-MsdkReactNativeExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MsdkReactNativeExample-MsdkReactNativeExampleTests.release.xcconfig"; path = "Target Support Files/Pods-MsdkReactNativeExample-MsdkReactNativeExampleTests/Pods-MsdkReactNativeExample-MsdkReactNativeExampleTests.release.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -41,30 +36,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0C80B921A6F3F58F76C31292 /* libPods-MsdkReactNativeExample.a in Frameworks */, + 9994C017EB0EF86A8D2DD962 /* Pods_MsdkReactNativeExample.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 00E356EF1AD99517003FC87E /* MsdkReactNativeExampleTests */ = { - isa = PBXGroup; - children = ( - 00E356F21AD99517003FC87E /* MsdkReactNativeExampleTests.m */, - 00E356F01AD99517003FC87E /* Supporting Files */, - ); - path = MsdkReactNativeExampleTests; - sourceTree = ""; - }; - 00E356F01AD99517003FC87E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 00E356F11AD99517003FC87E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; 13B07FAE1A68108700A75B9A /* MsdkReactNativeExample */ = { isa = PBXGroup; children = ( @@ -84,8 +62,7 @@ isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 5DCACB8F33CDC322A6C60F78 /* libPods-MsdkReactNativeExample.a */, - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-MsdkReactNativeExample-MsdkReactNativeExampleTests.a */, + 5C636C9F10A3C259045F42AB /* Pods_MsdkReactNativeExample.framework */, ); name = Frameworks; sourceTree = ""; @@ -102,7 +79,6 @@ children = ( 13B07FAE1A68108700A75B9A /* MsdkReactNativeExample */, 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* MsdkReactNativeExampleTests */, 83CBBA001A601CBA00E9B192 /* Products */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, BBD78D7AC51CEA395F1C20DB /* Pods */, @@ -123,10 +99,8 @@ BBD78D7AC51CEA395F1C20DB /* Pods */ = { isa = PBXGroup; children = ( - 3B4392A12AC88292D35C810B /* Pods-MsdkReactNativeExample.debug.xcconfig */, - 5709B34CF0A7D63546082F79 /* Pods-MsdkReactNativeExample.release.xcconfig */, - 5B7EB9410499542E8C5724F5 /* Pods-MsdkReactNativeExample-MsdkReactNativeExampleTests.debug.xcconfig */, - 89C6BE57DB24E9ADA2F236DE /* Pods-MsdkReactNativeExample-MsdkReactNativeExampleTests.release.xcconfig */, + 4BCF33B8B6FD87581F6E9AF7 /* Pods-MsdkReactNativeExample.debug.xcconfig */, + 26EBB139B5DD09E24500DC9B /* Pods-MsdkReactNativeExample.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -138,13 +112,13 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "MsdkReactNativeExample" */; buildPhases = ( - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, + 5C1CE7A8E2A20B4F2C5B1A67 /* [CP] Check Pods Manifest.lock */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, + 32529AD95C3AB22285F336DF /* [CP] Embed Pods Frameworks */, + 1A2A16519FE71ACE5119B434 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -216,7 +190,24 @@ shellPath = /bin/sh; shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; }; - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { + 1A2A16519FE71ACE5119B434 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 32529AD95C3AB22285F336DF /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -233,7 +224,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { + 5C1CE7A8E2A20B4F2C5B1A67 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -255,23 +246,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -289,7 +263,7 @@ /* Begin XCBuildConfiguration section */ 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-MsdkReactNativeExample.debug.xcconfig */; + baseConfigurationReference = 4BCF33B8B6FD87581F6E9AF7 /* Pods-MsdkReactNativeExample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -301,47 +275,14 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - OTHER_CFLAGS = ( - "$(inherited)", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/DoubleConversion/DoubleConversion.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTDeprecation/RCTDeprecation.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTFabric/React-RCTFabric.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTRuntime/React-RCTRuntime.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTTypeSafety/RCTTypeSafety.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React/React-Core.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/ReactAppDependencyProvider/ReactAppDependencyProvider.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/ReactCodegen/ReactCodegen.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/ReactCommon/ReactCommon.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_Fabric/React-Fabric.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_FabricComponents/React-FabricComponents.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_NativeModulesApple/React-NativeModulesApple.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_RCTAppDelegate/React-RCTAppDelegate.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/folly/RCT-Folly.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/glog/glog.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/jsi/React-jsi.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/jsinspector_modern/React-jsinspector.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/jsinspector_modern_tracing/React-jsinspectortracing.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_debug/React-debug.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_featureflags/React-featureflags.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_nativemodule_defaults/React-defaultsnativemodule.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_nativemodule_dom/React-domnativemodule.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_nativemodule_featureflags/React-featureflagsnativemodule.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_nativemodule_idlecallbacks/React-idlecallbacksnativemodule.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_nativemodule_microtasks/React-microtasksnativemodule.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_css/React-renderercss.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_debug/React-rendererdebug.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_graphics/React-graphics.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_imagemanager/React-ImageManager.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_runtime/React-jsitooling.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_utils/React-utils.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/reacthermes/React-hermes.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/yoga/Yoga.modulemap\"", - ); + OTHER_CFLAGS = "$(inherited)"; + "OTHER_CFLAGS[arch=*]" = "$(inherited)"; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", "-lc++", ); + OTHER_SWIFT_FLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = msdkreactnative.example; PRODUCT_NAME = MsdkReactNativeExample; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -352,7 +293,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-MsdkReactNativeExample.release.xcconfig */; + baseConfigurationReference = 26EBB139B5DD09E24500DC9B /* Pods-MsdkReactNativeExample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -365,39 +306,6 @@ MARKETING_VERSION = 1.0; OTHER_CFLAGS = ( "$(inherited)", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/DoubleConversion/DoubleConversion.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTDeprecation/RCTDeprecation.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTFabric/React-RCTFabric.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTRuntime/React-RCTRuntime.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/RCTTypeSafety/RCTTypeSafety.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React/React-Core.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/ReactAppDependencyProvider/ReactAppDependencyProvider.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/ReactCodegen/ReactCodegen.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/ReactCommon/ReactCommon.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_Fabric/React-Fabric.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_FabricComponents/React-FabricComponents.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_NativeModulesApple/React-NativeModulesApple.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/React_RCTAppDelegate/React-RCTAppDelegate.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/folly/RCT-Folly.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/glog/glog.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/jsi/React-jsi.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/jsinspector_modern/React-jsinspector.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/jsinspector_modern_tracing/React-jsinspectortracing.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_debug/React-debug.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_featureflags/React-featureflags.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_nativemodule_defaults/React-defaultsnativemodule.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_nativemodule_dom/React-domnativemodule.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_nativemodule_featureflags/React-featureflagsnativemodule.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_nativemodule_idlecallbacks/React-idlecallbacksnativemodule.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_nativemodule_microtasks/React-microtasksnativemodule.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_css/React-renderercss.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_debug/React-rendererdebug.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_graphics/React-graphics.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_renderer_imagemanager/React-ImageManager.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_runtime/React-jsitooling.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/react_utils/React-utils.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/reacthermes/React-hermes.modulemap\"", - "-fmodule-map-file=\"${PODS_ROOT}/Headers/Public/yoga/Yoga.modulemap\"", "-DNDEBUG", ); OTHER_LDFLAGS = ( @@ -405,6 +313,7 @@ "-ObjC", "-lc++", ); + OTHER_SWIFT_FLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = msdkreactnative.example; PRODUCT_NAME = MsdkReactNativeExample; SWIFT_VERSION = 5.0; @@ -463,6 +372,19 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", + "${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", + ); IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD = ""; LDPLUSPLUS = ""; @@ -485,8 +407,11 @@ "-DFOLLY_CFG_NO_COROUTINES=1", "-DFOLLY_HAVE_CLOCK_GETTIME=1", ); - OTHER_LDFLAGS = "$(inherited) "; - REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; + OTHER_LDFLAGS = ( + "$(inherited)", + " ", + ); + REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native"; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; USE_HERMES = true; @@ -537,6 +462,19 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", + "${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", + ); IPHONEOS_DEPLOYMENT_TARGET = 13.4; LD = ""; LDPLUSPLUS = ""; @@ -558,8 +496,11 @@ "-DFOLLY_CFG_NO_COROUTINES=1", "-DFOLLY_HAVE_CLOCK_GETTIME=1", ); - OTHER_LDFLAGS = "$(inherited) "; - REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; + OTHER_LDFLAGS = ( + "$(inherited)", + " ", + ); + REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; VALIDATE_PRODUCT = YES; diff --git a/example/ios/MsdkReactNativeExample.xcodeproj/xcshareddata/xcschemes/MsdkReactNativeExample.xcscheme b/example/ios/MsdkReactNativeExample.xcodeproj/xcshareddata/xcschemes/MsdkReactNativeExample.xcscheme index 9dcf26e..9a3ae20 100644 --- a/example/ios/MsdkReactNativeExample.xcodeproj/xcshareddata/xcschemes/MsdkReactNativeExample.xcscheme +++ b/example/ios/MsdkReactNativeExample.xcodeproj/xcshareddata/xcschemes/MsdkReactNativeExample.xcscheme @@ -27,18 +27,6 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - - - NSAppTransportSecurity - NSAllowsArbitraryLoads NSAllowsLocalNetworking @@ -34,6 +33,8 @@ NSLocationWhenInUseUsageDescription + RCTNewArchEnabled + UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities diff --git a/example/ios/MsdkReactNativeExampleTests/Info.plist b/example/ios/MsdkReactNativeExampleTests/Info.plist deleted file mode 100644 index ba72822..0000000 --- a/example/ios/MsdkReactNativeExampleTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/example/ios/MsdkReactNativeExampleTests/MsdkReactNativeExampleTests.m b/example/ios/MsdkReactNativeExampleTests/MsdkReactNativeExampleTests.m deleted file mode 100644 index 70ef8d3..0000000 --- a/example/ios/MsdkReactNativeExampleTests/MsdkReactNativeExampleTests.m +++ /dev/null @@ -1,66 +0,0 @@ -#import -#import - -#import -#import - -#define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React" - -@interface MsdkReactNativeExampleTests : XCTestCase - -@end - -@implementation MsdkReactNativeExampleTests - -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test -{ - if (test(view)) { - return YES; - } - for (UIView *subview in [view subviews]) { - if ([self findSubviewInView:subview matching:test]) { - return YES; - } - } - return NO; -} - -- (void)testRendersWelcomeScreen -{ - UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; - BOOL foundElement = NO; - - __block NSString *redboxError = nil; -#ifdef DEBUG - RCTSetLogFunction( - ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); -#endif - - while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { - [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - foundElement = [self findSubviewInView:vc.view - matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; - } - -#ifdef DEBUG - RCTSetLogFunction(RCTDefaultLogFunction); -#endif - - XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); - XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); -} - -@end diff --git a/example/ios/Podfile b/example/ios/Podfile index 005f7d9..31d6379 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -5,8 +5,9 @@ require Pod::Executable.execute_command('node', ['-p', {paths: [process.argv[1]]}, )', __dir__]).strip -platform :ios, 15.6 +platform :ios, 16.6 prepare_react_native_project! +ENV['RCT_NEW_ARCH_ENABLED'] = '1' linkage = ENV['USE_FRAMEWORKS'] if linkage != nil @@ -23,11 +24,6 @@ target 'MsdkReactNativeExample' do :app_path => "#{Pod::Config.instance.installation_root}/.." ) - target 'MsdkReactNativeExampleTests' do - inherit! :complete - # Pods for testing - end - post_install do |installer| # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 react_native_post_install( diff --git a/example/node_modules b/example/node_modules deleted file mode 120000 index 68a084a..0000000 --- a/example/node_modules +++ /dev/null @@ -1 +0,0 @@ -../node_modules \ No newline at end of file diff --git a/example/node_modules b/example/node_modules new file mode 100644 index 0000000..68a084a --- /dev/null +++ b/example/node_modules @@ -0,0 +1 @@ +../node_modules \ No newline at end of file diff --git a/example/package.json b/example/package.json index fd9eea1..7078ded 100644 --- a/example/package.json +++ b/example/package.json @@ -10,18 +10,19 @@ "build:ios": "react-native build-ios --scheme MsdkReactNativeExample --mode Debug --extra-params \"-sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO\"" }, "dependencies": { - "react": "19.0.0", - "react-native": "^0.79.5" + "react": "19.1.0", + "react-native": "^0.81.3", + "msdk-react-native": "*" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native-community/cli": "latest", - "@react-native/babel-preset": "0.79.5", - "@react-native/metro-config": "0.79.5", - "@react-native/typescript-config": "0.79.5", - "react-native-builder-bob": "^0.30.2" + "@react-native/babel-preset": "0.81.1", + "@react-native/metro-config": "0.81.1", + "@react-native/typescript-config": "0.81.1", + "react-native-builder-bob": "^0.40.13" }, "engines": { "node": ">=18" diff --git a/example/src/App.tsx b/example/src/App.tsx index 82873f6..ce5ad5e 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -46,7 +46,8 @@ export default function App() { const [mockModeType, setMockModeType] = useState(EcmpMockModeType.disabled); const [hideScanningCards, setHideScanningCards] = useState(true); const [hideSavedWallets, setHideSavedWallets] = useState(false); - const [brandColor, setBrandColor] = useState('#3498db'); + const [primaryBrandColor, setPrimaryBrandColor] = useState('#3498db'); + const [secondaryBrandColor, setSecondaryBrandColor] = useState('#CAB2FF'); const [storedCardType, setStoredCardType] = useState(''); // Screen Display Modes @@ -188,7 +189,8 @@ export default function App() { applePayMerchantID: applePayMerchantID || undefined, applePayDescription: applePayDescription || undefined, applePayCountryCode: applePayCountryCode || undefined, - brandColor, + primaryBrandColor, + secondaryBrandColor, storedCardType: parseInt(storedCardType) || undefined }, (result) => { @@ -311,10 +313,18 @@ export default function App() { + + diff --git a/ios/Models/PluginAdditionalField.swift b/ios/Models/PluginAdditionalField.swift index fbf840a..b9f0591 100644 --- a/ios/Models/PluginAdditionalField.swift +++ b/ios/Models/PluginAdditionalField.swift @@ -6,7 +6,7 @@ // import Foundation -import ecommpaySDK +import EcommpaySDK internal struct PluginAdditionalField: Decodable { let type: String diff --git a/ios/Models/PluginPaymentInfo.swift b/ios/Models/PluginPaymentInfo.swift index bf3d9c1..880320d 100644 --- a/ios/Models/PluginPaymentInfo.swift +++ b/ios/Models/PluginPaymentInfo.swift @@ -6,7 +6,7 @@ // import Foundation -import ecommpaySDK +import EcommpaySDK internal struct PluginPaymentInfo: Decodable { let projectID: Int32 diff --git a/ios/Models/PluginPaymentOptions.swift b/ios/Models/PluginPaymentOptions.swift index 532db86..80257f3 100644 --- a/ios/Models/PluginPaymentOptions.swift +++ b/ios/Models/PluginPaymentOptions.swift @@ -6,7 +6,7 @@ // import Foundation -import ecommpaySDK +import EcommpaySDK import React @@ -70,7 +70,8 @@ internal struct PluginPaymentOptions: Decodable { let applePayDescription: String? let applePayCountryCode: String? let isDarkTheme: Bool? - let brandColor: String? + let primaryBrandColor: String? + let secondaryBrandColor: String? let storedCardType: Int? let signature: String? @@ -121,9 +122,13 @@ internal struct PluginPaymentOptions: Decodable { } // Brand customization - if let brandColorString = brandColor { - sdkPaymentOptions.brandColor = UIColor(hex: brandColorString) + if let primaryBrandColorString = primaryBrandColor { + sdkPaymentOptions.primaryBrandColor = UIColor(hex: primaryBrandColorString) } + + if let secondaryBrandColorString = secondaryBrandColor { + sdkPaymentOptions.secondaryBrandColor = UIColor(hex: secondaryBrandColorString) + } // Stored card type if let storedCardType = storedCardType { diff --git a/ios/Models/PluginRecipientInfo.swift b/ios/Models/PluginRecipientInfo.swift index fa5201f..a5340ba 100644 --- a/ios/Models/PluginRecipientInfo.swift +++ b/ios/Models/PluginRecipientInfo.swift @@ -6,7 +6,7 @@ // import Foundation -import ecommpaySDK +import EcommpaySDK internal struct PluginRecipientInfo: Decodable { let walletOwner: String? diff --git a/ios/Models/PluginRecurrentData.swift b/ios/Models/PluginRecurrentData.swift index ef63549..e5227a1 100644 --- a/ios/Models/PluginRecurrentData.swift +++ b/ios/Models/PluginRecurrentData.swift @@ -6,7 +6,7 @@ // import Foundation -import ecommpaySDK +import EcommpaySDK internal struct PluginRecurrentData: Decodable { let register: Bool @@ -22,12 +22,12 @@ internal struct PluginRecurrentData: Decodable { let amount: Int64? let schedule: [PluginRecurrentDataSchedule]? - func map() -> ecommpaySDK.RecurrentInfo { - let recurrentType = ecommpaySDK.RecurrentType(rawValue: type ?? "") - let recurrentPeriod = ecommpaySDK.RecurrentPeriod(rawValue: period) + func map() -> EcommpaySDK.RecurrentInfo { + let recurrentType = EcommpaySDK.RecurrentType(rawValue: type ?? "") + let recurrentPeriod = EcommpaySDK.RecurrentPeriod(rawValue: period) let mappedSchedule = schedule?.map { $0.map() } ?? [] - return ecommpaySDK.RecurrentInfo( + return EcommpaySDK.RecurrentInfo( register: register, type: recurrentType, expiryDay: expiryDay, @@ -48,8 +48,8 @@ internal struct PluginRecurrentDataSchedule: Decodable { let date: String let amount: Int - func map() -> ecommpaySDK.RecurrentInfoSchedule { - return ecommpaySDK.RecurrentInfoSchedule( + func map() -> EcommpaySDK.RecurrentInfoSchedule { + return EcommpaySDK.RecurrentInfoSchedule( date: date, amount: amount ) diff --git a/ios/Models/PluginResult.swift b/ios/Models/PluginResult.swift index 44a56d9..6770189 100644 --- a/ios/Models/PluginResult.swift +++ b/ios/Models/PluginResult.swift @@ -6,7 +6,7 @@ // import Foundation -import ecommpaySDK +import EcommpaySDK internal struct PluginResult: Decodable, Encodable { let resultCode: Int diff --git a/ios/MsdkReactNative.mm b/ios/MsdkReactNative.mm index 1076829..b3064f5 100644 --- a/ios/MsdkReactNative.mm +++ b/ios/MsdkReactNative.mm @@ -1,5 +1,4 @@ #import -#import @interface RCT_EXTERN_MODULE(MsdkReactNative, NSObject) diff --git a/ios/MsdkReactNative.swift b/ios/MsdkReactNative.swift index c47445a..433fcf7 100644 --- a/ios/MsdkReactNative.swift +++ b/ios/MsdkReactNative.swift @@ -1,12 +1,12 @@ import React -import ecommpaySDK +import EcommpaySDK @objc(MsdkReactNative) class MsdkReactNative: NSObject { @objc func initializePaymentWithOptions(_ options: NSDictionary, resolver: @escaping RCTPromiseResolveBlock, rejecter: @escaping RCTPromiseRejectBlock) { - let sdkFacade: EcommpaySDK = EcommpaySDK() + let sdkFacade: Ecommpay = Ecommpay() let paymentOptions: PaymentOptions = RCTConvertPluginPaymentOptions.buildPaymentOptions(options) DispatchQueue.main.async { diff --git a/msdk-react-native.podspec b/msdk-react-native.podspec index 97d0648..3e07562 100644 --- a/msdk-react-native.podspec +++ b/msdk-react-native.podspec @@ -11,7 +11,7 @@ Pod::Spec.new do |s| s.license = package["license"] s.authors = package["author"] - s.platforms = { :ios => 15.6 } + s.platforms = { :ios => 16.6 } s.source = { :git => "https://github.com/ITECOMMPAY/msdk-react-native.git", :tag => "#{s.version}" } s.source_files = "ios/**/*.{h,m,mm,swift}" @@ -19,7 +19,16 @@ Pod::Spec.new do |s| # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. install_modules_dependencies(s) - s.dependency 'EcommpaySDK_UI', '3.8.8' + + if defined?(:spm_dependency) + spm_dependency(s, + url: 'https://github.com/ITECOMMPAY/mobile-sdk-ios-ui.git', + requirement: {kind: 'upToNextMajorVersion', minimumVersion: '4.0.0'}, + products: ['EcommpaySDK'] + ) + else + raise "Please upgrade React Native to >=0.75.0 to use SPM dependencies." + end # Don't install the dependencies when we run `pod install` in the old architecture. if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then diff --git a/package.json b/package.json index e663e71..a2475f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "msdk-react-native", - "version": "0.2.2", + "version": "0.3.0", "description": "m", "source": "./src/index.tsx", "main": "./lib/commonjs/index.js", @@ -8,11 +8,11 @@ "exports": { ".": { "import": { - "types": "./lib/typescript/module/src/index.d.ts", + "types": "./lib/typescript/src/index.d.ts", "default": "./lib/module/index.js" }, "require": { - "types": "./lib/typescript/commonjs/src/index.d.ts", + "types": "./lib/typescript/src/index.d.ts", "default": "./lib/commonjs/index.js" } } @@ -75,16 +75,16 @@ "@types/react": "^19.0.0", "commitlint": "^17.0.2", "del-cli": "^5.1.0", - "eslint": "^9.32.0", + "eslint": "^8.57.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.1", "jest": "^29.7.0", - "metro": "^0.82.4", - "metro-core": "^0.82.4", + "metro": "^0.83.1", + "metro-core": "^0.83.1", "prettier": "^3.0.3", - "react": "19.0.0", - "react-native": "0.79.5", - "react-native-builder-bob": "^0.30.2", + "react": "19.1.0", + "react-native": "0.81.3", + "react-native-builder-bob": "^0.40.13", "release-it": "^15.0.0", "turbo": "^1.10.7", "typescript": "^5.2.2" @@ -163,23 +163,12 @@ "source": "src", "output": "lib", "targets": [ - [ - "commonjs", - { - "esm": true - } - ], - [ - "module", - { - "esm": true - } - ], + "commonjs", + "module", [ "typescript", { - "project": "tsconfig.build.json", - "esm": true + "project": "tsconfig.build.json" } ] ] From b71b57ba3792129339384290555ef2d5d209e4d9 Mon Sep 17 00:00:00 2001 From: Sergei Kamakov Date: Wed, 12 Nov 2025 10:33:20 +0300 Subject: [PATCH 2/3] Debug color configuration --- .../msdkreactnative/MsdkReactNativeModule.kt | 4 + example/src/App.tsx | 5 +- ios/Models/PluginPaymentOptions.swift | 100 ++++++++++-------- src/index.tsx | 41 +++---- 4 files changed, 83 insertions(+), 67 deletions(-) diff --git a/android/src/main/java/com/msdkreactnative/MsdkReactNativeModule.kt b/android/src/main/java/com/msdkreactnative/MsdkReactNativeModule.kt index 69657e8..e039330 100644 --- a/android/src/main/java/com/msdkreactnative/MsdkReactNativeModule.kt +++ b/android/src/main/java/com/msdkreactnative/MsdkReactNativeModule.kt @@ -92,6 +92,10 @@ class MsdkReactNativeModule(reactContext: ReactApplicationContext) : secondaryBrandColor = colorString } + params.getBoolean("hideFooterLogo")?.let { + hideEcommpayLogo = it + } + // Stored card type storedCardType = params.safeGetInt("storedCardType") } diff --git a/example/src/App.tsx b/example/src/App.tsx index ce5ad5e..7b7df25 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -189,8 +189,9 @@ export default function App() { applePayMerchantID: applePayMerchantID || undefined, applePayDescription: applePayDescription || undefined, applePayCountryCode: applePayCountryCode || undefined, - primaryBrandColor, - secondaryBrandColor, + primaryBrandColor: primaryBrandColor, + secondaryBrandColor: secondaryBrandColor, + hideFooterLogo: true, storedCardType: parseInt(storedCardType) || undefined }, (result) => { diff --git a/ios/Models/PluginPaymentOptions.swift b/ios/Models/PluginPaymentOptions.swift index 80257f3..f53ee22 100644 --- a/ios/Models/PluginPaymentOptions.swift +++ b/ios/Models/PluginPaymentOptions.swift @@ -15,7 +15,7 @@ internal enum PluginActionType: Int, Decodable { case Auth = 2 case Tokenize = 3 case Verify = 4 - + func map() -> PaymentOptions.ActionType { if (self == PluginActionType.Auth) { return PaymentOptions.ActionType.Auth @@ -31,7 +31,7 @@ internal enum PluginActionType: Int, Decodable { internal enum PluginMockModeType: Int, Decodable { case DISABLED, SUCCESS, DECLINE - + func map() -> MockModeType { switch self { case PluginMockModeType.SUCCESS: @@ -46,7 +46,7 @@ internal enum PluginMockModeType: Int, Decodable { internal enum PluginScreenDisplayMode: Int, Decodable { case HIDE_SUCCESS_FINAL_SCREEN, HIDE_DECLINE_FINAL_SCREEN - + func map() -> ScreenDisplayMode { if (self == PluginScreenDisplayMode.HIDE_SUCCESS_FINAL_SCREEN) { return ScreenDisplayMode.hideDeclineFinalPage @@ -72,44 +72,45 @@ internal struct PluginPaymentOptions: Decodable { let isDarkTheme: Bool? let primaryBrandColor: String? let secondaryBrandColor: String? + let hideFooterLogo: Bool? let storedCardType: Int? let signature: String? - + func map() -> PaymentOptions { let sdkPaymentOptions = paymentInfo.mapToPaymentOption() - + sdkPaymentOptions.action = actionType.map() sdkPaymentOptions.isDarkThemeOn = isDarkTheme ?? false - + print("Selected mock type: \(mockModeType.map())") - + sdkPaymentOptions.mockModeType = mockModeType.map() - + // Screen display modes if let screenModes = screenDisplayModes { let modes = screenModes.map { $0.map() } sdkPaymentOptions.screenDisplayModes = Set(modes) } - + // Additional fields if let additionalFields = additionalFields { sdkPaymentOptions.additionalFields = additionalFields.map { $0.map() } } - + // Recipient info if let recipientInfo = recipientInfo { sdkPaymentOptions.recipientInfo = recipientInfo.map() } - + // Recurrent data if let recurrentData = recurrentData { sdkPaymentOptions.recurrentInfo = recurrentData.map() } - + // Payment options sdkPaymentOptions.hideScanningCards = hideScanningCards ?? false - + // Apple Pay if let applePayCountryCode = applePayCountryCode, let applePayMerchantId = applePayMerchantId, @@ -120,26 +121,30 @@ internal struct PluginPaymentOptions: Decodable { countryCode: applePayCountryCode ) } - + // Brand customization if let primaryBrandColorString = primaryBrandColor { sdkPaymentOptions.primaryBrandColor = UIColor(hex: primaryBrandColorString) } - - if let secondaryBrandColorString = secondaryBrandColor { - sdkPaymentOptions.secondaryBrandColor = UIColor(hex: secondaryBrandColorString) - } - + + if let secondaryBrandColorString = secondaryBrandColor { + sdkPaymentOptions.secondaryBrandColor = UIColor(hex: secondaryBrandColorString) + } + + if let hideFooterLogo = hideFooterLogo { + sdkPaymentOptions.hideFooterLogo = hideFooterLogo + } + // Stored card type if let storedCardType = storedCardType { sdkPaymentOptions.storedCardType = NSNumber(value: storedCardType) } - + // Override signature if provided at top level if let topLevelSignature = signature { sdkPaymentOptions.signature = topLevelSignature } - + return sdkPaymentOptions } } @@ -147,25 +152,25 @@ internal struct PluginPaymentOptions: Decodable { // MARK: - RCTConvert Extensions @objc(PaymentOptions) class RCTConvertPluginPaymentOptions: RCTConvert { - + @objc static func buildPaymentOptionsFromInfo(_ json: NSDictionary) -> PaymentOptions { let jsonDict = json as! [String: Any] - + let jsonData = try! JSONSerialization.data(withJSONObject: jsonDict, options: []) - + let pluginPaymentInfo = try! JSONDecoder().decode(PluginPaymentInfo.self, from: jsonData) return pluginPaymentInfo.mapToPaymentOption() } - + @objc static func buildPaymentOptions(_ json: NSDictionary) -> PaymentOptions { let jsonDict = json as! [String: Any] - + let jsonData = try! JSONSerialization.data(withJSONObject: jsonDict, options: []) - + let pluginPaymentOptions = try! JSONDecoder().decode(PluginPaymentOptions.self, from: jsonData) return pluginPaymentOptions.map() } - + } extension UIColor { @@ -173,25 +178,30 @@ extension UIColor { let r, g, b, a: CGFloat if hex.hasPrefix("#") { - let start = hex.index(hex.startIndex, offsetBy: 1) - let hexColor = String(hex[start...]) - - if hexColor.count == 8 { - let scanner = Scanner(string: hexColor) - var hexNumber: UInt64 = 0 - - if scanner.scanHexInt64(&hexNumber) { - r = CGFloat((hexNumber & 0xff000000) >> 24) / 255 - g = CGFloat((hexNumber & 0x00ff0000) >> 16) / 255 - b = CGFloat((hexNumber & 0x0000ff00) >> 8) / 255 - a = CGFloat(hexNumber & 0x000000ff) / 255 - - self.init(red: r, green: g, blue: b, alpha: a) - return - } - } + let start = hex.index(hex.startIndex, offsetBy: 1) + var hexColor = String(hex[start...]) + + if hexColor.count < 8 { + hexColor = hexColor + "ff" + } + + if hexColor.count == 8 { + let scanner = Scanner(string: hexColor) + var hexNumber: UInt64 = 0 + + if scanner.scanHexInt64(&hexNumber) { + r = CGFloat((hexNumber & 0xff000000) >> 24) / 255 + g = CGFloat((hexNumber & 0x00ff0000) >> 16) / 255 + b = CGFloat((hexNumber & 0x0000ff00) >> 8) / 255 + a = CGFloat(hexNumber & 0x000000ff) / 255 + + self.init(red: r, green: g, blue: b, alpha: a) + return + } + } } return nil } + } diff --git a/src/index.tsx b/src/index.tsx index 4f30c61..0183163 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -23,17 +23,17 @@ const MsdkReactNative = NativeModules.MsdkReactNative projectID: number; paymentID: string; paymentAmount: number; - paymentCurrency: string; - paymentDescription?: string; + paymentCurrency: string; + paymentDescription?: string; customerID?: string; - regionCode?: string; + regionCode?: string; token?: string; languageCode?: string; receiptData?: string; hideSavedWallets?: boolean; signature?: string; } - + export type EcmpPaymentOptions = { actionType: EcmpActionType; paymentInfo: EcmpPaymentInfo; @@ -50,33 +50,35 @@ const MsdkReactNative = NativeModules.MsdkReactNative applePayMerchantID?: string; applePayDescription?: string; applePayCountryCode?: string; - brandColor?: string; + primaryBrandColor?: string; + secondaryBrandColor?: string; + hideFooterLogo?: boolean; storedCardType?: number; } - + export enum EcmpActionType { Sale = 1, Auth = 2, Tokenize = 3, Verify = 4, } - + export enum EcmpMockModeType { disabled, success, decline } - + export enum EcmpScreenDisplayMode { hideSuccessFinalPage = 1, hideDeclineFinalPage = 2 } - + export type EcmpAdditionalField = { type: string; value: string; } - + export type EcmpRecurrentData = { register: boolean; type?: string; @@ -91,12 +93,12 @@ const MsdkReactNative = NativeModules.MsdkReactNative amount?: number; schedule?: EcmpRecurrentDataSchedule[]; } - + export type EcmpRecurrentDataSchedule = { date?: string; amount?: bigint; } - + export type EcmpRecipientInfo = { walletOwner?: string; walletId?: string; @@ -107,7 +109,7 @@ const MsdkReactNative = NativeModules.MsdkReactNative city?: string; stateCode?: string; } - + export const initializePayment = async (params: EcmpPaymentOptions, callback: (result: any) => void) => { try { const result = await MsdkReactNative.initializePaymentWithOptions(params); @@ -116,7 +118,7 @@ const MsdkReactNative = NativeModules.MsdkReactNative callback(error) } } - + export const getParamsForSignature = async (params: EcmpPaymentInfo): Promise => { try { const result = await MsdkReactNative.getParamsForSignature(params); @@ -128,15 +130,15 @@ const MsdkReactNative = NativeModules.MsdkReactNative } export class SignatureGenerator { - static generateSignature(paramsToSign: string, secret: string): string { + static generateSignature(paramsToSign: string, secret: string): string { let signature = ''; - + try { if (!paramsToSign || !secret) { console.error('Missing parameters for signature generation'); return ''; } - + const hmacDigest = CryptoJS.HmacSHA512(paramsToSign, secret); signature = CryptoJS.enc.Base64.stringify(hmacDigest); return signature; @@ -144,9 +146,8 @@ const MsdkReactNative = NativeModules.MsdkReactNative console.error('Signature generation error:', e); return ''; } - + } } - + export default SignatureGenerator; - \ No newline at end of file From 833d38a0bd9940d56740edce8cc42d0e781183c1 Mon Sep 17 00:00:00 2001 From: Sergei Kamakov Date: Wed, 12 Nov 2025 14:30:21 +0300 Subject: [PATCH 3/3] Fix dependencies --- .../project.pbxproj | 48 +++++++++---------- msdk-react-native.podspec | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/example/ios/MsdkReactNativeExample.xcodeproj/project.pbxproj b/example/ios/MsdkReactNativeExample.xcodeproj/project.pbxproj index bcec418..3cbf893 100644 --- a/example/ios/MsdkReactNativeExample.xcodeproj/project.pbxproj +++ b/example/ios/MsdkReactNativeExample.xcodeproj/project.pbxproj @@ -10,8 +10,8 @@ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 32A31A93038FA1C4358451AB /* libPods-MsdkReactNativeExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B03206317683F007F97157FD /* libPods-MsdkReactNativeExample.a */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; - 9994C017EB0EF86A8D2DD962 /* Pods_MsdkReactNativeExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C636C9F10A3C259045F42AB /* Pods_MsdkReactNativeExample.framework */; }; ED315D7B9A26DFB8535D6560 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 044B26A852C377199855C725 /* PrivacyInfo.xcprivacy */; }; /* End PBXBuildFile section */ @@ -26,8 +26,8 @@ 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = MsdkReactNativeExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; 26EBB139B5DD09E24500DC9B /* Pods-MsdkReactNativeExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MsdkReactNativeExample.release.xcconfig"; path = "Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample.release.xcconfig"; sourceTree = ""; }; 4BCF33B8B6FD87581F6E9AF7 /* Pods-MsdkReactNativeExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MsdkReactNativeExample.debug.xcconfig"; path = "Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample.debug.xcconfig"; sourceTree = ""; }; - 5C636C9F10A3C259045F42AB /* Pods_MsdkReactNativeExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MsdkReactNativeExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = MsdkReactNativeExample/LaunchScreen.storyboard; sourceTree = ""; }; + B03206317683F007F97157FD /* libPods-MsdkReactNativeExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MsdkReactNativeExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -36,7 +36,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9994C017EB0EF86A8D2DD962 /* Pods_MsdkReactNativeExample.framework in Frameworks */, + 32A31A93038FA1C4358451AB /* libPods-MsdkReactNativeExample.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -62,7 +62,7 @@ isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 5C636C9F10A3C259045F42AB /* Pods_MsdkReactNativeExample.framework */, + B03206317683F007F97157FD /* libPods-MsdkReactNativeExample.a */, ); name = Frameworks; sourceTree = ""; @@ -117,8 +117,8 @@ 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 32529AD95C3AB22285F336DF /* [CP] Embed Pods Frameworks */, - 1A2A16519FE71ACE5119B434 /* [CP] Copy Pods Resources */, + F2713DD548CEDFFF567ACB9F /* [CP] Copy Pods Resources */, + A55593FCBC9600139BBEFF12 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -190,24 +190,29 @@ shellPath = /bin/sh; shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; }; - 1A2A16519FE71ACE5119B434 /* [CP] Copy Pods Resources */ = { + 5C1CE7A8E2A20B4F2C5B1A67 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-resources-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Copy Pods Resources"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-MsdkReactNativeExample-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-resources.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 32529AD95C3AB22285F336DF /* [CP] Embed Pods Frameworks */ = { + A55593FCBC9600139BBEFF12 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -224,26 +229,21 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 5C1CE7A8E2A20B4F2C5B1A67 /* [CP] Check Pods Manifest.lock */ = { + F2713DD548CEDFFF567ACB9F /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-resources-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-MsdkReactNativeExample-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MsdkReactNativeExample/Pods-MsdkReactNativeExample-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -411,7 +411,7 @@ "$(inherited)", " ", ); - REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native"; + REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; USE_HERMES = true; @@ -500,7 +500,7 @@ "$(inherited)", " ", ); - REACT_NATIVE_PATH = "${PODS_ROOT}/../../../node_modules/react-native"; + REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; USE_HERMES = true; VALIDATE_PRODUCT = YES; diff --git a/msdk-react-native.podspec b/msdk-react-native.podspec index 3e07562..2e7b7e4 100644 --- a/msdk-react-native.podspec +++ b/msdk-react-native.podspec @@ -23,7 +23,7 @@ Pod::Spec.new do |s| if defined?(:spm_dependency) spm_dependency(s, url: 'https://github.com/ITECOMMPAY/mobile-sdk-ios-ui.git', - requirement: {kind: 'upToNextMajorVersion', minimumVersion: '4.0.0'}, + requirement: {kind: 'upToNextMajorVersion', minimumVersion: '4.0.1'}, products: ['EcommpaySDK'] ) else