Python3苹果mobileconfig下载服务器

我正在尝试构建一个系统,以使ios像https://get.udid.io这样的网站得到审核。 在创建系统的过程中,我们正在创建提供mobileconfig的服务器。 使python3和Azure函数出现问题。 按照Apple的指南,我在标头中添加了“ application / x-apple-appen-config”,并在正文中包含了签名的mobileconfig文件以传递响应。 接收到文件,但是它是0byte。

如果我在中间使用readlines打印它,我想我可以正确读取文件,那是什么问题?

import logging

import azure.functions as func


def main(req: func.HttpRequest) -> func.HttpResponse:
    f = open("signed.mobileconfig",'rb')
    lines = f.readlines()
    for line in lines:
        print(line)
    data = f.read()
    f.close()

    header = {'Content-Type' : 'application/x-apple-aspen-config'}
    return func.HttpResponse(data,status_code=200,headers=header)
iCMS 回答:Python3苹果mobileconfig下载服务器

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2230981.html

大家都在问