Skip to content

Commit

Permalink
fix: Move dyld register callback to initialize (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
einsteinx2 committed Nov 30, 2022
1 parent 624891b commit 49d3660
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mParticle-Apple-SDK/Utils/MPApplication.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ @implementation MPApplication
@synthesize initialLaunchTime = _initialLaunchTime;
@synthesize pirated = _pirated;

+ (void)initialize {
if (self == [MPApplication class]) {
_dyld_register_func_for_add_image(addImageListCallback);
}
}

- (id)init {
self = [super init];
if (!self) {
Expand All @@ -98,8 +104,6 @@ - (id)init {

userDefaults = [MPIUserDefaults standardUserDefaults];

_dyld_register_func_for_add_image(addImageListCallback);

return self;
}

Expand Down

0 comments on commit 49d3660

Please sign in to comment.