GameKit imports GamePlayKit on iOS 8 and below, which causes a runtime crash.

Originator:harlanhaskins
Number:rdar://21670374 Date Originated:03-Jul-2015
Status:Closed Resolved:Fixed
Product: Product Version:
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
In the umbrella header for GameKit,

#import <GamePlayKit/GamePlayKit.h>

which causes a crash at runtime on iOS 8 and below when trying to use GameKit.

Steps to Reproduce:
Create a project.

import GameKit using a modular import.

Set the deployment target to 8.0.

Attempt to run on a device that's below iOS 9.

Note the dyld error:

dyld: Library not loaded: /System/Library/Frameworks/GameplayKit.framework/GameplayKit
  Referenced from: /private/var/mobile/Containers/Bundle/Application/D64C3101-F1AB-454C-8992-2D24B9499076/Sample.app/Frameworks/libswiftGameKit.dylib
  Reason: image not found
(lldb)

Expected Results:
The app links properly without GamePlayKit on iOS 8

Actual Results:
The app crashes trying to link a nonexistent framework.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!