why do i need gameplaykit

According to my project errors i need gameplaykits. This is only for ios 9 but my app need to be availble for ios 8. How can i fixs this.


this is my project:



https://drive.google.com/file/d/0B6qhon61NKJLOG9ONWpNMWNJUmc/view?usp=sharing

Answered by LCS in 20347022

It appears to be a bug in the iOS 9 SDK version of the GameKit framework, since it should not force the totally unrelated GameplayKit requirement that blocks deployment on iOS 8. You should file a bug at bugreporter.apple.com about it, if you haven't already.


Theoretically, if you build targetting an older iOS 8.x SDK it should link with a version of GameKit that doesn't include any references to GameplayKit.


If you plan to release your app to the App Store in the next few months before Xcode 7 is out of beta, you will need to build with Xcode 6.4 anyway, and it supports the iOS 8.4 SDK. That also means your app needs to be written in Swift 1.2 and not Swift 2.


If you won't be releasing your app until after Xcode 7 is officially released, and want to keep developing using Swift 2, you might be able to add the iOS 8.4 SDK to Xcode 7. I'm not sure it will work though.


Download Xcode 6.4 if you don't have it already, and get the iOS 8.4 SDK from inside the application package and drag it to the desktop while holding down the option key to make a copy:
/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk

Rename the copy to "iPhoneOS8.4.sdk" and drag it to the same location inside the Xcode 7 beta application.

Now you should be able to choose the iOS 8.4 SDK as your SDKROOT in the build settings for your project.

Well you can't fix that.

You either use GameplayKit and restrict yourself to iOS 9

or you just use SpriteKit and do all the AI yourself in iOS 8

or you use a a third party library all together like Unity or CocoaTouch that can be updated independantly of the operating system.


From what I've seen GameplayKit is really good for turn based games, so if you want to keep your life simple you might go down the GameplayKit path and just wait a few months before releasing your app (assuming you're aiming for hte app store).

Remember that iOS users tend to have very high, very fast upgrade rates. You're fine to support iOS 9 only—actually, that's kind of what users have come to expect.

Actually, his code doesn't seem to use GameplayKit in any way, and as far as I can tell the GameplayKit framework isn't linked in to it directly.


It appears that the GameKit framework (an entirely different framework, available from iOS 4 or so) is somehow trying to link to GameplayKit itself, and that is causing the error.


Maybe changing the GameKit framework to Optional linking instead of Required would avoid the unnecessary dependency side-effects?


I don't have a paid developer account, so I can't actually try doing a build with the iOS Device target instead of the simulator, and I don't think there is any way for me to poke around further. (If you want to mess with it, you just need to uncheck all the missing image files from the target, it will build without them.)

I have tryed changing gamekit to optional but the error still occurs, any more ideas thanks

Accepted Answer

It appears to be a bug in the iOS 9 SDK version of the GameKit framework, since it should not force the totally unrelated GameplayKit requirement that blocks deployment on iOS 8. You should file a bug at bugreporter.apple.com about it, if you haven't already.


Theoretically, if you build targetting an older iOS 8.x SDK it should link with a version of GameKit that doesn't include any references to GameplayKit.


If you plan to release your app to the App Store in the next few months before Xcode 7 is out of beta, you will need to build with Xcode 6.4 anyway, and it supports the iOS 8.4 SDK. That also means your app needs to be written in Swift 1.2 and not Swift 2.


If you won't be releasing your app until after Xcode 7 is officially released, and want to keep developing using Swift 2, you might be able to add the iOS 8.4 SDK to Xcode 7. I'm not sure it will work though.


Download Xcode 6.4 if you don't have it already, and get the iOS 8.4 SDK from inside the application package and drag it to the desktop while holding down the option key to make a copy:
/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk

Rename the copy to "iPhoneOS8.4.sdk" and drag it to the same location inside the Xcode 7 beta application.

Now you should be able to choose the iOS 8.4 SDK as your SDKROOT in the build settings for your project.

Try import GameCenter instead of import GameKit


Apple has changed the framework name in ios 9

why do i need gameplaykit
 
 
Q