I've run into the exact same problem described here:
But unfortunately the discussion ends with the discussion creator just writing: "I fixed it", without any explanation.
I've followed the official guide, and I can finally add the correct Provisioning Profile to the main project. However when trying to select the correct Provisioning Profile for the extension-project it's not available. It seems it's not available because of the mismatch in BundleID, but you can't have the same ID for both the main project and the extension. I've used the suggested BundleID: my.real.bundleid.OneSignalNotificationServiceExtension.
I'm not sure what to do now?