Comments (12)
@twittemb to confirm, have you enabled Background Modes
and Remote Notifications
as noted in the Pushing Background Updates to Your App?
from azure-notificationhubs-ios.
Yes. In fact I have done my tests with the SwiftUI sample app (adapted to my notification hubs data).
I have remade the test this morning and If I don't add the UNUserNotificationCenterDelegate conformance and the delegation in the AppDelegate, then background notifications are not read in the application.
Once I add that, I have foreground and background notifications (for silent notifications as well as alert notifications)
from azure-notificationhubs-ios.
@twittemb will investigate the other scenarios. The test send I believe does not do the proper APNS headers for content-available which is required here.
Additionally, the notification’s POST request should contain the apns-push-type header field with a value of background, and the apns-priority field with a value of 5. The APNs server requires the apns-push-type field when sending push notifications to Apple Watch, and recommends it for all platforms. For more information, see Create and Send a POST Request to APNs.
from azure-notificationhubs-ios.
I guess there might be an issue with the swizzling because we must make the AppDelegate conform to UNUserNotificationCenterDelegate
and set the delegate for UNUserNotificationCenter.current().delegate = self
.
Overall I’ve made everything work but there is some plumbing to do that is not specified in the documentation.
from azure-notificationhubs-ios.
@twittemb It's an issue with our sample apps as they should be setting the delegate immediately during application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
from azure-notificationhubs-ios.
Thanks for the follow up. So I guess we can close this issue ?
I think it could be nice to amend the README to reflect that, wouldn't it ?
from azure-notificationhubs-ios.
If I may, I think the Swift / SwiftUI sample apps should be updated also right ?
from azure-notificationhubs-ios.
@twittemb they will be updated, just verifying through review that this is the correct approach before I merge the PR
from azure-notificationhubs-ios.
ok great, thanks.
For the issue #101, Am I right when I must deactivate the method swizzling to access a User response to a notification with a category (with custom actions) ?
from azure-notificationhubs-ios.
@twittemb you do not have to disable swizzling if you don't want to, no, as I show in my examples as I get the actions and save them to a variable as noted in the AppDelegate
from azure-notificationhubs-ios.
@mpodwysocki Hi,
Is there a way to register to the APNs for Provisional Push with the Azure NH SDK ?
Thanks.
from azure-notificationhubs-ios.
@twittemb let's close this issue and please open a feature request for Provisional Push.
from azure-notificationhubs-ios.
Related Issues (20)
- [BUG] MSNotificationHub.setUserId exception HOT 1
- Received Failure Notifications
- [BUG] - 'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead.
- Cannot create a successful registration description using pushChannel or installationId HOT 1
- [BUG] iOS 15 - didReceiveRemoteNotification not called on background of first install HOT 1
- [BUG] Unable to use the released 3.1.5 xcframework build with my application, error when archiving: "bitcode bundle could not be generated"
- [BUG] MSInstallationLifecycleDelegate and MSInstallationEnrichmentDelegate are not work.
- How to remove the current NotificationHub iOS? HOT 1
- Is there any clearer way to get started with SwiftUI and Notification Hubs?
- SwiftUI example w/o ViewController?
- /Helpers/SBTokenProvider.m:239:15: error: variable 'expireInSeconds' set but not used [-Werror,-Wunused-but-set-variable] [BUG]
- SwiftUI Previews in Xcode 14 not working while adding the WindowsAzureMessaging dependency HOT 5
- Build failure in Objective C++ projects [BUG] HOT 7
- [BUG] First launch can't receive notification by tags on iOS. HOT 2
- [BUG] WindowsAzureMessaging.xcframework does not contain the correct WindowsAzureMessaging.framework for macOS.
- [QUERY] handle for the registration is no longer valid
- [BUG] Xcode 15 Beta failing to compile with WindowsAzureMessaging dependency HOT 11
- -[SBNotificationHub parseResultAndUpdateWithName:data:error:]
- Umbrella header for module..
- Please update ReadMe for SPM guide
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-notificationhubs-ios.