45 lines
1.2 KiB
Objective-C
45 lines
1.2 KiB
Objective-C
#import <Foundation/Foundation.h>
|
|
#import <React/RCTBridge.h>
|
|
#import <React/RCTRootView.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@protocol NewsmemoryDelegate <NSObject>
|
|
@optional
|
|
- (void)onNewsmemoryClose;
|
|
- (BOOL)newsmemoryWillOpenURL:(NSString *)url;
|
|
- (void)onNewsmemoryTrackAction:(NSDictionary *)data;
|
|
- (void)onNewsmemoryReload;
|
|
- (BOOL)onNewsmemoryTokenExpired;
|
|
@end
|
|
|
|
/// The RN library API
|
|
@interface Newsmemory : NSObject
|
|
|
|
/// The way in which we communicate with React Native
|
|
@property (nonatomic, strong, readonly) RCTBridge *bridge;
|
|
|
|
/// The single instance of a Newsmemory
|
|
+ (instancetype)sharedInstance;
|
|
+ (void)setDelegate:(id <NewsmemoryDelegate>)delegate;
|
|
+ (void)setDebugMode:(BOOL)debug;
|
|
+ (void)setPSetup:(NSString *)pSetup;
|
|
+ (void)setServer:(NSString *)server;
|
|
+ (void)setToken:(NSString *)token;
|
|
+ (void)setNeedsCloseButton:(BOOL)need;
|
|
+ (void)setNeedsSafeArea:(BOOL)need;
|
|
+ (void)setAPIKey:(NSString *)key;
|
|
+ (void)setLockedOrientation:(NSString *)orientation;
|
|
+ (void)setLockedOrientationDevice:(NSString *)device;
|
|
+ (void)enableDebugger:(BOOL)enabled;
|
|
+ (void)setReferrer:(NSString *)referrer;
|
|
+ (void)setExtraGA4Params:(NSString *)params;
|
|
|
|
- (instancetype)init;
|
|
- (RCTRootView *)getView;
|
|
- (id <NewsmemoryDelegate>)getDelegate;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|