Xcode 14 Beta 5 显示此异常:
[<_UINavigationBarContentViewLayout valueForUndefinedKey:]: this class is not key value coding-compliant for the key inlineTitleView.
使用 Xcode 14 Beta 5 时,我在所有 obj-c 项目中都遇到了这个新异常。
一些注意事项:
int main(int argc, char * argv[])我想知道是否还有其他人遇到过这种情况。
Xcode 13 中没有错误,但升级到 Xcode 14 后我开始收到以下错误。此错误似乎并没有阻止构建成功完成。
错误构建:P1的依赖关系:target-IMIHome_CN-cc573f8f295fdacea32720ac31b3c32d81d4253176a57d0d035f573833325806-:Debug:SwiftDriver编译要求IMIProject正常arm64 com.apple.xcode.tools.swift.compiler不是绝对的(Pods/IMSThingCap)能力/IMSThingCapability/IMSThingCapability.framework/模块/模块.模块映射)。
我的项目一直很好,直到我将 Xcode 升级到 Xcode 14,升级 Xcode 几周后,现在每次我尝试调试和打印它总是显示如下错误,我不明白为什么:
warning: Swift error in scratch context: error: failed to load module 'UAT'
.
Shared Swift state for UAT.app has developed fatal errors and is being discarded.
REPL definitions and persistent names/types will be lost.
error: expression failed to parse:
Run Code Online (Sandbox Code Playgroud)
我已将我的项目目标分成 4 个不同的目标,并且每个目标上都会发生错误,我尝试在 Xcode 13 上运行我的项目,调试器工作正常(除了 Xcode 14),现在我只能使用打印而不是调试控制台。真的有人像我一样遇到过这个问题吗?任何帮助将不胜感激。
在 Xcode 14 之前创建多平台应用程序时,Xcode 将为每个目标创建一个单独的权利文件。现在,在 Xcode 14 中,所有目标默认使用相同的权利文件。
在Xcode 14项目中添加HealthKit能力,并"Privacy - Health Update Usage Description"在Key中填充字符串Info.plist,然后提示HealthKit授权请求后,并没有弹出要求用户同意App使用HealthKit数据的界面。此外,控制台中打印以下错误:运行状况请求显示失败:缺少应用程序标识符权利。
将应用程序标识符权利手动添加到权利文件中可以解决该问题,但是,由于 macOS 目标也使用相同的权利文件,因此 Xcode 无法自动为 macOS 签署应用程序并给出以下错误:
Provisioning profile "Mac Team Provisioning Profile: com.xx.xx" doesn't include the application-identifier entitlement.
Run Code Online (Sandbox Code Playgroud)
这里正确的做法是什么?我应该手动创建第二个权利文件并将它们分开吗?如果是这样,这将如何完成?还是我还缺少其他东西?
任何帮助将不胜感激。
我正在尝试创建一个从底部进入屏幕的视图的动画。但第一次它只出现在屏幕上,没有任何动画,然后它就开始正常工作。
这是代码:
struct ContentView: View {
@State private var showView = false
var body: some View {
ZStack(alignment: .bottom){
VStack{
Button("TAP HERE") {
withAnimation(.spring()) {
showView.toggle()
}
}
Spacer()
}
if showView {
RoundedRectangle(cornerRadius: 30)
.frame(height: UIScreen.main.bounds.height * 0.5)
.transition(.move(edge: .bottom))
}
}
.edgesIgnoringSafeArea(.bottom)
}
Run Code Online (Sandbox Code Playgroud)
}
这是行为:
我做错了什么?
我正在使用 Xcode 14 beta 5 和 Swift 5
Xcode 14,在游乐场(带有import UIKit):
let uuid = UUID().uuidString
let boundary = "Boundary-\(uuid)"
Run Code Online (Sandbox Code Playgroud)
美好的。但uuid实际上并不需要,所以让我们将其折叠成一行:
let boundary = "Boundary-\(UUID().uuidString)"
Run Code Online (Sandbox Code Playgroud)
这会引发编译错误:
错误:“UUID”仅在 iOS 6.0 或更高版本中可用;的客户
'__lldb_expr_9'可能有较低的部署目标
我似乎让编译器陷入了一些关于字符串插值如何在操场上工作的奇怪边缘情况。这里可能发生了什么?
当我将 Xcode 升级到 14 时,我的应用程序崩溃并收到错误消息:\n dyld:未加载库:/usr/lib/swift/libswiftCoreGraphics.dylib
\n仅发生在 iOS 版本低于 13\xef\xbc\x8c 的设备上,例如 iOS 12/11\xef\xbc\x8c
\n在 SwiftUI 中关闭工作表后,导航栏按钮不可点击。以下是重现该问题的步骤
现在导航栏按钮框架未对齐。点击的工作框架与按钮的可见框架不同。这在 iOS 16 模拟器上很容易重现,但在实际的 iOS 设备上会间歇性地重现。以下是重现该问题的最少代码
struct ContentView: View {
@State private var showSheetView = false
var body: some View {
NavigationView {
VStack {
navigationBarView
Color.blue
}
.sheet(isPresented: $showSheetView) {
FilterView()
}
.navigationBarHidden(true)
}
.navigationViewStyle(.stack)
}
private var navigationBarView: some View {
HStack(spacing: 0) {
Spacer()
Button {
showSheetView = true
} label: {
Text("Filter")
.padding()
.background(Color.red)
}
}
}
}
struct FilterView: View {
var body: some View {
Color.green
} …Run Code Online (Sandbox Code Playgroud) 我当前版本的 Fastlane 2.173.0 可以与 XCode 13 配合使用,并构建我的 iOS RN/Native 项目并将其发布到 TestFlight。但是在迁移到 XCode 14 后,我在开始构建时遇到了下一个错误 ( gym)。
[16:56:49]: $ set -o pipefail && xcodebuild -workspace MyProject.xcworkspace -scheme MyProject -configuration Release -destination \'generic/platform=iOS\' -archivePath /Users/vagrant/Library/Developer/Xcode/Archives/2022-10-31/MyProject\\ 2022-10-31\\ 16.56.49.xcarchive archive | tee /var/folders/9l/1ysg9vq51p37q0lgksxhdb9r0000gn/T/fastlane_logs3640665801/gym/MyProject-MyProject.log | xcbeautify\n[16:56:52]: \xe2\x96\xb8 Resolve Package Graph\n[16:56:54]: \xe2\x96\xb8 Resolved source packages\n[16:56:54]: \xe2\x96\xb8 DLog - https://github.com/ikhvorost/DLog @ 1.4.0\n[16:56:54]: \xe2\x96\xb8 PromiseQ - https://github.com/ikhvorost/PromiseQ.git @ 1.7.0\n[16:56:54]: \xe2\x96\xb8 Realm - https://github.com/realm/realm-cocoa.git @ 10.15.1\n[16:56:54]: \xe2\x96\xb8 RealmDatabase - https://github.com/realm/realm-core @ 11.4.1\n[16:57:10]: \xe2\x96\xb8 \xe2\x9a\xa0\xef\xb8\x8f Run script build …Run Code Online (Sandbox Code Playgroud) 源代码:
\n#include <cstdio>\n\nstatic const char encodeBase64Table[64 + 1] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n\nint main() {\n // create decoding table\n unsigned long invalid = 64;\n unsigned long decodeBase64Table[256] = {};\n for (unsigned long i = 0; i < 256; i++)\n decodeBase64Table[i] = invalid;\n for (unsigned long i = 0; i < 64; i++) {\n decodeBase64Table[(unsigned char)encodeBase64Table[i]] = i;\n }\n printf("decodeBase64Table[65] = %lu\\n", decodeBase64Table[65]);\n\n return 0;\n}\nRun Code Online (Sandbox Code Playgroud)\nApple Clang 11.0.3(预期输出,即使使用 -O3):
\n/t/s/1673994196 \xe2\x9d\xaf\xe2\x9d\xaf\xe2\x9d\xaf /usr/bin/clang++ --version\nApple clang version 11.0.3 (clang-1103.0.32.62)\nTarget: x86_64-apple-darwin21.6.0\nThread model: posix\nInstalledDir: /Library/Developer/CommandLineTools/usr/bin\n/t/s/1673994196 …Run Code Online (Sandbox Code Playgroud)