Giter Site home page Giter Site logo

azure / azure-notificationhubs-ios Goto Github PK

View Code? Open in Web Editor NEW
34.0 272.0 28.0 21.39 MB

Azure Notification Hubs SDK for Apple

License: Apache License 2.0

Objective-C 80.23% Shell 3.17% Ruby 0.36% Swift 16.06% C 0.08% Objective-C++ 0.11%
azure azure-notification-hubs apns tvos push-notifications ios macos mac-catalyst

azure-notificationhubs-ios's Introduction

framework-docs analyze-test

Microsoft Azure Notification Hubs SDK for Apple

Microsoft Azure Notification Hubs provide a multiplatform, scaled-out push infrastructure that enables you to send mobile push notifications from any backend (in the cloud or on-premises) to any mobile platform. To learn more, visit our Developer Center.

The Azure Notification Hubs SDK for Apple provides capabilities for registering your device and receive push notifications on macOS and iOS including platforms including tvOS, watchOS and Mac Catalyst.

Getting Started

The Azure Notification Hubs can be added to your app via Cocoapods, Carthage, Swift Package Manager, or by manually adding the binaries to your project. We have a number of sample applications available written in both Swift and Objective-C to help you get started for both iOS with Mac Catalyst support, and a macOS sample, and SwiftUI coming soon.

This introduces a new API as of version 3.0, and the usage of SBNotificationHub with registrations is still supported, but discouraged as we have the new MSNotificationHub which uses the Installation API and modern Apple APIs.

  1. NH Sample App for iOS/Mac Catalyst (Swift | Objective-C)
  2. NH Sample App for macOS (Swift | Objective-C)
  3. NH Sample App for SwiftUI (iOS | macOS)
  4. NH Sample Legacy App using Legacy APIs (Swift | Objective-C)

Integration with Cocoapods

Add the following into your podfile to pull in the Azure Notification Hubs SDK:

pod 'AzureNotificationHubs-iOS'

Run pod install to install the pod and then open your project workspace in Xcode.

Integration with Carthage

Below are the steps on how to integrate the Azure Notification Huds SDK in your Xcode project using Carthage version 0.30 or higher. Add the following to your Cartfile to include GitHub repository.

# Gets the latest release
github "Azure/azure-notificationhubs-ios"

You can also specify a specific version of the Azure Notification Hubs SDK such as 3.1.4.

# Get version in the format of X.X.X such as 3.1.4
github "Azure/azure-notificationhubs-ios" ~> 3.1.4

Once you have this, run carthage update. This will fetch the SDK and put it into the Carthage/Checkouts folder. Open Xcode and drag the WindowsAzureMessaging.framework from the Carthage/Builds/iOS for iOS or Carthage/Builds/macOS for macOS. Ensure the app target is checked during the import.

Integration via Swift Package Manager

The Azure Notification Hubs SDK also supports the Swift Package Manager. To integrate, use the following steps:

  1. From the Xcode menu click File > Swift Packages > Add Package Dependency.
  2. In the dialog, enter the repository URL: http://github.com/Azure/azure-notificationhubs-ios.git
  3. In the Version, select Up to Next Major and take the default option.
  4. Choose WindowsAzureMessaging in the Package Product column.

Integration via copying binaries

The Azure Notification Hubs SDK can also be added manually by downloading the release from GitHub on the Azure Notification Hubs SDK Releases.

The SDK supports the use of XCframework. If you want to integrate XCframeworks into your project, download the WindowsAzureMessaging-SDK-Apple-XCFramework.zip from the releases page and unzip it. Resulting folder contents are not platform-specific, instead it contains the XCframework.

Unzip the file and you will see a folder called WindowsAzureMessaging-SDK-Apple that contains the framework files each platform folder. Copy the framework to a desired location and then add to Xcode. Ensure the app target is checked during the import.

Initializing the SDK

To get started with the SDK, you need to configure your Azure Notification Hub with your Apple credentials. To integrate the SDK, you will need the name of the hub as well as a connection string from your Access Policies. Note that you only need the "Listen" permission to intercept push notifications.

You can then import the headers for Swift:

import WindowsAzureMessaging

And Objective-C as well:

#import <WindowsAzureMessaging/WindowsAzureMessaging.h>

Then we can initialize the SDK with our hub name and connection string. This will automatically register the device using the Installation API with your device token.

Using Swift, we can use the start method, which then starts the installation and device registration process for push notifications.

Swift:

let connectionString = "<connection-string>"
let hubName = "<hub-name>"

MSNotificationHub.start(connectionString: connectionString!, hubName: hubName!)

With Objective-C, it is largely the same with calling the startWithConnectionString method:

Objective-C:

NSString *connectionString = @"<connection-string>";
NSString *hubName = @"<hub-name>";

[MSNotificationHub startWithConnectionString:connectionString hubName:hubName];

By default, the SDK will initialize with the UNAuthorizationOptions for alert, badge and sound, however, if you wish to change that, you can use the startWithConnectionString:hubName:options method specifying which options you wish to use.

Swift:

// Create with alert, badge and sound
let hubOptions = MSNotificationHubOptions(withOptions: [.alert, .badge, .sound])

// Start SDK
MSNotificationHub.start(connectionString: connectionString!, hubName: hubName!, options: hubOptions!)

Objective-C:

// Create with alert, badge and sound
MSNotificationHubOptions *hubOptions = [[MSNotificationHubOptions alloc] initWithAuthorizationOptions:(UNAuthorizationOptions)(UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge)];

// Start SDK
[MSNotificationHub startWithConnectionString:connectionString hubName:hubName options:hubOptions];

Intercepting Push Notifications

You can set up a delegate to be notified whenever a push notification is received in foreground or a background push notification has been tapped by the user. To get started with intercepting push notifications, implement the MSNotificationHubDelegate, and use the MSNotificationHub.setDelegate method to set the delegate implementation.

Swift:

class SetupViewController: MSNotificationHubDelegate // And other imports

// Set up the delegate
MSNotificationHub.setDelegate(self)

// Implement the method
func notificationHub(_ notificationHub: MSNotificationHub!, didReceivePushNotification notification: MSNotificationHubMessage!) {

    let title = notification.title ?? ""
    let body = notification.body ?? ""

    if (UIApplication.shared.applicationState == .background) {
        NSLog("Notification received in background: title:\"\(title)\" body:\"\(body)\"")
    } else {
        let alertController = UIAlertController(title: title, message: body, preferredStyle: .alert)
        alertController.addAction(UIAlertAction(title: "OK", style: .cancel))

        self.present(alertController, animated: true)
    }
}

Objective-C:

@interface SetupViewController <MSNotificationHubDelegate /* Other protocols */>

// Set up the delegate
[MSNotificationHub setDelegate:self];

// Implement the method
- (void)notificationHub:(MSNotificationHub *)notificationHub didReceivePushNotification:(MSNotificationHubMessage *)notification {
    NSString *title = notification.title ?: @"";
    NSString *body = notification.body ?: @"";

    if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) {
        NSLog(@"Notification received in the background: title: %@ body: %@", title, body);
    } else {
        UIAlertController *alertController = [UIAlertController alertControllerWithTitle:notification.title
                        message:notification.body
                 preferredStyle:UIAlertControllerStyleAlert];
        [alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]];

        [self presentViewController:alertController animated:YES completion:nil];
    }
}

Tag Management

One of the ways to target a device or set of devices is through the use of tags, where you can target a specific tag, or a tag expression. The Azure Notification Hub SDK for Apple handles this through top level methods that allow you to add, clear, remove and get all tags for the current installation. In this example, we can add some recommended tags such as the app language preference, and device country code.

Swift:

// Get language and country code for common tag values
let language = Bundle.main.preferredLocalizations.first!
let countryCode = NSLocale.current.regionCode!

// Create tags with type_value format
let languageTag = "language_" + language
let countryCodeTag = "country_" + countryCode

MSNotificationHub.addTags([languageTag, countryCodeTag])

Objective-C:

// Get language and country code for common tag values
NSString *language = [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0];
NSString *countryCode = [[NSLocale currentLocale] countryCode];

// Create tags with type_value format
NSString *languageTag = [NSString stringWithFormat:@"language_%@", language];
NSString *countryCodeTag = [NSString stringWithFormat:@"country_%@", countryCode];

[MSNotificationHub addTags:@[languageTag, countryCodeTag]];

Template Management

With Azure Notification Hub Templates, you can enable a client application to specify the exact format of the notifications it wants to receive. This is useful when you want to create a more personalized notification, with string replacement to fill the values. The Installation API allows multiple templates for each installation which gives you greater power to target your users with rich messages.

For example, we can create a template with a body, some headers, and some tags.

Swift:

// Get language and country code for common tag values
let language = Bundle.main.preferredLocalizations.first!
let countryCode = NSLocale.current.regionCode!

// Create tags with type_value format
let languageTag = "language_" + language
let countryCodeTag = "country_" + countryCode

let body = "{\"aps\": {\"alert\": \"$(message)\"}}"
let template = MSInstallationTemplate()
template.body = body
template.addTags([languageTag, countryCodeTag])

MSNotificationHub.setTemplate(template, forKey: "template1")

Objective-C:

NSString *language = [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0];
NSString *countryCode = [[NSLocale currentLocale] countryCode];

// Create tags with type_value format
NSString *languageTag = [NSString stringWithFormat:@"language_%@", language];
NSString *countryCodeTag = [NSString stringWithFormat:@"country_%@", countryCode];

NSString *body = @"{\"aps\": {\"alert\": \"$(message)\"}}";

MSInstallationTemplate *template = [MSInstallationTemplate new];
template.body = body;

[template addTags:@[languageTag, countryCodeTag]];

[MSNotificationHub setTemplate:template forKey:@"template1"];

Push to User Management

The SDK supports the ability to associate a user with an installation. This allows you to be able to target all devices associated with a particular User ID. The user's identity set through the SDK can be whatever the developer wants it to be: the user's name, email address, phone number, or some other unique identifier. This is supported through the MSNotificationHub and the setUserId method.

Swift:

let userId = "iosUser123"
MSNotificationHub.setUserId(userId);

Objective-C:

NSString *userId = @"iosUser123";
[MSNotificationHub setUserId:userId];

To target a particular user on the backend, you can specify a tag such as $UserId:{VALUE} where VALUE is the user name you have specified, just as you can target an installation using the $InstallationId:{VALUE} tag.

Intercepting Installation Management

The SDK will handle saving the installation for you, however, we provide hooks where you can intercept both the successful installation or any failure through the MSInstallationLifecycleDelegate. This has two methods, didSaveInstallation for successful saves, and didFailToSaveInstallation for any failures. We can implement this to have our own logging for example.

Swift:

// Set the delegate
MSNotificationHub.setLifecycleDelegate(self)

// Handle success
func notificationHub(_ notificationHub: MSNotificationHub!, didSave installation: MSInstallation!) {
    let installationId = installation.installationId;
    NSLog("Successful save with Installation ID: \"\(installationId)\"")
}

// Handle failure
func notificationHub(_ notificationHub: MSNotificationHub!, didFailToSave installation: MSInstallation!, withError error: Error!) {
    NSLog("Failed to save installation")
}

Objective-C:

// Set the delegate
[MSNotificationHub setLifecycleDelegate:self];

// Handle successes
- (void)notificationHub:(MSNotificationHub *)notificationHub didSaveInstallation:(MSInstallation *)installation {
    NSLog(@"Successful save with Installation ID: %@", installation.installationId);
}

// Handle failure
- (void)notificationHub:(MSNotificationHub *)notificationHub
    didFailToSaveInstallation:(MSInstallation *)installation
                    withError:(NSError *)error {
    NSLog(@"Failed to save installation with error %@", [error localizedDescription]);
}

Enriching Installations

The SDK will update the installation on the device any time you change its properties such as adding a tag or adding an installation template. Before the installation is sent to the backend, you can intercept this installation to modify anything before it goes to the backend, for example, if you wish to add or modify tags. This is implemented in the MSInstallationEnrichmentDelegate protocol with a single method of willEnrichInstallation.

Swift:

// Set the delegate
MSNotificationHub.setEnrichmentDelegate(self)

// Handle the enrichment
func notificationHub(_ notificationHub: MSNotificationHub!, willEnrichInstallation installation: MSInstallation!) {
    installation.addTag("customTag")
}

Objective-C:

// Set the delegate
[MSNotificationHub setEnrichmentDelegate:self];

// Handle the enrichment
- (void)notificationHub:(MSNotificationHub *)notificationHub willEnrichInstallation:(MSInstallation *)installation {
    // Add another tag
    [installation addTag:@"customTag"];
}

Saving Installations to a Custom Backend

The Azure Notification Hubs SDK will save the installation to our backend by default. If, however, you wish to skip our backend and store it on your backend, we support that through the MSInstallationManagementDelegate protocol. This has a method to save the installation willUpsertInstallation, passing in the installation, and then a completion handler is called with either an error if unsuccessful, or nil if successful. To set the delegate, instead of specifying the connection string and hub name, you specify the installation manager with startWithInstallationManagement

Swift:

// Set the delegate
MSNotificationHub.startWithInstallationManagement(self)

func notificationHub(_ notificationHub: MSNotificationHub!, willUpsertInstallation installation: MSInstallation!, withCompletionHandler completionHandler: @escaping (NSError?) -> Void) {
    // Save to your own backend
    // Call the completion handler with no error if successful
    completionHandler(nil);
}

Objective-C:

// Set the delegate
[MSNotificationHub startWithInstallationManagement:self];

// Save to your own backend
- (void)notificationHub:(MSNotificationHub *)notificationHub
    willUpsertInstallation:(MSInstallation *)installation
         completionHandler:(void (^)(NSError *_Nullable))completionHandler {
    // Save to your own backend
    // Call the completion handler with no error if successful
    completionHandler(nil);
}

Disabling Automatic Swizzling

By default, the SDK will swizzle methods to automatically intercept calls to UIApplicationDelegate/NSApplicationDelegate for calls to registering and intercepting push notifications, as well as UNUserNotificationCenterDelegate methods. Note this is only available for iOS, watchOS, and Mac Catalyst. This is not supported on macOS and tvOS.

Disabling UIApplicationDelegate/NSApplicationDelegate

  1. Open the project's Info.plist

  2. Add the NHAppDelegateForwarderEnabled key and set the value to 0. This disables the UIApplicationDelegate/NSApplicationDelegate auto-forwarding to MSNotificaitonHub.

  3. Implement the MSApplicationDelegate/NSApplicationDelegate methods for push notifications.

    Implement the application:didRegisterForRemoteNotificationsWithDeviceToken: callback and the application:didFailToRegisterForRemoteNotificationsWithError: callback in your AppDelegate to register for Push notifications. In the code below, if on macOS, not Mac Catalyst, replace UIApplication with NSApplication.

    Swift:

    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    
        // Pass the device token to MSNotificationHub
        MSNotificationHub.didRegisterForRemoteNotifications(withDeviceToken: deviceToken)
    }
    
    func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
    
        // Pass the error to MSNotificationHub
        MSNotificationHub.didFailToRegisterForRemoteNotificationsWithError(error)
    }

    Objective-C:

    - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
        // Pass the device token to MSNotificationHub
        [MSNotificationHub didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
    }
    
    - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
        // Pass the error to MSNotificationHub
        [MSNotificationHub didFailToRegisterForRemoteNotificationsWithError:error];
    }
  4. Implement the callback to receive push notifications

    Implement the application:didReceiveRemoteNotification:fetchCompletionHandler callback to forward push notifications to MSNotificationHub In the code below, if on macOS, not Mac Catalyst, replace UIApplication with NSApplication.

    Swift:

    func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
    
        // Forward to MSNotificationHub
        MSNotificationHub.didReceiveRemoteNotification(userInfo)
    
        // Complete handling the notification
        completionHandler(.noData)
    }

    Objective-C:

    - (void)application:(UIApplication *)application
        didReceiveRemoteNotification:(NSDictionary *)userInfo
              fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
    
        // Forward to MSNotificationHub
        [MSNotificationHub didReceiveRemoteNotification:userInfo];
    
        // Complete handling the notification
        completionHandler(UIBackgroundFetchResultNoData);
    }

Disabling UNUserNotificationCenterDelegate

  1. Open the project's Info.plist

  2. Add the NHUserNotificationCenterDelegateForwarderEnabled key and set the value to 0. This disables the UNUserNotificationCenterDelegate auto-forwarding to MSNotificaitonHub.

  3. Implement UNUserNotificationCenterDelegate callbacks and pass the notification's payload to MSNotificationHub.

    Swift:

    @available(iOS 10.0, *)
    func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
    
        //...
    
        // Pass the notification payload to MSNotificationHub
        MSNotificationHub.didReceiveRemoteNotification(notification.request.content.userInfo)
    
        // Complete handling the notification
        completionHandler([])
    }
    
    @available(iOS 10.0, *)
    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
    
        //...
    
        // Pass the notification payload to MSNotificationHub
        MSNotificationHub.didReceiveRemoteNotification(response.notification.request.content.userInfo)
    
        // Complete handling the notification
        completionHandler()
    }

    Objective-C:

    - (void)userNotificationCenter:(UNUserNotificationCenter *)center
          willPresentNotification:(UNNotification *)notification
            withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
            API_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0)) {
    
        //...
    
        // Pass the notification payload to MSNotificationHub
        [MSNotificationHub didReceiveRemoteNotification:notification.request.content.userInfo];
    
        // Complete handling the notification
        completionHandler(UNNotificationPresentationOptionNone);
    }
    
    - (void)userNotificationCenter:(UNUserNotificationCenter *)center
       didReceiveNotificationResponse:(UNNotificationResponse *)response
                withCompletionHandler:(void (^)(void))completionHandler API_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0)) {
    
        //...
        [MSNotificationHub didReceiveRemoteNotification:response.notification.request.content.userInfo];
    
        // Complete handling the notification
        completionHandler();
    }

Useful Resources

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

All Objective-C files follow LLVM coding style (with a few exceptions) and are formatted accordingly. To format your changes, make sure you have the clang-format tool. It can be installed with Homebrew using the command brew install clang-format. Once you have installed clang-format, run ./clang-format-changed-files.sh from the repository root - this will format all files that have changes against the remote main branch (it will also perform a git fetch).

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

azure-notificationhubs-ios's People

Contributors

brannon avatar evgeny-pol avatar hyunoosung avatar itoys avatar kirill-pyatunin avatar kostya-zhidovinov avatar kylekampy avatar marstr avatar microsoftopensource avatar mpodwysocki avatar msftgits avatar stankovski avatar varvusc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-notificationhubs-ios's Issues

Xamarin.Forms: Notifications stop after the device is rebooted.

Hello,

I've set up push notifications on my forms app. On Android everything is working well. IOS has the following issue:

After the device is rebooted, push notifications for the app will stop working. If I uninstall the app, and reinstall it again, newly sent push notifications will show up on the phone and will break again after reboot.

I can see the registration is still there, completely unchanged, and Azure is saying that the "push" went successfully.

image

Here is how my registration is set up.

  1. On the appledelegate.cs class I'm saving the token.
public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
 {
                var bytes = deviceToken.ToArray();
                var token = BitConverter.ToString(bytes).Replace("-", "");
                Xamarin.Essentials.SecureStorage.SetAsync("NOTIFICATION_HANDLE", token).Wait();
}
  1. When the user is logged in I send a call to my API to register the token with the userid as the tag. (handle variable is the token)
//register account
public async void RegisterUser(int userId, string handle, DeviceType type)
{
    string registrationId = null;
    // make sure there are no existing registrations for this push handle (used for iOS and Android)
    if (handle != null)
    {
		var registrations = await _hub.GetRegistrationsByChannelAsync(handle, 100);
        foreach (RegistrationDescription registration in registrations)
        {
            if (registrationId == null)
            {
                registrationId = registration.RegistrationId;
            }
            else
            {
                 await _hub.DeleteRegistrationAsync(registration);
            }
        }
    }

    //brand new account, register
    if (registrationId == null)
    {
        registrationId = await _hub.CreateRegistrationIdAsync();
        RegistrationDescription reg = type == DeviceType.ANDROID ? (RegistrationDescription)new FcmRegistrationDescription(handle) : (RegistrationDescription)new AppleRegistrationDescription(handle);
        reg.RegistrationId = registrationId;
        reg.Tags = new HashSet<string>();
        reg.Tags.Add("username:" + userId);
        await _hub.CreateOrUpdateRegistrationAsync(reg);
    }
    else
    {
        RegistrationDescription existingRegistration = await _hub.GetRegistrationAsync<RegistrationDescription>(registrationId);
        if (existingRegistration.Tags == null)
        {
            existingRegistration.Tags = new HashSet<string>();
            existingRegistration.Tags.Add("username:" + userId);
        }
        else if (!existingRegistration.Tags.Any(x => x.Contains("username:" + userId)))
		{
			existingRegistration.Tags.Add("username:" + userId);
        }
        await _hub.CreateOrUpdateRegistrationAsync(existingRegistration);
    }
}

Once the device is rebooted. It doesn't matter if I send a notification to a specific tag, or to everyone. It also doesn't matter if I start the app again, or keep it untouched. It also doesn't matter if I log into the app or not. No matter what, after device reboot push notifications for the app will stop working until the app is reinstalled. So it feels like w/e hooks there are between the device, apple and microsoft are invalidated after reboot.

I think I'm doing something wrong, so I want to check here to see if anyone could help me.

[BUG] iOS 15 - didReceiveRemoteNotification not called on background of first install

Describe the bug
A clear and concise description of what the bug is.
On iOS 15, when fresh install the app -> put it in background (not killed yet) -> send a notification to the app -> tap on the notification -> didReceiveRemoteNotification not called to handle the notification.
Exception or Stack Trace
Add the exception log and stack trace if available

To Reproduce
Steps to reproduce the behavior:
1/ Fresh install app
2/ Put it in background (not killed)
3/ Send notification to the app
4/ Tap on the notification
5/ didReceiveRemoteNotification method not called

Expected behavior
A clear and concise description of what you expected to happen.
didReceiveRemoteNotification is called to handle the notification

Setup (please complete the following information):

  • OS: iOS 15
  • IDE : Xcode 13
  • Version: 3.15

Additional context
Add any other context about the problem here.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [ x] Bug Description Added
  • [ x] Repro Steps Added
  • [ x] Setup information Added

Cannot create a successful registration description using pushChannel or installationId

Query/Question

Following this tutorial: https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-aspnet-backend-ios-apple-apns-notification

I have a web api backend for registering devices for push notifications and associating tags with this registration which looks similar to:

NotificationHubClient hub = AzureNotificationHub.Instance.Hub;
string newRegistrationId = request.RegistrationId;

// make sure there are no existing registrations for this push handle/device token (used for iOS and Android)
if (request.Handle != null)
{
	var registrations = Task.Run(async () => await hub.GetRegistrationsByChannelAsync(request.Handle, 100)).Result;

	foreach (RegistrationDescription registration in registrations)
	{
		if (string.IsNullOrEmpty(newRegistrationId))
		{
			newRegistrationId = registration.RegistrationId;
			Log.Debug($"Push notifications found existing registration: {registration}.");
		}
		else
		{
			Task.Run(async () => await hub.DeleteRegistrationAsync(registration));
			Log.Debug($"Push notification registration deleted: {request.RegistrationId}");
		}
	}
}

if (string.IsNullOrEmpty(newRegistrationId))
{
	newRegistrationId = Task.Run(async () => await hub.CreateRegistrationIdAsync()).Result;
	Log.Debug($"Push notifications created new registration: {newRegistrationId}.");
}

var userTags = new HashSet<string>()
{
	$"instanceid:{ServerManager.InstanceId}",
	$"ciid:{Security.User.CurrentUser.ConfigurationItemId}"
};

RegistrationDescription newRegistration = null;
switch (request.Platform)
{
	case Request.PushNotificationPlatforms.Apple:
		newRegistration = new AppleRegistrationDescription(request.Handle, userTags);
		break;
	case Request.PushNotificationPlatforms.Fcm:
		newRegistration = new FcmRegistrationDescription(request.Handle, userTags);
		break;
}

newRegistration.RegistrationId = newRegistrationId;

try
{
	var result = Task.Run(async () => await hub.CreateOrUpdateRegistrationAsync(newRegistration)).Result;
	Log.Debug($"Push notifications for: {request.Platform} with registration id: {newRegistrationId} for instance/ciid: {ServerManager.InstanceId}/{Security.User.CurrentUser.ConfigurationItemId} created.");
}
catch (MessagingException e)
{
	ReturnGoneIfHubResponseIsGone(e);
}

return new Response() { RegistrationId = newRegistration.RegistrationId };

I am then sending the "Handle"/ PNS hand;e to the server which is got in the iOS app by getting the pushChannel:

func notificationHub(_ notificationHub: MSNotificationHub!, didSave installation: MSInstallation!) {
    let installationId = installation.pushChannel;
    // other code to save the pushChannel and after user logs in then register on the server
}

That is then posted to my api backend to upsert a registration for the device/platform.

This produces no error, but when I test send a notification (using a tag set against that registration) on the Azure portal I get the error:

The Push Notification System handle for the registration is invalid

Thereafter if I test send again, it doesn't find that registration (assume it was removed because it wasnt valid?) so no message is sent or error shown.

I currently don't know what do to get my iOS device successfully registering using Registrations. I have done this in android with the android library no issue, I simply sent the result from FirebaseMessaging.getInstance().getToken() as my handle and all works a charm.

Why is this not a Bug or a feature Request?
Im sure others have this working, perhaps I am using the incorrect information to register via registrations on my c# server in IOS. I used registrations in android so would be optimal to use them in iOS, but if thats an issue I'll switch I just need this working desperately!

Setup (please complete the following information if applicable):

  • OS: macOS Big Sur 11.5.2/iOS 12.x
  • IDE : Xcode 12.5.1
  • Version of the Library used: latest

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Query Added
  • Setup information Added

Received Failure Notifications

Describe the bug
When trying to receive background notifications (silent notifications), nothing happens. When we open de app again, in the debugger we receive a exception, Connection 6: received failure notification. But when we send normal notifications (with an alert: "" attribute, everything works just fine)

Exception or Stack Trace
Add the exception log and stack trace if available

To Reproduce
Steps to reproduce the behavior:

  • start up the app.
  • soft close the app
  • Send a background notification: { "aps": { "content-available":1 }, "data": { "type": "test" }}
  • Open the app
  • check Xcode debugging, it should contain a message: Connection x: received failure notification

Code Snippet
Add the code snippet that causes the issue.
{ "aps": { "content-available":1 }, "data": { "type": "HEALTH_ISSUE_CREATED" }}

Expected behavior
Nothing should happen, when connecting a device to Xcode, after sending the notification, open the app, a message should pop up with:
Connection x: received failure notification

Screenshots
If applicable, add screenshots to help explain your problem.
image

Setup (please complete the following information):

  • OS: [e.g. iOS 13.x]
    iOS 14.5.1
  • IDE : [e.g. Xcode 11.x]
    Xcode 12.5.1
  • Version of the Library used
    3.1.3

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

[BUG] Nested Register callback does not work when run on threadpool using Task.Run or Task.Factory.StartNew with any options combo

Describe the bug
Nested Register callback does not work when run on threadpool using Task.Run or Task.Factory.StartNew with any options combo

Exception or Stack Trace
None

To Reproduce
Please see original issue:

Code Snippet
`public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
{

        App.NotificationManager.SetRegistrationId(deviceToken);


        Task.Run(() => { 
        var test = new ConcurrentDictionary<string, int>();
        test.AddOrUpdate("test", 0, (x, y) => y);



        Hub.UnregisterAll(deviceToken, (errorC) =>
        {
            if (errorC != null)
            {
                Debug.WriteLine($"Unable to call unregister {errorC}");
                return;
            }


            try
            {

                var tagsetLoud = new NSSet(test.Keys.ToArray());
                var tagsetSilent = new NSSet(test.Keys.Append("silent").ToArray());






                Hub.RegisterNative(deviceToken, tagsetLoud, (errorCallback) =>
                {
                    if (errorCallback != null)
                    {


                    }
                    else
                    {

                    }
                });



                var templateExpiration = DateTime.Now.AddDays(120).ToString(System.Globalization.CultureInfo.CreateSpecificCulture("en-US"));
                AppDelegate.Hub.RegisterTemplate(deviceToken, "defaultTemplate", AppConstants.APNTemplateBody, templateExpiration, tagsetLoud, (errorCallback) =>
                {

                    if (errorCallback != null)
                    {

                    }

                });


            }
            catch
            {
                Debug.WriteLine("Failure registering");
            }
        });
    });




    }`

Expected behavior
Should register with notifications.

Screenshots
None.

Setup (please complete the following information):

  • OS: Mac Catalina build machine, Win 10 dev machine
  • IDE : VS Studio 2019 Community

Additional context
Callbacks not working correctly in xamarin ios / xamarin forms ios

Azure Notification HUB Tag having issue

I want to use the email ID [email protected] as Tag while registering Azure Notification Hub through my Xamarin iOS Project.
I found that notification hub registration is working fine and sending push notification successfully from Azure Notification Hub Test send console also but it is not receiving on my iOS device at any state of the Application. As per my observation if the tag ( email id) having more than two period/dot(.) characters it will not receive push notification to your iOS device. Is it a limitation or a known issue ?

It is working fine if I'm setting the Tag as [email protected]

Environment

NuGet Package - Xamarin.Azure.NotificationHubs.iOS (2.0.4)

Xamarin.iOS
Version: 13.14.1.39 (Visual Studio Community)

Operating System
Mac OS X 10.15.4

Sample code is given below

string UserEmailID = "[email protected]";

                var tags = new NSSet(UserEmailID);
                    Hub.RegisterNative(deviceToken, tags, err =>
                    {
                        if (err != null)
                        {
                            Console.WriteLine("Error: " + err.DebugDescription);
                        }
                        else
                        {
                            Console.WriteLine("Success");
                        }
                    }); 

[QUERY] Handling categories does need swizzling being deactivated ?

Query/Question
I'm trying to implement notifications with "categories" and custom actions. Although I am able to catch them in my app, the notificationHub(notificationHub:didReceiveNotification:) delegate function does not provide the user's actions (we only have title, subtitle, body and userInfo in the MSNotificationHubMessage object).

Do we have to deactivated method swizzling and implement the UNUserNotificationCenterDelegate delegate functions to be able to retrieve the user's responses ?

Why is this not a Bug or a feature Request?
It could be a feature request depending on the relevance of the question.

Setup (please complete the following information if applicable):

  • OS: iOS 14
  • IDE : Xcode 12
  • Version of the Library used: 3.1.1
  • Swizzling is still activated
  • Token based authentication

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [x ] Query Added
  • [x ] Setup information Added

iOS13 crashed

iOS13 registerNativeWithDeviceToken method crashed

How to remove the current NotificationHub iOS?

I subscribe to the notification hub in the device like this:

MSNotificationHub.start(connectionString: connectionString!, hubName: hubName!, options: hubOptions!)

How can I clear(remove) that current installation from the device?

I already tried UIApplication.shared.unregisterForRemoteNotifications()

Setup (please complete the following information if applicable):

  • OS: iOS 15.4

implicit conversion loses integer precision: 'long' to 'int'

Compiling produces the following warning:

- WARN  | [iOS]  AzureNotificationHubs-iOS/iOS/WindowsAzureMessaging/WindowsAzureMessaging/Helpers/SBNotificationHubHelper.m:85:37: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]

[BUG] MSInstallationLifecycleDelegate and MSInstallationEnrichmentDelegate are not work.

Describe the bug
MSInstallationLifecycleDelegate and MSInstallationEnrichmentDelegate method are not called.
RegisteredForRemoteNotifications is called correctly.

Exception or Stack Trace

To Reproduce

Code Snippet

    public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate, IUNUserNotificationCenterDelegate
    {        
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {            
            global::Xamarin.Forms.Forms.Init();
            
            UNUserNotificationCenter.Current.Delegate = this;            
            
            LoadApplication(new App());

            
            MSNotificationHub.SetDelegate(new AzureNotificationHubListener());
            MSNotificationHub.SetLifecycleDelegate(new AzureInstallationLifecycleListener());
            MSNotificationHub.SetEnrichmentDelegate(new AzureInstallationEnrichmentListener());
            MSNotificationHub.Start(Constants.NotificationHubUrl, Constants.NotificationHubName);
            
            return base.FinishedLaunching(app, options);
        }

        public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken)
        {
             // This method is called correctlly.
        }

        public override void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error)
        {
            ;
        }

    public class AzureNotificationHubListener : MSNotificationHubDelegate
    {
        public override void DidReceivePushNotification(MSNotificationHub notificationHub, MSNotificationHubMessage message)
        {
            // This method is called correctlly.
        }
    }

    public class AzureInstallationLifecycleListener : MSInstallationLifecycleDelegate
    {
        public override void DidFailToSaveInstallation(MSNotificationHub notificationHub, MSInstallation installation, NSError error)
        {
            ;
        }

        public override void DidSaveInstallation(MSNotificationHub notificationHub, MSInstallation installation)
        {
            // This method is not called.
        }
    }

    public class AzureInstallationEnrichmentListener : MSInstallationEnrichmentDelegate
    {
        public override void WillEnrichInstallation(MSNotificationHub notificationHub, MSInstallation installation)
        {
            // This method is not called.
        }
    }

Expected behavior

DidSaveInstallation and WillEnrichInstallation are called.

Screenshots
If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: [iOS 14.7.1]
  • IDE : [Xcode 13.2.1][VS for Mac 8.10.19]
  • Version of the Library used [3.1.1]
  • Xamarin.Forms version 5.0.0.2337

Additional context
Add any other context about the problem here.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

[QUERY] handle for the registration is no longer valid

Query/Question
Why notifications are not working anymore when moving from the dev environment to the testflight environment?

Why is this not a Bug or a feature Request?
Not clear if it's a bug, the only message I get from the test in Notification Hub is this "handle for the registration is no longer valid"

Setup (please complete the following information if applicable):

  • OS: 16
  • IDE :XCode 14.3
  • Version of the Library used: 3.1.5

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [x ] Query Added
  • [ x] Setup information Added

iOS 13 Consistent crash on unregisterAllWithDeviceToken

Consistent crash when we call unregisterAllWithDeviceToken.

  • Using 2.0.4.
  • Xcode 11.1
  • iOS 13.1.3

Tried including the framework directly and through Cocoapods (not that it should make a difference).

Trace:
Screen Shot 2019-10-22 at 2 43 47 PM

Error in the console:
-[Swift.__StringStorage bytes]: unrecognized selector sent to instance 0x282536800

This is the only thing left that's blocking my team from updating from Xcode 10 to Xcode 11.

Thread 1: Exception: "-[MSInstallation initWithCoder:]: unrecognized selector sent to instance 0x2825d8a50"

Describe the bug
Adding the 3.1.1 via cocoapods or swift package manager breaks the app at initialisation.

Exception or Stack Trace
2020-11-24 19:05:07.765153-0300 Dietbox[715:225535] -[MSInstallation initWithCoder:]: unrecognized selector sent to instance 0x2825d8a50
2020-11-24 19:05:07.765384-0300 Dietbox[715:225535] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MSInstallation initWithCoder:]: unrecognized selector sent to instance 0x2825d8a50'
*** First throw call stack:
(0x1961ad654 0x195ecfbcc 0x1960b1dd8 0x1961b17f8 0x1961b371c 0x1965704f8 0x19656f9b4 0x196480658 0x1964d3a94 0x102353900 0x102355098 0x102354980 0x102354910 0x102351990 0x19a27e6cc 0x1091c6338 0x1091c7730 0x1091d5710 0x19612b6bc 0x196126590 0x196125ba8 0x1a0295344 0x19a2613e4 0x1021bddb8 0x195fad8f0)
libc++abi.dylib: terminating with uncaught exception of type NSException

To Reproduce
add pod 'AzureNotificationHubs-iOS' to pod file
run pod install
build on physical device.

(Also tried using swift package manager)

Screenshots
bug

Setup (please complete the following information):

  • OS: iOS 13.6.1, 13.7 and 14.1
  • IDE : Xcode Version 11.6 (11E708)
  • 3.1.1

Additional context
Updated the pods to generate a new version for production but it breaks at app initialisation

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [V] Bug Description Added
  • [V] Repro Steps Added
  • [V] Setup information Added

[BUG] MSNotificationHub.setUserId exception

Describe the bug
When calling MSNotificationHub.setUserId("(userId)"), I get date1 cannot be nil Future exception.

Exception or Stack Trace

2021-01-18 15:44:35.946674+0900 SampleNHAppSwiftUI[40719:3241842] *** -[NSCalendar isDate:equalToDate:toUnitGranularity:]: date1 cannot be nil
Future exception.
A few of these errors are going to be reported with this complaint, then further violations will simply be ignored.
Here is the backtrace where this occurred this time (some frames may be missing due to compiler optimizations):
(
	0   CoreFoundation                      0x00000001a994c168 935533F2-35EE-314E-A760-E74521F68435 + 1278312
	1   SampleNHAppSwiftUI                  0x000000010429ca5c -[MSInstallation isEqualToMSInstallation:] + 332
	2   SampleNHAppSwiftUI                  0x000000010429cd6c -[MSInstallation isEqual:] + 100
	3   SampleNHAppSwiftUI                  0x00000001042ab77c -[MSDebounceInstallationManager execute] + 96
	4   Foundation                          0x00000001aacd0b20 __NSFireTimer + 68
	5   CoreFoundation                      0x00000001a98b5fa0 935533F2-35EE-314E-A760-E74521F68435 + 663456
	6   CoreFoundation                      0x00000001a98b5ba0 935533F2-35EE-314E-A760-E74521F68435 + 662432
	7   CoreFoundation                      0x00000001a98b4ffc 935533F2-35EE-314E-A760-E74521F68435 + 659452
	8   CoreFoundation                      0x00000001a98aeee4 935533F2-35EE-314E-A760-E74521F68435 + 634596
	9   CoreFoundation                      0x00000001a98ae21c CFRunLoopRunSpecific + 600
	10  GraphicsServices                    0x00000001c13b2784 GSEventRunModal + 164
	11  UIKitCore                           0x00000001ac2ecfe0 23311071-8AD7-3E8F-836A-BE5DC8A8B0DF + 12357600
	12  UIKitCore                           0x00000001ac2f2854 UIApplicationMain + 168
	13  SampleNHAppSwiftUI                  0x00000001042842d0 main + 88
	14  libdyld.dylib                       0x00000001a956e6b0 785BEE7F-AC2C-388D-865C-36279D1B3DD1 + 5808

To Reproduce
Call MSNotificationHub.setUserId("(userId)") after or before MSNotificationHub.start(connectionString: connectionString!, hubName: hubName!) initialization.

Code Snippet

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        
        if let path = Bundle.main.path(forResource: "DevSettings", ofType: "plist") {
            if let configValues = NSDictionary(contentsOfFile: path) {
                connectionString = configValues["CONNECTION_STRING"] as? String
                hubName = configValues["HUB_NAME"] as? String
                
                if (!(connectionString ?? "").isEmpty && !(hubName ?? "").isEmpty)
                {
                    UNUserNotificationCenter.current().delegate = self;
                    MSNotificationHub.setDelegate(self)
                    MSNotificationHub.start(connectionString: connectionString!, hubName: hubName!)
                    MSNotificationHub.setUserId("myUserId")
                    addTags()
                    
                    return true
                }
            }
        }
        
        NSLog("Please setup CONNECTION_STRING and HUB_NAME in DevSettings.plist and restart application")
        
        exit(-1)
    }

Expected behavior
I would expect some success return message from NotificationHub that my userId is set successfully.

Screenshots
If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: [iOS14]
  • IDE : [Xcode 12.3]
  • Version of the Library used: v3.1.2

Additional context
Add any other context about the problem here.
I have tried moving setUserId before and after the NotificationHub initialization but had no luck.
There must be something that I missed or the instruction has missing part to set the userId correctly.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

Is there any clearer way to get started with SwiftUI and Notification Hubs?

Query/Question
I am following the documentation, but would like to have a clear basic set of instructions on how Notification Hubs should be implemented in SwiftUI.

For example in the Initializing SDK section, where should this go? AppDelegate.swift seems like the most likely place and there likely should be a set of steps to enable Notification Hubs in Swift as a baseline. Some tutorials like this seem to be helpful for APNS and getting started. It would be good to see the 5 or 10 things you need to do for a Swift app to get functional.

Example:

  1. Create Notification Hub in Azure
  2. Create iPhone App
  3. Register Notification Hub in client app
  4. Send test message from Azure Notification Hubs

Just something really spelling out what things are necessary to get a test notification to appear on an iPhone. From there we can layer in Tags, etc. The particular place where I am having trouble is the third step on my list. What "minimal viable" set of code do I need? Also having a SwiftUI example would be nice.

Do I only need code in this function to accomplish a test:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { }

bitcode support

it seems missing bitcode support on 3.0.0. I got this error while archiving app.

[BUG] WindowsAzureMessaging.xcframework does not contain the correct WindowsAzureMessaging.framework for macOS.

After trying to use Azure Notification Hubs for macOS using the xcframework .zip file from https://github.com/Azure/azure-notificationhubs-ios/releases, I noticed that the macxos WindowsAzureMessaging.framework does not contain any files and is a symlink to: /Users/matthewp/Library/Developer/Xcode/DerivedData/WindowsAzureMessaging-gtakvndxivnwmuebjxwxzcqevqjd/Build/Intermediates.noindex/ArchiveIntermediates/All Frameworks/IntermediateBuildFilesPath/UninstalledProducts/macosx/WindowsAzureMessaging.framework, so this does not work

[BUG] - 'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead.

Describe the bug
When trying to build an application with Xcode 13 beta 4 and the SDK installed via SPM, the build fails because 'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead.

This error occurred in lines 180 and 182 of MSNotificationHub.m

To Reproduce
Build or compile an application with the SDK installed via SPM with Xcode 13 beta 4.

Code Snippet
Add the code snippet that causes the issue.
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
UIUserNotificationType allNotificationTypes =
(UIUserNotificationType)(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge);
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:allNotificationTypes categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
}
[[UIApplication sharedApplication] registerForRemoteNotifications];
#pragma GCC diagnostic pop
#endif

Expected behavior
The build and compilation finish without this error.

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot 2021-08-04 at 09 26 13

Setup (please complete the following information):

  • IDE : [e.g. Xcode 13 beta 4]
  • Version of the Library used: 3.1.3

Additional context
Add any other context about the problem here.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

-[SBNotificationHub parseResultAndUpdateWithName:data:error:]

Bug Title
-[SBNotificationHub parseResultAndUpdateWithName:data:error:]
NSRangeException - *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array

Exception or Stack Trace
Fatal Exception: NSRangeException
0 CoreFoundation 0x9e38 __exceptionPreprocess
1 libobjc.A.dylib 0x178d8 objc_exception_throw
2 CoreFoundation 0x1af078 -[__NSCFString characterAtIndex:].cold.1
3 CoreFoundation 0x1a42c -[__NSArrayM objectAtIndex:]
4 RNDC 0xea63d8 -[SBNotificationHub parseResultAndUpdateWithName:data:error:] + 287 (SBNotificationHub.m:287)
5 RNDC 0xea62b8 __82-[SBNotificationHub upsertRegistrationWithName:registrationId:payload:completion:]_block_invoke + 274 (SBNotificationHub.m:274)
6 RNDC 0xea06ac -[SBURLConnection connectionDidFinishLoading:] + 116 (SBURLConnection.m:116)
7 FirebasePerformance 0x157d0 (Missing UUID 7934ed34949930e8894c0952de7a1bf4)
8 CFNetwork 0x272f54 __CFTubeSetTubeTypeNotifier
9 CFNetwork 0x272ef4 __CFTubeSetTubeTypeNotifier
10 CFNetwork 0x273014 __CFTubeSetTubeTypeNotifier
11 CFNetwork 0x1bdff8 _CFNetworkErrorGetLocalizedDescription
12 CFNetwork 0x1bc800 _CFNetworkErrorGetLocalizedDescription
13 libdispatch.dylib 0x3f88 _dispatch_client_callout
14 libdispatch.dylib 0x7a08 _dispatch_block_invoke_direct
15 CFNetwork 0x256fb8 _CFURLStorageSessionDisableCache
16 CoreFoundation 0x16c20 CFArrayApplyFunction
17 CFNetwork 0x256e90 _CFURLStorageSessionDisableCache
18 CFNetwork 0x259408 _CFURLStorageSessionDisableCache
19 CoreFoundation 0xd5f24 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
20 CoreFoundation 0xe22fc __CFRunLoopDoSource0
21 CoreFoundation 0x661c0 __CFRunLoopDoSources0
22 CoreFoundation 0x7bb7c __CFRunLoopRun
23 CoreFoundation 0x80eb0 CFRunLoopRunSpecific
24 GraphicsServices 0x1368 GSEventRunModal
25 UIKitCore 0x3a1668 -[UIApplication _run]
26 UIKitCore 0x3a12cc UIApplicationMain
27 RNDC 0xbfb40 main + 29 (AppDelegate.swift:29)
28 ??? 0x1ec700960 (Missing)
To Reproduce

  • (void)parseResultAndUpdateWithName:(NSString *)name data:(NSData *)data error:(NSError *__autoreleasing *)error {
    NSError *parseError;
    NSArray *registrations = [SBRegistrationParser parseRegistrations:data error:&parseError];
    if (!parseError) {
    //When we getting nil array that time we found crashed
    *[storageManager updateWithRegistrationName:name registration:(SBRegistration )[registrations objectAtIndex:0]];
    } else if (error) {
    (*error) = parseError;
    }
    }

Code Snippet

  • (void)parseResultAndUpdateWithName:(NSString *)name data:(NSData *)data error:(NSError *__autoreleasing *)error {
    NSError *parseError;
    NSArray *registrations = [SBRegistrationParser parseRegistrations:data error:&parseError];
    if (!parseError) {
    //When we getting nil array that time we found crashed
    *[storageManager updateWithRegistrationName:name registration:(SBRegistration )[registrations objectAtIndex:0]];
    } else if (error) {
    (*error) = parseError;
    }
    }

Expected behavior
Handle nil array

Screenshots
image

[BUG] Xcode 15 Beta failing to compile with WindowsAzureMessaging dependency

Describe the bug
Whilst testing our project with Xcode 15/iOS17 using the first Xcode 15 beta, we have found that we are unable to compile the app as it complains about a missing header file in the WindowsAzureMessaging dependency, which is adding using SPM.

Obviously, a quick investigation can see that the file is there and nothing has changed between Xcode 14 and 15

Xcode 14.3.1 builds without issue
Exception or Stack Trace

Showing All Messages
/Users/user/Library/Developer/Xcode/DerivedData/EFOS-gkiizosydfslxzfdkuthkpfxczum/SourcePackages/checkouts/azure-notificationhubs-ios/WindowsAzureMessaging/WindowsAzureMessaging/Helpers/SBURLConnection.m:5:9: 'ANHAsync.h' file not found

To Reproduce

  • Open a workspace or project that is using WindowsAzureMessaging in Xcode 15 beta
  • Clean and Build
  • Notice the build error.

Code Snippet
Just failing to find the file

Expected behavior
Should build

Screenshots
image
image

Setup (please complete the following information):

  • OS: MacOS Venture 13.4/iOS 17.0 target
  • IDE : Xcode 15 Beta
  • Version of the Library used: 3.1.5

Additional context
We are unable to test our application against iOS 17 without removing the package

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

iOS Rich push with mutable-content property

Hi,
I'm trying to implement rich push notifications (with NotificationServiceExtension) for iOS(obj c), and I get a 400 error when sending the mutable-content property in the template with the method "registerTemplateWithDeviceToken". It might have some problem with the dash symbol (possibly). Does anyone know how to fix or work around this issue? Or if I'm way off somehow: what's the correct way to use the mutable-content property?

Bitcode is not full enabled

Hi,

I get an error as below:

ld: bitcode bundle could not be generated because '/Users/Vic/projects/projecta/WindowsAzureMessaging.framework/WindowsAzureMessaging(SBNotificationHub.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build file '/Users/Vic/projects/projecta/WindowsAzureMessaging.framework/WindowsAzureMessaging' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

But otool shows it contains bitcode:

Vic:projecta Vic$ (otool -arch arm64 -l WindowsAzureMessaging.framework/WindowsAzureMessaging | grep LLVM) || echo "no bitcode"
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM
segname __LLVM

Any ideas?

Thanks,

Vic

SwiftUI Previews in Xcode 14 not working while adding the WindowsAzureMessaging dependency

Describe the bug
Xcode Version 14.1 (14B47b) is unable to generate the SwiftUI Preview when adding WindowsAzureMessaging (v3.1.5) reference from GitHub.

Exception or Stack Trace
HumanReadableSwiftError

SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x0000600001a52820):'WindowsAzureMessaging'>)

To Reproduce

  1. Start Xcode Version 14.1 (14B47b)
  2. Load a Project referencing from GitHub the WindowsAzureMessaging library
  3. The project will build without errors
  4. Open a fire containing a View
  5. The SwiftUI preview fails with error

Expected behavior
I expect to see the preview of my SwiftUI view

Screenshots
Xcode

Setup (please complete the following information):

  • OS: macOS Ventura 13.0.1 (22A400)
  • IDE : Xcode Version 14.1 (14B47b)
  • WindowsAzureMessaging 3.1.5

Additional context
The issue I face seems to be similar to this: microsoft/appcenter-sdk-apple#2433

Add support for APN Provisional Push

Is your feature request related to a problem? Please describe.

iOS 12 supports the Provisional Push which changes how the APNS messages are displayed on the device. Currently, this is not supported as we request permissions on the SDK startup.

Describe the solution you'd like
If the customer indicates in the Info.plist of PROVISIONAL_PUSH is set to 1, then we could detect it while we are requesting permissions and add it to the list.

Describe alternatives you've considered
There are other notification types we may want to support, and not sure if adding via plist is the right way.

Additional context
Ping @twittemb for more context

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Description Added
  • Expected solution specified

[iOS] leakage of confidential information

There is a security vulnerability where device tokens can be read from iOS device since it is stored in NSUserDefaults, particularly below file,
iOS/WindowsAzureMessaging/WindowsAzureMessaging/Helpers/SBLocalStorage.m

Any plan to fix this?

Swift Package Manager support?

Is there a roadmap or discussion around SPM support for this library? This is something I'd be happy to contribute to if the team is open to it.

Question about tvOS support

Hello,

I'd like to use Azure's Notification Hub to send some notifications to the users that are using AppleTV.

Notifications on iOS are working great, but I can't use this package on tvOS.

Would it be possible to have a package made for tvOS?

ios9 support

Hello!

Could someone help me building iOS/bin/WindowsAzureMessaging.framework.zip with io9 support?
Sorry, but I use cordova and I don't know very much about xcode deploy and I am having some trouble with the new xcode.

Tks

IOS 13.1.2 | Authorization Failed 401 | iOS 12.4.1 works | using latest build 2.0.4 AZFM

On iOS 12.4.1 works perfectly. Upgraded Framework to latest build 2.0.4 AZURE MSG FMWK
On iOS 13.1.2 I run the same code and get a 401 error.

Any thoughts? Says token has expired in 13.1.2 every time.
Tokens are correct and urls are correct. I think there is something wrong with the signing or time calculation.

iOS XCODE Console Output. Changed some details.
URL:https://nsp1.servicebus.windows.net/hub1/Registrations/?$filter=deviceToken+eq+'C1DAAB...20B0F39631DFD8F'&api-version=2013-04

Headers:{
Authorization = "SharedAccessSignature sr=http%3a%2f%2fnsp1.servicebus.windows.net%2fhub1%2fregistrations%2f%3f%24filter%3ddevicetoken%2beq%2b%27c1daab..b0f39631dfd8f%27%26api-version%3d2013-04&sig=eLeMSA6M9NB7BUm2%2FtDR1P%2Fana0HWwYe814bKxf6Obg%3D&se=1570779011&skn=Test";
"Content-Type" = "application/xml";
"User-Agent" = "NOTIFICATIONHUBS/2013-04(api-origin=IosSdk; os=iOS; os_version=13.1.2;)";
}

Error registering for notifications: Error Domain=WindowsAzureMessaging Code=401 "URLRequest failed for <NSMutableURLRequest: 0x281b79960> { URL: https://nsp1.servicebus.windows.net/hub1/Registrations/?$filter=deviceToken+eq+'C1DAAB0...F39631DFD8F'&api-version=2013-04 } with status code: unauthorized"

UserInfo={NSLocalizedDescription=URLRequest failed for <NSMutableURLRequest: 0x281b79960> { URL: https://nsp1.servicebus.windows.net/hub1/Registrations/?$filter=deviceToken+eq+'C1DAAB085473C0209C8...0F'&api-version=2013-04 } with status code: unauthorized}

Error registering for notifications: 401

[BUG] Unable to use the released 3.1.5 xcframework build with my application, error when archiving: "bitcode bundle could not be generated"

Describe the bug
I am integrating the azurenotificationhub SDK with my framework project, when I create the archive for simulator architecture of my framework I get the error - "ld: bitcode bundle could not be generated because '/Users/xxxxxx/Library/Developer/Xcode/DerivedData/MySDK-dozgbwlspdaldbhkykrfqephjqxb/Build/Intermediates.noindex/ArchiveIntermediates/AuthSDK/BuildProductsPath/Release-iphonesimulator/WindowsAzureMessaging.framework/WindowsAzureMessaging(SBNotificationHub.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)"

Exception or Stack Trace
"ld: bitcode bundle could not be generated because '/Users/xxxxxx/Library/Developer/Xcode/DerivedData/MySDK-dozgbwlspdaldbhkykrfqephjqxb/Build/Intermediates.noindex/ArchiveIntermediates/AuthSDK/BuildProductsPath/Release-iphonesimulator/WindowsAzureMessaging.framework/WindowsAzureMessaging(SBNotificationHub.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)"

To Reproduce
Steps to reproduce the behavior:
Integrate the WindowsAzureMessaging.xcframework with project and try to generate the archive from command line using the "xcodebuild archive -scheme MySDK -destination "generic/platform=iOS Simulator" -archivePath "../MySDKFramework/MySDK-iphonesimulator" SKIP_INSTALL=NO ENABLE_BITCODE=YES"

Expected behavior
I need to generate the .xcarchive for my project with ENABLE_BITCODE=YES. So that I can create the xcframework version of my SDK.

Setup (please complete the following information):

  • OS: iOS 15.0
  • IDE : Xcode 13.0
  • Version of the Library used : 3.1.5

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [*] Bug Description Added
  • [*] Repro Steps Added
  • [*] Setup information Added

[BUG] [MSInstallation isEqualToMSInstallation:] is passing nil to NSCalendar method

Describe the bug
[MSInstallation isEqualToMSInstallation:] is passing nil to NSCalendar method. This is generating the following log spew from Apple, which indicates this will be an exception in the future:
*** -[NSCalendar isDate:equalToDate:toUnitGranularity:]: date1 cannot be nil
Future exception.
A few of these errors are going to be reported with this complaint, then further violations will simply be ignored.

Exception or Stack Trace

CoreFoundation 0x00000001a68b4168 935533F2-35EE-314E-A760-E74521F68435 + 1278312
WindowsAzureMessaging 0x0000000102ca3724 -[MSInstallation isEqualToMSInstallation:] + 588
WindowsAzureMessaging 0x0000000102ca3d30 -[MSInstallation isEqual:] + 204
WindowsAzureMessaging 0x0000000102c9ba40 -[MSDebounceInstallationManager execute] + 120

This codepath should nil check before calling the NSCalendar API.

To Reproduce

  1. Start MSNotificationHub
  2. Set the user ID

Code Snippet
Seems to ultimately be triggered by setting the user ID:

MSNotificationHub.setUserId("\(userId.lowercased())")

Expected behavior
A clear and concise description of what you expected to happen.

Setup (please complete the following information):

  • OS: iOS 14.3
  • IDE : Xcode 12.3
  • WindowsAzureMessaging 3.1.1 (SwiftPM)

Additional context

(lldb) po self.expirationTime
 nil
(lldb) po installation.expirationTime
2021-04-06 02:55:33 +0000

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

iOS: [SBNotificationHub unregisterAllWithDeviceToken:completion:] doesn't unregister all registrations

If an iPhone has two registrations with the same device token, one call to unregisterAllWithDeviceToken:completion: seems like it would delete them both. The actual behavior is that unregisterAllWithDeviceToken:completion: needs to be called twice--each call deletes one registration. Here's my incomplete understanding of what's going on:

SBNotificationHub.m:

- (void) deleteRegistrationWithName:(NSString*)templateName completion:(void (^ (NSError*))completion
{
    StoredRegistrationEntry* cached = [storageManager getStoredRegistrationEntryWithRegistrationName:templateName];
    if(cached == nil)
    {
        if(completion)
        {
            completion(nil);
        }

        return;
    }
    // snip HTTP DELETE call
}    

unregisterAllWithDeviceToken calls deleteRegistrationWithName for each registration returned by retrieveAllRegistrationsWithDeviceToken. Because my registrations were created by registerNativeWithDeviceToken, templateName == "$Default" for both registrations. The first call successfully retrieves a StoredRegistrationEntry for name $Default and hits the Web service, deleting one of the two registrations. The second call to deleteRegistrationWithName gets no registrations for name $Default and fails silently.

At this point, if retrieveAllRegistrationsWithDeviceToken is called again, the cache in storageManager refreshes, and deleteRegistrationWithName will successfully delete the remaining registration.

[BUG] Background notifications are not catched

Describe the bug
I'm integrating Azure Notification Hubs in an iOS app. I use the azure notification hub portal to send a notification to my app.
While the app is in foreground the notification is received and the function "func notificationHub(didReceivePushNotification:)" is called. I'm able to read the payload.
But while the app is in background, the notification is displayed by the OS as a banner, when I click on it, then the app is put back to foreground but the function "func notificationHub(didReceivePushNotification:)" is never called.

I've tried with the SwiftUI sample app, and I have the same behaviour.

Could this be because of the Token based authentication to the APNs ?
Is the Test Send function able to send background notifications ?

Exception or Stack Trace
The first time I click on the banner (log from the sample app):

2020-09-23 16:48:40.186513-0400 SampleNHAppSwiftUI[6769:2781293] [connection] nw_read_request_report [C1] Receive failed with error "Software caused connection abort"

To Reproduce
Steps to reproduce the behavior:

  • Go to Azure notification Hub portal / Test Send
  • pick Apple for the platforms
  • leave the payload as is
  • send the notification
  • the notification is sent and received

Code Snippet
in the AppDelegate:

MSNotificationHub.start(connectionString: connectionString, hubName: hubName)

in the SceneDelegate

MSNotificationHub.setDelegate(self)
MSNotificationHub.setLifecycleDelegate(self)

...

func notificationHub(_ notificationHub: MSNotificationHub!, didReceivePushNotification message: MSNotificationHubMessage!) {
    NSLog("Received notification: %@; %@", message.title ?? "<nil>", message.body ?? "<nil>")
}

Expected behavior
While in background, the notification is displayed as a banner. When the banner is clicked, the app is put in foreground and the notification payload is accessible in the function "func notificationHub(didReceivePushNotification:)"

Screenshots
If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: iOS 14
  • IDE : Xcode 12
  • Version of the Library used: 3.1.1
  • the method swizzling is still activated
  • I'm using a Token based authentication with the APNs (not a Certificate method)

Additional context
Add any other context about the problem here.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [ x] Bug Description Added
  • [ x] Repro Steps Added
  • [ x] Setup information Added

[UPDATE]

The only way I can make it work is by making the AppDelegate conform to UNUserNotificationCenterDelegate and call UNUserNotificationCenter.current().delegate = self before starting MSNotificationHub.start

Do you confirm ?

Build failure in Objective C++ projects [BUG]

Describe the bug
Some of the files like MSNotificationHub.m and MSNotificationHub.h use "template" as the name for properties which is a reserved keyword in Objective C++, this essentially prevents projects that use Objective C++ from calling this library and this also affects React Native users as the latest version of the framework uses Objective C++ for the AppDelegate.mm

Exception or Stack Trace
Expected identifier; 'template' is a keyword in Objective-C++

To Reproduce
Reference the library in .mm files.

Code Snippet
+ (BOOL)setTemplate:(MSInstallationTemplate *)template forKey:(NSString *)key { return [sharedInstance setTemplate:template forKey:key]; }

this and other similar code where "template" keyword is used.

Expected behavior
The project should compile without errors.

Setup (please complete the following information):

  • OS: 16.2
  • IDE : 14.2
  • Version of the Library used: 3.1.5

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

[BUG] Adding a template crashes 3.0.1

Describe the bug

Using the 3.0.1 SDK I'm seeing a crash when adding a template.

Exception or Stack Trace

2020-08-10 16:30:58.202232-0400 MyApp [4715:2125173] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (MSInstallationTemplate)'
*** First throw call stack:
(0x1a72fd654 0x1a701fbcc 0x1a7775b7c 0x1a77784a0 0x1a734ac14 0x1a71d6fc4 0x1a77779d0 0x1a77784a0 0x1a734ac14 0x1a71d551c 0x1a77779d0 0x1a762d00c 0x1a762cc90 0x1006ab280 0x1006a43e8 0x1006a3708 0x1a76f6d94 0x1a727c134 0x1a727be50 0x1a727b52c 0x1a727653c 0x1a7275ba8 0x1b13e5344 0x1ab3b13e4 0x100146144 0x1a70fd8f0)
libc++abi.dylib: terminating with uncaught exception of type NSException

MSInstallation.m is converting a dictionary to JSON but one of the elements (templates array) of the dictionary isn't a supported type, causing the crash:

(lldb) po dictionary
{
    expirationTime = "2020-11-08T15:33-0500";
    installationId = "some_id";
    platform = apns;
    pushChannel = device_token;
    tags =     (
        "my_tag"
    );
    templates =     {
        template = "<MSInstallationTemplate: 0x2839ab5a0>";
    };
}

To Reproduce
Run the code in the code snippet.

Code Snippet

        let body =
        """
        {
          "aps": {
            "alert": "$(message)"
          }
        }
        """
        let template = MSInstallationTemplate()
        template.body = body
        template.addTag(azureTag)
        MSNotificationHub.setTemplate(template, forKey: "template")

Expected behavior
I expect the template to register and no crash.

Setup (please complete the following information):

  • OS: iOS 13.6
  • IDE : Xcode 11.6
  • Version of the Library used: 3.0.1 via SPM

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

[iOS] tags are sent in undetermined order, makes unit testing more difficult

I notice that the SBNotificationHub register* methods take an NSSet of tags which works fine.

However, the in the unit tests the body is compared via string comparison. Since the order of the members of the set is undefined, I have noticed that the tests sometimes pass and sometimes fail (in fact it looks like 64-bit simulated devices order them one way, and 32-bit the other).

In my local repo I have "fixed" this issue by converting the set to a sorted array in

SBNotificationHubHelper convertTagSetToString:

but a better alternative might be to rewrite the TestHelper.m to extract the <Tags>...</Tags> section of the body and validate that separately.

[BUG] First launch can't receive notification by tags on iOS.

Describe the bug
First launch can't receive notification by tags on iOS.

Exception or Stack Trace
Receive notification by tags on first launch

To Reproduce
Steps to reproduce the behavior:

  1. Install App
  2. Send to Tag Expression
  3. Not receive

Code Snippet
Add the code snippet that causes the issue.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: iOS 15.7.3
  • IDE : Xcode 14.2
  • Version of the Library used

Additional context
If we assign the tags ourselves on the phone side. We get the notifications.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added

[QUERY] How to remove SceneDelegate and implement in @main struct?

Query/Question
A clear and concise ask/query.
I have created SwiftUI project for iOS14 which doesn't include neither AppDelegate nor SceneDelegate.

But the SampleNBHAppSwiftUI project has both AppDelegate and SceneDelegate and I understand that AppDelegate should be implemented in order to get the notification even in iOS14.
but I would like to move SceneDelegate functions to @main App.
Is this possible?
If so, how can I achieve this?

Why is this not a Bug or a feature Request?
This is just to remove confusing between old sample to match the current iOS14 project configuration.

Setup (please complete the following information if applicable):

  • OS: iOS 14.0
  • IDE : Xcode 12.3
  • Version of the Library used: v3.1.2

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Query Added
  • Setup information Added

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.