gpt4 book ai didi

ios - 从 .mobileconfig 获取设备 UDID

转载 作者:IT王子 更新时间:2023-10-29 08:03:40 26 4
gpt4 key购买 nike

我正在尝试编写类似于 http://whatismyudid.com/ 的函数然后获得批准,将返回用户的 UDID 并将其存储到数据库中以供该用户将来引用。

我已经编写了一个 .mobileconfig xml 文档,它可以在配置文件安装程序中正常打开,但是当我告诉它安装配置文件时,它会以 [alert] Invalid Profile 响应,但没有警报正文。没有描述,没有代码,没有帮助。

我是移动配置游戏的新手,所以任何帮助都会让我兴奋不已。

这是我的配置文件:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<dict>
<key>URL</key>
<string>http://apps.mortlabs.com/device/retrieve.php</string>
<key>DeviceAttributes</key>
<array>
<string>UDID</string>
<string>IMEI</string>
<string>ICCID</string>
<string>VERSION</string>
<string>PRODUCT</string>
</array>
</dict>
<key>PayloadOrganization</key>
<string>MortLabs.com</string>
<key>PayloadDisplayName</key>
<string>Profile Service</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadUUID</key>
<string>B958E359-34C2-42F4-BD0C-C985E6D5376B</string>
<key>PayloadIdentifier</key>
<string>com.mortlabs.profile-service</string>
<key>PayloadDescription</key>
<string>This temporary profile will be used to find and display your current device's UDID.</string>
<key>PayloadType</key>
<string>Profile Service</string>
</dict>
</plist>

通过导航到 http://apps.mortlabs.com/device/enroll.php 来初始化配置文件使用移动浏览器

最佳答案

我发现通过使用上面的方法,Ipad/Iphone 正在与 Apache 对话 - Kyle2011 在 https://discussions.apple.com/thread/3089948?start=0&tstart=0 发表的帖子填写解决方案的其余部分。

基本上在 retrieve.php 页面的底部,您需要使用类似于以下的行将浏览器重定向到目录:-

header("Location: https://www.example.com/enrolment?params={$params}");

注册是一个目录 - 然后调用 DirectoryIndex(通常是 index.php),然后可以向您的用户显示内容。

要填充 $params 变量,您需要在 retrieve.php 脚本顶部添加以下行

$data = file_get_contents('php://input');

然后您可以解析 $data 字符串以获得您需要的内容(尝试 file_put_contents("data.txt", $data); 或 Kyle2011 的示例)

我还通过在 Mac 的终端中使用 udidgen 而不是仅仅使用 whatismyudid.com 将 Payload UDID 更改为不同的东西。

更新:从 iOS 7.1 开始,一些文件(.plist IIRC)需要通过 https://提供 - 如果所有内容都通过 http://提供,它们将无法安装 - 可能最好提供所有内容,包括.ipa 通过 https://确保 Apple 方面的 future 更改不会造成问题。

关于ios - 从 .mobileconfig 获取设备 UDID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5781314/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com