如何调试在Azure中的测试发送? [英] How to debug a Test Send in Azure?

查看:267
本文介绍了如何调试在Azure中的测试发送?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置我的.Net后端和iOS客户端在蔚蓝之间的全成推送通知。我跟着<一个href=\"https://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-how-to-troubleshoot/#RuntimeDebugging\"相对=nofollow>这个例子的附加到我的调试器,并能够尽可能获得尽可能打从我的iPhone了一台iMac的动作在我的电脑我的Visual Studio中的破发点

结果对象既不是投掷的错误,也没有返回结果!

所以,我切换方向,目前正试图调试只发送一个测试发送天青(见图片)。我又得到一个消息说:成功发送测试邮件结果{0过去了,0失败},但没有什么显示在我的iPhone了。
我认为,行为类似于一个在code和解决人会解决其他:
A.它是安全的假设,因为我创下code断点我在苹果开发者设置是正确的?
B.你会如何找出0通过了奇怪的消息和0失败!?

在这里输入的形象描述

更新#1 - 韦斯利McSwain:
谢谢回答。我是按照此<一个href=\"https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-ios-get-started-push/\"相对=nofollow>教程其中有这样迅速的注册:

  FUNC应用程序(应用程序:UIApplication的,
  ?didFinishLaunchingWithOptions launchOptions:[NSObject的:AnyObject]) - GT;布尔{
   application.registerUserNotificationSettings(
       UIUserNotificationSettings(forTypes:[.Alert,.Badge,.Sound]
           类别:无))
   application.registerForRemoteNotifications()
   返回true
}

我可以逐步通过code罚款。 ?顺便说一句错误.DESCRIPTION在这另一种方法完成​​处理程序是零:

  FUNC应用程序(应用程序:UIApplication的,
   didRegisterForRemoteNotificationsWithDeviceToken deviceToken:NSData的){
    ClientManager.sharedClient.push?.registerDeviceToken(deviceToken){错误
        打印(错误登记的通知:,错误.DESCRIPTION)
    }
}


解决方案

我终于已经能够接收通知,昨晚。我继续重做使用本教程的所有苹果端安装步骤整个演练:的发送推送通知到iOS与Azure的通知集线器的然后用这个东西蔚蓝端:的创建iOS应用和<一个href=\"https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-ios-get-started-push/\"相对=nofollow>推送通知添加到您的iOS应用。
这照顾设备的注册应用程序的成功,这是我能够用音符AdrianHall该线程中进行验证。
但是,这还不够。 Azure的教程不及详述英寸x code所需的步骤,我在这里找到:的 [如何在iOS的设置远程推送通知 - 雨燕2.0​​ code
我没有设置在X code或类似的东西的推送通知。

我希望这详细的解答将节省您通过挖掘多小时。

I am trying to setup a successfull push notifications between my .Net backend and ios client in azure. I followed this example to attach to my debugger and was able to get as far as hitting a break point in my visual studio in my pc by an action from my iphone with an iMac

The result object is neither throwing error nor returning results!

so, I've switched direction and now trying debug by only sending a Test Send in Azure (see pic). Again I get a message saying: "Successfully sent test message. Outcome {0 passed, 0 failed}" but there is nothing showing up on my iphone. I think the behavior is similar to the one in code and solving one would solve the other: A. Is it safe to assume that since I am hitting the breakpoint in code that my setup in Apple Developer is correct? B. How would you figure out the strange message of 0 Passed and 0 failed!?

UPDATE #1 - Wesley McSwain: thanks for answering. I was following this tutorial which had this swift registration:

func application(application: UIApplication,
  didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
   application.registerUserNotificationSettings(
       UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound],
           categories: nil))
   application.registerForRemoteNotifications()
   return true
}

I can step through that code fine. btw the error?.description in the completion handler of this other method is nil:

func application(application: UIApplication,
   didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
    ClientManager.sharedClient.push?.registerDeviceToken(deviceToken) { error in
        print("Error registering for notifications: ", error?.description)
    }
}

解决方案

I finally have been able to receive notifications last night. I went ahead and redid an entire walk-through of all apple-side installation steps using this tutorial: Sending push notifications to iOS with Azure Notification Hubs then the azure-side of things using this: Create an iOS app and Add Push Notifications to your iOS App. That took care of the registering the app of the device successfully, which I was able to verify using the note of AdrianHall in this thread. But that wasn't enough. The Azure tutorials fell short detailing the steps needed in Xcode, which I found here: [How To] Setup Remote Push Notification in iOS - Swift 2.0 Code I didn't have to setup any "push notification" in Xcode or anything like that.

I hope this detailed answer will save you many hours of digging through.

这篇关于如何调试在Azure中的测试发送?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆