diff --git a/.github/actions/prepare-ios/action.yml b/.github/actions/prepare-ios/action.yml index 20f523c1..b4c59ac0 100644 --- a/.github/actions/prepare-ios/action.yml +++ b/.github/actions/prepare-ios/action.yml @@ -13,3 +13,8 @@ runs: key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} restore-keys: | ${{ runner.os }}-pods- + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2' + bundler-cache: true diff --git a/.github/workflows/native_tests.yml b/.github/workflows/native_tests.yml new file mode 100644 index 00000000..895865bb --- /dev/null +++ b/.github/workflows/native_tests.yml @@ -0,0 +1,47 @@ +name: Native Tests + +on: + push: + branches: + - master + pull_request: + branches: + - master + +env: + BUNDLE_GEMFILE: ${{ github.workspace }}/TestApp/Gemfile + +jobs: + test-native-android: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Prepare Android + uses: ./.github/actions/prepare-android + + - name: Run Unit Tests for Android + run: yarn test:android + + test-native-ios: + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Prepare iOS + uses: ./.github/actions/prepare-ios + + - name: Install Lib cocoapods + run: | + (cd ios;pod install) + + - name: Run Unit Tests for iOS + run: yarn test:ios diff --git a/.github/workflows/native_tests_and_apps.yml b/.github/workflows/test_apps.yml similarity index 66% rename from .github/workflows/native_tests_and_apps.yml rename to .github/workflows/test_apps.yml index e142e6bd..3da21f41 100644 --- a/.github/workflows/native_tests_and_apps.yml +++ b/.github/workflows/test_apps.yml @@ -1,4 +1,4 @@ -name: Native Tests & Apps +name: Test Apps on: push: @@ -8,8 +8,11 @@ on: branches: - master +env: + BUNDLE_GEMFILE: ${{ github.workspace }}/TestApp/Gemfile + jobs: - test-native-android: + build-testapp-android: runs-on: ubuntu-latest steps: - name: Checkout @@ -21,9 +24,14 @@ jobs: - name: Prepare Android uses: ./.github/actions/prepare-android - - name: Run Unit Tests for Android - run: yarn test:android - build-testapp-android: + - name: Bundle TestApp JS for Android + run: mkdir TestApp/android/app/src/main/assets && (cd TestApp;yarn bundle:android) + + - name: Build TestApp for Android + run: | + yarn run build:android + + build-testapp-newarch-android: runs-on: ubuntu-latest steps: - name: Checkout @@ -40,9 +48,9 @@ jobs: - name: Build TestApp for Android run: | - yarn run build:android + ORG_GRADLE_PROJECT_newArchEnabled=true yarn run build:android - test-native-ios: + build-testapp-ios: runs-on: macos-latest steps: - name: Checkout @@ -54,13 +62,18 @@ jobs: - name: Prepare iOS uses: ./.github/actions/prepare-ios - - name: Install Lib cocoapods + - name: Install TestApp cocoapods run: | - (cd ios;pod install) + (cd TestApp/ios;bundle exec pod install) - - name: Run Unit Tests for iOS - run: yarn test:ios - build-testapp-ios: + - name: Bundle TestApp JS for iOS + run: (cd TestApp;yarn bundle:ios) + + - name: Build TestApp for iOS + run: | + yarn run build:ios + + build-testapp-newarch-ios: runs-on: macos-latest steps: - name: Checkout @@ -74,7 +87,7 @@ jobs: - name: Install TestApp cocoapods run: | - (cd TestApp/ios;pod install) + (cd TestApp/ios;rm Podfile.lock;RCT_NEW_ARCH_ENABLED=1 bundle exec pod install) - name: Bundle TestApp JS for iOS run: (cd TestApp;yarn bundle:ios) diff --git a/ios/RNKlarnaMobileSDK.xcodeproj/project.pbxproj b/ios/RNKlarnaMobileSDK.xcodeproj/project.pbxproj index 006c2a8e..1360d76b 100644 --- a/ios/RNKlarnaMobileSDK.xcodeproj/project.pbxproj +++ b/ios/RNKlarnaMobileSDK.xcodeproj/project.pbxproj @@ -51,22 +51,19 @@ 3FC0A2F5614F1B06C1249CA3 /* Pods-RNKlarnaMobileSDK-RNKlarnaMobileSDKTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNKlarnaMobileSDK-RNKlarnaMobileSDKTests.debug.xcconfig"; path = "Target Support Files/Pods-RNKlarnaMobileSDK-RNKlarnaMobileSDKTests/Pods-RNKlarnaMobileSDK-RNKlarnaMobileSDKTests.debug.xcconfig"; sourceTree = ""; }; 42BC05FD2AC57D950044A9FE /* KlarnaStandaloneWebViewManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KlarnaStandaloneWebViewManager.h; sourceTree = ""; }; 42BC05FE2AC57E110044A9FE /* KlarnaStandaloneWebViewManager.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = KlarnaStandaloneWebViewManager.mm; sourceTree = ""; }; - 42BC06002AC585950044A9FE /* KlarnaStandaloneWebViewWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KlarnaStandaloneWebViewWrapper.h; sourceTree = ""; }; - 42BC06012AC5866B0044A9FE /* KlarnaStandaloneWebViewWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KlarnaStandaloneWebViewWrapper.h; sourceTree = ""; }; 42BC06022AC586C50044A9FE /* KlarnaStandaloneWebViewWrapper.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = KlarnaStandaloneWebViewWrapper.mm; sourceTree = ""; }; 42BC06042AC588180044A9FE /* KlarnaStandaloneWebViewWrapper.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = KlarnaStandaloneWebViewWrapper.mm; sourceTree = ""; }; 7917D752255C45FB00E16799 /* RNKlarnaMobileSDKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RNKlarnaMobileSDKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 7917D754255C45FB00E16799 /* PaymentViewWrapperTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PaymentViewWrapperTests.m; sourceTree = ""; }; 7917D756255C45FB00E16799 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 792F67BB2AB8AD7D00675E18 /* PaymentViewWrapper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PaymentViewWrapper.mm; sourceTree = ""; }; - 792F67BC2AB8AD7D00675E18 /* PaymentViewWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaymentViewWrapper.h; sourceTree = ""; }; 792F67BE2AB8AD7D00675E18 /* PaymentViewWrapper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PaymentViewWrapper.mm; sourceTree = ""; }; - 792F67BF2AB8AD7D00675E18 /* PaymentViewWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaymentViewWrapper.h; sourceTree = ""; }; + 796795862C1B39E700BAB0C1 /* KlarnaCheckoutViewWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KlarnaCheckoutViewWrapper.h; sourceTree = ""; }; + 796795872C1B39F100BAB0C1 /* KlarnaStandaloneWebViewWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KlarnaStandaloneWebViewWrapper.h; sourceTree = ""; }; + 796795882C1B39FB00BAB0C1 /* PaymentViewWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaymentViewWrapper.h; sourceTree = ""; }; 79BD25F82BC97A0100D2D92A /* KlarnaCheckoutViewManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KlarnaCheckoutViewManager.h; sourceTree = ""; }; 79BD25F92BC97A3000D2D92A /* KlarnaCheckoutViewManager.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = KlarnaCheckoutViewManager.mm; sourceTree = ""; }; 79BD25FB2BC97B0900D2D92A /* KlarnaCheckoutViewWrapper.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = KlarnaCheckoutViewWrapper.mm; sourceTree = ""; }; - 79BD25FD2BC97B2200D2D92A /* KlarnaCheckoutViewWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KlarnaCheckoutViewWrapper.h; sourceTree = ""; }; - 79BD25FE2BCD4F5A00D2D92A /* KlarnaCheckoutViewWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KlarnaCheckoutViewWrapper.h; sourceTree = ""; }; 79BD25FF2BCD4F6C00D2D92A /* KlarnaCheckoutViewWrapper.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = KlarnaCheckoutViewWrapper.mm; sourceTree = ""; }; 79BD26022BCD56D400D2D92A /* RNMobileSDKUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNMobileSDKUtils.h; sourceTree = ""; }; 79BD26032BCD572600D2D92A /* RNMobileSDKUtils.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RNMobileSDKUtils.mm; sourceTree = ""; }; @@ -175,11 +172,8 @@ 792F67BA2AB8AD7D00675E18 /* newarch */ = { isa = PBXGroup; children = ( - 79BD25FE2BCD4F5A00D2D92A /* KlarnaCheckoutViewWrapper.h */, 79BD25FF2BCD4F6C00D2D92A /* KlarnaCheckoutViewWrapper.mm */, 792F67BB2AB8AD7D00675E18 /* PaymentViewWrapper.mm */, - 792F67BC2AB8AD7D00675E18 /* PaymentViewWrapper.h */, - 42BC06012AC5866B0044A9FE /* KlarnaStandaloneWebViewWrapper.h */, 42BC06022AC586C50044A9FE /* KlarnaStandaloneWebViewWrapper.mm */, ); path = newarch; @@ -188,11 +182,8 @@ 792F67BD2AB8AD7D00675E18 /* oldarch */ = { isa = PBXGroup; children = ( - 79BD25FD2BC97B2200D2D92A /* KlarnaCheckoutViewWrapper.h */, 79BD25FB2BC97B0900D2D92A /* KlarnaCheckoutViewWrapper.mm */, 792F67BE2AB8AD7D00675E18 /* PaymentViewWrapper.mm */, - 792F67BF2AB8AD7D00675E18 /* PaymentViewWrapper.h */, - 42BC06002AC585950044A9FE /* KlarnaStandaloneWebViewWrapper.h */, 42BC06042AC588180044A9FE /* KlarnaStandaloneWebViewWrapper.mm */, ); path = oldarch; @@ -210,6 +201,9 @@ 9CDEDC2923475BAC006C9C97 /* view */ = { isa = PBXGroup; children = ( + 796795862C1B39E700BAB0C1 /* KlarnaCheckoutViewWrapper.h */, + 796795872C1B39F100BAB0C1 /* KlarnaStandaloneWebViewWrapper.h */, + 796795882C1B39FB00BAB0C1 /* PaymentViewWrapper.h */, 792F67BA2AB8AD7D00675E18 /* newarch */, 792F67BD2AB8AD7D00675E18 /* oldarch */, ); diff --git a/ios/Sources/KlarnaCheckoutViewManager.mm b/ios/Sources/KlarnaCheckoutViewManager.mm index ace54e8e..8cdd960c 100644 --- a/ios/Sources/KlarnaCheckoutViewManager.mm +++ b/ios/Sources/KlarnaCheckoutViewManager.mm @@ -3,11 +3,7 @@ #import #import -#ifdef RCT_NEW_ARCH_ENABLED -#import "view/newarch/KlarnaCheckoutViewWrapper.h" -#else -#import "view/oldarch/KlarnaCheckoutViewWrapper.h" -#endif +#import "view/KlarnaCheckoutViewWrapper.h" @implementation KlarnaCheckoutViewManager diff --git a/ios/Sources/KlarnaPaymentViewManager.mm b/ios/Sources/KlarnaPaymentViewManager.mm index 5266f723..f665d1f3 100644 --- a/ios/Sources/KlarnaPaymentViewManager.mm +++ b/ios/Sources/KlarnaPaymentViewManager.mm @@ -3,11 +3,7 @@ #import #import -#ifdef RCT_NEW_ARCH_ENABLED -#import "view/newarch/PaymentViewWrapper.h" -#else -#import "view/oldarch/PaymentViewWrapper.h" -#endif +#import "view/PaymentViewWrapper.h" @implementation KlarnaPaymentViewManager diff --git a/ios/Sources/KlarnaStandaloneWebViewManager.mm b/ios/Sources/KlarnaStandaloneWebViewManager.mm index 1695a85f..b53d837f 100644 --- a/ios/Sources/KlarnaStandaloneWebViewManager.mm +++ b/ios/Sources/KlarnaStandaloneWebViewManager.mm @@ -3,11 +3,7 @@ #import #import -#ifdef RCT_NEW_ARCH_ENABLED -#import "view/newarch/KlarnaStandaloneWebViewWrapper.h" -#else -#import "view/oldarch/KlarnaStandaloneWebViewWrapper.h" -#endif +#import "view/KlarnaStandaloneWebViewWrapper.h" @implementation KlarnaStandaloneWebViewManager diff --git a/ios/Sources/view/oldarch/KlarnaCheckoutViewWrapper.h b/ios/Sources/view/KlarnaCheckoutViewWrapper.h similarity index 79% rename from ios/Sources/view/oldarch/KlarnaCheckoutViewWrapper.h rename to ios/Sources/view/KlarnaCheckoutViewWrapper.h index 8ee717f4..4ed31f03 100644 --- a/ios/Sources/view/oldarch/KlarnaCheckoutViewWrapper.h +++ b/ios/Sources/view/KlarnaCheckoutViewWrapper.h @@ -1,14 +1,20 @@ -#if !RCT_NEW_ARCH_ENABLED - #import +#import +#if RCT_NEW_ARCH_ENABLED +#import +#else #import -#import #import -#import +#endif + NS_ASSUME_NONNULL_BEGIN + +#if RCT_NEW_ARCH_ENABLED +@interface KlarnaCheckoutViewWrapper : RCTViewComponentView +#else @interface KlarnaCheckoutViewWrapper : UIView @property (nonatomic, copy) RCTDirectEventBlock onEvent; @@ -17,10 +23,10 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, strong) NSString* returnUrl; -#pragma mark - React Native Overrides - (void) setReturnUrl:(NSString * _Nonnull)returnUrl; -- (void) evaluateProps; -- (void) initializeActualCheckoutView; +#endif + +#pragma mark - React Native Overrides @property (nonatomic, weak) RCTUIManager* uiManager; @@ -32,6 +38,5 @@ NS_ASSUME_NONNULL_BEGIN @end -NS_ASSUME_NONNULL_END -#endif +NS_ASSUME_NONNULL_END diff --git a/ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.h b/ios/Sources/view/KlarnaStandaloneWebViewWrapper.h similarity index 81% rename from ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.h rename to ios/Sources/view/KlarnaStandaloneWebViewWrapper.h index acefe5ea..e09d879d 100644 --- a/ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.h +++ b/ios/Sources/view/KlarnaStandaloneWebViewWrapper.h @@ -1,14 +1,18 @@ -#if !RCT_NEW_ARCH_ENABLED - #import +#import +#if RCT_NEW_ARCH_ENABLED +#import +#else #import -#import #import -#import +#endif NS_ASSUME_NONNULL_BEGIN +#if RCT_NEW_ARCH_ENABLED +@interface KlarnaStandaloneWebViewWrapper : RCTViewComponentView +#else @interface KlarnaStandaloneWebViewWrapper : UIView @property (nonatomic, copy) RCTDirectEventBlock onLoadStart; @@ -18,11 +22,10 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) RCTDirectEventBlock onKlarnaMessage; @property (nonatomic, strong) NSString* returnUrl; +#endif #pragma mark - React Native Overrides -- (void)initializeKlarnaStandaloneWebView; - @property (nonatomic, weak) RCTUIManager* uiManager; - (void)load:(nonnull NSString*)url; @@ -36,7 +39,3 @@ NS_ASSUME_NONNULL_BEGIN @end NS_ASSUME_NONNULL_END - -#endif - - diff --git a/ios/Sources/view/oldarch/PaymentViewWrapper.h b/ios/Sources/view/PaymentViewWrapper.h similarity index 89% rename from ios/Sources/view/oldarch/PaymentViewWrapper.h rename to ios/Sources/view/PaymentViewWrapper.h index a5476f15..7bbc1d42 100644 --- a/ios/Sources/view/oldarch/PaymentViewWrapper.h +++ b/ios/Sources/view/PaymentViewWrapper.h @@ -1,14 +1,18 @@ -#if !RCT_NEW_ARCH_ENABLED - #import +#import +#if RCT_NEW_ARCH_ENABLED +#import +#else #import -#import #import -#import +#endif NS_ASSUME_NONNULL_BEGIN +#if RCT_NEW_ARCH_ENABLED +@interface PaymentViewWrapper : RCTViewComponentView +#else @interface PaymentViewWrapper : UIView @property (nonatomic, copy) RCTDirectEventBlock onInitialized; @@ -23,10 +27,10 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, strong) NSString* category; @property (nonatomic, strong) NSString* returnUrl; -#pragma mark - React Native Overrides - (void) setCategory:(NSString *)category; -- (void) evaluateProps; -- (void) initializeActualPaymentView; +#endif + +#pragma mark - React Native Overrides @property (nonatomic, weak) RCTUIManager* uiManager; @@ -44,6 +48,5 @@ NS_ASSUME_NONNULL_BEGIN @end -NS_ASSUME_NONNULL_END -#endif +NS_ASSUME_NONNULL_END diff --git a/ios/Sources/view/newarch/KlarnaCheckoutViewWrapper.h b/ios/Sources/view/newarch/KlarnaCheckoutViewWrapper.h deleted file mode 100644 index 1c525059..00000000 --- a/ios/Sources/view/newarch/KlarnaCheckoutViewWrapper.h +++ /dev/null @@ -1,26 +0,0 @@ -#if RCT_NEW_ARCH_ENABLED - -#import -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface KlarnaCheckoutViewWrapper : RCTViewComponentView - -#pragma mark - React Native Overrides - -@property (nonatomic, weak) RCTUIManager* uiManager; - -- (void)setSnippet:(NSString*)snippet; - -- (void)suspend; - -- (void)resume; - -@end - - -NS_ASSUME_NONNULL_END - -#endif diff --git a/ios/Sources/view/newarch/KlarnaCheckoutViewWrapper.mm b/ios/Sources/view/newarch/KlarnaCheckoutViewWrapper.mm index ecc64a88..c32b614f 100644 --- a/ios/Sources/view/newarch/KlarnaCheckoutViewWrapper.mm +++ b/ios/Sources/view/newarch/KlarnaCheckoutViewWrapper.mm @@ -1,6 +1,6 @@ #if RCT_NEW_ARCH_ENABLED -#import "KlarnaCheckoutViewWrapper.h" +#import "../KlarnaCheckoutViewWrapper.h" #import "../../common/RNMobileSDKUtils.h" #import diff --git a/ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.h b/ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.h deleted file mode 100644 index b58b5a08..00000000 --- a/ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.h +++ /dev/null @@ -1,29 +0,0 @@ -#if RCT_NEW_ARCH_ENABLED - -#import -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface KlarnaStandaloneWebViewWrapper : RCTViewComponentView - -#pragma mark - React Native Overrides - -@property (nonatomic, weak) RCTUIManager* uiManager; - -- (void) initializeKlarnaStandaloneWebView:(nonnull NSString*)returnUrl; - -- (void)load:(nonnull NSString*)url; - -- (void)goForward; - -- (void)goBack; - -- (void)reload; - -@end - -NS_ASSUME_NONNULL_END - -#endif diff --git a/ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.mm b/ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.mm index dd69734d..ad63391c 100644 --- a/ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.mm +++ b/ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.mm @@ -1,6 +1,6 @@ #if RCT_NEW_ARCH_ENABLED -#import "KlarnaStandaloneWebViewWrapper.h" +#import "../KlarnaStandaloneWebViewWrapper.h" #import #import diff --git a/ios/Sources/view/newarch/PaymentViewWrapper.h b/ios/Sources/view/newarch/PaymentViewWrapper.h deleted file mode 100644 index 04a5e421..00000000 --- a/ios/Sources/view/newarch/PaymentViewWrapper.h +++ /dev/null @@ -1,33 +0,0 @@ -#if RCT_NEW_ARCH_ENABLED - -#import -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface PaymentViewWrapper : RCTViewComponentView - -#pragma mark - React Native Overrides -- (void) initializeActualPaymentView:(NSString*)category withReturnUrl:(NSString*)returnUrl; - -@property (nonatomic, weak) RCTUIManager* uiManager; - -- (void)initializePaymentViewWithClientToken:(NSString*)clientToken withReturnUrl:(NSString*)returnUrl; - -- (void)loadPaymentViewWithSessionData:(nullable NSString*)sessionData; - -- (void)loadPaymentReview; - -- (void)authorizePaymentViewWithAutoFinalize:(BOOL)autoFinalize sessionData:(nullable NSString*)sessionData; - -- (void)reauthorizePaymentViewWithSessionData:(nullable NSString*)sessionData; - -- (void)finalizePaymentViewWithSessionData:(nullable NSString*)sessionData; - -@end - - -NS_ASSUME_NONNULL_END - -#endif diff --git a/ios/Sources/view/newarch/PaymentViewWrapper.mm b/ios/Sources/view/newarch/PaymentViewWrapper.mm index 9869e24d..349c11eb 100644 --- a/ios/Sources/view/newarch/PaymentViewWrapper.mm +++ b/ios/Sources/view/newarch/PaymentViewWrapper.mm @@ -1,6 +1,6 @@ #if RCT_NEW_ARCH_ENABLED -#import "PaymentViewWrapper.h" +#import "../PaymentViewWrapper.h" #import #import diff --git a/ios/Sources/view/oldarch/KlarnaCheckoutViewWrapper.mm b/ios/Sources/view/oldarch/KlarnaCheckoutViewWrapper.mm index 57fabf34..828dce2c 100644 --- a/ios/Sources/view/oldarch/KlarnaCheckoutViewWrapper.mm +++ b/ios/Sources/view/oldarch/KlarnaCheckoutViewWrapper.mm @@ -1,6 +1,6 @@ #if !RCT_NEW_ARCH_ENABLED -#import "KlarnaCheckoutViewWrapper.h" +#import "../KlarnaCheckoutViewWrapper.h" #import "../../common/RNMobileSDKUtils.h" #import diff --git a/ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.mm b/ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.mm index 0d8646f3..38ad1886 100644 --- a/ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.mm +++ b/ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.mm @@ -1,6 +1,6 @@ #if !RCT_NEW_ARCH_ENABLED -#import "KlarnaStandaloneWebViewWrapper.h" +#import "../KlarnaStandaloneWebViewWrapper.h" #import #import diff --git a/ios/Sources/view/oldarch/PaymentViewWrapper.mm b/ios/Sources/view/oldarch/PaymentViewWrapper.mm index c8e1147b..c536b401 100644 --- a/ios/Sources/view/oldarch/PaymentViewWrapper.mm +++ b/ios/Sources/view/oldarch/PaymentViewWrapper.mm @@ -1,6 +1,6 @@ #if !RCT_NEW_ARCH_ENABLED -#import "PaymentViewWrapper.h" +#import "../PaymentViewWrapper.h" #import #import diff --git a/ios/Tests/PaymentViewWrapperTests.m b/ios/Tests/PaymentViewWrapperTests.m index 000e751d..acb8e99b 100644 --- a/ios/Tests/PaymentViewWrapperTests.m +++ b/ios/Tests/PaymentViewWrapperTests.m @@ -12,11 +12,15 @@ #import #import "../Sources/KlarnaPaymentViewManager.h" -#ifdef RCT_NEW_ARCH_ENABLED -#import "../Sources/view/newarch/PaymentViewWrapper.h" -#else -#import "../Sources/view/oldarch/PaymentViewWrapper.h" -#endif +#import "../Sources/view/PaymentViewWrapper.h" + +@interface PaymentViewWrapper () + +// declaring private methods to be able to verify them with OCMock +- (void) evaluateProps; +- (void) initializeActualPaymentView; + +@end @interface PaymentViewWrapperTests : XCTestCase