Missing Push Notification Entitlement - 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 8 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 https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1.
When I upload a build to test flight I get the following mail from Apple.
And this has been happening since I Integrated the google sdk and implemented google sign in in my app.
I haven't enabled push notifications in my app and nor is there any problem with the certificates. Even in the capabilities tab push notifications are turned off
I don't seem to understand what the problem is. I don't want to enable push notifications as I am not using it in my app.
Any help will be appreciated. Thank you.
Following is my AppDelegate for reference
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, GIDSignInDelegate, GIDSignInUIDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let console = ConsoleDestination()
log.addDestination(console)
Mixpanel.initialize(token: AppConfig.mixPanelProjectToken)
var configureError: NSError?
GGLContext.sharedInstance().configureWithError(&configureError)
if MixpanelTweaks.assign(MixpanelTweaks.showView) {
navigateToView()
}
if let infoPlist = Bundle.main.infoDictionary,
let config = infoPlist["TwitterKeys"] as? Dictionary<String, AnyObject> {
let consumer = config["consumerSecret"] as? NSString
let consumerSecret = config["ConsumerKey"] as? NSString
Twitter.sharedInstance().start(withConsumerKey:consumerSecret as! String, consumerSecret:consumer as! String)
}
// Override point for customization after application launch.
return FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
}
func navigateToView(){
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let initialViewController = storyboard.instantiateViewController(withIdentifier: "InitialViewNavigationController")
self.window?.rootViewController = initialViewController
self.window?.makeKeyAndVisible()
}
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
let handled = FBSDKApplicationDelegate.sharedInstance().application(app, open: url, sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as! String, annotation: options[UIApplicationOpenURLOptionsKey.annotation])
GIDSignIn.sharedInstance().handle(url,
sourceApplication:options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String,
annotation: [:])
Twitter.sharedInstance().application(app, open: url, options: options)
return handled
}
func sign(_ signIn: GIDSignIn!, didDisconnectWith user: GIDGoogleUser!, withError error: Error!) {
}
func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {
}
func signIn(signIn: GIDSignIn!, didSignInForUser user: GIDGoogleUser!,
withError error: NSError!) {
}
func applicationWillResignActive(_ application: UIApplication) {
FBSDKAppEvents.activateApp()
}
func applicationDidEnterBackground(_ application: UIApplication) {
}
func applicationWillEnterForeground(_ application: UIApplication) {
}
func applicationDidBecomeActive(_ application: UIApplication) {
}
func applicationWillTerminate(_ application: UIApplication) {
GIDSignIn.sharedInstance().signOut()
}
}