Skip to content

Commit

Permalink
Pushwoosh iOS SDK 6.5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
PushwooshCI committed Feb 27, 2024
1 parent 50946bc commit 74f245e
Show file tree
Hide file tree
Showing 19 changed files with 60 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#endif

#define PUSHWOOSH_VERSION @"6.5.7"
#define PUSHWOOSH_VERSION @"6.5.8"


@class Pushwoosh, PWMessage, PWNotificationCenterDelegateProxy;
Expand Down
Binary file modified Framework/Pushwoosh.framework/Versions/A/Pushwoosh
Binary file not shown.
Binary file not shown.
12 changes: 6 additions & 6 deletions XCFramework/Pushwoosh.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<string>ios-arm64_x86_64-maccatalyst</string>
<key>LibraryPath</key>
<string>Pushwoosh.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>Pushwoosh.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>maccatalyst</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#endif

#define PUSHWOOSH_VERSION @"6.5.7"
#define PUSHWOOSH_VERSION @"6.5.8"


@class Pushwoosh, PWMessage, PWNotificationCenterDelegateProxy;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#endif

#define PUSHWOOSH_VERSION @"6.5.7"
#define PUSHWOOSH_VERSION @"6.5.8"


@class Pushwoosh, PWMessage, PWNotificationCenterDelegateProxy;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</data>
<key>Headers/Pushwoosh.h</key>
<data>
NKbTKmTdt103f1ytahLEOgKWh5Y=
j8cshRzU/7ISe0Km1n/ycjLjWuo=
</data>
<key>Info.plist</key>
<data>
Expand Down Expand Up @@ -188,11 +188,11 @@
<dict>
<key>hash</key>
<data>
NKbTKmTdt103f1ytahLEOgKWh5Y=
j8cshRzU/7ISe0Km1n/ycjLjWuo=
</data>
<key>hash2</key>
<data>
vkxxrmq0UKesrycGww6u8w8UCG9pF4fAEYMePp+H7s4=
TZZUVDWDXNFJQ4rDrr/wPCowld60keeRtThaYkeUmKM=
</data>
</dict>
<key>Modules/module.modulemap</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#endif

#define PUSHWOOSH_VERSION @"6.5.7"
#define PUSHWOOSH_VERSION @"6.5.8"


@class Pushwoosh, PWMessage, PWNotificationCenterDelegateProxy;
Expand Down
Binary file not shown.
14 changes: 7 additions & 7 deletions XCFramework/PushwooshGeozones.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,32 @@
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_i386_x86_64-simulator</string>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>PushwooshGeozones.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>i386</string>
<string>x86_64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<string>ios-arm64_i386_x86_64-simulator</string>
<key>LibraryPath</key>
<string>PushwooshGeozones.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
2 changes: 1 addition & 1 deletion iOS_SDK/Pushwoosh/Pushwoosh.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Pod::Spec.new do |s|

s.name = "Pushwoosh"
s.version = "6.5.7"
s.version = "6.5.8"
s.summary = "Push notifications library by Pushwoosh."
s.platform = :ios

Expand Down
2 changes: 1 addition & 1 deletion iOS_SDK/Pushwoosh/Pushwoosh/Public/Pushwoosh.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#endif

#define PUSHWOOSH_VERSION @"6.5.7"
#define PUSHWOOSH_VERSION @"6.5.8"


@class Pushwoosh, PWMessage, PWNotificationCenterDelegateProxy;
Expand Down
62 changes: 37 additions & 25 deletions iOS_SDK/Pushwoosh/Pushwoosh/Utils/Runtime/PWPushRuntime.ios.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,34 +66,9 @@ BOOL _replacement_didFinishLaunchingWithOptionsExtensionRequest(id self, SEL _cm
((BOOL(*)(id, SEL, UIApplication *, NSDictionary *))pw_original_didFinishLaunchingWithOptionsExtension)(self, _cmd, application, launchOptions);

BOOL result = YES;
BOOL useRuntime = [PWConfig config].useRuntime;

[[PWAppLifecycleTrackingManager sharedManager] startTracking];

if ([[UIApplication sharedApplication] respondsToSelector:@selector(pushwooshUseRuntimeMagic)] && useRuntime) {
if (launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey]) {
NSLog(@"Application was launched from a remote notification");
}

if (![[PWPreferences preferences] hasAppCode]) {
// pushwoosh has not been initialized yet
return result;
}

if (![PushNotificationManager pushManager].delegate) {
if ([[UIApplication sharedApplication] respondsToSelector:@selector(getPushwooshDelegate)]) {
[PushNotificationManager pushManager].delegate = [[UIApplication sharedApplication] getPushwooshDelegate];
} else {
[PushNotificationManager pushManager].delegate = (NSObject<PushNotificationDelegate> *)self;
}
}

if (![UNUserNotificationCenter currentNotificationCenter].delegate) {
//this function will also handle UIApplicationLaunchOptionsLocationKey
[[PushNotificationManager pushManager] handlePushReceived:launchOptions];
}
}

return result;
}

Expand Down Expand Up @@ -296,6 +271,7 @@ - (void)performSwizzlingForDelegate:(id<UIApplicationDelegate>)delegate proxy:(i

Class delegateClass = [delegate class];

[self swizzle_didFinishLaunchingWithOptions:delegateClass];
[self swizzle_didRegisterForRemoteNotificationsWithDeviceToken:delegateClass];
[self swizzle_didFailToRegisterForRemoteNotificationsWithError:delegateClass];
[self swizzle_didReceiveRemoteNotification:delegateClass];
Expand Down Expand Up @@ -386,6 +362,11 @@ + (void)load {
}
}

- (void)swizzle_didFinishLaunchingWithOptions:(Class)delegateClass {
Method originalMethod = class_getInstanceMethod(delegateClass, @selector(application:didFinishLaunchingWithOptions:));
pw_original_didFinishLaunchingWithOptions = method_setImplementation(originalMethod, (IMP)_replacement_didFinishLaunchingWithOptions);
}

- (void)swizzle_didRegisterForRemoteNotificationsWithDeviceToken:(Class)delegateClass {
Method originalMethod = class_getInstanceMethod(delegateClass, @selector(application:didRegisterForRemoteNotificationsWithDeviceToken:));
pw_original_didRegisterForRemoteNotificationWithDeviceToken_Imp = method_setImplementation(originalMethod, (IMP)_replacement_didRegisterForRemoteNotificationWithToken);
Expand All @@ -406,6 +387,37 @@ + (void)swizzle_registerForRemoteNotifications {
pw_original_registerForRemoteNotifications_Imp = method_setImplementation(originalMethod, (IMP)_replacement_registerForRemoteNotifications);
}

BOOL _replacement_didFinishLaunchingWithOptions(id self, SEL _cmd, UIApplication *application, NSDictionary *launchOptions) {
BOOL result = YES;

if ([self respondsToSelector:@selector(application:didFinishLaunchingWithOptions:)]) {
result = ((BOOL(*)(id, SEL, UIApplication *, NSDictionary *))pw_original_didFinishLaunchingWithOptions)(self, _cmd, application, launchOptions);
} else {
[self applicationDidFinishLaunching:application];
result = YES;
}

if (![[PWPreferences preferences] hasAppCode]) {
// pushwoosh has not been initialized yet
return result;
}

if (![PushNotificationManager pushManager].delegate) {
if ([[UIApplication sharedApplication] respondsToSelector:@selector(getPushwooshDelegate)]) {
[PushNotificationManager pushManager].delegate = [[UIApplication sharedApplication] getPushwooshDelegate];
} else {
[PushNotificationManager pushManager].delegate = (NSObject<PushNotificationDelegate> *)self;
}
}

if (![UNUserNotificationCenter currentNotificationCenter].delegate) {
//this function will also handle UIApplicationLaunchOptionsLocationKey
[[PushNotificationManager pushManager] handlePushReceived:launchOptions];
}

return result;
}

void _replacement_registerForRemoteNotifications(UIApplication * self, SEL _cmd) {
if (![PWUtils isSimulator]) {
((void(*)(id, SEL))pw_original_registerForRemoteNotifications_Imp)(self, _cmd);
Expand Down
2 changes: 1 addition & 1 deletion iOS_SDK/Pushwoosh/PushwooshXCFramework.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Pod::Spec.new do |s|

s.name = "PushwooshXCFramework"
s.version = "6.5.7"
s.version = "6.5.8"
s.summary = "Push notifications library by Pushwoosh."
s.platform = :ios

Expand Down
Binary file modified iOS_SDK/Pushwoosh/build/XCBuildData/build.db
Binary file not shown.
Binary file not shown.
Binary file modified iOS_SDK/Pushwoosh/buildI/XCBuildData/build.db
Binary file not shown.

0 comments on commit 74f245e

Please sign in to comment.