Giter Site home page Giter Site logo

Comments (12)

mpodwysocki avatar mpodwysocki commented on June 2, 2024

@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.

twittemb avatar twittemb commented on June 2, 2024

@mpodwysocki

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.

mpodwysocki avatar mpodwysocki commented on June 2, 2024

@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.

twittemb avatar twittemb commented on June 2, 2024

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.

mpodwysocki avatar mpodwysocki commented on June 2, 2024

@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.

twittemb avatar twittemb commented on June 2, 2024

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.

twittemb avatar twittemb commented on June 2, 2024

If I may, I think the Swift / SwiftUI sample apps should be updated also right ?

from azure-notificationhubs-ios.

mpodwysocki avatar mpodwysocki commented on June 2, 2024

@twittemb they will be updated, just verifying through review that this is the correct approach before I merge the PR

from azure-notificationhubs-ios.

twittemb avatar twittemb commented on June 2, 2024

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.

mpodwysocki avatar mpodwysocki commented on June 2, 2024

@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.

twittemb avatar twittemb commented on June 2, 2024

@mpodwysocki Hi,

Is there a way to register to the APNs for Provisional Push with the Azure NH SDK ?

Thanks.

from azure-notificationhubs-ios.

mpodwysocki avatar mpodwysocki commented on June 2, 2024

@twittemb let's close this issue and please open a feature request for Provisional Push.

from azure-notificationhubs-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.