Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ITMS-90078: Missing Push Notification Entitlement #368

Open
DonnieBLT opened this issue Mar 2, 2024 · 12 comments
Open

ITMS-90078: Missing Push Notification Entitlement #368

DonnieBLT opened this issue Mar 2, 2024 · 12 comments

Comments

@DonnieBLT
Copy link
Collaborator

DonnieBLT commented Mar 2, 2024

The warning "ITMS-90078: Missing Push Notification Entitlement" occurs when your iOS app has been submitted to the App Store without the necessary push notification entitlements configured, but your app or its frameworks use APNs (Apple Push Notification service) features.

To fix this issue in a Flutter project, follow these steps:

  1. Enable Push Notifications in Xcode:

    • Open your iOS project in Xcode (located in <your_project>/ios folder).
    • Select your app's target and go to the "Signing & Capabilities" tab.
    • Click on "+ Capability" button and add "Push Notifications".
  2. Ensure your App ID is Configured for Push Notifications:

    • Go to the Apple Developer Member Center.
    • Navigate to "Certificates, IDs & Profiles" > "Identifiers".
    • Find your app's identifier and make sure "Push Notifications" service is enabled.
  3. Provisioning Profile:

    • Make sure you have a provisioning profile that includes push notifications for your app.
    • If needed, generate a new provisioning profile that includes the push notification entitlement and download it.
    • Double-click the downloaded file to install it in Xcode.
  4. Update your Flutter project:

    • If you made changes to the entitlements or provisioning profile, you might need to clean and rebuild your Flutter project.
    • Open a terminal, navigate to your Flutter project directory, and run:
      flutter clean
      flutter build ios
      
  5. Re-submit your app:

    • After making the necessary changes, archive your app again in Xcode and submit it to the App Store via Xcode or the Application Loader.

Note: If your app does not use push notifications, this error could also be triggered by a third-party library that references APNs. In this case, you may need to remove the library or disable its push notification features if not used.

Before re-submitting your app, make sure to test it thoroughly to ensure that the push notification capabilities are correctly implemented and that there are no other entitlement issues.

@github-project-automation github-project-automation bot moved this to Backlog in 📌 All Mar 2, 2024
@DonnieBLT DonnieBLT moved this from Backlog to Ready in 📌 All Mar 2, 2024
@Uttkarsh-raj
Copy link
Contributor

Uttkarsh-raj commented Jun 11, 2024

@DonnieBLT Just for the clarification can you confirm if this is an "error" or a "warning" cause i found a discussion regarding this. Does this answer by Sten in this discussion https://stackoverflow.com/questions/32251123/missing-push-notification-entitlement solves this ?

@DonnieBLT
Copy link
Collaborator Author

Thanks for the clarification, it's a warning but it sends an extra email each time the app has a PR.

@Uttkarsh-raj
Copy link
Contributor

Thanks for the clarification, it's a warning but it sends an extra email each time the app has a PR.

Is this regarding the deployment part? Or is the email being generated by some CI/CD pipeline?

@DonnieBLT
Copy link
Collaborator Author

the CI/CD publishes the app to the app store for testing on each PR / merge

@Uttkarsh-raj
Copy link
Contributor

Is it possible to get a look into this pipeline?

@DonnieBLT
Copy link
Collaborator Author

@Uttkarsh-raj
Copy link
Contributor

Can you share the email that is being sent it would make it easy to figure this out..

@DonnieBLT
Copy link
Collaborator Author

image

@Uttkarsh-raj
Copy link
Contributor

I think this is due to the Publishing and the Post Processing steps in the workflow... the app is being built 2 times and maybe that is why it is generating 2 emails..

@DonnieBLT
Copy link
Collaborator Author

Can we please prioritize this?

@DonnieBLT
Copy link
Collaborator Author

@Uttkarsh-raj can you please add your comments here of how we can fix this?

@Uttkarsh-raj
Copy link
Contributor

The error message indicates that your app is attempting to use the Apple Push Notification service but lacks the required aps-environment entitlement. Here’s how you can resolve this issue:

Steps to Add aps-environment Entitlement

  1. Enable Push Notifications in Xcode:

    • Open your project in Xcode.
    • Select your project in the Project Navigator.
    • Select your app target.
    • Go to the "Signing & Capabilities" tab.
    • Click the "+" button to add a new capability.
    • Add the "Push Notifications" capability.
  2. Modify the Entitlements File:

    • Ensure you have an Entitlements file (e.g., Runner.entitlements).

    • If you don't have one, create a new one:

      • Right-click on your project in the Project Navigator.
      • Select "New File...".
      • Choose "iOS" -> "Resource" -> "Property List".
      • Name the file Runner.entitlements.
    • Add the following key to your entitlements file:

      <key>aps-environment</key>
      <string>development</string>
    • Change development to production when you are ready to distribute your app.

  3. Ensure Proper Signing:

    • Go to the "Signing & Capabilities" tab.
    • Make sure that the correct team is selected and that the Automatically manage signing checkbox is checked.
    • Ensure that your Provisioning Profile includes the aps-environment entitlement.
  4. Update the Podfile (if necessary):

    • If you’re using any specific Pods that require additional permissions or capabilities, ensure they are correctly configured.

Here is a sample Runner.entitlements file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>aps-environment</key>
  <string>development</string>
</dict>
</plist>

After making these changes, follow these steps:

  1. Clean and Build:

    • In Xcode, go to Product -> Clean Build Folder.
    • Then build your project again.
  2. Archive and Upload:

    • Create a new archive (Product -> Archive).
    • Validate and upload your app to App Store Connect.
  3. Check Notifications:

    • Ensure you handle the push notification registration and incoming notifications correctly in your app code.

By following these steps, you should be able to resolve the ITMS-90078 issue regarding the missing push notification entitlement. If you have further issues with multiple notifications being generated, ensure that your notification handling logic is correctly implemented and that you are not inadvertently registering for push notifications multiple times during the build stages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

2 participants