升级最新的 Xcode 版本 15.0 (15A240d) 后,无法构建成功,并出现以下错误:
Unable to process Info.plist during build process
Run Code Online (Sandbox Code Playgroud) 由于我已经升级到 Xcode 15.0,在我的构建成功后,它显示
Running {ProjectName} on iPhone 15
但调试选项被禁用。
请参见图像:调试菜单显示所有选项均已禁用。 调试行不显示调试选项
我可以添加断点,但执行不会在任何断点处停止。另外,当我浏览应用程序时,我会在 Xcode 中看到控制台日志。
知道为什么调试选项不会显示吗?
我尝试了 Clean Build、Restart Simulator、Restart Xcode 和 Restart Mac 来查找调试设置,但这些选项都不适合我。
我有一个 React Native 代码,当我尝试在 上运行它时Xcode 15,iOS 17
我收到错误
[RTIInputSystemClient RemoteTextInputSessionWithID:performInputOperation:] 执行输入操作需要 Otp 屏幕上的有效 sessionID,该 ID 是 4 个文本框。
它运行良好iOS 16
我最近更新到 Xcode 15,发现符号导航器已被书签导航器取代。
我一直试图找到它但没有成功。
随着符号导航器显然消失了,是否有一种方法可以在单个位置查看类层次结构以及所有项目和链接框架符号的综合列表?
画布似乎是只读的...我只能将对象(视图和修改器等)从库拖放到代码本身上。我正在上 udemy 课程,讲师将对象拖放到画布上,同时自动更新代码和画布。然而,她使用的是旧版本的 Xcode。为什么苹果要删除这个功能?或者我错过了某个地方的设置?即使当我将按钮拖到代码中时,我什至无法在画布上拖动和移动按钮,它只是无法单击。
我的 SwiftUI 项目中有一个 Swift 包,其中包含 UI 组件的样式。此外,此包还包括一个资源文件夹,其中包含可在样式中使用的资源。我可以通过名称获取图像,但我想知道是否可以使用枚举访问图像。因为 Xcode 15 会自动生成资产符号。
\n下面的例子可以解释我的意思:
\npublic struct CheckboxToggleStyle: ToggleStyle {\n@Binding var color: Color\n\nlet checked = Image("checkbox-checked", bundle: .module) // \xe2\x9c\x85 works\nlet unchecked = Image("checkbox-unchecked", bundle: .module) // \xe2\x9c\x85 works\nlet checked = Image(.checkboxChecked) // \xe2\x9d\x8c failed\nlet unchecked = Image(.checkboxUnchecked) // \xe2\x9d\x8c failed\n\npublic func makeBody(configuration: Configuration) -> some View {\n (configuration.isOn ? checked : unchecked)\n .renderingMode(.template)\n .foregroundColor(color)\n .onTapGesture {\n withAnimation {\n configuration.isOn.toggle()\n }\n }\n}\nRun Code Online (Sandbox Code Playgroud)\n}
\n我刚刚从我通过 Swift Package Manager 引用的开源包中添加了我的第一个 Xcode 15、Swift 5.9 宏。我第一次在本地编译时,我必须通过对话框信任宏的包,这对于本地构建来说很好。但是,现在我的应用程序无法在 Xcode Cloud 上构建,并出现错误“必须先启用目标才能使用它”。
如何告诉 Xcode Cloud 信任宏的目标?
我尝试在 Xcode 15 中使用 #Preview 宏预览 UIKit 视图,但出现此错误
\n== PREVIEW UPDATE ERROR:\n\n FailedToLaunchAppError: Failed to launch\n \n ==================================\n \n | RemoteHumanReadableError: The operation couldn\xe2\x80\x99t be completed. Transaction failed. Process failed to launch. (process launch failed)\n | \n | BSTransactionError (1):\n | ==error-reason: process launch failed\n | ==transaction: <FBApplicationProcessLaunchTransaction: 0x600003b287e0>\n | ==precipitating-error: Error Domain=FBProcessExit Code=64 "The process failed to launch." UserInfo={NSLocalizedFailureReason=The process failed to launch., BSErrorCodeDescription=launch-failed, NSUnderlyingError=0x600000c1ad90 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600000c1aee0 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: …Run Code Online (Sandbox Code Playgroud) 我注意到在 Xcode 15.0 中,除非我从应用程序中xcodebuild删除宏,否则存档应用程序的命令会失败。#Preview
$ xcodebuild archive -scheme <Your Scheme> -sdk iphoneos -allowProvisioningUpdates -archivePath build.xcarchive
Run Code Online (Sandbox Code Playgroud)
错误是:
{
"kind": "finished",
"name": "compile",
"pid": 42409,
"output": "<unknown>:0: warning: compiler plugin not loaded: '\/Applications\/Xcode-15.0.0-Release.Candidate.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Developer\/usr\/bin\/swift-plugin-server; fai
led to initialize\n\/Users\/xyz\/Dev\/experiments\/fastlane-test\/fastlane-test\/ContentView.swift:22:1: error: external macro implementation type 'PreviewsMacros.SwiftUIView' could not be found for macro
'Preview(_:body:)'\n#Preview {\n^\nSwiftUI.Preview:2:41: note: 'Preview(_:body:)' declared here\n@freestanding(declaration) public macro Preview(_ name: String? = nil, body: @escaping @MainActor () -> View) = #ex
ternalMacro(module: \"PreviewsMacros\", type: \"SwiftUIView\")\n ^\n",
"process": {
"real_pid": 42409 …Run Code Online (Sandbox Code Playgroud) 我最近不得不引入一个在模拟器上不支持 arm64 的库(GoogleMLKit,使用 Pods)。
如果我尝试在arm64(非Rosetta)上构建模拟器,Xcode会给出从新添加的Google库及其依赖项引用的x86_64的链接器错误。
最重要的是:
我尝试在 podfile 中排除 pod 的 arm64 和/或 x86_64,但无济于事。
我使用的是 Xcode 15.0.1。
xcode15 ×10
ios ×4
xcode ×4
swift ×2
swiftui ×2
ios17 ×1
preview ×1
react-native ×1
rosetta ×1
swift-macro ×1
uikit ×1
xcode-cloud ×1