Link SceneKit Framework 避免在 iOS 7 上崩溃

Link SceneKit Framework avoid crash on iOS 7

我有一个支持 iOS 7 及更高版本的应用程序。对于我想使用 SceneKit 的视图之一,如果应用程序 运行ning 在 iOS 8 或更高版本上。我通过使用这段代码来做到这一点

if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")){
        [self performSegueWithIdentifier:@"3DIdentifier" sender:cell];
    }
    else{
        [self performSegueWithIdentifier:@"2DIdentifier" sender:cell];
    }
}

问题在于,当使用 iOS 7 模拟器时,应用程序不会 运行。

原因:没有找到合适的图片。找到了: /System/Library/Frameworks/SceneKit.framework/SceneKit:mach-o,但不是为 iOS 模拟器构建的

有没有办法 link SceneKit 使应用程序仍然可以构建并且 运行 在 iOS 7 上?

你是弱链接SceneKit吗? 参见 and https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html