From 93e797f1649cfbdd5748956feb245ee27c75c996 Mon Sep 17 00:00:00 2001 From: romulox_x Date: Sat, 23 May 2015 03:17:52 -0700 Subject: Fixed null pointer bug in ios store. added functions to game center to reset the user's achievements, request all the achievements they've made progress on, request descriptions of all possible achievements, and show the built in game center overlay. Upgraded all (I think) deprecated functions to ios 6 versions. as per discussion with reduz on IRC, ios 6 is now the official lowest supported iOS version. compatibility could be added, but it's so obsolete, it's tough to argue for continuing to support it. some naming of functions and dictionary parameters might need to change. I just named them whatever made sense to me :) --- platform/iphone/view_controller.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'platform/iphone/view_controller.mm') diff --git a/platform/iphone/view_controller.mm b/platform/iphone/view_controller.mm index a5ca689e61..f04264cfd9 100644 --- a/platform/iphone/view_controller.mm +++ b/platform/iphone/view_controller.mm @@ -124,10 +124,14 @@ int add_cmdline(int p_argc, char** p_args) { } }; - - (BOOL)prefersStatusBarHidden { return YES; } +- (void) gameCenterViewControllerDidFinish:(GKGameCenterViewController*) gameCenterViewController { + printf("in finish"); + [gameCenterViewController dismissViewControllerAnimated:YES completion:nil]; +} + @end -- cgit v1.2.3 From 95cd9b1ad54f799d9513911e4cebc5bafc135d97 Mon Sep 17 00:00:00 2001 From: romulox_x Date: Sat, 23 May 2015 23:22:20 -0700 Subject: added response event for game center overlay closing --- platform/iphone/view_controller.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'platform/iphone/view_controller.mm') diff --git a/platform/iphone/view_controller.mm b/platform/iphone/view_controller.mm index f04264cfd9..bc9950979e 100644 --- a/platform/iphone/view_controller.mm +++ b/platform/iphone/view_controller.mm @@ -130,7 +130,8 @@ int add_cmdline(int p_argc, char** p_args) { } - (void) gameCenterViewControllerDidFinish:(GKGameCenterViewController*) gameCenterViewController { - printf("in finish"); + //[gameCenterViewController dismissViewControllerAnimated:YES completion:^{GameCenter::get_singleton()->game_center_closed();}];//version for signaling when overlay is completely gone + GameCenter::get_singleton()->game_center_closed(); [gameCenterViewController dismissViewControllerAnimated:YES completion:nil]; } -- cgit v1.2.3