MDM:APNS通知没有达到iPhone [英] MDM: APNS notification does not reach iPhone

查看:226
本文介绍了MDM:APNS通知没有达到iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的通知没有达到一个终端。
请告诉我。
你好。谢谢。

iPhone 4S的的iOS 5.1
我写了下面的Ruby脚本。
并其从MDM服务器执行。
不过,公告没有达到iPhone的终端。
请告诉我。
通过mobileconfigA安装已经完成,题目和设备令牌已经投入到MDM服务器。
它检查了正确的信息也的可得,
据证实,消息或徽章的续期到的APN的iPhone终端进行。
只有MDM中的APN没有达到iPhone的终端。
我想解决这个问题。
如果你愿意,请帮助我。

 #!的/ usr / bin中/红宝石-ku
需要'openssl的'
需要'插座'(味精= [])LT;< dd0b64b77ebcac2092d6fe644d4db04e39d577c0228cf2187d8f87966aff8234
设备= msg.pack(H *)
插座= TCPSocket.new('gateway.sandbox.push.apple.com',2195)
#socket = TCPSocket.new('gateway.push.apple.com',2195)
上下文= OpenSSL的SSL :: :: SSLContext.new('的SSLv3')
context.cert = OpenSSL的:: X509 :: Certificate.new(File.read('nj_dev_apns-dev.pem'))
context.key = OpenSSL的:: PKEY :: RSA.new(File.read('nj_dev_apns-DEV-关键noenc.pem'))
SSL = OpenSSL的SSL :: :: SSLSocket.new(插座,上下文)
ssl.connect有效载荷= LT;< -EOS
{
    #MDM:{< PushMagic>}
    {MDM:7C68976X-E70D-485Q-8CA7-7AC48F2F5F4A}
}
EOS(消息= [])LT;< [0]包(H)LT;< [32] .pack(N)
  <<设备<&下; [payload.size] .pack('N')LT;<有效载荷
ssl.write(message.join(''))
ssl.close
socket.close


解决方案

我的建议是首先尝试生产APNS,所以使用这个网址:gateway.push.apple.com,如果你使用的是IPCU产生mobileconfig,然后在MDM负载不要选择选项使用APNS开发服务器。
而看到<一个href=\"http://stackoverflow.com/questions/10571190/apns-notifications-not-reaching-devices-enrolled-in-apple-mdm\">this也。

A notice does not reach a terminal. Please let me know. Hello. Thank you.

iPhone 4S iOS 5.1 I wrote the following ruby script. And it performed from the MDM server. However, a notice does not reach an iPhone terminal. Please let me know. A setup by ."mobileconfig" was completed and the topic and the device token have been PUT to the MDM server. It checked that the right information was also acquirable, It is confirmed that renewal of a message or a badge is made to an iPhone terminal in APNs. Only APNs of MDM does not reach an iPhone terminal. I would like to solve this problem. If you please, please help me.

#!/usr/bin/ruby -Ku
require 'openssl'
require 'socket'

(msg = []) << "dd0b64b77ebcac2092d6fe644d4db04e39d577c0228cf2187d8f87966aff8234"
device  = msg.pack("H*")
socket = TCPSocket.new('gateway.sandbox.push.apple.com',2195)
#socket = TCPSocket.new('gateway.push.apple.com',2195)
context = OpenSSL::SSL::SSLContext.new('SSLv3')
context.cert = OpenSSL::X509::Certificate.new(File.read('nj_dev_apns-dev.pem'))
context.key  = OpenSSL::PKey::RSA.new(File.read('nj_dev_apns-dev-key-noenc.pem'))
ssl = OpenSSL::SSL::SSLSocket.new(socket, context)
ssl.connect

payload = <<-EOS
{
    #"mdm":"{<PushMagic>}"
    {"mdm":"7C68976X-E70D-485Q-8CA7-7AC48F2F5F4A"}
}
EOS

(message = []) << ['0'].pack('H') << [32].pack('n')
  << device << [payload.size].pack('n') << payload
ssl.write(message.join(''))
ssl.close
socket.close 

解决方案

My suggestion is first try production APNS , so use this url:gateway.push.apple.com, and if you are using IPCU to generate mobileconfig,then in MDM payload don't select the option "Use Development APNS Server". And see this also.

这篇关于MDM:APNS通知没有达到iPhone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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