Search Unity

was built for 'armv7', but device requires 'armv6' ??

Discussion in 'iOS and tvOS' started by RobbieDingo, Apr 15, 2010.

  1. RobbieDingo

    RobbieDingo

    Joined:
    Jun 2, 2008
    Posts:
    484
    Hi,

    I have Unity iPhone 1.7 and have recently upgraded to SnowLeopard, and Xcode to v.3.2.3.

    When I try to Build my Unity Project in Xcode, I get the following error message (when Checking Dependencies) :-

    In Unity Player Settings I set:

    iPhone Sdk Version: iPhone OS 3.1.3
    Target Device: iPhone Only


    In Xcode I set:

    Active SDK: iPhone Device 3.1.3
    Active Configuration: Release
    Active Target: Unity-iPhone
    Active Executable: Unity-iPhone - iPhone
    Active Architecture: armv7 (this is the only available option)


    ... I'm trying to Build to an iPhone 3G (not 3GS) running OS v.3.1.3.

    Is that the problem? - If so, can I no longer build for a normal 3G iPhone??

    Many thanks for any speedy replies....
     
  2. HoofSC

    HoofSC

    Joined:
    Jun 11, 2009
    Posts:
    25
  3. mts2021

    mts2021

    Joined:
    Aug 4, 2007
    Posts:
    150
    Just throwing in my two sense, I may not know what Im talking about or am mixing up facts, but the new updates for the OS for the iphone/ipod touch are not for 1st gen ipod, rendering it as far as it can go in the OS for the future.
    Perhaps the same thing has happened with the 3g original phones?

    If not I tried.
     
  4. HoofSC

    HoofSC

    Joined:
    Jun 11, 2009
    Posts:
    25
    I got the project to build, finally.

    First of all, in Xcode Project->Edit Active Target->"iphone-Unity"

    Set the Architectures:Standard(armv6 armv7)
    Base SDK: Device 4.0
    Uncheck build active only

    I still had an issue with ~/AppPath/Libraries/libiPhone-Network.a
    I simply moved the file out of the Libraries subfolder, and the build worked!

    Hmm.... hopefully this will all be worked out soon.

    Edit: well, no dice... the Icon.png does not show on the Springboard. Oh well, I will continue to develop the app, and hope that it gets worked out soon.
     
  5. Jehsup

    Jehsup

    Joined:
    May 22, 2008
    Posts:
    166
    Submit a bug. That is what the feature is there for. It can't get fixed if UT doesn't know about it.
     
  6. RobbieDingo

    RobbieDingo

    Joined:
    Jun 2, 2008
    Posts:
    484
    @ HoofSC

    - Sorry to hear you are having similar issues to me. By the way, please can you be careful how you respond to threads that you didn't start, if you jump in, some readers might think you have semi-closed this discussion with your casual "oh well..." reply - This thread is not yet resolved....

    @ Jehsup

    - I don't think this is a Unity Bug at all so I'm not sure what I would gain by doing that, (or rather, if it is I would have expected many more people to have found it by now?) - The workflow worked A-OK before I upgraded to Snow Leopard and Xcode to v.3.2.3 - thus pointing the issue in that direction I would assume?


    Anyone else come across this particular Xcode error message?:-

     
  7. defjr

    defjr

    Joined:
    Apr 27, 2009
    Posts:
    436
    Yes, I have. I just change it to armv6 in the target info and everything runs ok. Hope this helps.
     
  8. RobbieDingo

    RobbieDingo

    Joined:
    Jun 2, 2008
    Posts:
    484
    I did not have armv6 as an option in the drop down menu - Active Architecture... Until....

    I Double Clicked the ‘Unity-iPhone’ Target (under ‘Targets’ left hand side in Xcode) and in the new window, the ‘build tab setting’ I changed:

    Architectures: Standard (armv6 armv7)
    Base SDK: iPhone Device 3.1.3
    Build Active Architecture Only: [ NO TICK ]

    It runs on an original iPhone2G iPhone3G (running iPhone OS v3.1.3) - I cant test on a 3GS at the moment - hope that will be OK as I'm about to submit the App...
     
  9. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    arm6 + arm7 runs on 3GS yeah.
    unlike arm7 only which does not run on previous versions.
     
  10. RobbieDingo

    RobbieDingo

    Joined:
    Jun 2, 2008
    Posts:
    484
    Thanks dreamora - can I also trouble you with this one:-

    I always have a complete nightmare trying to make a distribution build - it brings me out in a cold sweat every time.

    What I don't get right now, is that when I try to make a distribution build, the build is successful BUT it then tries to install it onto my iphone and throws up this warning:

    Probably because you can't install a distribution build on to a local device, right?

    BUT why does it even try to do that?? I don't remember it ever doing that before?
     
  11. synapsemassage

    synapsemassage

    Joined:
    Jul 27, 2009
    Posts:
    334
    sweat is part of Apple's user experience ;-).

    I remember the same cold sweat with the same warning and wondered if this would make any problems. Tried it several times but always the same warning, and then decided to ignore it. Everything worked out ok as far as I remember, but no guarentees. I'm old, my memory is not the best anymore and Apple changes things every second.
     
  12. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    Having the same armv7 problem trying to build Unity Remote for an iPod touch 2G. I have no idea where armv7 is rearing its head in the project; as far as I can tell, I removed it.
     
  13. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    it rears because with OS4, half the ARM6 devices are not supported anymore at all and the other have legacy support only.

    As such the "optimized" (-> default) platform has been switched to ARM7 only while it previously was ARM6 + ARM7

    what you need to do is a 3 step thing:

    1. project target architecture settings -> arm6
    2. target target architecture settings -> arm6
    3. in the project -> set active architecture menu, switch it to ARM6 from ARM7

    now it should just work again.
     
  14. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    I can't get this be there, even doing what was mentioned above.
     
  15. happybomb

    happybomb

    Joined:
    Apr 22, 2010
    Posts:
    21
    Same here. I cant get it to show anything but ARM7.

    xcode 3.2.3/iPhone SDK 4
    iPhone OS4

    Any ideas? Would it be best to revert back to previous SDK/OS?
     
  16. jtbentley

    jtbentley

    Joined:
    Jun 30, 2009
    Posts:
    1,397
    I fumbled my way through it also..

    Set my active architecture to Armv6, then set my target/build settings to Optimised (armv6 armv7) and unticked 'Build Active Architecture Only'.

    However, I've yet to upload this build to the appstore, yesterday it got rejected (immedietly, thankfully) for not having the correct architectures.
     
  17. defmech

    defmech

    Joined:
    Feb 24, 2007
    Posts:
    506
    I'm having the same problems, too. If I build for debug, I get the networking library error. If I build for release the networking library error goes away, but I can't select ARM 6 as the target causing the compile to fail at the end (iPhone 3g).

    I moved the networking library out of its folder as suggested on the last page, but I can't compile without it.

    edit: Okay, I got it fixed in my case and I feel like an idiot for not noticing. When you're editing all the build settings in those different places, make sure it's for Release and not Debug. If the active architecture is only sticking to ARM 7 for Release builds, you probably didn't set the Release build settings correctly(if you're like me)
     
  18. dsthilaire

    dsthilaire

    Joined:
    Dec 4, 2009
    Posts:
    17
    Thanks dreamora! It worked just fine. I could build again for our iphone 3G devices.

    ^_^
     
  19. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Ensure that you change the deployment target as well as the supported architecture in the project as well as the target settings.
    Especially the later are fundamental as the project settings seem to be far less "defining" than they used to be with earlier SDKs
     
  20. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    This is completely hell confusing.
     
  21. AmazingRuss

    AmazingRuss

    Joined:
    May 25, 2008
    Posts:
    933
    Try this:

    Find Targets in Xcode, and then rightclick on Unity-iPhone under that, then click get info. On the screen that comes up, first select All Configurations in the upper left, then below where it says Architectures, select Standard Arm6/Arm7.
     
  22. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Edit I just changed everthing and it works though couldnt say why

    Cheers
    AC
     
  23. AmazingRuss

    AmazingRuss

    Joined:
    May 25, 2008
    Posts:
    933
    You have appeased xcode, for now....
     
  24. Wenceslao

    Wenceslao

    Joined:
    Feb 7, 2009
    Posts:
    142
    I tried the suggestions in this thread to build to my iPhone 3G and I still receive the error "IncorrectArchitecture" was received from the device
     
  25. Wenceslao

    Wenceslao

    Joined:
    Feb 7, 2009
    Posts:
    142
    Asheh22 from IRC helped walk me through it, I changed the project and target settings and after a couple times of XCode crashing, it took to the changes. I must have done something different when I got home because I was getting these errors relentlessly. I wish Unity would handle these settings.
     
  26. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Try the apple developer forums, those folk seem to know the xcode mystery better than most

    AC
     
  27. TobyLeon

    TobyLeon

    Joined:
    Jan 29, 2010
    Posts:
    26
    I don't know if this is any help, but I had to read this thread a couple of times before it solved my problem with the armsv6 7 problem.

    Unity IPhone:
    1. Build With Target device version "Unknown" or "iPhone OS 3.2" ( I used Unknown)

    xCode:
    1. In the top bar for the program XCode:
    * Project -> Edit Project Settings
    * In The General Tab:
    * Base SDK for ALL Configurations: iPhone Device 4.0.
    * In the Build Tab:
    * Under Architectures:
    * Architectures: armsv6.
    * Base SDK: iPhone Device 4.0
    * Under Deployment
    * IPhone OS Deployment Target: <Depends on what you build for, I built for my 3.1.2 iPhone>

    2. In the xCode Window:
    * In the project explorer to the left, go down to "Targets" and expand it.
    * Right-click "Unity-iPhone" and chose "Get Info"
    * Under Architectures:
    * Architectures: Standard(armsv6 armsv7)
    * Base SDK: iPhone Device 4.0
    * Build Active Architecture Only: <I don't actually know, I had it clicked in , but I've heard that people have had problems with that, in that case, tick it off>

    3. Now armsv6 should be selectable in the drop down window in the top left corner of xCode. Chose armsv6 and Build.

    Summary: I think that alot of people are trying to do Step 1 without doing Step 2 in my walkthrough
    .

    i sincerely hope this helps
     
  28. xandeck

    xandeck

    Joined:
    Apr 2, 2009
    Posts:
    563
    I got it working after a few punchs in my head =) too
    Anyway, anybody knows if Apple will accept any APP/Game with this architecture? Or what we need to do for them to accept?
     
  29. BetaRayBill

    BetaRayBill

    Joined:
    Jun 6, 2009
    Posts:
    188
    I followed Toby's post to a tee, but I don't see
    "Project -> Edit Project Settings
    * In The General Tab:
    * Base SDK for ALL Configurations: iPhone Device 4.0."

    I only see xcode 3.1, 3.0, 3.2, and 2.4, in there. Even though in the main window of Xcode it says its buiding for Device 4.0 Release.

    any idea?
     
  30. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    the xcode version of iOS 4.0.x is actually 3.2.3
     
  31. BetaRayBill

    BetaRayBill

    Joined:
    Jun 6, 2009
    Posts:
    188
    Hmm.. ok did that, but every time I build and run it resets itself back and everything turns red again. I must be missing something like,.. "save settings" though its greyed out.

    thx

    edit,.. i was building and running from unity, not xcode after changing the settings,. it works. :)
     
  32. iEarthHero1

    iEarthHero1

    Joined:
    Jul 28, 2009
    Posts:
    301
    Holy f*ing crap.

    I cannot believe that after spending literally thousands of dollars on Unity Products my continued app development comes down to a single post by a good Samaritan (TobyLeon) on this forum.

    I cannot believe how screwed I would have been or impossible this would have been to solve looking at TobyLeons list of instructions.

    I am forever in your debt TobyLeon. I seriously am sitting here in a cold sweat at the thought of how many days of research this would have taken... and maybe still not have an answer.

    Does anyone else think that Unity should have some formal list of instructions somewhere on this problem? Or a big flashing warning not to make the mistake of up upgrading?

    I mean seriously... this is like buying a Ferari and finding out after the fact it has no engine.

    I really cannot believe this just happened and I am little freaked out that it just did.

    Thanks.
     
  33. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Just a note to all those turning off Build Active Architecture only...

    your binary will a "fat" binary (close to double the size) if you build both architectures.

    Given that the armv7 optimisations have little effect (no efect at all??) on Unity 1.7 projects, you probably don't want to build them. In most cases you would care more about binary size (particularly if you are trying to come in under 20MB).

    So leave this box ticked, select the Optimized (armv6, armv7) option for build architectures, and then select armv6 as the active architecture for your build.
     
  34. tractiongames

    tractiongames

    Joined:
    Jan 26, 2009
    Posts:
    154
    Thanks for posting that JohnnyA

    If only I had found that yesterday before I spent a whole day researching the matter and submitting in a cold sweat with no idea of wether or not the build config was correct.

    As you said, our build was indeed 'FAT' and was blowing out the 20 meg calculation for app store size, after doing what you said it came back down to the original size (actually a tiny bit smaller) and the update was submitted ok.

    I then noticed a post by Dreamora in another thread where he mentioned checking the 'active architecture only' checkbox with Arm6 would alienate iPad, iPhone 4 AND iPhone 3GS users!

    Now we all know Dreamora knows his stuff, had it been anyone else I'd have completely ignored it but now I am super concerned. Surely not! Arm6 is what 99.999% of the apps on the app store were compiled in and they mostly all work fine on these future devices so why all of a sudden if we compile will it alienate them??
     
  35. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    Are these 'issues' solved in unity 3.0 in some easy to understand fashion?
    Only I thought one of the benefits of using Unity to develop iphone games (apart from the visual dev. environment!) was that you don't or shouldn't have to muck around in Xcode/objective-C (needed for in-app purchases right now btw) etc.
     
  36. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    He does know his stuff, but in this case I think he is mistaken. I'm sure 3GS and 4G is fine, not sure on iPad as I haven't done anything for iPad and I don't have one to test with.

    The only reason to build "thin" would be to keep your app under the 20MB limit. If this is not an issue for you (i.e. if your app doesn't make this limit regardless) then stick to building both.

    You could mess around with THUMB, THUMB-2 instructions sets as well, but not sure how this goes for unity.
     
  37. tractiongames

    tractiongames

    Joined:
    Jan 26, 2009
    Posts:
    154
    "I'm sure 3GS and 4G is fine, not sure on iPad as I haven't done anything for iPad and I don't have one to test with."

    iPad should be fine, they have had the ability to play older iPhone games in an upscaled iPhone compatible mode since day 1. To our amazement we have a lot of iPad players who are very happy with the game (which is probably because the graphics are very lo-fi 2D so the chunkier resolution is less noticeable / important).

    In our situation, building for both did push us over the 20 meg limit where it was under before so it was very important to us.

    So to summarise for those who are following this thread.

    If you want your app to be the same size as before the SDK 4 update and are happy with iPad players playing the game in an upscaled iPhone mode here are the settings. I also note this should allow the iPhone 4 to utilise multi-tasking as well and any retina resolution / ipad app icons will also be displayed on the app menu.

    Unity:

    iPhone SDK: iPhone OS 3.0
    Target Device: iPhone Only

    Xcode:

    Active Architecture: Arm6
    Base SDK 4.0
    Build Active Architecture Only (checked)

    It is also worth noting that you have to set the Base SDK in xCode every time you build and run from Unity by holding the option key and clicking the Build Configuration drop down list. (there may be a trampoline project way of doing this permanently however we have not had any luck in doing so yet)
     
  38. iEarthHero1

    iEarthHero1

    Joined:
    Jul 28, 2009
    Posts:
    301
    I just submitted my first app to the app store using the technique detailed in this thread.

    However, when creating the store version in XCODE, it asks me twice to visit the keychain and generate two app files in the products folder. I see no way to tell the files apart and just submitted the top one.

    I will guess one is an ARM6 and one is an ARM7 version?

    But then how would you know which was which, and which to send to the store?

    Thoughts on this?

    Thanks.
     
  39. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you would create corresponding targets in xcode and let it name the output differently

    it won't have two files next to each other, if you compile a second one with the same target and name, it will just overwrite it.

    splitting it like this is also only an idea if you intend to make an ios4 only application (or naturally an ipad only)


    @tractiongames: if you set it to unknown in unity you only have to set it once
     
  40. iEarthHero1

    iEarthHero1

    Joined:
    Jul 28, 2009
    Posts:
    301
    Hmmm.

    In Xcode under UNITY IPHONE>PRODUCTS it lists two files with the same name.
    (I followed the store distribution instructions and clicked on the top one and did REVEAL IN FINDER)

    In the actual folder under UNITY PLAYER>BUILD it lists one file and I can see the .zip I created.

    So I guess the question now is why is Xcode showing two of the same file names when only one is showing in the actual build folder?

    However, I guess I am comforted in that if only one is showing in the actual build folder I guess there must not be a problem and the app will go through fine.

    Thanks.
     
  41. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    thats because you named them the same for the different cases. But the cases can not coexist.
    no xcode error, its called "the 40cm in front of screen major computer problem" ;-)

    though what you see there is normally not build target directly but simulator vs device target


    for the store / adhoc versions I personally use build archive and upload it right from there since apple has put that upload tool enforcement into place.
     
  42. iEarthHero1

    iEarthHero1

    Joined:
    Jul 28, 2009
    Posts:
    301
    @ dreamora
    Thank you. I am glad that you are able to see the mistake that I am making.

    1) Is this mistake going to disrupt my store release?
    2) What does each of the two file names represent? The arm versions?
    2) Where in XCODE do I give them different names so that I can avoid the problem that you are describing.

    Thanks.