1

I've got a frustrating problem here in that my iPhone app seems to run fine in XCode (running in the simulator or debugging it with iPhone plugged in), but archive versions act differently.

My sprites are supposed to perform movement only in a strict grid pattern and at constant speeds, but they are sort of skipping around and moving in unexpected diagonals.

I don't think it's IOS7-related because the problem doesn't manifest in the new version (7) of the simulator.

I never saw this problem in months of development and dev testing. It only seems to have started happening since I started producing and distributing archives.

App details: Game, cocos2D

Hardware: MacBook Air, iPhone5, IOS7

4

1 回答 1

2

I ended up getting some help from someone on the Apple Developer Forums, but I'd like to update this posting as well, even though it's redundant.

I've been running XCode for over 2 years and I didn't realize build configurations could cause different behaviour.

By setting the Run scheme to use the Release build configuration I was able to re-create the problem on the device.

The problem still existed of course, but this posting I found suggested turning off compiler optimizations to solve a vaguely similar problem.

That did it. Somehow the calculations that occur to control sprite vectors in my application behave strangely with compiler optimizations turned on.

于 2013-09-28T16:21:15.517 回答