gpt4 book ai didi

ios - Unity3D iOS 导出错误-调用 'objc_msgSendSuper' 没有匹配函数

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:10:46 24 4
gpt4 key购买 nike

我尝试为 iOS 导出我的 Unity3D 项目,但我一直收到此错误:

No matching function for call to 'objc_msgSendSuper'

[DIRECTORY]/Classes/UI/UnityViewControllerBase+iOS.mm:166:5: No matching function for call to 'objc_msgSendSuper'

[DIRECTORY]/Classes/UI/UnityViewControllerBase+iOS.mm:180:5: No matching function for call to 'objc_msgSendSuper'

[DIRECTORY]/Classes/UI/UnityViewControllerBase+iOS.mm:210:5: No matching function for call to 'objc_msgSendSuper'

我还得到以下提示:

[DIRECTORY]/Classes/Unity/ObjCRuntime.h:20:43: Expanded from macro 'UNITY_OBJC_FORWARD_TO_SUPER'

[DIRECTORY]/Classes/Unity/ObjCRuntime.h:11:60: Expanded from macro 'UNITY_OBJC_SEND_MSG'

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/objc/message.h:65:1: Candidate function not viable: requires 0 arguments, but 4 were provided

XCode 标记以下代码行:

UNITY_OBJC_FORWARD_TO_SUPER(self_, [UIViewController class], @selector(willRotateToInterfaceOrientation:duration:), WillRotateToInterfaceOrientationSendFunc, toInterfaceOrientation, duration);

UNITY_OBJC_FORWARD_TO_SUPER(self_, [UIViewController class], @selector(didRotateFromInterfaceOrientation:), DidRotateFromInterfaceOrientationSendFunc, fromInterfaceOrientation);

UNITY_OBJC_FORWARD_TO_SUPER(self_, [UIViewController class], @selector(viewWillTransitionToSize:withTransitionCoordinator:), ViewWillTransitionToSizeSendFunc, size, coordinator);

我已经测试过在模拟的 iPhone X (iOS 11.4) 上构建该应用。

谁能告诉我如何解决这个问题?

MacOS:HighSierra 10.13.4Unity3D(个人):2018.1.1f1X代码:9.4

最佳答案

我在 Unity 2018.1.3 上有同样的问题

在关闭“启用对 objc_msgSendCalls 的严格检查”选项后(在项目 -> Apple LLVM 9.0 预处理下)设法在模拟器上编译和运行。

我对原生 iOS 开发知之甚少,所以忽略此类错误可能会很糟糕。我正在尝试降级到我没有的 Unity 2017.3.1这些错误。

关于ios - Unity3D iOS 导出错误-调用 'objc_msgSendSuper' 没有匹配函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50738137/

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