【发布时间】:2015-04-22 23:33:24
【问题描述】:
我最近向应用商店提交了一个应用(使用 swift 制作的 spritekit 游戏),但由于发现其中存在错误而被拒绝。苹果的确切回应是:
在通过 Wi-Fi 和蜂窝网络运行 iOS 8.1.3 的 iPad 上进行审查时,我们在您的应用中发现了一个或多个错误。 具体来说,应用程序加载到空白显示。有关详细信息,请参阅随附的屏幕截图。
我收到了一张空白屏幕截图(灰色),但这没有任何帮助。我无法重现该问题,因为该应用程序在我的 iPad (8.1.3) 上运行良好。有谁知道这可能是什么?我测试了发送给苹果的相同版本。
这是我的视图控制器代码:
super.viewDidLoad()
let scene:SKScene = GameScene()
// Configure the view.
let skView = self.view as! SKView
skView.showsFPS = false
skView.showsNodeCount = false
/* Sprite Kit applies additional optimizations to improve rendering performance */
skView.ignoresSiblingOrder = true
/* Set the scale mode to scale to fit the window */
scene.scaleMode = .ResizeFill
scene.anchorPoint = CGPoint(x: 0.5, y: 0.5)
scene.size = skView.bounds.size
skView.presentScene(scene)
}
override func shouldAutorotate() -> Bool {
return true
}
override func supportedInterfaceOrientations() -> Int {
if UIDevice.currentDevice().userInterfaceIdiom == .Phone {
return Int(UIInterfaceOrientationMask.AllButUpsideDown.rawValue)
} else {
return Int(UIInterfaceOrientationMask.All.rawValue)
}
}
这是游戏第一个场景的一些代码(didMoveToView):
authenticateLocalPlayer()
//add background
self.addChild(backgroundpic)
//retrieve ad
//loadAds()
//get high score
var accessPlayScene = PlayScene()
var gameSceneHighScore = accessPlayScene.returnHighScore()
//set background color
backgroundColor = SKColor.blackColor()
//add leaderboardbutton
leaderBoardButton.position = CGPointMake((CGRectGetMidX(self.frame)), ((-1) * self.frame.size.height*0.27))
self.addChild(leaderBoardButton)
//add play button
self.tutorialButton.position = CGPointMake(CGRectGetMidX(self.frame),CGRectGetMaxY(self.frame)*(-0.05))
self.addChild(self.tutorialButton)
//add high score label
gameSceneHighScoreLabel.fontColor = UIColor.redColor()
gameSceneHighScoreLabel.position = CGPointMake(CGRectGetMidX(self.frame), (CGRectGetMaxY(self.frame)*0.75))
gameSceneHighScoreLabel.text = "High Score: " + String(gameSceneHighScore)
self.addChild(gameSceneHighScoreLabel)
//add intro text
self.appName.position = CGPointMake(CGRectGetMidX(self.frame),(CGRectGetMaxY(self.frame)*0.90))
self.addChild(appName)
//add tutorial button
PLAYBUTTON.position = CGPointMake(CGRectGetMidX(self.frame), CGRectGetMaxY(self.frame)*0.45)
self.addChild(PLAYBUTTON)
}
感谢您的帮助
【问题讨论】:
-
"在 Wi-Fi 和蜂窝网络上运行 iOS 8.1.3" 这是否意味着您在应用启动时进行了某种网络连接?如果是这样,那就是问题所在。
-
该应用程序使用 iAd,但这似乎工作正常。即使我从应用程序中取出 iAd 并重新提交,我也收到了同样的错误。
标签: ios xcode ipad swift crash