CABTMidiCentralViewController used in Storyboard o

2019-03-04 02:51发布

问题:

I am having an app that uses the CABMIDICentralViewController directly within the storyboard. I dont want to use it in the code in any way.

Now i have the strange issue, that this embedded view controller (used in the storyboard as ContainerView that is embedded in a regular VC with the class attribute set to CABTMIDICentralViewController) is only working when I keep a mention in the code like this

- (IBAction)openCentralConfig
{
    CABTMIDICentralViewController *viewController = [CABTMIDICentralViewController new];
}

When i remove that line of code the containerview stays empty. When i keep it, everything is fine. I guess the compiler optimizes imports and symbols and then its not known anymore.

How can I avoid having this reference in the code.

Update 1

Same issue happens here

Switching to XCode 10 causes `UserNotifications.framekwor dyld: Library not loaded crash` for iOS9

Update 2

More generic question

XCode sometimes removes linked library