Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Newbie stuck in Xcode. How to solve an error?

Discussion in 'iOS and tvOS' started by NicoNN, May 25, 2015.

  1. NicoNN

    NicoNN

    Joined:
    Feb 13, 2014
    Posts:
    7
    Goodday!

    I am trying to port my game to iOS. I'm completely new to Apple/iOS and I'm having a hard time debugging it in Xcode. I'm using Unity 4.6.5 and Xcode 6.1.

    I build the Xcode project from Unity and I'm running the app in Xcode on the simulator. I can play the app but when you're gameover the app quites with the follwing error: (enclosed an image)

    This is where I'm stuck. I assume the EXC_BAD_ACCESS (code=2, address=0x0) is the problem?
    I already google'd a lot but I just can't figure out which of my scripts/code is responsible for this error.

    I would really appreciate some help. Thank you!
     

    Attached Files:

  2. aihodge

    aihodge

    Joined:
    Nov 23, 2014
    Posts:
    164
    Are you using iAds or similar on the game over menu screen? It looks like it is expecting an advertising identifier string.
     
  3. NicoNN

    NicoNN

    Joined:
    Feb 13, 2014
    Posts:
    7
    Hi aihodge,

    yes, I'm using UnityAds when the game-over menu screens pops up.
    How do you know it is expecting an advertising identifier string?
     
  4. aihodge

    aihodge

    Joined:
    Nov 23, 2014
    Posts:
    164
    Just by following the stack trace leading to the crash in the screenshot that you posted - iPhone_get_advertisingIdentifier_m564 and iPhone_Get_Custom_PropAdvertisingIdentifier() is what caught my eye.

    I don't have any experience with UnityAds, but its configuration in your project is the first place I'd start in debugging this one if I were you.
     
  5. NicoNN

    NicoNN

    Joined:
    Feb 13, 2014
    Posts:
    7
    Now you mention it, I used an android ID for UnityAds. I think I should use one for iOS :oops::)

    I'll update this thread ones I got that done.
    Thank you!
     
  6. aihodge

    aihodge

    Joined:
    Nov 23, 2014
    Posts:
    164
    That could very well be it!