我正在使用everyplay记录我的游戏,玩家可以在结果屏幕上分享视频。
在iPad上录制,分享和查看个人资料工作正常,但当我点击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编写代码的方式。我想知道cocos2dx与Everyplay是否有问题。
请指教。 感谢
答案 0 :(得分:3)
我认为你的游戏只是风景。在这种情况下,您有两个选项来解决这个问题。
选项1:
将UISupportedInterfaceOrientations数组添加到游戏的info.plist中,其中包含UIInterfaceOrientationPortrait,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight和UIInterfaceOrientationPortraitUpsideDown。您可以通过从项目摘要页面检查所有支持的接口方向或手动编辑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;
}