(sorry for the non clickable links, it's my first post, and seems I cannot put url yet)
I'm quite lost here. It has been a few hours I'm stuck on this one.
I enabled Push Notifications service to my existing App ID through the Provisioning Portal on Apple's website.
I regenerated the provisioning profiles and downloaded them on my mac. Push notifications is correctly added to the provisioning profiles.
In Debug Mode everything works as expected. I can start my app in debug mode on my iPhone and I receive correctly push notifications.
When I try to deploy the app in Release Mode on my iPhone, I got the following error:
VerifyingApplication - PercentComplete: 40%
ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.2G7ky8/extracted/restofriends.iOS.app : 0xe8008016 (The executable was signed with invalid entitlements.)
error MT1006: Could not install the application '/Users/julien/Projects/stoemp-front/iOS/bin/iPhone/Release/restofriends.iOS.app' on the device 'iPhone de Julien': 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).
Application could not be uploaded to the device.
I compared the entitlements of the app and the embedded provisioning profile like explained here but content is the same:
I split my Entitlements.plist file into two files, to be sure to have 'production' as aps-environment when in Release mode.
Nothing change, still always have the same error.
I tried to rebuild, to restart Visual Studio, and even restarted my iPhone, still always have the same error.
Visual Studio for Mac Version 7.5.2 (build 40)
Xcode 9.4 (14160)
Any idea ??