Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to provide AppDelegate for SwiftUI lifecycle etc #1048

Closed
wants to merge 3 commits into from

Conversation

hyouuu
Copy link

@hyouuu hyouuu commented Feb 11, 2022

Should fix #1045 (comment) but I've no idea how to build OneSignal XCFramework to test and haven't touched ObjC for ages so might have issues


This change is Reviewable

@jkasten2
Copy link
Member

@hyouuu Thanks for the PR! From a quick look it seems this could cover the UIApplicationDelegateAdaptor case in issue #1045. However we first would like an investigation if it is possible to auto detect this and correctly handle it without needing a new API and requiring extra setup steps from app developers.

@hyouuu
Copy link
Author

hyouuu commented Feb 13, 2022

Great to hear! I built a local XCFramework and unfortunately setting the appDelegate wouldn't work as it doesn't seem to respond to the objc selectors. So I added back a OSNotificationReceivedBlock similar to 2.x which works for my project.

Nonetheless I left the changes here in case it would be helpful when you implement the redirection to UIApplicationDelegateAdaptor.

IMO there is no reason to omit OSNotificationReceivedBlock when there are OSNotificationWillShowInForegroundBlock & OSNotificationOpenedBlock

@emawby
Copy link
Contributor

emawby commented May 24, 2022

closing this pr since we are fixing in #1091

@emawby emawby closed this May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OneSignal seems to swizzle app delegate methods and didReceiveRemoteNotification is not called
3 participants