From 45399cb3a8cd06a4b309705a96c32bb91cf6a66c Mon Sep 17 00:00:00 2001 From: Nuri Mertcan Guner Date: Thu, 28 Sep 2023 17:30:36 +0200 Subject: [PATCH] fix standalone view ios files --- .../project.pbxproj | 32 +++++++++---------- ios/Sources/KlarnaStandaloneWebViewManager.h | 2 +- ios/Sources/KlarnaStandaloneWebViewManager.mm | 4 +-- ...iew.h => KlarnaStandaloneWebViewWrapper.h} | 2 +- ...w.mm => KlarnaStandaloneWebViewWrapper.mm} | 8 +++-- ...iew.h => KlarnaStandaloneWebViewWrapper.h} | 2 +- ...w.mm => KlarnaStandaloneWebViewWrapper.mm} | 6 ++-- 7 files changed, 29 insertions(+), 27 deletions(-) rename ios/Sources/view/newarch/{KlarnaStandaloneWebView.h => KlarnaStandaloneWebViewWrapper.h} (78%) rename ios/Sources/view/newarch/{KlarnaStandaloneWebView.mm => KlarnaStandaloneWebViewWrapper.mm} (78%) rename ios/Sources/view/oldarch/{KlarnaStandaloneWebView.h => KlarnaStandaloneWebViewWrapper.h} (89%) rename ios/Sources/view/oldarch/{KlarnaStandaloneWebView.mm => KlarnaStandaloneWebViewWrapper.mm} (76%) diff --git a/ios/RNKlarnaMobileSDK.xcodeproj/project.pbxproj b/ios/RNKlarnaMobileSDK.xcodeproj/project.pbxproj index da48ca33..742d3d10 100644 --- a/ios/RNKlarnaMobileSDK.xcodeproj/project.pbxproj +++ b/ios/RNKlarnaMobileSDK.xcodeproj/project.pbxproj @@ -7,9 +7,9 @@ objects = { /* Begin PBXBuildFile section */ - 42BC05FF2AC57E110044A9FE /* KlarnaStandaloneWebViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BC05FE2AC57E110044A9FE /* KlarnaStandaloneWebViewManager.m */; }; - 42BC06032AC586C50044A9FE /* KlarnaStandaloneWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BC06022AC586C50044A9FE /* KlarnaStandaloneWebView.m */; }; - 42BC06052AC588180044A9FE /* KlarnaStandaloneWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 42BC06042AC588180044A9FE /* KlarnaStandaloneWebView.m */; }; + 42BC05FF2AC57E110044A9FE /* KlarnaStandaloneWebViewManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 42BC05FE2AC57E110044A9FE /* KlarnaStandaloneWebViewManager.mm */; }; + 42BC06032AC586C50044A9FE /* KlarnaStandaloneWebViewWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 42BC06022AC586C50044A9FE /* KlarnaStandaloneWebViewWrapper.mm */; }; + 42BC06052AC588180044A9FE /* KlarnaStandaloneWebViewWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 42BC06042AC588180044A9FE /* KlarnaStandaloneWebViewWrapper.mm */; }; 7917D755255C45FB00E16799 /* PaymentViewWrapperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7917D754255C45FB00E16799 /* PaymentViewWrapperTests.m */; }; 7917D757255C45FB00E16799 /* libRNKlarnaMobileSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 134814201AA4EA6300B7C361 /* libRNKlarnaMobileSDK.a */; }; 792F67C02AB8AD7D00675E18 /* PaymentViewWrapper.mm in Sources */ = {isa = PBXBuildFile; fileRef = 792F67BB2AB8AD7D00675E18 /* PaymentViewWrapper.mm */; }; @@ -46,11 +46,11 @@ 19C9876CD048B49EB4361DB8 /* Pods-RNKlarnaMobileSDK-RNKlarnaMobileSDKTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNKlarnaMobileSDK-RNKlarnaMobileSDKTests.release.xcconfig"; path = "Target Support Files/Pods-RNKlarnaMobileSDK-RNKlarnaMobileSDKTests/Pods-RNKlarnaMobileSDK-RNKlarnaMobileSDKTests.release.xcconfig"; sourceTree = ""; }; 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.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KlarnaStandaloneWebViewManager.m; sourceTree = ""; }; - 42BC06002AC585950044A9FE /* KlarnaStandaloneWebView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KlarnaStandaloneWebView.h; sourceTree = ""; }; - 42BC06012AC5866B0044A9FE /* KlarnaStandaloneWebView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KlarnaStandaloneWebView.h; sourceTree = ""; }; - 42BC06022AC586C50044A9FE /* KlarnaStandaloneWebView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KlarnaStandaloneWebView.m; sourceTree = ""; }; - 42BC06042AC588180044A9FE /* KlarnaStandaloneWebView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KlarnaStandaloneWebView.m; 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 = ""; }; @@ -125,7 +125,7 @@ B3E7B5881CC2AC0600A0062D /* KlarnaPaymentViewManager.h */, B3E7B5891CC2AC0600A0062D /* KlarnaPaymentViewManager.mm */, 42BC05FD2AC57D950044A9FE /* KlarnaStandaloneWebViewManager.h */, - 42BC05FE2AC57E110044A9FE /* KlarnaStandaloneWebViewManager.m */, + 42BC05FE2AC57E110044A9FE /* KlarnaStandaloneWebViewManager.mm */, 9CDEDC2923475BAC006C9C97 /* view */, ); path = Sources; @@ -160,8 +160,8 @@ children = ( 792F67BB2AB8AD7D00675E18 /* PaymentViewWrapper.mm */, 792F67BC2AB8AD7D00675E18 /* PaymentViewWrapper.h */, - 42BC06012AC5866B0044A9FE /* KlarnaStandaloneWebView.h */, - 42BC06022AC586C50044A9FE /* KlarnaStandaloneWebView.m */, + 42BC06012AC5866B0044A9FE /* KlarnaStandaloneWebViewWrapper.h */, + 42BC06022AC586C50044A9FE /* KlarnaStandaloneWebViewWrapper.mm */, ); path = newarch; sourceTree = ""; @@ -171,8 +171,8 @@ children = ( 792F67BE2AB8AD7D00675E18 /* PaymentViewWrapper.mm */, 792F67BF2AB8AD7D00675E18 /* PaymentViewWrapper.h */, - 42BC06002AC585950044A9FE /* KlarnaStandaloneWebView.h */, - 42BC06042AC588180044A9FE /* KlarnaStandaloneWebView.m */, + 42BC06002AC585950044A9FE /* KlarnaStandaloneWebViewWrapper.h */, + 42BC06042AC588180044A9FE /* KlarnaStandaloneWebViewWrapper.mm */, ); path = oldarch; sourceTree = ""; @@ -380,11 +380,11 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 42BC06032AC586C50044A9FE /* KlarnaStandaloneWebView.m in Sources */, + 42BC06032AC586C50044A9FE /* KlarnaStandaloneWebViewWrapper.mm in Sources */, B3E7B58A1CC2AC0600A0062D /* KlarnaPaymentViewManager.mm in Sources */, 792F67C02AB8AD7D00675E18 /* PaymentViewWrapper.mm in Sources */, - 42BC06052AC588180044A9FE /* KlarnaStandaloneWebView.m in Sources */, - 42BC05FF2AC57E110044A9FE /* KlarnaStandaloneWebViewManager.m in Sources */, + 42BC06052AC588180044A9FE /* KlarnaStandaloneWebViewWrapper.mm in Sources */, + 42BC05FF2AC57E110044A9FE /* KlarnaStandaloneWebViewManager.mm in Sources */, 792F67C12AB8AD7D00675E18 /* PaymentViewWrapper.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/ios/Sources/KlarnaStandaloneWebViewManager.h b/ios/Sources/KlarnaStandaloneWebViewManager.h index 17109915..cdc180f7 100644 --- a/ios/Sources/KlarnaStandaloneWebViewManager.h +++ b/ios/Sources/KlarnaStandaloneWebViewManager.h @@ -1,5 +1,5 @@ #import -@interface KlarnaStandaloneWebViewManager : RCTViewComponentView +@interface KlarnaStandaloneWebViewManager : RCTViewManager @end diff --git a/ios/Sources/KlarnaStandaloneWebViewManager.mm b/ios/Sources/KlarnaStandaloneWebViewManager.mm index f95354a4..dbf6ef40 100644 --- a/ios/Sources/KlarnaStandaloneWebViewManager.mm +++ b/ios/Sources/KlarnaStandaloneWebViewManager.mm @@ -5,9 +5,9 @@ #ifdef RCT_NEW_ARCH_ENABLED -#import "view/newarch/KlarnaStandaloneWebView.h" +#import "view/newarch/KlarnaStandaloneWebViewWrapper.h" #else -#import "view/oldarch/KlarnaStandaloneWebView.h" +#import "view/oldarch/KlarnaStandaloneWebViewWrapper.h" #endif @implementation KlarnaStandaloneWebViewManager diff --git a/ios/Sources/view/newarch/KlarnaStandaloneWebView.h b/ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.h similarity index 78% rename from ios/Sources/view/newarch/KlarnaStandaloneWebView.h rename to ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.h index 23376154..a30f803f 100644 --- a/ios/Sources/view/newarch/KlarnaStandaloneWebView.h +++ b/ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.h @@ -6,7 +6,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface KlarnaStandaloneWebView : RCTViewComponentView +@interface KlarnaStandaloneWebViewWrapper : RCTViewComponentView @property (nonatomic, weak) RCTUIManager* uiManager; diff --git a/ios/Sources/view/newarch/KlarnaStandaloneWebView.mm b/ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.mm similarity index 78% rename from ios/Sources/view/newarch/KlarnaStandaloneWebView.mm rename to ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.mm index 407bd05a..a79abcca 100644 --- a/ios/Sources/view/newarch/KlarnaStandaloneWebView.mm +++ b/ios/Sources/view/newarch/KlarnaStandaloneWebViewWrapper.mm @@ -1,6 +1,6 @@ #if RCT_NEW_ARCH_ENABLED -#import "KlarnaStandaloneWebView.h" +#import "KlarnaStandaloneWebViewWrapper.h" #import #import @@ -15,11 +15,13 @@ using namespace facebook::react; -@interface KlarnaStandaloneWebView () +@interface KlarnaStandaloneWebViewWrapper () @end -@implementation KlarnaStandaloneWebView +@implementation KlarnaStandaloneWebViewWrapper + +@end #endif diff --git a/ios/Sources/view/oldarch/KlarnaStandaloneWebView.h b/ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.h similarity index 89% rename from ios/Sources/view/oldarch/KlarnaStandaloneWebView.h rename to ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.h index 018428d8..c04368b4 100644 --- a/ios/Sources/view/oldarch/KlarnaStandaloneWebView.h +++ b/ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.h @@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface KlarnaStandaloneWebView : UIView +@interface KlarnaStandaloneWebViewWrapper : UIView @property (nonatomic, strong) NSString* returnUrl; diff --git a/ios/Sources/view/oldarch/KlarnaStandaloneWebView.mm b/ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.mm similarity index 76% rename from ios/Sources/view/oldarch/KlarnaStandaloneWebView.mm rename to ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.mm index f2e2514a..9a910480 100644 --- a/ios/Sources/view/oldarch/KlarnaStandaloneWebView.mm +++ b/ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.mm @@ -1,17 +1,17 @@ #if !RCT_NEW_ARCH_ENABLED -#import "KlarnaStandaloneWebView.h" +#import "KlarnaStandaloneWebViewWrapper.h" #import #import -@interface KlarnaStandaloneWebView () +@interface KlarnaStandaloneWebViewWrapper () @property (nonatomic, strong) KlarnaStandaloneWebView* klarnaStandaloneWebView; @end -@implementation KlarnaStandaloneWebView +@implementation KlarnaStandaloneWebViewWrapper #pragma mark - React Native Overrides