0

I'm using Nextpeer in Cocos for multi-player game, and want to set portrait orientation for NextpeerSettingInitialDashboardOrientation. I'm using this code for that :

 NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:
                              [NSNumber numberWithBool:FALSE], NextpeerSettingSupportsDashboardRotation,
                              [NSNumber numberWithInt:NPNotificationPosition_BOTTOM], NextpeerSettingNotificationPosition,
                              [NSNumber numberWithBool:FALSE], NextpeerSettingInitialDashboardOrientation,
                              nil];

[Nextpeer initializeWithProductKey:@"ID" andSettings:settings andDelegates:
 [NPDelegatesContainer containerWithNextpeerDelegate:self notificationDelegate:nil tournamentDelegate:self currencyDelegate:nil]];

But i'm getting this warning, and my orientation is not set to portrait. It's set it to Landscape. My default orientation is portrait.

Nextpeer warning: The desired orientation (1) isn't supported by the currently integrated Nextpeer's resource bundle.
  • How to change NextpeerSettingSupportsDashboardRotation ?

  • How to resolve this warning ?

iBhavin
  • 1,261
  • 15
  • 30

1 Answers1

0

Nextpeer has different resource bundles based on your project orientation and universal support. You need to make sure that you integrate the correspondent resource bundle. For example if your is landscape universal then you need to set the NPResources_iPad_iPhone_Landscape bundle in your project as instructed in the iOS integration guide.

In order to change the NextpeerSettingSupportsDashboardRotation value to TRUE just change the object value like this:

 NSDictionary* settings = [NSDictionary dictionaryWithObjectsAndKeys:
                          [NSNumber numberWithBool:TRUE], NextpeerSettingSupportsDashboardRotation,
                          [NSNumber numberWithInt:NPNotificationPosition_BOTTOM], NextpeerSettingNotificationPosition,
                          [NSNumber numberWithBool:FALSE], NextpeerSettingInitialDashboardOrientation,
                          nil];
Muddy Waters
  • 113
  • 9