gpt4 book ai didi

ios - Xcode bot 安装链接请求超时

转载 作者:可可西里 更新时间:2023-11-01 04:13:43 31 4
gpt4 key购买 nike

我已经能够让我的 Xcode 机器人成功集成并创建一个 .ipa 文件。我的 Xcode 服务器上安装了一个 ssl 证书,我可以很好地连接到 xcode/bots url。当我通过 iPad 连接到 url 时,首先提示我安装证书,但它以红色显示未验证(见附件)Not verified

我在设备上安装配置文件后,xcode/bots 页面有一个绿色的“安装”按钮。单击“安装”按钮后,它永远不会加载应用程序,几分钟后我收到“无法连接到 xx.yy.com” Cannot connection

有什么想法吗?

最佳答案

https://github.com/mtjddnr/lab/wiki/Xcode-Integration-Server-OTA---Reverse-Proxy-Nginx

Nginx + 反向代理 + OS X 服务器[Xcode 服务器]

设置

互联网 -> [443] 路由器(端口转发) -> [443]Nginx 服务器(具有 HTTPS 证书) -> [443]Mac Mini(OS X 服务器,Xcode 服务器)

(StartSSL certificate is used)

Xcode 服务器使用 20300(HTTP)、20343(HTTPS) 端口

问题

  1. 进入 Xcode 服务器 WEB
  2. 选择机器人
  3. 点击Install按钮
  4. 如果是第一次,它会要求安装证书。安装它并返回网页。
  5. 点击Install再次按钮
  6. 警告消息“无法连接到服务器”

OTA 的工作原理

  1. 当点击 Install按钮,它导航到 https://<DOMAIN>/xcode/internal/api/integrations/<UNIQUE ID>/install_product
  2. 它将状态 302 返回到新位置:itms-services://?action=download-manifest&url=https://<DOMAIN>:20343/api/integrations/<UNIQUE ID>/<RECENT Integrated ID>/install_manifest.plist
  3. itms-services URL Schema 调用 iOS 设备运行安装。
  4. iOS 下载 install_manifest.plist然后根据plist信息,选择右边IPA网址
  5. https://<DOMAIN>:20343/api/assets/token/<RECENT Integrated ID>/<UNIQUE ID>-<Bot Name>/<Intergation #>/<Product Name>-<Device Model>.ipa
  6. 下载并安装

分析

  • 在第 2 步,它返回 URL <DOMAIN>:20343 .端口号 20343 未被路由器(或防火墙)打开
  • 路径也应该是/xcode/internal/api/integrations/不是/api/integrations/

如何修复

位置:/Library/Developer/XcodeServer/CurrentXcodeSymlink/Contents/Developer/usr/share/xcs/xcsd/

修改constants.js第25行

XCSProxiedAPIBasePath: '/xcode/api',XCSProxiedAPIBasePath: '/xcode/internal/api',

评论classes/fileClass.js第383行

//host = host.split(':')[0] + ':' + k.XCSHTTPSPort; // force traffic over the HTTPS port

修改classes/fileClass.js第384行

var basePath = k.XCSAPIBasePath; // connection is direct to xcsd, always

var basePath = k.XCSProxiedAPIBasePath; // connection is direct to xcsd, always

重启服务器

关于ios - Xcode bot 安装链接请求超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28336185/

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