change
This commit is contained in:
parent
0289958a33
commit
ee90e241d2
@ -1,28 +0,0 @@
|
||||
//
|
||||
// AppMetrica+Delegate.h
|
||||
// Pods
|
||||
//
|
||||
// Created by Andrey Bondarenko on 16.02.2021.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <React/RCTBridgeModule.h>
|
||||
|
||||
#ifndef AppMetrica_Delegate_h
|
||||
#define AppMetrica_Delegate_h
|
||||
|
||||
|
||||
#endif /* AppMetrica_Delegate_h */
|
||||
|
||||
@interface AppMetricaDelegateApp : NSObject <UIApplicationDelegate>
|
||||
|
||||
+ (_Nonnull instancetype)sharedInstance;
|
||||
|
||||
- (void)observe;
|
||||
|
||||
|
||||
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
|
||||
|
||||
|
||||
@end
|
@ -1,43 +0,0 @@
|
||||
//
|
||||
// AppMetrica+Delegate.m
|
||||
// react-native-appmetrica-next
|
||||
//
|
||||
// Created by Andrey Bondarenko on 16.02.2021.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "AppMetrica+AppDelegate.h"
|
||||
|
||||
|
||||
@implementation AppMetricaDelegateApp
|
||||
|
||||
+ (instancetype)sharedInstance {
|
||||
static dispatch_once_t once;
|
||||
__strong static AppMetricaDelegateApp *sharedInstance;
|
||||
dispatch_once(&once, ^{
|
||||
sharedInstance = [[AppMetricaDelegateApp alloc] init];
|
||||
});
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
|
||||
- (void)observe {
|
||||
static dispatch_once_t once;
|
||||
__weak AppMetricaDelegateApp *weakSelf = self;
|
||||
dispatch_once(&once, ^{
|
||||
AppMetricaDelegateApp *strongSelf = weakSelf;
|
||||
|
||||
|
||||
SEL didReceiveRemoteNotificationWithCompletionSEL =
|
||||
NSSelectorFromString(@"application:didReceiveRemoteNotification:fetchCompletionHandler:");
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// called when `registerForRemoteNotifications` completes successfully
|
||||
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
||||
NSLog(@"deviceToken 41");
|
||||
}
|
||||
|
||||
@end
|
@ -11,7 +11,6 @@
|
||||
#import <Firebase/Firebase.h>
|
||||
#import "AppMetricaUtils.h"
|
||||
#import <YandexMobileMetricaPush/YMPYandexMetricaPush.h>
|
||||
#import "AppMetrica+AppDelegate.h"
|
||||
|
||||
|
||||
static NSString *const kYMMReactNativeExceptionName = @"ReactNativeException";
|
||||
@ -65,24 +64,8 @@ RCT_EXPORT_METHOD(reportUserProfile:(NSDictionary *)configDict)
|
||||
|
||||
|
||||
|
||||
//- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
|
||||
//
|
||||
// NSLog(@"deviceToken");
|
||||
// If the library AppMetrica the SDK was not initialized before this step,
|
||||
// the method call will result in emergency stop applications.
|
||||
// #ifdef DEBUG
|
||||
// YMPYandexMetricaPushEnvironment pushEnvironment = YMPYandexMetricaPushEnvironmentDevelopment;
|
||||
// #else
|
||||
// YMPYandexMetricaPushEnvironment pushEnvironment = YMPYandexMetricaPushEnvironmentProduction;
|
||||
// #endif
|
||||
// [YMPYandexMetricaPush setDeviceTokenFromData:deviceToken pushEnvironment:pushEnvironment];
|
||||
//}
|
||||
|
||||
RCT_EXPORT_METHOD(initPush:(NSData *)deviceToken)
|
||||
{
|
||||
// [YMPYandexMetricaPush setDeviceTokenFromData:deviceToken];
|
||||
// NSLog(@"deviceToken 7", [FIRMessaging messaging].APNSToken);
|
||||
// NSLog([FIRMessaging messaging].APNSToken);
|
||||
|
||||
#ifdef DEBUG
|
||||
YMPYandexMetricaPushEnvironment pushEnvironment = YMPYandexMetricaPushEnvironmentDevelopment;
|
||||
@ -91,8 +74,6 @@ RCT_EXPORT_METHOD(initPush:(NSData *)deviceToken)
|
||||
#endif
|
||||
[YMPYandexMetricaPush setDeviceTokenFromData:[FIRMessaging messaging].APNSToken pushEnvironment:pushEnvironment];
|
||||
|
||||
|
||||
// RNFBMessagingAppDelegate
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(getLibraryApiLevel)
|
||||
|
Loading…
Reference in New Issue
Block a user