错误解决:code=3000,未找到应用程序的“aps-environment”的权利字符串

本文详细阐述了苹果应用在iPad上测试过程中无法注册APNs推送的问题,原因在于测试真机中的provisioning file与APNs推送证书关联的App id不一致。文章进一步介绍了排查步骤,包括在Developer Apple页面和测试设备上验证APNs名称属性一致性,最终解决兼容性问题。

问题原因:测试真机中的provisioning file对应的App id与APNs推送的Certificate关联的App id不一致;


出现过程:之前一直在iphone上进行真机测试,今天拿了台ipad过来测试兼容性,安装应用后就发现无法注册上APNs


出现原因:开发者账户下注册了两个App ID:一个是与要测试的App Bunder ID一致的;另一个是通配符'*'。Xcode6.0.1自动安装时,选择了后一个App ID下载provisioning file,能正确安装和运行App,但注册推送时,因App ID不一致无法注册。


排查过程:

1. developer.apple.com -> Member Center->Certificates->All   找到APNs推送书(type:APNs Development iOS),确认它的Name属性;

2.打开测试设备,设置->通用->描述文件->找到测试App的描述文件,确认是否与步骤一APNs对应的一致;

import os import sys from pathlib import Path root_dir = str(Path(__file__).parent.parent.parent.parent.parent) if root_dir not in sys.path: sys.path.insert(0, root_dir) from model.controllertestcase import ControllerTestCase from OmadaControllerAPI.OpenAPIService.dashboard_service import DashboardService import random import string import time class MyTestCase(ControllerTestCase): def __init__( self, omadacloud_url: str, controller_url: str, username: str, password: str, environment: str, region: str, force_login: bool = False, ): super().__init__( omadacloud_url, controller_url, username, password, environment, region, force_login, ) self.init_case_name_id(os.path.basename(__file__)) self.item_id = "检查/openapi/v1/{omadacId}/sites/{siteId}/dashboard/channels接口" self.expected_result = "Get channel distribution and usage succeed" def setup(self): self.check_test_times() self.get_cookie_and_token_from_config() self.login_by_openapi(type=0) self.dashboard_service = DashboardService( self.openapi_host, self.openapi_headers, self.logger ) def test(self): try: response = self.dashboard_service.get_channel_distribution_and_usage( self.omadacId, 'test-id' ) response_json = response.json() if response_json["errorCode"] == 0: self.case_result = self.result.PASS self.actual_result = "Get channel distribution and usage succeed" self.logger.info(self.actual_result) else: self.case_result = self.result.FAIL self.actual_result = ( f"Get channel distribution and usage failed: {response_json['msg']}" ) self.logger.error(self.actual_result) except Exception as e: self.case_result = self.result.FAIL self.actual_result = f"Get channel distribution and usage failed: {e}" self.logger.error(self.actual_result) self.add_result( self.case_result, self.item_id, self.actual_result, self.expected_result, "", ) def teardown(self): pass if __name__ == "__main__": testcase = MyTestCase( "", "https://localhost:8043/82064d2c4dff19907fd0fe09bf88ef8d", "admin", "Tplink123!", "prd", "aps1", True, ) testcase.do_test()
最新发布
08-15
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值