缺少推送通知授權 - 您的應用似乎向Apple推送通知服務註冊,但應用程序簽名的授權不包含「aps-environment」授權。如果您的應用使用Apple推送通知服務,請確保在Provisioning Portal中爲您的App ID啓用推送通知,並在使用包含「aps-environment」權利的Distribution provisioning配置文件簽署應用後重新提交。 Xcode 8不會在構建時自動從配置配置文件複製aps-environment權利。這種行爲是故意的。要使用此權利,請在項目編輯器的「功能」窗格中啓用推送通知,或手動將權利添加到您的權利文件。有關更多信息,請參閱https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1。來自蘋果的APNS警告,即使我在我的應用程序中沒有使用APNS
當我上傳構建以測試飛行時,我從Apple獲得以下郵件。
自從我整合了google sdk並在我的應用程序中實現了谷歌登錄後,這一直髮生。
我沒有在我的應用程序中啓用推送通知,也沒有任何問題與證書。即使在功能選項卡推送通知關閉
我似乎不明白問題是什麼。我不想啓用推送通知,因爲我沒有在我的應用程序中使用它。
任何幫助將不勝感激。謝謝。
以下是我參考
@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()
}
}
你檢查功能標籤? –
您的應用程序包是否包含使用推送通知的任何庫? –
APNS在功能選項卡 –