Xamarin.iOS Notification Extension Service - One Signal

I have been trying to implement the notification badge count that One Signal provides.

I follow their tutorial https://documentation.onesignal.com/docs/xamarin-sdk-setup#section-5-ios-add-the-notification-extension-service

And I also registered the App group in the apple developer portal and added it to the provision profile.

But when I try to deploy I get this error:

The executable was signed with invalid entitlements.

I think the problem is that the provision profile I have set in the iOS project doesn't show in the Notification Extension project, so I just set it to Automatic Provisioning. Any idea why the provision profile doesn't show?

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    After registering the App Group, you should configure your containing app's and extension app's IDs. Enable the App Groups capability in the developer portal. Then return back to your corresponding provisioning profiles, re-add the app IDs again. At last down load these provisioning files on your mac, reinstall them again.
    Then you can use them on Visual Studio both for Mac or Windows. Please check if you have written the correct group id in your entitlements.plist file. And don't use the Automatic Provisioning, manually choose the provision profile you downloaded just now. Also do not forget to configure the extension app's settings.

  • joaopalmajoaopalma Member ✭✭

    @LandLu said:
    After registering the App Group, you should configure your containing app's and extension app's IDs. Enable the App Groups capability in the developer portal. Then return back to your corresponding provisioning profiles, re-add the app IDs again. At last down load these provisioning files on your mac, reinstall them again.
    Then you can use them on Visual Studio both for Mac or Windows. Please check if you have written the correct group id in your entitlements.plist file. And don't use the Automatic Provisioning, manually choose the provision profile you downloaded just now. Also do not forget to configure the extension app's settings.

    The problem is that the provision profile that I downloaded and installed doesn't show up in the Extension project.

  • joaopalmajoaopalma Member ✭✭
    edited October 2018

    I fixed it.

  • LandLuLandLu Member, Xamarin Team Xamurai

    @joaopalma Glad you solved it. And if you felt this helpful for you, could you mark it as an answer?

  • ahmed.2117ahmed.2117 USMember ✭✭

    I encountered the same problem now,

    this is the error

    ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.YAShhi/extracted/MyApp.iOS.app/PlugIns/OneSignalNotificationServiceExtension.appex : 0xe8008016 (The executable was signed with invalid entitlements.)
    error MT1006: Could not install the application

    '/../../../MyApp.iOS/bin/iPhone/Release/MyApp.iOS.app' on the device 'Iphone': Your code signing/provisioning profiles are not correctly configured. Probably you have an entitlement not supported by your current provisioning profile, or your device is not part of the current provisioning profile. Please check the iOS Device Log for details (error: 0xe8008016).

    I think it is the provisioning of the service extension. But I couldn't get around it.

    Any help ?

Sign In or Register to comment.