标签: xcode12

Xcode 12 无法使用 Interface Builder 将子视图添加到滚动视图

使用 Xcode 12 界面构建器,我无法将视图拖到滚动视图中。这似乎是一项非常简单的任务,多年来一直运行良好。我不确定我错过了什么。不过,将视图拖到其他视图中效果很好。

iphone xcode ipad ios xcode12

25
推荐指数
2
解决办法
1876
查看次数

SwiftUI displayModeButtonItem 内部管理

每次导航到另一个屏幕时,我都会在控制台中收到此消息:

[Assert] displayModeButtonItem is internally managed and not exposed for DoubleColumn style. Returning an empty, disconnected UIBarButtonItem to fulfill the non-null contract.
Run Code Online (Sandbox Code Playgroud)

目前我在应用程序的入口点设置了导航视图,就像这样

NavigationView {
        KeyboardView(matrixVM: matrixVM, isNavigationBarHidden: $isNavigationBarHidden)
            .background(Color("background")
            .edgesIgnoringSafeArea(.all))
            .navigationBarTitle("Workspace")
            .navigationBarHidden(self.isNavigationBarHidden)
            .onAppear {
                self.isNavigationBarHidden = true
        }
    }
Run Code Online (Sandbox Code Playgroud)

然后在 KeyboardView 里面我有导航链接

NavigationLink(destination: NotebookView(isNavigationBarHidden: $isNavigationBarHidden, saved: matrixVM), label: {
                            Text("Notebooks")
                                .font(.system(size: 14, design: .rounded))
                                .fontWeight(.medium)
                                .foregroundColor(Color("text"))
                                .padding(.trailing, 10)
                        })
Run Code Online (Sandbox Code Playgroud)

在 NotebookView 中,我有一个导航链接列表(每个笔记本链接到其详细信息页面)

ScrollView(showsIndicators: false) {
                        ForEach(notebooks, id: \.self) { notebook in
                            
                            NavigationLink(destination: ExpandedSnippet(matrixVM: saved ,notebook: notebook)
                                            .navigationBarTitle("Notebook", displayMode: .inline)) …
Run Code Online (Sandbox Code Playgroud)

swiftui xcode12

23
推荐指数
4
解决办法
7039
查看次数

Xcode 12:在 FIRAnalyticsConnector 上构建错误

升级到 Xcode 12 后,我的项目不再为模拟器构建。

我得到的错误是:

ld: in ... /Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(
FIRAnalyticsConnector_e321ed8e3db06efc9803f6c008e67a34.o), 
building for iOS Simulator, but linking in object file built for iOS, file
'.../Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector'
for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

一种解决方法是添加arm64到我的项目 > 构建设置 > 排除的架构,但它不会为我的真实设备构建。

我已经尝试清理构建文件夹、更新 pod 文件、重新启动等。

我正在使用:

  • Firebase/分析 (6.33.0)
  • Xcode 12.0.1 (12A7300)
  • 可可豆:1.9.3

有任何想法吗?

xcode ios firebase-analytics xcode12

23
推荐指数
4
解决办法
1万
查看次数

使用 MapKit 和 SwiftUI、Xcode 12 在默认 iOS 地图上移动视图时,如何修复“不可见矩形需要样式 Z”的终端输出

使用 MapKit 和 SwiftUI(版本 12.0 beta 2 (12A6163b))放大/缩小地图时,终端会生成数百条这样的行:

2020-07-21 21:05:39.310719-0500 MyApp[95733:4195994] [VKDefault] 不可见矩形请求样式 Z

import SwiftUI
import MapKit

@main
struct MapTest: App {
    var body: some Scene {
        WindowGroup {
            MapView()
        }
    }
}

struct MapView: View {
    var body: some View {
        Map()
    }
}

struct MapView_Previews: PreviewProvider {
    static var previews: some View {
        MapView()
    }
}

struct Map: UIViewRepresentable {
    func makeUIView(context: Context) -> MKMapView {
        
        let map = MKMapView()
        map.delegate = context.coordinator
        return map
    }
    
    func …
Run Code Online (Sandbox Code Playgroud)

mapkit ios swift swiftui xcode12

22
推荐指数
1
解决办法
3729
查看次数

Xcode 12 - AppName 的架构 (arm64) 不包含 iPhone 11 Pro 可以执行的架构(Intel 64 位)

我得到 AppName 的架构 (arm64) 不包括 iPhone 11 Pro 可以执行的架构(英特尔 64 位)。Xcode 12 beta-3 上的错误,

我在架构 x86_64 armv7s arm64 下面设置了

如何解决这个错误?

ios swift ios14 xcode12

22
推荐指数
4
解决办法
1万
查看次数

MacOS Catalina 版本 10.15.4 中的“Spotlight 意外退出”,在我安装 Xcode 12 后发生此崩溃

我已经反复显示下面的日志。 在 MacOS Catalina 版本 10.15.4 中安装 Xcode 12 后发生此崩溃

任何人请帮我解决这个崩溃。

Process:               Spotlight [3454]
Path:                  /Applications/Xcode 12.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Applications/Spotlight.app/Spotlight

Identifier:            Spotlight
Version:               1.0 (1)
Code Type:             X86-64 (Native)
Parent Process:        launchd_sim [3294]
Responsible:           SimulatorTrampoline [2445]
Date/Time:             2020-09-26 07:23:36.460 +0530
OS Version:            Mac OS X 10.15.4 (19E266)
Report Version:        12

Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_SHARED_CACHE_DIR=/Users/jitendra/Library/Developer/CoreSimulator/Caches/dyld/19E266/com.apple.CoreSimulator.SimRuntime.iOS-14-0.18A372
DYLD_ROOT_PATH=/Applications/Xcode 12.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot

Time Awake Since Boot: 1800 seconds
System Integrity Protection: disabled
Crashed Thread:        0
Exception Type:        EXC_CRASH (SIGKILL)
Exception Note:        EXC_CORPSE_NOTIFY
Termination Reason: …
Run Code Online (Sandbox Code Playgroud)

macos ios14 xcode12

22
推荐指数
1
解决办法
3618
查看次数

SwiftUI macOS fetch json 错误 [logging] 卷不支持数据保护,剥离 SQLITE_OPEN_FILEPROTECTION_* 标志\

我厌倦了为我的 IOS 应用程序构建一个 macOS 应用程序(Xcode 12,SwifUI)。要从我的网站获取 json 数据,我需要一个获取请求(没有 API 密钥)。我在 medium、hackingwithswift 等上找到了几个样本,但我总是保持相同的错误。

[logging] volume does not support data protection, stripping SQLITE_OPEN_FILEPROTECTION_* flags\
Run Code Online (Sandbox Code Playgroud)

我想知道为什么我只在 macOS 项目上出现这个错误,因为我的 IOS 版本工作正常。

class FetchDeviceInfo: ObservableObject {

    @Published var deviceInfo = [DeviceData]()

    init() {

        let url = "https://yourURL"

        let session = URLSession(configuration: .default)

        session.dataTask(with: URL(string: url)!) { (data, _, _) in

            guard let json = data else{return}

            do{

                let data = try JSONDecoder().decode([DeviceData].self, from: json)

                print(images)

                DispatchQueue.main.async {
                    self.deviceInfo = data
                }
            }
            catch{
                print(error.localizedDescription)
            } …
Run Code Online (Sandbox Code Playgroud)

macos json swiftui fetchrequest xcode12

22
推荐指数
2
解决办法
3098
查看次数

由于在 iOS 14.2 模拟器的排除架构中设置 arm64 导致的大量错误

首先免责声明:我使用 Mac Mini 和 Apple Silicon M1。

由于 Xcode 12 中的已知错误,我在 Excluded Architectures 中设置了 arm64:

链接的框架“XXXXXX”缺少此目标所需的一个或多个架构:arm64。

因为我改变了模拟器的控制台(仅在 iOS 14 中)在启动时打印大量错误,关于错误的哈希模拟器:

[db] LSSchemaConfigureForStore 失败,错误错误域=NSOSStatusErrorDomain 代码=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0xc853fe2e 5309ad0b 85774b3404e7df374b3404e7df34b304e7df35c535c5c535c54c535c535c , WrongSimulatorHash={length = 32, bytes = 0x762c6c62 f729dcd9 f2ce6d7b bb9aec8d ... d11ece5a 5fc731a0 }}

还有其他人有这个问题吗?问候。

xcode ios swift ios14 xcode12

22
推荐指数
1
解决办法
2466
查看次数

“为 iOS 构建,但嵌入式框架 'xxx.framework' 是为 iOS + iOS 模拟器构建的”

升级到 Xcode 12.3 时,出现错误:

Building for iOS, but the embedded framework 'opus.framework' was built for iOS + iOS Simulator
Run Code Online (Sandbox Code Playgroud)

但更新前一切正常。

ios xcode12

22
推荐指数
2
解决办法
4975
查看次数

源代码控制文本显示的宽度...如何修复?

在 Xcode 12 中,这就是我的源代码控制导航器的样子。正如您在此处看到的那样,Xcode 11 及更早版本并未削减或压缩列宽。有想法该怎么解决这个吗?

Xcode 12 在 Catalina 上运行暗模式。

xcode xcode12

21
推荐指数
1
解决办法
918
查看次数

标签 统计

xcode12 ×10

ios ×6

xcode ×4

ios14 ×3

swift ×3

swiftui ×3

macos ×2

fetchrequest ×1

firebase-analytics ×1

ipad ×1

iphone ×1

json ×1

mapkit ×1