Code=3000 "未找到应用程序的“aps-environment”的授权字符串" 解决办法

本文针对iOS应用在使用最新推送框架时遇到的问题进行了详细的解析。主要介绍了如何检查Xcode设置、确保provisioning profile与bundle identifier的一致性,并提供了解决方案。

这个问题可能比较多出现,网上呢一股脑的方案是:描述文件,推送证书与项目中的bundle identifer 不一致,或者什么appid不一致呀,什么证书生成顺序不一致呀,什么xcode的code signing没有配置呀,就不写了,网上搜很多,我现在就把自己的问题说一下:

出现的背景是:原先的项目兼容iOS10,远程推送也用了最新的iOS10的推送框架,创建证书、描述文件的时候的appid,顺序啊,bundle identifer呀都正常

如果大家谁也出现这个问题了,不要忘记去看看xcode中的一个设置: 


如果这两个step报错,就要去按照网上其他的重新设置provisioning profile,bundle identifer等,让其保持一致性。

如果还是不行,就直接clean一下,重启Xcode,然后重新运行,我就是这么好的。希望对你有所帮助。



原文地址:http://blog.youkuaiyun.com/u010731949/article/details/52555768

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值