我正在处理一个 React Native 项目,设置 Xcode Cloud 构建。
我不断收到此错误:
unable to open configuration settings file
Pods-XXX.debug.xcconfig:1
Run Code Online (Sandbox Code Playgroud)
我的工作区中的文件如下所示:
|-- XXX
|-- Pods
|. -- Podfile
|. -- Targets Support Files
|. -- Pods-XXX
|. -- Pods-XXX.debug
Run Code Online (Sandbox Code Playgroud) 我以传统方式构建 ios 项目没有问题,但是当尝试使用 Xcode Cloud 构建时,似乎在查找特定路径时遇到一些麻烦。我正在从存储库导入构建,是否有可能 pod 文件未安装,或者 Flutter 项目是否需要一些我缺少的额外调整。
environment variables我们在Xcode 方案中有这些
这段代码在本地运行良好
let webHost = ProcessInfo.processInfo.environment["HOST_URL"]!
let apiHost = ProcessInfo.processInfo.environment["API_URL"]!
let beamsKey = ProcessInfo.processInfo.environment["BEAMS_KEY"]!
let mixpanelKey = ProcessInfo.processInfo.environment["MIXPANEL_KEY"]!
Run Code Online (Sandbox Code Playgroud)
但是,当使用Xcode Cloud与相同的environment variables.
它构建成功,但应用程序因该日志而崩溃。
使用Xcode Cloud时读取这些环境变量的正确方法是什么?
我正在使用 Xcode Cloud 来存档移动应用程序,一切正常。但这是一个大项目,所以我正在尝试优化整体构建时间。当我检查日志时,我可以看到 Xcode Cloud 正在导出存档用于开发、临时和应用程序商店分发。临时和开发分发的导出需要大量时间,而我根本不需要它们。我试图研究是否有办法禁用这些导出,但我找不到任何东西。有人知道禁用它们的方法吗?感谢您的任何帮助。
我找不到任何有关 Xcode Cloud 代码覆盖率的信息。运行结束时,菜单仅显示:
这里有哪些选项?构建后脚本?
工作流程设置有 2 个操作:
我有一个 2 团队连接到我的 Apple 开发者帐户。在其中一个中,我们计划启动 Xcode Cloud,但随后我选择“产品”->“Xcode Cloud”->“创建工作流程”,第二个团队出现,我无法更改它。
有人找到解决这个问题的方法吗?
我有这个插件
struct Main: BuildToolPlugin {
func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] {
let inputFolder = target.directory.appending("Image")
let output = context.pluginWorkDirectory.appending("GeneratedImageAssets.swift")
return [
.buildCommand(
displayName: "Running ImageAssets parser",
executable: try context.tool(named: "ImageAssetsParser").path,
arguments: [inputFolder.string, output.string],
environment: [:],
inputFiles: [inputFolder],
outputFiles: [output]
)
]
}
}
Run Code Online (Sandbox Code Playgroud)
ImageAssetsParser是一个executableTarget快速代码,用于扫描文件夹并将它们写入output插件发送的文件夹中。
虽然在本地它可以正常工作,但在 Xcode Cloud 上我收到权限错误:
奇怪的是,我还有一个prebuildCommand插件,它使用swiftgen, 作为 anartifactbundle并且它工作正常,它写在同一个文件夹中。
我错过了什么吗?
swift swift-package-manager xcode-cloud swift-package-plugin
我刚刚从我通过 Swift Package Manager 引用的开源包中添加了我的第一个 Xcode 15、Swift 5.9 宏。我第一次在本地编译时,我必须通过对话框信任宏的包,这对于本地构建来说很好。但是,现在我的应用程序无法在 Xcode Cloud 上构建,并出现错误“必须先启用目标才能使用它”。
如何告诉 Xcode Cloud 信任宏的目标?
随着 Apple 宣布 Xcode Cloud 现已可供所有开发人员使用,我尝试将其设置为 Kotlin 多平台项目。老实说,开始有点困难。目前我在简单的测试操作中面临以下问题:
\nThe operation couldn\xe2\x80\x99t be completed. Unable to locate a Java Runtime.\nPlease visit http://www.java.com for information on installing Java.\nCommand PhaseScriptExecution failed with a nonzero exit code\nRun Code Online (Sandbox Code Playgroud)\n所以我阶段就尝试安装一个jdk ci_post_clone.sh。的输出java -version如下:
openjdk version "17.0.2" 2022-01-18\nOpenJDK Runtime Environment (build 17.0.2+8-86)\nOpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)\nInstalled java\nRun Code Online (Sandbox Code Playgroud)\n还./gradlew -v输出:
\nShowing All Messages\n------------------------------------------------------------\n\nGradle 7.4.2\n\n------------------------------------------------------------\nKotlin: 1.5.31\nGroovy: 3.0.9\nAnt: Apache Ant(TM) version 1.10.11 compiled on July 10 2021\nJVM: …Run Code Online (Sandbox Code Playgroud) 我一直在试图找出为什么这个 xcode 云自定义脚本昨天突然开始对我失败,因为我没有更改任何内容并且它之前一直在工作:
#!/bin/sh
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE
brew install cocoapods
# have to add node yourself
brew install node@16
# link it to the path
brew link node@16
brew install yarn
# Install dependencies you manage with CocoaPods.
yarn
pod install
# the sed command from RN cant find the file... so we have to run it ourselves
sed -i -e $'s/ && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0)//' /Volumes/workspace/repository/ios/Pods/RCT-Folly/folly/portability/Time.h
Run Code Online (Sandbox Code Playgroud)
由于某种原因,它开始失败并出现以下错误:
==> Installing node@16 dependency: brotli
==> Pouring brotli--1.0.9.monterey.bottle.tar.gz
Error: The `brew link` step …Run Code Online (Sandbox Code Playgroud) xcode-cloud ×10
xcode ×6
swift ×4
ios ×3
react-native ×3
flutter ×1
homebrew ×1
kotlin ×1
node.js ×1
swift-macro ×1
xcode15 ×1