Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

IOS7 and Game Center Achievements- no banners displayed.

Discussion in 'iOS and tvOS' started by vbbartlett, Sep 20, 2013.

  1. vbbartlett

    vbbartlett

    Joined:
    Dec 4, 2012
    Posts:
    25
    Hoping someone can confirm or refute the fact that it appears that achievements don't show when they are achieved. When run on an IOS6 the achievement shows up but when run on the iOS 7 it doesn't show up.
    When Game Center is opened I can confirm that I don't have the achievement on both devices.
    Next I preform the action to receive the achievement.
    Open Game Center again and confirm that I have received the achievement.
    IOS6 shows the banner.
    ios7 no banner is shown.

    Verified that notifications are banner.

    I am building under xcode5 and unity 4.2

    Anything else?
     
  2. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,066
    Just came in here searching for an answer to this myself :)

    I no longer have an iOS 6 device handy to test with (cause I'm a dumbass), but I'm seeing the issue on iOS7. Achievements work perfectly, but there's just no banner being displayed.
     
  3. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,066
    For the record, this is what I'm doing upon successful authentication:

    Code (csharp):
    1.  
    2. private void ProcessGameCenterAuthentication(bool success)
    3. {
    4.     if (success)
    5.     {
    6.         UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform.ShowDefaultAchievementCompletionBanner(true);
    7.     }
    8. }
    9.  
    This has worked previously. I'm assuming it's still relevant and correct, and all that's required to get those banners showing?
     
  4. vbbartlett

    vbbartlett

    Joined:
    Dec 4, 2012
    Posts:
    25
    Yeah same here that looks almost exactly like me code and it displays the banners on iOS5/6
     
  5. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,066
    Okay, then I guess it doesn't work anymore :)

    Unless there's something different that needs to happen under iOS7, but I'm not aware of any changes.
     
  6. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    I think Game Centre is totally borked now.

    My code was working perfectly (using prime31's gc plugin), now I have all sorts of issues:

    1. Can't do part achievements e.g. 10% completion 20% so forth on collection achievements
    2. Achievement banners when completed are still showing again after completion (i.e. not recognising that it's already completed).

    Was all working perfectly before and so far noone can give me answers - getting hot potatoes between apple and prime ><


    Edit: Can also confirm that banners show on ios6 (on my ipod 4 and ipad1) but NOT on ios7 (my iphone 4s)
     
    Last edited: Sep 21, 2013
  7. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,066
    You're actually seeing achievement banners on iOS7 though?
     
  8. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    No, not at all. Only seeing them on iOS6 (i haven't updated all devices).

    I've been searching all over the net for other people reporting this and my other %completion issue AND the reporting of achievements complete even when they've been completed before, and so far this is it - like it's potentially only a unity or prime31 issue.
     
  9. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    Found this on Apple website:
    Wonder if Unity and Prime31 have looked into these? Could be an issue in there.
     
  10. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,066
    Hopefully some fixes are coming along soon. It's the only thing holding me up on release now :(
     
  11. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    Same. We've just started final beta testing and this could potentially hold us back from the date we want :(
     
  12. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    I just tried it out with our GameKit for iOS7.0 module using the low level APIs and same results. The apple dev forums are also reporting the same thing for iOS 7.0 devices. It's likely an iOS7.0 bug.
     
  13. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    @u3dxt is your system working correctly for achievements with progressive updates? (e.g. 10% complete) etc?
     
  14. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @OceanBlue Sure. Below is a simple demo our plugin's iOS 7.0 GameKit.

    [video=youtube_share;ugpm95rBEYQ]http://youtu.be/ugpm95rBEYQ

    Code (csharp):
    1.  
    2. // reporting achievements, args: id, percentage
    3. GameKitXT.ReportAchievement("FLOOR2_COMPLETED", 10);
    4.  
     
  15. blueteak

    blueteak

    Joined:
    Feb 19, 2013
    Posts:
    139
    Does that mean that an update to the OS will fix bug, and not require modifications to existing code?

    Also, has anyone tested live game's achievements instead of in sandbox?
     
  16. ecc83

    ecc83

    Joined:
    Nov 23, 2012
    Posts:
    32
    Wanted to bump this. Are there any reports of whether the achievement banner displays in the live environment?

    I'm getting the same behaviour described here - using the Unity Social API - achievement works fine in the sandbox, but the banner does not display. This is on a device with iOS 7.0.3

    Anyone got any updates or more info?

    Cheers
    ecc83
     
  17. vbbartlett

    vbbartlett

    Joined:
    Dec 4, 2012
    Posts:
    25
    I can confirm that the live area works. Banners display properly.
     
  18. ecc83

    ecc83

    Joined:
    Nov 23, 2012
    Posts:
    32
    Thanks! :)
     
  19. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,066
    Yup - same here. Works fine in the live app.
     
  20. MissVi

    MissVi

    Joined:
    Apr 2, 2013
    Posts:
    7
    OceanBlue, I'm not using Prime31 but Unity indeed has a bug when doing cumulative progress reporting.

    I'm using this:
    Code (csharp):
    1.                 Social.ReportProgress(achievementID, progressCompleted, success =>
    2.                 {
    3.                     ...
    4.                 });
    5.  
    The banner shows up ( < ios7.0) when the achievement progress is reported 100% straight away. But will not show if it's cumulative like you mentioned.

    I already coded everything in Unity until I saw this issue. I didn't want to discard that work so what I did was, if the achievement progress reaches 100%, I will report it again on the xcode side just to show the damn banner. I know it's redundant but it's just a work around and I'm still hoping Unity will fix it one day.

    In the iOS plugin I wrote something like:

    Code (csharp):
    1.             achievement.showsCompletionBanner = YES;
    2.             achievement.percentComplete = 100.0;
    3.             [achievement reportAchievementWithCompletionHandler:^(NSError *error)
    4.              {
    5.                  if (error != nil)
    6.                  {
    7.                      NSLog(@"%@", error.localizedFailureReason);
    8.                  }
    9.              }];
    That did the trick.

    But yeah, completion banners does not show all the time in iOS7.0+
     
  21. akashkubasad

    akashkubasad

    Joined:
    Jul 9, 2018
    Posts:
    2
    enable the social and gamekit in the wrapper it works
     

    Attached Files: