Closed ghost closed 6 years ago
Hello, @moontecholabs
support@appsflyer.com
for such kind of problems.–
@andr-ggn thanks For your help
@andr-ggn any update on above crash.
Hello, @moontecholabs again!
We are checking the best way to fix it on SDK side but in the meanwhile, I prepared a small workaround for you.
Please, let us know if it works for you.
//
// AppsFlyer+Workaround.m
//
// Created by AndreyG-AF on 10/02/17.
//
#import <objc/runtime.h>
#import <Foundation/Foundation.h>
@implementation NSUserDefaults (AppsFlyer)
+ (void)load {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Class class = [self class];
method_exchangeImplementations(class_getInstanceMethod(class, @selector(setObject:forKey:)),
class_getInstanceMethod(class, @selector(af_setObject:forKey:)));
method_exchangeImplementations(class_getInstanceMethod(class, @selector(removeObject:)),
class_getInstanceMethod(class, @selector(af_removeObject:)));
});
}
- (void)af_setObject:(NSString *)string forKey:(NSString *)key {
dispatch_async(dispatch_get_main_queue(), ^{
[self af_setObject:string forKey:key];
});
}
- (void)af_removeObject:(NSString *)key {
dispatch_async(dispatch_get_main_queue(), ^{
[self af_removeObject:key];
});
}
@end
@andr-ggn thanks for your help.We will check and update if it working.
@moontecholabs any updates?
We have updated latest pod version, so now not facing.
after installing AppsFlyerFramework we received Crash on our Fabrics.Crash details as follow.