Tan*_*lim 16 xcode xcodebuild unity-game-engine gitlab-ci fastlane
我正在使用 fastlane 来构建我的 Unity iPhone 应用程序。\n它工作得很好,直到突然我在构建过程中开始收到以下错误/警告:
\n[10:13:48]: $ xcodebuild -resolvePackageDependencies -scheme Unity-iPhone -project ./Unity-iPhone.xcodeproj\n[10:13:48]: \xe2\x96\xb8 2021-11-16 10:13:48.903 xcodebuild[59318:1348378] XType: failed to connect - Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process.}\n[10:13:48]: \xe2\x96\xb8 2021-11-16 10:13:48.904 xcodebuild[59318:1348378] Font server protocol version mismatch (expected:5 got:0), falling back to local fonts\n[10:13:48]: \xe2\x96\xb8 2021-11-16 10:13:48.904 xcodebuild[59318:1348378] XType: unable to make a connection to the font daemon!\n[10:13:48]: \xe2\x96\xb8 2021-11-16 10:13:48.904 xcodebuild[59318:1348378] XType: XTFontStaticRegistry is enabled as fontd is not available.\n[10:13:49]: \xe2\x96\xb8 Command line invocation:\n[10:13:49]: \xe2\x96\xb8 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -scheme Unity-iPhone -project ./Unity-iPhone.xcodeproj\n[10:13:49]: \xe2\x96\xb8 User defaults from command line:\n[10:13:49]: \xe2\x96\xb8 IDEPackageSupportUseBuiltinSCM = YES\n[10:13:49]: \xe2\x96\xb8 resolved source packages: \nRun Code Online (Sandbox Code Playgroud)\n这种情况并不总是发生,但当发生这种情况时,CodeSign 部分将会失败,最终 fastlane 部署通道也会失败。一直在寻找答案,但还没有找到任何可以帮助我的东西。
\n以下是一些规格:
\n附加信息:\ni 从 Gitlab CI/CD 运行部署
\n这是我的 Fastlane 文件内容:
\nplatform :ios do\n before_all do\n Dotenv.load ".env.ios"\n Dotenv.overload '.env.secret'\n end\n\n desc "Sync the certificates"\n lane :sync_signing do\n unlock_keychain( password: ENV['KEYCHAIN_SECRET'] )\n sync_code_signing # match\n mapping = Actions.lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]\n update_code_signing_settings(profile_name: mapping[ENV['MATCH_APP_IDENTIFIER']]) \n end\n\n\n desc "Build Binary"\n lane :build do\n sync_signing\n build_ios_app # gym\n end\n\n\n desc "Deploy to TestFlight"\n lane :deploy do\n increment_build_number(build_number: ENV["CI_PIPELINE_ID"])\n build\n upload_to_testflight # pilot\n end\nend\nRun Code Online (Sandbox Code Playgroud)\n感谢您的任何帮助!
\n我认为最终解决的问题是在钥匙串中安装正确的“Apple 全球开发者关系认证机构”。我的证书有效期为 2023 年 2 月。我删除了该证书并转到此处:https ://www.apple.com/certificateauthority/ ,下载了名为“全球开发者关系 - G3”的证书(将于 2030 年 2 月 20 日到期) 00:00:00 UTC)”,然后重试构建并且成功了。
I hope that helps! If it doesn't, lmk, there were some other things I tried that might have solved it.