gpt4 book ai didi

objective-c - 为什么我在 GCDevice.h 中得到属性为 'retain (or strong)' 的属性必须是对象类型?

转载 作者:行者123 更新时间:2023-12-04 15:17:34 25 4
gpt4 key购买 nike

我的代码在 12 之前的 Xcode 版本中始终可以正确编译。现在我正在尝试在 12 中构建我遇到了这个错误 - 我知道如何修复它,除了它在 CoreController header GCDevice 中。 h, 由 Apple 提供。更令人恼火的是,我什至没有使用 CoreController - 但它是由我确实使用的 GameKit.h 导入的。我的代码是用 ObjectiveC 编写的,并且是为 MacOS 构建的,并且 GameKit 是按如下方式导入的(如果有任何区别的话):

#import <Cocoa/Cocoa.h>
#import <GameKit/GameKit.h>
#import <AVFoundation/AVAudioPlayer.h>

当我创建一个全新的项目时,使用 GameKit 并且只有我使用 GameKit 的代码被复制并粘贴到其中(所以不是实际的游戏),它构建得很好。在我看来,这表明build设置可能存在问题?

GameKit 只导入一次,所以我认为多次导入不会有问题。还有其他人看到这个问题吗?

最佳答案

enter image description here

build设置 -> 部署 -> macOS 部署目标 -> 11.1

关于objective-c - 为什么我在 GCDevice.h 中得到属性为 'retain (or strong)' 的属性必须是对象类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64027478/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com