Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

stera8

macrumors member
Original poster
Aug 21, 2014
59
2
I'm wondering if others are having this issue.

I created a game in xcode 5 and ran it through all the simulators for iOS 7. It worked perfectly fine. (3.5 and 4)

Since my phone is running the iOS 8 beta, I downloaded xcode6-beta to try it on the device. The game loads up but it does not work properly. It won't work properly on the device or the iPhone 5 simulators.

Is this an error with the beta? All my code seems to work fine. When I put it back into xcode 5, the simulators work great.

Thank you for your answers


***The game is based on the classic helicopter game. So pretend you press the screen for the helicopter and you move thru avoiding obstacles, except now when I demo it for iOS8 it won't move forward, it just moves up and down.
 
You didn't even post what error you're getting... :)

That's because I'm not getting a code error :( It runs through the simulator but the app doesn't work properly once it loads up. I'll try to make a YouTube video
 
How the game works properly in Xcode 5 with iPhone 4inch screen




I also just installed iOS 7.1 sim on Xcode 6 and it works fine on the iPhone 5 sim for 7.1 but not iOS 8
 
Last edited by a moderator:
Just add a breakpoint in the method that moves the plane forward (or the background) and see whats going on.

FWIW, my game (sprite kit) works fine in the iOS 8 simulator and on my iOS 8 5S. Have you tried running on a real device with iOS 8 on it?
 
Just add a breakpoint in the method that moves the plane forward (or the background) and see whats going on.

FWIW, my game (sprite kit) works fine in the iOS 8 simulator and on my iOS 8 5S. Have you tried running on a real device with iOS 8 on it?

tried it on the actual device with no success.


Using Xcode 6 I ran the simulator with iPhone 5 (7.1) and it works great. Ran the same code with iPhone 5 (8.0) glitches as seen in the videos.
 
How about a breakpoint as Sean suggested?

Did you try any debugging techniques at all?
 
How about a breakpoint as Sean suggested?

Did you try any debugging techniques at all?

Yes. I used some breakpoints and I'm back to these three lines of code.

Code:
    Car.center= CGPointMake(Heli.center.x,  Car.center.y + Y);
    
    Obstacle.center = CGPointMake(Obstacle.center.x - 10, Obstacle.center.y);
    Obstacle2.center = CGPointMake(Obstacle2.center.x - 10, Obstacle2.center.y);

So the car moves up and down but the cones are not moving to the left. This is only happening when I run it using iOS simulator and an iOS 8 device. It works perfectly fine with all iOS 7.

Could it be a bug?
Does the code need to be written differently?

Thanks for all the help you guys have provided me so far. I appreciate it.
 
It might help to print out the center of one of the obstacles each time through the animation loop.

Is it possible that the positions of the obstacles are modified outside the code you show? It seems that they move left gradually (as expected) but then jump right. There is obviously some kind of hit detection code that determines if an obstacle hits the car. Maybe that code is causing the problem.
 
It might help to print out the center of one of the obstacles each time through the animation loop.

Is it possible that the positions of the obstacles are modified outside the code you show? It seems that they move left gradually (as expected) but then jump right. There is obviously some kind of hit detection code that determines if an obstacle hits the car. Maybe that code is causing the problem.

Thanks for the advice... I'll look through that section after I come back from some ocean fishing tomorrow :cool:


...but with my problem, I guess I'm hung up at the part that the code works perfect in 7.1 but glitches 8.0
 
So it's a bug in xcode 6 I'm assuming. The game posted to the App Store and I was able to download it to my 8.0 device. It works perfectly.


I filed a bug report with apple.


Thank you everyone for being patient and helping me out
 
So it's a bug in xcode 6 I'm assuming. The game posted to the App Store and I was able to download it to my 8.0 device. It works perfectly.


I filed a bug report with apple.


Thank you everyone for being patient and helping me out

Glad you got it sorted out. The simulator isn't a perfect representation, so I would always test on the actual device to be sure.
 
xCode beta 7

Can anyone confirm this is a bug an not a code issue, i have a similar program that works with iOS 7 but not 8. I am using Xcode beta 7
 
Ive installed my app on an iOS8 device and the problem still occurs so this is NOT a bug with the simulator, something in the code is being compiled differently in is to ios7. anyone any ideas???
 
I'm noticing sound issues as well as email issues in Xcode 6 gm. Pretty lame stuff hopefully they will fix it down the road.
 
I don't think its bugs, I've tried using the GM version and still no different, this is a code error but i just don't know what
 
...but with my problem, I guess I'm hung up at the part that the code works perfect in 7.1 but glitches 8.0

It's a bug in your code that only shows up in some conditions (using a random uninitialized variable or memory location, etc), such as the newer, possibly more strict, OS.

So find and fix your app's bugs.
 
So after hours of careful checking Ive found the solution, uptick 'use auto layout' on the storyboard and its all fine :) should fix all similar errors. No bugs in my code thanks :)
 
----------

[/COLOR]
so after hours of careful checking ive found the solution, uptick 'use auto layout' on the storyboard and its all fine :) should fix all similar errors. No bugs in my code thanks :)


thank youuuuuu
 
@simbo, I'd say that the storyboard is part of your code, or at least part of your project that you're responsible for.

However, what you're saying is that some behavior changed between OS versions, kind of behind your back. And of course what you're really saying is "it's not my fault." ;-)

I'm only now really getting into Constraints. I can say that things to happen behind your back. The OS does add constraints without telling you. And this behavior has changed between OS 7.0, 7.1, and 8.0.

Anyway, glad you figured it out.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.