Skip to content

Commit

Permalink
fix: Update KlarnaMobileSDK (#30)
Browse files Browse the repository at this point in the history
Update the KlarnaMobileSDK
  • Loading branch information
NQuinn27 authored Jul 26, 2024
1 parent bc73bd5 commit 85bc658
Show file tree
Hide file tree
Showing 60 changed files with 25,143 additions and 21,954 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1072,18 +1072,40 @@ SWIFT_CLASS("_TtC15KlarnaMobileSDK21KlarnaMobileSDKCommon")
@end



/// On Site Messaging placement style configuration.
SWIFT_CLASS("_TtC15KlarnaMobileSDK27KlarnaOSMStyleConfiguration")
@interface KlarnaOSMStyleConfiguration : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@class UIColor;
@class KlarnaTextStyleConfiguration;

SWIFT_CLASS_NAMED("Builder")
@interface KlarnaOSMStyleBuilder : NSObject
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
- (nonnull instancetype)setBackgroundColor:(UIColor * _Nullable)color SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)setTextStyleConfiguration:(KlarnaTextStyleConfiguration * _Nonnull)configuration SWIFT_WARN_UNUSED_RESULT;
- (KlarnaOSMStyleConfiguration * _Nonnull)build SWIFT_WARN_UNUSED_RESULT;
@end

@class UIViewController;

SWIFT_CLASS("_TtC15KlarnaMobileSDK13KlarnaOSMView")
@interface KlarnaOSMView : UIView
/// View controller (or activity) that will be used to render placement
/// details modally (required). Would be <code>hostActivity</code> on Android.
@property (nonatomic, weak) UIViewController * _Nullable hostViewController;
/// Style configuration for the KlarnaOSMView. When not nil it will take precedence over the Theme values and support for dark mode needs to be implemented.
@property (nonatomic, strong) KlarnaOSMStyleConfiguration * _Nullable styleConfiguration;
/// Initialize OSM view.
- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE;
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
- (void)layoutSubviews;
- (void)didMoveToWindow;
- (void)traitCollectionDidChange:(UITraitCollection * _Nullable)previousTraitCollection;
@end


Expand Down Expand Up @@ -2007,7 +2029,6 @@ SWIFT_CLASS("_TtC15KlarnaMobileSDK23KlarnaStandaloneWebView")
@end

@class WKNavigation;
@class UIColor;
@class WKFrameInfo;
@class WKUserScript;
@protocol WKScriptMessageHandler;
Expand Down Expand Up @@ -2114,6 +2135,25 @@ SWIFT_PROTOCOL("_TtP15KlarnaMobileSDK31KlarnaStandaloneWebViewDelegate_")
- (void)klarnaStandaloneWebView:(KlarnaStandaloneWebView * _Nonnull)webView requestMediaCapturePermissionFor:(WKSecurityOrigin * _Nonnull)origin initiatedByFrame:(WKFrameInfo * _Nonnull)frame ofType:(WKMediaCaptureType)type handler:(void (^ _Nonnull)(WKPermissionDecision))handler SWIFT_AVAILABILITY(ios,introduced=15.0);
@end


/// Text style configuration for text elements in Klarna components.
SWIFT_CLASS("_TtC15KlarnaMobileSDK28KlarnaTextStyleConfiguration")
@interface KlarnaTextStyleConfiguration : NSObject
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end

@class UIFont;

SWIFT_CLASS_NAMED("Builder")
@interface KlarnaTextStyleBuilder : NSObject
- (nonnull instancetype)setTextColor:(UIColor * _Nullable)color SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)setTextFont:(UIFont * _Nullable)font SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)setTextSize:(CGFloat)size SWIFT_WARN_UNUSED_RESULT;
- (KlarnaTextStyleConfiguration * _Nonnull)build SWIFT_WARN_UNUSED_RESULT;
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end

/// Defines the theme (or style) that components should use.
/// The theme will always default to <code>light</code>. Automatic switching is opt-in. This is because both Klarna
/// and many existing apps that integrate the SDK historically only support a light theme, and we don’t want
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.0-1273-gde2baac
v1.0.0-1373-g31bb03f
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 85bc658

Please sign in to comment.