Tag: xcode

推送消息不会使用分布式证书发送

我可以使用沙箱发送推送器p12文件的推送通知,但是我在appstore上的应用程序,我使用配置证书f12文件使用gateway.push.apple.com消息无法到达设备。 推送通知服务已在distirbuted证书上激活,我在developer.apple.com上查看,我也在尝试新的设备ID。 (不是开发者设备ID) 我怎样才能解决我的问题? 你可以帮帮我吗? 我哪里错了? 我的C#代码如下: int port = 2195; String hostname = “gateway.push.apple.com”; String certificatePath = HttpContext.Current.Server.MapPath(“distribution.p12”); X509Certificate2 clientCertificate = new X509Certificate2(System.IO.File.ReadAllBytes(certificatePath), “xxx”, X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable); X509Certificate2Collection certificatesCollection = new X509Certificate2Collection(clientCertificate); TcpClient client = new TcpClient(hostname, port); SslStream sslStream = new SslStream(client.GetStream(), false, new RemoteCertificateValidationCallback(ValidateServerCertificate), null); try { sslStream.AuthenticateAsClient(hostname, certificatesCollection, SslProtocols.Tls, […]

需要调试从客户端计算机请求的Web API服务 – 需要帮助,我该怎么做?

我构建了一个Web API服务,该服务在我的IIS机器上本地托管。 我有一个iOS应用程序,我通过XCode运行,调用Web服务。 连接就在那里,并且有效。 iOS应用程序成功连接到我发布的Web服务。 问题是我的Web服务正在向客户端(iOS)返回一个非描述性错误,因此我需要做的是在运行我的iOS应用程序时单步执行Web服务代码。 所以,总结一下: 我通过MacBook运行iOS应用程序,它连接到我的.NET Web API服务。 我的Web API服务发布到我的本地IIS,并将错误返回给客户端。 在Visual Studio中没有遇到断点 – 我是否需要将Visual Studio调试器附加到特定进程? 我已经尝试在运行我的iOS应用程序时以调试模式运行我的Web服务,但无济于事。 如何在运行访问Web服务的客户端应用程序(iOS)时单步执行我的Web服务代码?