title: Flutter iOS app submission issue warning: Missing Push Notification Entitlement
body: <p>After uploading a Flutter app to App Store Connect, I got the following email warning:</p>
  
  <blockquote>
    <p>Dear Developer,</p>
    
    <p>We identified one or more issues with a recent delivery for your app,
    "[APP NAME]". Your delivery was successful, but you may wish to correct
    the following issues in your next delivery:</p>
    
    <p><strong>Missing Push Notification Entitlement</strong> - Your app appears to register with the Apple Push Notification service, but the app
    signature's entitlements do not include the "aps-environment"
    entitlement. If your app uses the Apple Push Notification service,
    make sure your App ID is enabled for Push Notification in the
    Provisioning Portal, and resubmit after signing your app with a
    Distribution provisioning profile that includes the "aps-environment"
    entitlement. Xcode does not automatically copy the aps-environment
    entitlement from provisioning profiles at build time. This behavior is
    intentional. To use this entitlement, either enable Push Notifications
    in the project editor's Capabilities pane, or manually add the
    entitlement to your entitlements file. For more information, see
    <a href="https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1" rel="noreferrer">https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1</a>.</p>
    
    <p>After you’ve corrected the issues, you can use Xcode or Application
    Loader to upload a new binary to App Store Connect.</p>
    
    <p>Best regards,</p>
    
    <p>The App Store Team</p>
  </blockquote>
  
  <p>I don't use push notifications in my app? Why am I getting this warning? And how do I remove the "aps-environment" entitlement, wherever and whatever that is?</p>
  
  <p><strong>Note:</strong> This App Store issue has appeared multiple times on SO, sometimes because people needed to add push notifications (see <a href="https://stackoverflow.com/questions/14807129/missing-push-notification-entitlement">this</a> and <a href="https://stackoverflow.com/questions/27945557/missing-push-notification-entitlement-warning">this</a>) and sometimes because they didn't (see <a href="https://stackoverflow.com/questions/32261604/missing-push-notification-entitlement-ios-app-submission-i-dont-use-it">this</a> and <a href="https://stackoverflow.com/questions/32127500/how-to-remove-push-notification-api/32128846#32128846">this</a>). This appears to be Flutter related in my case, though, so I am adding a new question.</p>