GameCenter original image not found for Xcode 7.0 Beta 4

Does anyone encounter this problem when trying to run their application on a real iPhone (iOS version 8.4) using Xcode 7 Beta 4?

dyld: library not loaded: /System/Library/Frameworks/GameCenter.framework/GameCenter Links: / private / var / mobile / Containers / Bundle / Application / CC713E5A-7839-43F1-9AEB-932AE2A3DF8A / .... Reason: image not found

For your information, it worked without errors before switching to Xcode 7 ...

+4
source share
3 answers

Looks like the issue disappeared in Xcode Beta 5. Anyone to confirm this?

0
source

In the Project-> Build Settings, there is a weak link for both the new iOS 9 GameCenter lib and the old GameKit libraries and try again. You can loosely link them by specifying "Status" as "Optional."

enter image description here

You need an old one that still works if you are running on an earlier version of iOS than 9, which will need the GameKit stub library associated with it, because it will not know about the new GameCenter for iOS 9.

You may also need to change

#import <GameKit/GameKit.h> 

to

 #import <GameCenter/GameCenter.h> 

If I had to guess that the change might just be limited to using a less common library name, as Apple continues to add more game-oriented libs (Spritekit, Scenekit, Replaykit, etc.), renaming the main GameCenter lib from GameKit to GameCenter has meaning.

+2
source

For me, this worked well on iOS 8.4 and iOS 9 with these changes in the above sentences:

  • Do not change your code, just stick to #import <GameKit / GameKit.h>
  • When creating with Xcode 7 add GameCenter.framework (weak link / optional) and do not change this parameter for GameKit.framework (required)

What is it.

If XCode7 gives you a GameKit.Framework linker error, go back to Xcode 6.4 and rebuild the project (disable the target GameCenter.framework membership in the file inspector before). Then go back to Xcode 7 - the linker error has disappeared.

+1
source

All Articles