iphone游戏中的Nextpeer Alert:您已与服务器断开连接

时间:2013-03-25 04:17:08

标签: iphone cocos2d-iphone multiplayer nextpeer

我们在其中一个游戏中使用了nextpeer多人游戏。它工作了2天,现在它显示警告 - “你已经与服务器断开连接。请稍后再试”。

enter image description here enter image description here

这是我的nextpeer初始化代码。

-(void)initializeNextpeer:(NSDictionary *)launchOptions
{
    BOOL isRetina = (IS_IPAD) ? FALSE : TRUE ;

    NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:

                              // This game has no retina support - therefore we have to let the platform know
                              [NSNumber numberWithBool:isRetina], NextpeerSettingGameSupportsRetina,
                              // Support orientation change for the dashboard notifications
                              [NSNumber numberWithBool:TRUE], NextpeerSettingSupportsDashboardRotation,
                              // Support orientation change for the in game notifications
                              [NSNumber numberWithBool:TRUE], NextpeerSettingObserveNotificationOrientationChange,
                              //  Place the in game notifications on the bottom screen (so the current score will be visible)
                              [NSNumber numberWithInt:NPNotificationPosition_TOP], NextpeerSettingNotificationPosition,
                              nil];

    [Nextpeer initializeWithProductKey:@"47874e79e3b0d02c4fe1847fbdb54a1d2e02b943"
                            andSettings:settings
                          andDelegates:[NPDelegatesContainer containerWithNextpeerDelegate:self]];

    // Register for push notifications
    [[UIApplication sharedApplication]
     registerForRemoteNotificationTypes:
     UIRemoteNotificationTypeBadge |
     UIRemoteNotificationTypeSound |
     UIRemoteNotificationTypeAlert];

    // Handle any notifications the game was launched with
    [Nextpeer handleLaunchOptions:launchOptions];

}

为什么现在突然停止工作并显示此警报?有人遇到类似的问题吗?

0 个答案:

没有答案