Select your project and select your main target. Then go to Signing & Capabilities. Then click on + Capability and search for push notifications and add it.

Click on + Capability again and search for background modes. Add it and select Remote notifications.

In order for MagicPush to keep track of the notification delivery status we need a notification service extension to be added. Go to file → New → Target, select Notification Service Extension and click next.

Change the Product Name to MagicPushNotificationServiceExtension and click on finish.

Be sure to click on Cancel when you get the Activate scheme prompt.
Using App Groups allows your app and the MagicPushNotificationServiceExtension to communicate with the server when a notification is received, even when the app is not running.
Select your main app target → signing & capabilities and click on + Capability and search for App Groups.

Then click on the + button and set the container name to group.BUNDLE IDENTIFIER OF YOUR APP.magicpush. Where BUNDLE IDENTIFIER OF YOUR APP is the same as your main application bundle identifier.

Click OK and do the same for the MagicPushNotificationServiceExtension. Use the same container name as the main app target.
