我们在其中一个游戏中使用了nextpeer多人游戏。它工作了2天,现在它显示警告 - “你已经与服务器断开连接。请稍后再试”。
这是我的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];
}
为什么现在突然停止工作并显示此警报?有人遇到类似的问题吗?