Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

xCode fails to compile

Discussion in 'iOS and tvOS' started by rsud, Aug 21, 2010.

  1. rsud

    rsud

    Joined:
    Aug 13, 2010
    Posts:
    89
    I used iPhone Unity and believe I setup things correctly. After doing Build Run on a simple project in Unity iPhone it failed to build in xCode.

    I see the following:

    ----------------------
    Build Unity-iPhone of project Unity-iPhone with configuration (null)

    Check dependencies

    [BEROR]No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7, VALID_ARCHS=i386 ppc ppc64 ppc7400 ppc970 x86_64).

    Build Failed
    1 Error
    ----------------------------

    Also, see this if I build in xCode directly:

    -------------------------
    Build Unity-iPhone of project Unity-iPhone with configuration Release

    Check dependencies

    [BEROR]error: There is no SDK with the name or path 'iphoneos3.0'
    [BWARN]warning: building for deployment target '3.0' requires an armv6 architecture.
    ------------------------

    The active SDK shows 'Base SDK is missing'

    I have iPhone 4.0 installed on my Touch and have updated xCode as well (Apple upgrade bundle for xCode and iPhone SDK).

    Is there a way to fix this?
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    what you need to do is go into project menü -> active target (in xcode) and there change the base sdk to 4.0
     
  3. rsud

    rsud

    Joined:
    Aug 13, 2010
    Posts:
    89
    Thanks. The actual change is Project-> edit project settings but you sent me in the right direction. New to the apple platform so lots to learn....
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    its normally easier to keep the target in mind as the deployment target for example is present only there, not in the project settings :)
     
  5. bumba

    bumba

    Joined:
    Oct 10, 2008
    Posts:
    358
    Only for clarification, if i set everything like this it will be fine, right? :


    Project -> Edit Project Settings:

    Architectures: Standard (armv6 armv7)
    Base SDK : iPhone Device 4.0


    Project -> Edit Active Target "Unity-iPhone"

    Architectures: Standard (armv6 armv7)
    Base SDK : iPhone Device 4.0
     
  6. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    will be fine but in active target, you might also want to alter the Deployment Target to OS 3.1.3 for example so non-iOS4 devices can use it too
     
  7. rrvs331

    rrvs331

    Joined:
    Aug 16, 2010
    Posts:
    51
    @dreamora why not just set it to 3.0?
     
  8. pixelmoon

    pixelmoon

    Joined:
    Sep 13, 2010
    Posts:
    27
    Hey!!...thank you for this fix...I was just about to throw away the computer out the window :)
     
  9. abethedarkness

    abethedarkness

    Joined:
    Nov 2, 2009
    Posts:
    8
    i have set up all my sdks and what not but i still get this error

    No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7, VALID_ARCHS=i386 ppc ppc64 ppc7400 ppc970 x86_64).

    not sure how to fix it. its honestly driving me nuts please help:eek: