[Resolved] PLEASE HELP: Cannot build on XCode 4.2 or 4.3

Hi. I’m pulling what little remains of my hair, out of my head. I have been at this for 2 days, and I keep getting these errors:

[text]
warning: iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv7 (-19033)
Executable=/Users/DuneBox/Desktop/18.app/Info.plist
codesign_wrapper-0.7.10: using Apple CA for profile evaluation
AssertMacros: exec, file: codesign.c, line: 170
AssertMacros: binary, file: codesign.c, line: 235
AssertMacros: code_signatures, file: codesign_wrapper.c, line: 945

  • (null)

warning: Unable to extract entitlements from application: (null) (-19045)
[/text]

I have a Macbook Air.
Lion 10.7.3 installed.
XCode 4.3.2 (tried 4.2 as well)
I tried corona builds 797, 782, and 704a (using both version of xcode)
I deleted, revoked, and reinstalled all of my developer certificates
Yes, I set minimumOSVersion = 4.3 in the build settings file. I tried without, too.
I am using the latest version of the application loader
Latest version of command line tools (downloaded from apple developer site, not within xcode)
I set the xcode-select value according to what the posts have said.

I am also using Corona Project Manager 2.8.0 (3). I can launch the Corona Simulator from within XCode, then build for iOS, but in XCode 4.3 (or 4.2) it hits an error that I can’t even see because I either don’t know how to access the info, or the error message isn’t getting passed into XCode properly. In the very least, I’d like to see some docs on how to set up Corona with XCode 4.2/4.3 cuz the current docs are NOT helpful.

NOTHING IS WORKING. I am frustrated. I want to be able to build and submit an app, and the lack of good, clear instructions from both apple and anscamobile is really pushing me to the edge. I am gonna start takin candy from children and shoving old ladies. It’s not pretty.

First and foremost, I want a solution to this.
To that end, I have a few questions:

  1. What does this warning mean: “warning: iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv7 (-19033)”? What could I possible do to have ‘removed’ this architecture? How do I put it back in?

  2. does anyone have XCode 4.2 or 4.3 working on Lion with Corona, deploying to iOS 5 devices?

  3. Is that warning likely the main problem? That is, if I fix this, does it seem likely the other warnings are tied to that? So, am I getting “codesign_wrapper-0.7.10: using Apple CA for profile evaluation” because a default profile is being used since there’s something wrong with mine?

Lastly, assuming this gets solved: Hire me, Carlos. I will move to Los Gatos and I will fix the darn docs! :wink:

[import]uid: 10818 topic_id: 25673 reply_id: 325673[/import]

Just a guess:

•Have you installed in your test device the profile/s for that development (as Developer Profile, AdHoc, Team*, etc)?

•Have you registered (UDID) the test device into your iTC account allowing that device for test purposes?

•Have you seen this page about building for devices, profiles, configs, etc? --> http://developer.anscamobile.com/content/building-devices-iphoneipad

•Have you seen this Xcode 4.3 setup`s page by Ansca? --> http://developer.anscamobile.com/reference/xcode43
Hope this help something out.

Cheers,
Rodrigo. [import]uid: 89165 topic_id: 25673 reply_id: 103797[/import]

Hey Rodrigo-

Thanks for the reply. I did all of those things already. I probably should have clarified that I have done a lot of installs on the device, and I’ve got an app or two out there in the world. The process isn’t new, it’s just stopped working.

Here’s what has changed in the last week:

  1. I renewed my apple developer subscription.
  2. I moved my device from iOS 4.x to 5.1
  3. I switched from a mac mini running snow leopard & xCode 3.x to a newer mac running lion and XCode 4.3.2

It worked fine… but somewhere in step 3, it stopped working. The error message comes up after the Corona Build-- before I even attempt to put it on any device. It builds okay for ad hoc testing, but says it will fail Apple’s tests for submitting to the app store.

Again, I appreciate your input. Do you have XCode 4.3.2 running on Lion? Is it doing builds for you without errors?

I dread this, but I might just have to re-install the OS. [import]uid: 10818 topic_id: 25673 reply_id: 103801[/import]

@duneunit, yes, I am running Lion 10.7.3 and latest Xcode version 4.3.2 (4E2002).

So I know it all works nice and I can say it for you being sure. As also Ive just submitted for Apple an update of my app that by now is still waiting for review btw. So be sure that it works, you have only to find out what is making it "hard" for you and I know its all pain. :\

So, after you say that you can still build and install in the device Ad-Hoc`s builds so I become a little “lost” right now, because I thought it was not working at all!

My tip for you right now would be for you to get oppened your Xcode , then open up the Organizer (I use it for EVERYTHING regarding installations on devices, debug on the console, uninstall, etc etc) and then LOG-IN into your iTunnes Connect account from there (I mean from the own Organizer) and let it fetch all your profiles (even distribution ones) into your machine (Mac) and after all that proccess, restart your Mac (I always do it for anything). So, after it start-up again, try to make your build and see what happens!

PS: Be sure to run the latest Xcode 4.3 (forget the 4.2v because you do not need it with even the latest stable build of CoronaSDK) as with the latest Xcode you also get the latest Application Loader I think.

PS2: Be sure to not have into your Macs **keychain** 2 iOS Developer Certificate. As you said youve renewed not so long your Apple`s license so I thought it would be a valid advice btw.

PS3: Please, run your "Apple`s Software Update and be sure to have installed into your new machine the Java 2012-003 patch as it also can make you have problems when trying uploading your apps for iTunnes Store via Application Loader as well.

PS4: Also be sure to have a look into this post because that looks like “almost” the same problem or at least the error message you`re getting too! --> http://developer.anscamobile.com/forum/2012/04/23/create-ios-build-broken

Lets go, see how it goes and I advice you to not get so mad with it at all because more or less time youll get it, with or without help, but better with help and like so am here trying. :slight_smile:
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 25673 reply_id: 103806[/import]

Rodrigo-

You are solid, good help! Thank you!

So, I am glad to hear you have it working. That probably means something either got corrupted in my XCode installation, or I’ve completely messed up my keychain somehow.

So, to be clear… Corona generates an App, but warns me that it cannot be submitted to the App Store. In that sense, it can be built. But building is not good if I can’t get it into the store. All of your words are helping me tho, to look more at my developer certification/profiles again.

I am too tired to give it a try now… gonna call it a night, but I will sleep better knowing I’ve got a few more things to try in the morning! Thanks again, Rodrigo! I will let you know how it goes…

One question, if you have a chance:

I’m not a Mac user at heart, and I find XCode 4.3 very confusing. How do you set up a project to run from XCode? I was using CPM, which is different. If I create a new project in XCode, I’m not sure how to trigger the Build action to automatically launch my project’s main.lua file and show output.

Anyway, thanks again and I’ll give you an update.

-Duneunit [import]uid: 10818 topic_id: 25673 reply_id: 103811[/import]

@Duneunit,

Regarding your question about:
"How do you set up a project to run from XCode? I was using CPM, which is different. If I create a new project in XCode, I’m not sure how to trigger the Build action to automatically launch my project’s main.lua file and show output.

Sorry, maybe I wasnt very clear but I do not make builds via the own Xcode. What I do is make my build with the Corona Simulator using the **Distribution** Profile (when the purpose of the app is to be uploading for AppStore later) or I make a build using the **AdHoc** Profile (thats for testing purposes running in the device). So after I have the Corona`s build done, I open the Xcode > Organizer (with my iDevice plugged in -USB) and there firstly I click on the btn refresh that so will ask me to log-in into my iTC account (it all happens inside the own Organizer). So after that point, it analyse and fetch all your certificates and profiles (the same ones that are setup into your own iTC account). So at this point I can already see my device “connected” (green light beside its phone icon) and so am able to install or uninstall any app that I have built with Corona via the own Organizer and also, as the iDevice is plugged in the Mac so am able to install the app into the mobile and run it on the phone realtime because like this we get to see the realtime “logs”, “warnings”, “errors”, etc that may have in the app and also see the “prints” statements concerning debug session as well (again all of this is passed into the Organizer).
I hope you get to understand me.

And please, be sure to have seen this topic as it may help also:
–> http://developer.anscamobile.com/forum/2012/04/23/create-ios-build-broken
By the way, if you do not, tell here and lets keep trying to make it work. :slight_smile:

Cheers,
Rodrigo. [import]uid: 89165 topic_id: 25673 reply_id: 103814[/import]

Hope to hear how you got on.

Have moved this to the appropriate sub forum. [import]uid: 52491 topic_id: 25673 reply_id: 103824[/import]

Hey guys, thanks for the input. Alas, still no luck.

I’m afraid there’s a bit of confusion, so let me try to clear this up again. When I build with Corona, I am building for Device… using a development provisioning profile to test the app an iPod Touch 4, with iOS 5.1 installed on it.

It connects to the server and builds fine. The app is created on my Desktop. The problem is that I always get this warning window which says:

Build for iOS
Your application built but failed to pass Apple’s validation tests.
Your application cannot be uploaded to the App Store until it passes
Apple’s validation tests, though you may install it directly to
provisioned devices.

Followed by the error messages I’ve posted previously.

I read through everything you linked me to, but still no solutions. Here’s what I did today:


First, opened Keychain Access
Selected Login, and Certificates below.
Deleted all Certificates (when I reboot, the default ones will be restored automatically)
Went to Keys and deleted them as well

Opened XCode.
Went to organizer.
Deleted any profiles I had

Restarted.

Went to Apple Developer, Provisioning Portal
Revoked my certificate. (Again, it is easy to create a new one)
Downloaded the WWDR intermediate certificate and installed it

Restarted.
Went to Keychain Access.
Generated a Keychain Signing Request.
Back to Apple Developer Provisioning Portal, where I created a new Certificate to replace the one I revoked.
Went to Dev Provisioning Profiles and deleted all the invalid provisioning profiles
Create at least 1 new provisioning profile to test the process with.

Went to XCode.
Organizer.
Refreshed profiles.
I now have my new profile and iOS Team Provisioning Profile

Restarted

Opened CPM, launched the an app, then tried to build using new profile.
Sadly, same result as before

I also deleted my iPod device from my app devices list on the provisioning portal, and re-added it
but without any new results.

Any help is still deeply appreciated. I am just about a week or so out from needing to build to deploy to the app store, and this is bringing everything to a halt.

[import]uid: 10818 topic_id: 25673 reply_id: 103877[/import]

Also, can anyone answer this one nagging question–

What does this mean?

warning: “iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv7 (-19033)”

How is my application executable missing this? Isn’t the app executable something corona is building for me? And if so, shouldn’t it be embedded into the executable via corona? I added various combinations of UIRequiredDeviceCapabilities = “armv7” in the settings file, and that doesn’t change the results. So how is this missing? What does this mean?

Thanks

[import]uid: 10818 topic_id: 25673 reply_id: 103879[/import]

@duneunit: Have you tried the suggestions here?: http://developer.anscamobile.com/forum/2012/03/24/help-adding-xcode-432 [import]uid: 84637 topic_id: 25673 reply_id: 103882[/import]

@duneunit,

Wow, what`s journey man. Sorry. :frowning:

BTW, have a look at the link that @Danny has passed above and also, I have a strange question for you:

– Did you try to build it at all without the use of CPM? So, just forget a minute you have the CPM and so build it without pass by CPM? Try that please…as you have tried so MANY things, go behind a little more and see what happens.

PS: Am not saying it`s a CPM problem BUT to save “brainstorming” even more, I would only try at least.
Notice us please,

Rodrigo. [import]uid: 89165 topic_id: 25673 reply_id: 103894[/import]

@Danny- I had already tried a combo of things from this page, but tried one or two more… updated Java to 2012-003. Still no go, but thanks for the idea.

@Rodrigo- I agree. I would like to remove CPM from my process, but I am not sure I am doing that correctly because I don’t fully understand how to use XCode 4.3… so following your advice, I am going to trash CPM and Corona from my machine, restart, install only Corona SDK, then run from XCode 4.3. I’ll let ya know what happens.

Thanks for all the input. You guys are keeping me sane! :wink:
[import]uid: 10818 topic_id: 25673 reply_id: 103907[/import]

Okay, Rodrigo-- you are on to something! :slight_smile:

NEW INFORMATION! AT LAST! :slight_smile:

So, I launch the corona terminal, select my main.lua from simulator, and it plays. Then I hit the CMD+B key to build. And in the terminal window, I get this:

The file sandbox for this project is located at the following folder:
(/Users/DuneBox/Library/Application Support/Corona Simulator/trunk-B813F371A7B6387DB09B2113A37B2696)
error: can’t exec ‘/Applications/Xcode.app/usr/bin/xcodebuild’ (No such file or directory)
2012-04-29 15:10:11.312 Corona Simulator[358:2403] xcrun xcodebuild -version failed to run.

xcode-select is likely misconfigured.

So i have tried all kinds of configurations with xcode-select. Keep in mind I know PC very well, but using a Mac I am stupid. So what am I doing wrong with my xcode-select? Well, even after setting it to sudo xcode-select /Applications/Xcode.app/Contents/Developer countless times… I tried sudo xcode-select -print-path and it was somehow the wrong directory. So I wonder if CPM was somehow resetting it?!

Anyway, problem isn’t solved yet.

I ran xcode-select AGAIN and that error finally goes away. (Yaaaaa!) However, when I build, I now get this:

Copyright © 2009-2012 A n s c a , I n c .
Version: 2.0.0
Build: 2012.797
The file sandbox for this project is located at the following folder:
(/Users/DuneBox/Library/Application Support/Corona Simulator/testapp-04592CA28F67D02167DEBF5D2FE17640)
Using Custom Build Id 09ce76a84ec867c48254ebfc56803803
Using additional build settings from: /Users/DuneBox/Desktop/testapp/build.settings
checkdir: cannot create extraction directory: Users/DuneBox/Desktop
Created XCENT: /var/folders/n5/pm74sbs95lz_kdb8cg1_mc3r0000gp/T/1335738720/entitlements.xcent
2012-04-29 15:32:07.191 defaults[734:f07]
There is no (ContentOrientation) default for the (Users/DuneBox/Desktop//testapp.app/Info) domain.
Defaults have not been changed.
2012-04-29 15:32:07.192 defaults[734:f07]
There is no (ContentOrientation) default for the (Users/DuneBox/Desktop//testapp.app/Info) domain.
Defaults have not been changed.
Runtime error
?:0: attempt to index a nil value
stack traceback:
[C]: ?
?: in function ‘?’
?: in function ‘?’
?: in function <?:623>
The good news, something different is going wrong. (Kinda good news… the original problem might not be fixed. I might have 2 now.) In this case, the app is never built. Before, it would end up on my destop and I’d get that message at the end saying it would not pass Apple’s tests.

So, any ideas after seeing this? What is the “ContentOrientation” problem about? My build.settings file looks like this:

[text]
settings = {
orientation =
{
default = “landscapeRight”,
},
iphone =
{
plist=
{
UIStatusBarHidden=true,
CFBundleIconFile = “Icon.png”,
CFBundleIconFiles = {
“Icon.png”,
“Icon@2x.png”,
“Icon-72.png”,
},
},
},
}
[/text]
Thoughts?

[import]uid: 10818 topic_id: 25673 reply_id: 103916[/import]

@Duneunit, honestly I have not so many thoughts about that, but still trying, you may TRY to setup your build.settings file (using the above example you posted) together this settings I post below, have a look:

[lua]settings =
{
orientation =
{
default = “landscapeRight”,
supported = --< {
“landscapeLeft”, “landscapeRight”
}
}
}[/lua]

See how it goes and what about some “new” error message… :\
Luck man!
Rodrigo.

[import]uid: 89165 topic_id: 25673 reply_id: 103919[/import]

Hey… thanks again for the support.

Day 3, still no progress. I tried what you mentioned and the errors don’t change. I don’t know what to do, so I am going to wipe my computer clean and re-install OS X Lion. Then XCode. Then Corona. Then see what happens. This is absurd, but I can’t think of anything else to do.

I’ll let you know how that goes.

Wheeee. :wink:

p.s. I also tried uninstalling XCode and Corona and a few other things just in case, but I think something is not getting removed in the uninstall that keeps preventing a clean installation. [import]uid: 10818 topic_id: 25673 reply_id: 103941[/import]

@Duneunit:

The correct command for setting xcode-select path for xcode 4.3 is:

sudo xcode-select -switch /Applications/Xcode.app  

I had the same issue as you a while ago and this command got rid of all the errors. [import]uid: 84637 topic_id: 25673 reply_id: 103970[/import]

@Danny-

Thanks, but that doesn’t work. Still generates errors. I have been trying “/Applications/Xcode.app”, “/Applications/Xcode.app/Developer,” and “/Applications/Xcode.app/Contents/Developer” over the last 3 days, along with several other combinations of fixes. Something has been seriously buggered. I had an installation of MacPorts which I wonder might have munged things up. Anyway, I am doing the re-install of OS X Lion today. If this doesn’t work, I’m going to chew off one of my arms. :wink:

Again, thanks for the input!
[import]uid: 10818 topic_id: 25673 reply_id: 104034[/import]

macports could cause issues for sure [import]uid: 84637 topic_id: 25673 reply_id: 104037[/import]

WOOOOOOOOOHOOOOOOOO!!!

FINALLY!!!

OMG – After 3 days of no progress and about a hundred trial builds, I finally have it working!!!

The solution: Re-format the hard drive and re-install Mac OS X Lion, XCode, and Corona from scratch. :wink:

(Alright, so it’s not a pretty solution. But it worked.)

My best guess is MacPorts. From now on, I will avoid MacPorts at all costs. :wink: The only other possible culprit is Command Line Tools doing something weird in the installation. I deleted my MacPorts installation between XCode upgrades, but I’ve seen enough posts that MacPorts doesn’t clean up nicely to make it my best guess.

A HUGE THANK YOU TO RODRIGO & DANNY & PEACH FOR KEEPING ME SANE. Thanks you guys. While I might complain about Apple & Corona Documentation sometimes, I love Corona, and I especially love the Corona Community!!!
[import]uid: 10818 topic_id: 25673 reply_id: 104075[/import]

@Duneunit ,

Mate, what would be better to be hearing from you, huh?! LOL

Really glad you got it working my friend. :slight_smile:

NOW, have an amazing production week!

Cheers,
Rodrigo. [import]uid: 89165 topic_id: 25673 reply_id: 104083[/import]