Issues with Xcode and iOS 8 device

Discussion in 'iOS Programming' started by stera8, Aug 21, 2014.

  1. stera8 macrumors member

    Joined:
    Aug 21, 2014
    #1
    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.
     
  2. JohnsonK macrumors regular

    Joined:
    Mar 6, 2014
    #2
    You didn't even post what error you're getting... :)
     
  3. stera8 thread starter macrumors member

    Joined:
    Aug 21, 2014
    #3
    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
     
  4. stera8, Aug 21, 2014
    Last edited by a moderator: Aug 26, 2014

    stera8 thread starter macrumors member

    Joined:
    Aug 21, 2014
    #4
    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
     
  5. Sean7512 macrumors 6502a

    Joined:
    Jun 8, 2005
    #5
    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?
     
  6. stera8 thread starter macrumors member

    Joined:
    Aug 21, 2014
    #6
    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.
     
  7. JohnsonK macrumors regular

    Joined:
    Mar 6, 2014
    #7
    How about a breakpoint as Sean suggested?

    Did you try any debugging techniques at all?
     
  8. stera8 thread starter macrumors member

    Joined:
    Aug 21, 2014
    #8
    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.
     
  9. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #9
    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.
     
  10. stera8 thread starter macrumors member

    Joined:
    Aug 21, 2014
    #10
    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
     
  11. stera8 thread starter macrumors member

    Joined:
    Aug 21, 2014
    #11
    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
     
  12. Sean7512 macrumors 6502a

    Joined:
    Jun 8, 2005
    #12
    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.
     
  13. simbo123 macrumors member

    Joined:
    Jun 17, 2013
    #13
    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
     
  14. simbo123 macrumors member

    Joined:
    Jun 17, 2013
    #14
    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???
     
  15. TouchMint.com macrumors 68000

    TouchMint.com

    Joined:
    May 25, 2012
    Location:
    Phoenix
    #15
    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.
     
  16. simbo123 macrumors member

    Joined:
    Jun 17, 2013
    #16
    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
     
  17. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #17
    Without providing us with your relevant code, I'm not sure how we can help.
     
  18. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #18
    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.
     
  19. simbo123 macrumors member

    Joined:
    Jun 17, 2013
    #19
    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 :)
     
  20. stera8 thread starter macrumors member

    Joined:
    Aug 21, 2014
    #20
    ----------

    [/COLOR]

    thank youuuuuu
     
  21. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #21
    @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.
     

Share This Page