jackcook / gchelper Goto Github PK
View Code? Open in Web Editor NEWA lightweight helper class for GameKit, written in Swift
License: MIT License
A lightweight helper class for GameKit, written in Swift
License: MIT License
It check if the player is logged in but it doesn't show the log in screen if the player isn't logged in!..
I've noticed a typo in the
public func loadAllAchivements(_ completion: (() -> Void)? = nil)
function
It should be loadAllAchievements(_ completion: (() -> Void)? = nil)
'playerID' was deprecated in iOS version 8.0: use player
Hey!
Invites don't seem to work - what's required to get invite friend part working. :)
Cheers!
I am trying to use your GCHelper and I put the line GCHelper.sharedInstance.authenticateLocalUser() in my AppDelegate but when I run the project on the simulator I get an error right away. I am new to Swift so I am probably doing something wrong. Any idea what I need to do to resolve this?
Thanks!
GCHelper authenticationChanged]: unrecognized selector sent to instance 0x78681a20'
*** First throw call stack:
(
0 CoreFoundation 0x01656746 exceptionPreprocess + 182
1 libobjc.A.dylib 0x012dba97 objc_exception_throw + 44
2 CoreFoundation 0x0165e705 -[NSObject(NSObject) doesNotRecognizeSelector:] + 277
3 CoreFoundation 0x015a5287 __forwarding + 1047
4 CoreFoundation 0x015a4e4e _CF_forwarding_prep_0 + 14
5 Foundation 0x0083a079 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke + 40
6 CoreFoundation 0x01620be4 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 20
7 CoreFoundation 0x0150d11b _CFXNotificationPost + 3051
8 Foundation 0x008295d6 -[NSNotificationCenter postNotificationName:object:userInfo:] + 98
9 GameCenterFoundation 0x03d0ba63 __52-[GKDaemonProxy setLocalPlayer:authenticated:reply:]_block_invoke + 904
10 libdispatch.dylib 0x052355ea _dispatch_call_block_and_release + 15
11 libdispatch.dylib 0x05257bef _dispatch_client_callout + 14
12 libdispatch.dylib 0x0523d6bb _dispatch_main_queue_callback_4CF + 993
13 CoreFoundation 0x015af8ee CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 14
14 CoreFoundation 0x0156d5f0 __CFRunLoopRun + 2256
15 CoreFoundation 0x0156ca5b CFRunLoopRunSpecific + 443
16 CoreFoundation 0x0156c88b CFRunLoopRunInMode + 123
17 GraphicsServices 0x044652c9 GSEventRunModal + 192
18 GraphicsServices 0x04465106 GSEventRun + 104
19 UIKit 0x026fd0b6 UIApplicationMain + 1526
Hi I'm trying out the invite though it is not receiving. Is there any docs to help figure this out Thank you
BTW - awesome resource
Great helper class, thanks for that! Noticed a little bug in the authenticateLocalUser method, though: As apple states in their documentation, you should always check the authenticated-property on the local player, instead of relying on an error.
Also, if the view is not nil, there should be code to present the given view controller, so the user sees a login screen.
Thanks again!
Chris
Use of unresolved identifier 'GKPlayerAuthenticationDidChangeNotificationName'
Should I register the localplayerlistener somewhere in the GCHelper authentication like this
GKLocalPlayer.localPlayer().registerListener(self)
so the app can listen for invites? I did't find such registration in the GCHelper.swift
On commit 'e8f816ad06505de81de0af4945c4668281c30c80' changing 'NSNotification.Name(rawValue: GKPlayerAuthenticationDidChangeNotificationName) ' to 'Notification.Name.GKPlayerAuthenticationDidChangeNotificationName' caused builds to fail occasionally.
Any possibility to add support for turn based matches? I tried myself and made a findTurnBasedMatchWithMinPlayers(), nearly identical to the non turn based one, but that was all I could come up with before things broke. If it's not too much work I'm sure a bunch of people would appreciate it! There isn't much info out there on turn based matchmaking.
I added the Repo to my project and try to authenticated the user but i always directly fail with
he requested operation could not be completed because this application is not recognized by Game Center.
Hey! If you're here to write some unit tests, the only note I have is to use XCTest.
If you're not sure why I wrote this issue, go take a look at the CocoaPods Testing Jam.
Thanks!
hi, not a big deal, but just updated to Xcode 8.3 and I am using your (very cool) GC Helper.
Now seeing a few warnings related to it.
they are all:
String interpolation produces a debug description for an optional value; did you mean to make this explicit ?
as i say, not a big deal at all, just thought i'd mention it.
thanks for your awesome code.
Hi I created a bookseller who offers help like you for the game center. I wanted to know if it told you that we combine our two projects ? https://github.com/DaRkD0G/Easy-Game-Center-Swift
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.