chenjunkai 6 anni fa
parent
commit
872844bd02
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      Controller/Test.py

+ 2 - 1
Controller/Test.py

@@ -46,7 +46,8 @@ class Test(View):
             # print(daytime)
             # print(daytime)
             # pem_path = os.path.join(BASE_DIR, 'Ansjer/file/apns-dev.pem')
             # pem_path = os.path.join(BASE_DIR, 'Ansjer/file/apns-dev.pem')
             # cli = apns2.APNSClient(mode="dev", client_cert=pem_path, password='111111')
             # cli = apns2.APNSClient(mode="dev", client_cert=pem_path, password='111111')
-            cli = apns2.APNSClient(mode="dev", client_cert=pem_path, password='1234')
+            cli = apns2.APNSClient(mode="prod", client_cert=pem_path, password='1234')
+            # cli = apns2.APNSClient(mode="dev", client_cert=pem_path, password='1234')
             now_time = int(time.time())
             now_time = int(time.time())
             push_data = {"alert": "Motion ", "event_time": now_time, "event_type": '51', "msg": "",
             push_data = {"alert": "Motion ", "event_time": now_time, "event_type": '51', "msg": "",
                          "received_at": now_time, "sound": "sound.aif", "uid": "XFDJUHUIOKJHYTGSFFDR"}
                          "received_at": now_time, "sound": "sound.aif", "uid": "XFDJUHUIOKJHYTGSFFDR"}