未找到 CoreMidi _MIDINetworkNotificationContactsDidChange 符号

发布于 2024-10-17 21:10:57 字数 1541 浏览 4 评论 0原文

在使用 CoreMIDI 的 iPad 应用程序崩溃后,我收到以下错误(* 是为了空白应用程序名称):

Dyld Error Message:
 Symbol not found: _MIDINetworkNotificationContactsDidChange
 Referenced from:
/var/mobile/Applications/8F08B78E-929D-4C5A-9F02-08FD5743C17F/***.app/***
 Expected in: /System/Library/Frameworks/CoreMIDI.framework/CoreMIDI
in /var/mobile/Applications/8F08B78E-929D-4C5A-9F02-08FD5743C17F/***.app/***
 Dyld Version: 179.4

监听 MIDI 网络会话:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sessionDidChange:) name:MIDINetworkNotificationSessionDidChange object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sessionDidChange:) name:MIDINetworkNotificationContactsDidChange object:nil];

当应用程序启动时,我使用以下命令 导致崩溃的原因。这是之后我称之为

session = [MIDINetworkSession defaultSession];
session.enabled = YES;
session.connectionPolicy = MIDINetworkConnectionPolicy_Anyone;
MIDIClientCreate(CFSTR("MidiManager"), midiNotifyProc, (void*)self, &midiClientRef);

这种看起来CoreMIDI库尚未包含在构建中。问题是,它作为必需的框架包含在构建中。 (部署目标设置为4.2)。我可以在我的 iPad 上很好地运行该构建,并且已经在其他用户的 iPad 上进行了广泛的测试,也没有出现任何问题。此外,这是对现有应用程序的更新,该应用程序已经进行了多次更新,没有出现任何问题。

我刚刚仔细检查了我的部署构建,框架肯定包含在内,我刚刚将该构建安装到我的 iPad 上(使用与商店不同的配置文件),它也工作得很好。

可能发生什么情况?难道是 Xcode 刚刚为我发送给 Apple 的构建做了一个糟糕的构建,还是我遗漏了一些明显的东西?我可以将 MIDINetworkNotificationSessionDidChange 通知符号更改为文字字符串 (@"MIDINetworkNotificationSessionDidChange") 以同时修复问题吗?

感谢您的帮助!

I'm getting the following error after a crash in an iPad app that uses CoreMIDI (The * are to blank out the app name):

Dyld Error Message:
 Symbol not found: _MIDINetworkNotificationContactsDidChange
 Referenced from:
/var/mobile/Applications/8F08B78E-929D-4C5A-9F02-08FD5743C17F/***.app/***
 Expected in: /System/Library/Frameworks/CoreMIDI.framework/CoreMIDI
in /var/mobile/Applications/8F08B78E-929D-4C5A-9F02-08FD5743C17F/***.app/***
 Dyld Version: 179.4

When the app launches, I listen for MIDI Network Sessions using

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sessionDidChange:) name:MIDINetworkNotificationSessionDidChange object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sessionDidChange:) name:MIDINetworkNotificationContactsDidChange object:nil];

Which seems to be what is causing the crash. This is after I call

session = [MIDINetworkSession defaultSession];
session.enabled = YES;
session.connectionPolicy = MIDINetworkConnectionPolicy_Anyone;
MIDIClientCreate(CFSTR("MidiManager"), midiNotifyProc, (void*)self, &midiClientRef);

This kind of looks like CoreMIDI library has not been included in the build. Problem is, it IS included in the build as a required framework. (And the deployment target is set to 4.2). I can run the build fine on my iPad and have been testing extensively with other users' iPads also with no problems whatsoever. Also, this is an update to an existing app that has had several updates already with no problems.

I just double checked my deployment build and the framework is definitely included, and I just installed that build onto my iPad (with a different provisioning profile from the store) and it works fine also.

What could be happening? Could it be that Xcode just did a bad build for the one I sent to Apple, or am I missing something obvious? Could I change the MIDINetworkNotificationSessionDidChange notification symbol to a literal string (@"MIDINetworkNotificationSessionDidChange") to fix things for the mean time?

Thanks for any help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

满栀 2024-10-24 21:10:57

看来这是苹果的事情。 PGMidi 的主力类的 .mm 在顶部包含此内容:

// For some reason, this is not pulled in by the umbrella header
#import <CoreMIDI/MIDINetworkSession.h>

https://github.com/petegoodliffe/PGMidi

Seems like this was an Apple thing. The .mm of PGMidi's workhorse class includes this at the top:

// For some reason, this is not pulled in by the umbrella header
#import <CoreMIDI/MIDINetworkSession.h>

https://github.com/petegoodliffe/PGMidi

大姐,你呐 2024-10-24 21:10:57

您是否记得在 Info.plist 中将最低操作系统要求设置为 4.2?崩溃报告可能来自使用早期版本 iOS 的用户,他们在不应该升级的情况下进行了升级。

Did you remember to set the minimum OS requirements to 4.2 in your Info.plist? It could be that the crash reports are coming from users on an earlier version of iOS who are upgrading when they shouldn't be.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文