每次播放都会录制视频,但当我点击"Share"并"View profile"时崩溃



我使用everyplay来记录我的游戏,玩家可以在结果屏幕上共享视频。

在iPad上录制、共享和查看个人资料都很好,但当我点击everyplay页面上的"共享"、"查看everyplay个人资料"按钮时,每个iPhone版本(4、4S、5)都会崩溃。

当我们点击这两个按钮时,我们跟踪了发生了什么。

2013-08-01 10:29:19.489 ZombieBlackout[6602:907] Video Updated
2013-08-01 10:29:20.786 ZombieBlackout[6602:907] everyplayRecordingStopped
2013-08-01 10:29:20.788 ZombieBlackout[6602:907] everyplayShown
2013-08-01 10:29:22.393 ZombieBlackout[6602:907] Audio route change while recording was stopped.
2013-08-01 10:29:22.394 ZombieBlackout[6602:907] A route change occurred that does not require stopping application audio.
2013-08-01 10:29:22.451 ZombieBlackout[6602:907] Audio route change while recording was stopped.
2013-08-01 10:29:22.453 ZombieBlackout[6602:907] A route change occurred that does not require stopping application audio.
2013-08-01 10:29:27.488 ZombieBlackout[6602:907] Video Updated
2013-08-01 10:29:35.383 ZombieBlackout[6602:907] *** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'
*** First throw call stack:
(0x3304f3e7 0x3ad40963 0x3304f307 0x34ec688f 0x3506b0c9 0x3f388d 0x3f0dad 0x3e1e5b 0x3e1d4b 0x3b15a793 0x3b15a5db 0x3b15de45 0x330231b1 0x32f9623d 0x32f960c9 0x36b7433b 0x34eb22b9 0xb1503 0xb02b8)
libc++abi.dylib: terminate called throwing an exception

我不认为这是因为我们的构建是在iPhone上,因为我在iPhone上尝试了Nimble Quest,我可以点击上面提到的2个按钮。

我正在使用Cocos2dx,我们的编码方式已经为Android做好了准备。我想知道Everyplay的cocos2dx是否有问题。

请告知。感谢

我认为你的游戏只是横向的。在这种情况下,您有两个选项来解决此问题。

选项1:

将UISupportedInterfaceOrientations数组添加到游戏的info.plist中,其中包含项目UIInterfaceOrientionPortrait、UIInterfaceOrientationLandscapeLeft、UIInteraceOrientionLandscapeRight和UIInterface东方PortraitOverrideDown。通过从项目摘要页面中检查所有支持的接口方向,或者手动编辑info.plist文件,您可以从xCode轻松地做到这一点。

选项2:

将以下方法添加到应用程序的AppDelegate.m文件中:

// IOS 6
-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
  return UIInterfaceOrientationMaskAll;
}

在这两种情况下,您还必须确保已将仅横向方向的处理代码添加到游戏的UIViewController中。

// IOS 5
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
  return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}
// IOS 6
- (BOOL)shouldAutorotate {
   return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
  return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight;
}

最新更新