gpt4 book ai didi

iPhone App无线分发-如何保护.ipa文件?

转载 作者:行者123 更新时间:2023-12-01 18:01:43 25 4
gpt4 key购买 nike

我有一个企业帐户,并且我正在分发一个私有(private)应用程序,所以我有一个需要登录名/密码的网页,然后有一个指向 .plist list 文件的链接,该文件也有指向 .ipa 文件的链接,问题是两个文件都在同一个服务器中,并且该服务器需要登录。

这就是为什么每当我点击链接时,即使我已经登录,我也会收到“无法连接”弹出窗口。我虽然已经通过了凭据,因为我已经登录了,但显然它们没有。

如何在不需要密码的情况下保护 .ipa 文件的下载(或者用户可以以某种方式提供密码),而没有人能够创建自己的 list 文件并提供指向我的 .ipa 文件的链接?

我尝试在网上寻找解决方案,但一无所获。

任何帮助将不胜感激。

谢谢你。

最佳答案

您可以使用 php 和 mysql 创建自己的登录系统。

将ipa文件放入public_html之前的文件夹中或 htdocswww_root或您用作网站根目录的任何内容。这样人们就无法链接到它。

然后使用如下代码:

$file = '/absolute/path/to/application.ipa';

if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}

这将强制下载。如果用户没有登录到您的 session ,那么您可以提供错误消息或类似消息。

关于iPhone App无线分发-如何保护.ipa文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8761546/

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