XCode 4 Released to the public. Phonegap conversation time.

62 views
Skip to first unread message

Ian

unread,
Mar 9, 2011, 3:58:22 PM3/9/11
to phonegap
Now that the NDA is not in effect, can we have a discussion on if
anyone has has been able to get PhoneGap to run?

Geuis

unread,
Mar 10, 2011, 3:14:43 AM3/10/11
to phonegap
I just got xcode 4 installed. I had to reinstall the PhoneGap iOS pkg
but PG doesn't show up in the new project window.

I tried running a working project but get compilation errors trying to
deploy to *any* simulator. "[BEROR]No architectures to compile for
(ARCHS=i386, VALID_ARCHS=armv6 armv7)."

Xcode then started downloading the "Mac OS X 10.6 Core Library", and
another. So at this point, I don't think 0.9.4 works with the new
xCode release.

Coderanger

unread,
Mar 10, 2011, 3:23:29 AM3/10/11
to phonegap
I have exactly the same problems, which is a shame as XCode4 is a much
better environment than XCode3 ever was ... perhaps I shouldnt have
removed my XCode3 installation quite so quickly :-)

somebody

unread,
Mar 10, 2011, 8:21:27 AM3/10/11
to phonegap
My existing projects compile like a charme, but new projects couldn't
be created.

firecall

unread,
Mar 10, 2011, 2:50:17 AM3/10/11
to phonegap
Anyone know, is it good to go? Can I upgrade to Xcode 4?

nico

unread,
Mar 10, 2011, 9:06:11 AM3/10/11
to phonegap
Hey !

I had the same problems and I've just found a solution here in the
FAQ : https://github.com/phonegap/phonegap-iphone/blob/master/README.md

You must had i386 to the valid architecture in your project (Build
Settings -> Architectures -> Valid Architectures) and do the same for
the PhoneGapLib.xcodeproj.

It has worked for me.

Somebody knows if the PhoneGap team is going to release a .pkg for
this new Xcode version ? I cannot create new projects from the New
Project Window anymore.

On 10 mar, 09:23, Coderanger <dancoderan...@gmail.com> wrote:
> I have exactly the same problems, which is a shame asXCode4is a much

Senne

unread,
Mar 10, 2011, 4:52:15 AM3/10/11
to phonegap
Same issue here: [BEROR]No architectures to compile for (ARCHS=i386,
VALID_ARCHS=armv6 armv7).

Geuis

unread,
Mar 10, 2011, 10:19:21 PM3/10/11
to phonegap
Sorry, the actual steps to fix this problem are not very clear. Can
you elaborate as to exactly what has to be done in detail?

David Orchard

unread,
Mar 11, 2011, 1:54:41 AM3/11/11
to phon...@googlegroups.com, Geuis
(snarky comment about thinking and searching rather than writing mostly deleted)

You need i386 as a valid arch for the simulator as the simulator is running on your mac, which isn't an iPhone or iPad CPU.  I don't know why XCode uses only the device arm6 or arm7 (newer models) CPUs as valid targets given that we want to often run on simulator, but it's pretty straightforward to add i386 as a valid architecture "arm6 arm7 i386".  That simple change got multiple phonegap projects working for me in Xcode 4 today.

Cheers,
Dave

--
You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en

For more info on PhoneGap or to download the code go to www.phonegap.com

Geuis

unread,
Mar 11, 2011, 2:36:21 AM3/11/11
to phon...@googlegroups.com, Geuis
Thanks for the reply. At least now I understand why the simulator is failing. However, at *no* point has anyone actually said *anything* about how to "change the architecture" in a way that those not intimately familiar with all the jiggly bits of Xcode, much less a completely new UI in Xcode 4. And it isn't for lack of searching or "thinking" as you put it. I've been doing nothing in the last 48 hours except trying to figure out how to fix this and get back to work. Do you have any idea how incredibly frustrating it is when you suddenly can't work on your project, one which is using a popular framework that you think is going to be on top of a major version release and is more or less mum about everything related to how it breaks suddenly? My favorite handful of posts thus far in the last 2 days have been "Well, now that we're out of NDA...". I'm not faulting the dedicated engineers contributing to the guts of PhoneGap not being able to talk publicly about Xcode, but considering that v4 has been in the works for the better part of 6 months I would at least hope that someone might have seen this coming and at least been able to issue a warning. People wouldn't have upgraded blindly to Xcode 4 (me included) and would have waited until PhoneGap had an update.

That being said, I figured out how to add the extra architecture.

1) Open your project. Find your .xcodeproj file in the Project Navigator (black folder icon, very top left).
2) After clicking on your .xcodeproj, on the right pane look for two tabs, Info and Build Settings. Click on Build Settings.
3) Find the Architectures section and click down the grey arrow to the left of it.
4) Under the Architectures section, you should see Debug and Release. Odds are they are both set to "Standard (armv6 armv7)". This is the problem.
5) We have to set Debug to i386. Click on "Standard (armv6 armv7)" next to Debug and in the popup menu, click Other.
6) You probably only see "$(ARCHS_STANDARD_32_BIT)". If you don't see "i386" click the +.
7) A new blue section under "$ARCHS_STANDARD_32_BIT" should appear. Double click on this to edit it. Type in i386, then click Done in the bottom right.
8) If its not set already, in the top left of the window choose either the 4.3 iPad or iPhone simulator.

Ok, at this point under the Product menu choose Clean. Then choose Run. It should now get much further past the original problem....

However, now another issue comes into place that I have to "think" about how to fix. 

ld: duplicate symbol _OBJC_IVAR_$_Camera.pickerController in /Users/geuis/Library/Developer/Xcode/DerivedData/cameraios-emugmeeqvlxzgjaikbuftqbfbhbg/Build/Products/Debug-iphonesimulator/libPhoneGapLib.a(Camera.o) and /Users/geuis/Library/Developer/Xcode/DerivedData/cameraios-emugmeeqvlxzgjaikbuftqbfbhbg/Build/Products/Debug-iphonesimulator/libPhoneGapLib.a(Camera.o) for architecture i386

collect2: ld returned 1 exit status

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

Geuis

unread,
Mar 11, 2011, 2:39:24 AM3/11/11
to phon...@googlegroups.com
No, don't do it. Some of us did and we're regretting it. Wait until there's another update to PhoneGap, or until we fools figure out how to do it. =(

Jesse MacFadyen

unread,
Mar 16, 2011, 4:05:31 PM3/16/11
to phon...@googlegroups.com, pmbailey
Yeah, Apple has never considered user templates as supported functionality so they can just go and change them whenever they want.  They changed them drastically this time.

Have a look a shaz's blog for a script that he wrote to handle creating a new empty PhoneGap project, it will save you from opening VM everytime.


Cheers,
  Jesse

On Wed, Mar 16, 2011 at 12:38 PM, pmbailey <pmba...@yahoo.com> wrote:
This "fool" decided to install OS-X on a VMWare Virtual machine, along
with Xcode 3.2.6 (Plus iOS4.3 final SDK), and PhoneGap 0.9.4.

While this is a hack, it does work. I go into my virtual machine,
create a new PhoneGap project using Xcode3, then just save it, then re-
open with Xcode4, and continue as normal.

Maybe that will help some of us until it's all fixed for real.

From what I understand is that Xcode changed the way you add new
project templates to it, but programs already using the PhoneGap
framework still work in Xcode4.

Hope this helps someone,
---
Patrick Bailey

On Mar 11, 2:39 am, Geuis <geuis.te...@gmail.com> wrote:
> No, don't do it. Some of us did and we're regretting it. Wait until there's
> another update to PhoneGap, or until we fools figure out how to do it. =(

--
You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en

For more info on PhoneGap or to download the code go to www.phonegap.com



--
--
Jesse MacFadyen
{
  blog:'blogs.nitobi.com/jesse',
  email:'jesse.m...@nitobi.com',
  company:
  {
    name:'Nitobi Software',
    site:'www.nitobi.com',
    phone:
    {
      office:'+1 (604) 685-9287',
      tollFree:'1-866-632-2777'
     }
  }
}

Jesse MacFadyen

unread,
Mar 16, 2011, 4:20:40 PM3/16/11
to phon...@googlegroups.com, pmbailey
Correction: it's blogs.nitobi.com/shazron

pmbailey

unread,
Mar 16, 2011, 4:33:56 PM3/16/11
to phonegap
Yea, I downloaded the script. Haven't tried it yet, but it looks like
other people like it. I usually have VMWare running all the time
anyway, so for me it's not that big of a deal. I'm mostly working on
my current projects, now creating many new ones right now.

I hope there is a proper fix soon, but thanks for the heads-up about
the script.

On Mar 16, 3:05 pm, Jesse MacFadyen <jesse.macfad...@nitobi.com>
wrote:
>   email:'jesse.macfad...@nitobi.com',

pmbailey

unread,
Mar 16, 2011, 3:38:21 PM3/16/11
to phonegap
This "fool" decided to install OS-X on a VMWare Virtual machine, along
with Xcode 3.2.6 (Plus iOS4.3 final SDK), and PhoneGap 0.9.4.

While this is a hack, it does work. I go into my virtual machine,
create a new PhoneGap project using Xcode3, then just save it, then re-
open with Xcode4, and continue as normal.

Maybe that will help some of us until it's all fixed for real.

From what I understand is that Xcode changed the way you add new
project templates to it, but programs already using the PhoneGap
framework still work in Xcode4.

Hope this helps someone,
---
Patrick Bailey

On Mar 11, 2:39 am, Geuis <geuis.te...@gmail.com> wrote:

Gonzalo

unread,
Mar 24, 2011, 6:56:24 PM3/24/11
to phonegap
Thanks for the tip!

I think I found the solution: you only need to add the i386
architecture on the Valid Architectures field. Leave the Architecture
unchanged (standard armv6 armv7). that fixed the problem for me.

-G

NotSoEvilKenevil

unread,
Mar 25, 2011, 12:12:25 AM3/25/11
to phonegap
This post saved me from pulling my hair out when trying to create an
ad-hoc distribution via Archive:
http://stackoverflow.com/questions/5271496/xcode4-ios-4-3-no-packager-exists-for-the-type-of-archive

The part about the Build Settings -> Deployment -> Skip Install being
set to Yes for PhoneGapLib.xcodeproj and leaving it as No for the
main project.
Reply all
Reply to author
Forward
0 new messages