Can't build for iPhone

I’m building an app using Kwik. When I run the Kwik build in Corona Simulator, I can build for iPad only but can’t build for iPhone. I get the following message.

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

I posted this on the Kwik forum and was told it’s a Corona thing. Any idea what I need to do here?

The iPad build works great on my iPad. I’d like to try it (and sell it) on the iPhone also.

Thanks.

Al [import]uid: 97852 topic_id: 21438 reply_id: 321438[/import]

Hey there,

See if anything in this thread applies to you;
http://developer.anscamobile.com/forum/2012/01/07/missing-required-architecture-error-build-coronasdk-2012722

Peach :slight_smile: [import]uid: 52491 topic_id: 21438 reply_id: 84891[/import]

Peach,

Thanks, but where do you put the minimum OS requirement in the build.settings file? I’ve never seen that before.

Also, it appears from the post that you referred me to that making that change didn’t seem to help that person.

I’m using Version 2011.704 (2011.12.8). I’m also on a Mac, still using Snow Leopard and have Xcode 4.2 (I think that’s the version, it’s on my laptop at home) which I just upgraded last week.

Any other ideas?

Al [import]uid: 97852 topic_id: 21438 reply_id: 84978[/import]

In build.settings in the plist section;

[lua]MinimumOSVersion=“4.3.0”[/lua]

In that thread the last user to post was, I believe, using an older version of Xcode. (There were two threads going on at once around the same subject.)

If that doesn’t work let me know and I’ll try to boot up my older laptop for some tests with Snow Leopard :slight_smile:

Peach [import]uid: 52491 topic_id: 21438 reply_id: 85126[/import]

Peach,

Almost there. Adding the code in the plist section let Corona build the app. Yeaaaa. Now I have one problem and no clue how to fix it.

I’ve built this app 3 ways. As iphone only, ipad only and universal (iphone AND ipad). I load them onto my devices through iTunes.

On my Ipad2 with 5.0.1, the iPad and universal work perfectly (didn’t try the iPhone only version). The universal shows up small like an iphone app would.

On my iPhone 4S, also running 5.0.1, I can’t get any of them to install. I get a “xxxxx fail to install” message.

Any idea why it would run on the iPad and not the iPhone?

Thanks, Peach. You’re awesome.

Al [import]uid: 97852 topic_id: 21438 reply_id: 85419[/import]

Hey Al,

Is provisioning set up correctly for iPhone 4S? Can you build and install any of our sample apps?

RE iPad size, what settings do you have in config.lua in relation to zoom?

Peach :slight_smile: [import]uid: 52491 topic_id: 21438 reply_id: 85462[/import]

Peach,

Thanks for your reply.

I can’t figure this out. I have all the certs, devices, app and provisions (developer and ad hoc distribution) done. I even regenerated new provisions. I have both my iPad and iPhone in both provisions. Using the Ad Hoc Distribution provision, I’m able to download the build onto my iPad and it works great. I can’t get the build or a build from any of your sample apps to go onto the iPhone. I keep getting a “XXX failed to load” error.

The iPad and iPhone are on the same IOS version. I’m using the same provision. I used an asterisk in the app ID since I’m not using iCloud or Game Center so version isn’t a factor.

Any other ideas? I’ve checked the device ID several time. And, as I said before, recreated the provisions, downloaded them and started all over.

If it didn’t work on my iPad I’d know that something is wrong with my provision settings, but it does work on the iPad, just not on the iPhone.

Once I figure this out and get get it on the iPhone to test, I’ll take the last and final step in this odyssey and try to get it into the App Store for sale.

Thanks for any help, Peach.

Al [import]uid: 97852 topic_id: 21438 reply_id: 86161[/import]

Dumb question, but lets go: Did you “authorize” your phone to be able to be under your development test devices - at your developer account?
Cheers,

[import]uid: 89165 topic_id: 21438 reply_id: 86178[/import]

There are no dumb questions and thanks for the reply.

Maybe I’m missing something but under “devices” I have my iPad and my iPhone. Each of the has the same two provisioning profiles. Is that what you mean by “authorizing” the iPhone?

I can’t find any other place in the provision portal to authorize a device. I’m hoping is something so obvious that I’m looking right past it.

Al [import]uid: 97852 topic_id: 21438 reply_id: 86183[/import]

Maybe I’m missing something but under “devices” I have my iPad and my iPhone. Each of the has the same two provisioning profiles. Is that what you mean by “authorizing” the iPhone?

@geek, no, you`re not missing nothing. You did right at the devices.

Its just very strange to be able to run on one device and not the other, still having the provisioning profiles the same on both. PS: How about your config.lua file? Is that set to use the default 320x480 or is that set for anything other than the default size? Because I do not know, but if that is set for 768x1024, wouldnt it be the problem? as the iphone retina has 960x640 max? Sorry, I did not test it or read anywhere about either, but it came to my mind and am telling you.
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 21438 reply_id: 86191[/import]

Rodrigo,

Thank you. I’ll check this out tonight at home. I built this app using KWIK and KWIK configured the files.

What makes me think this isn’t the problem is that, upon Peach’s advice, I tried building some of Ansca’s sample apps and putting them on the iPhone. They wouldn’t go on either.

I can’t find any settings in iTunes or on the iPhone that might be preventing this. Very strange. I’ll let you know what I find over the weekend.

Thanks again for your help.

Al [import]uid: 97852 topic_id: 21438 reply_id: 86207[/import]

You`re welcome.

Have you tried installing the latest Xcode version - as I have is 4.2.1 (4D502).

Also I do not know if your Snow Leopard OS would be “hurting” your build test. May it be? I do use latest Lion OS.

PS: I know Kwik as well…and I know KWIK would not harm the config files as well. So I do not believe also that it is a KWIK problem.

Sorry for not help at all, but am still thinking here about some “light” for you.
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 21438 reply_id: 86214[/import]

This sounds very bizarre.

My first thought would be that the UDID was wrong in Apple, although if you’ve checked it multiple times I don’t see how that would be the case.

Did you add your iPhone or iPad to Apple first? Was there a gap between the two? If so, did you update the provisioning profile on your computer? [import]uid: 52491 topic_id: 21438 reply_id: 86274[/import]

Peach, I think I added the iPhone first and then the iPad. There was no gap. I’ve re-generated provisioning profiles making sure both devices are on in each provisioning profile. So just to make sure it’s not my phone, I added my wife’s iPhone4 as a device, added it to each provisioning profile, downloaded the new profiles and I have the same problem.

I’ve finished my app, finally, and I can get it on my iPad (same provisioning profile) and it works great. I just can’t get it on my iPhone 4S. One of your readers thought it might be the config.lua or the build.settings. When I made this in KWIK I made it as a universal build and it created these files. In the Corona simulator, the KWIK build looks great on the iPhone, iPhone 4 and the iPad. Here is what the two files look like. I added the plist line “MinimumOSVersion=“4.3.0”,” because your simulator wouldn’t build without it. Do you see anything? Again, I’m new to this.

I want to submit this to Apple for iPhone and iPad but I’m not going to until I see that it works on my iPhone 4S.

-- build.settings   
settings =   
{   
 androidPermissions =   
 {   
 "android.permission.RECORD\_AUDIO",   
 "android.permission.WRITE\_EXTERNAL\_STORAGE",   
 },   
 orientation =   
 {   
 default = "landscapeRight",   
 supported = { "landscapeLeft", "landscapeRight" }   
 },   
  
 iphone =   
 {   
 plist=   
 {   
 UIApplicationExitsOnSuspend = false,   
 UIHiddenStatusBar="YES",   
 CFBundleIconFile="Icon.png",   
 MinimumOSVersion="4.3.0",  
 CFBundleIconFiles = {   
 "Icon.png",   
 "Icon@2x.png",   
 "Icon-72.png",   
 },   
 },   
 },   
}  

[code]
if system.getInfo(“model”) ~= “iPad” and system.getInfo(“model”) ~= “iPhone4” then
application =
{
content =
{
–zoom
width = 768,
height = 1024,
fps = 60,
scale = “zoomStretch”,

imageSuffix =
{
["@2"] = 1,
}
}
}

else
application =
{
content =
{
width = 768,
height = 1024,
fps = 60,
scale = “zoomStretch”,

imageSuffix =
{
["@2"] = .8,
}
}
}
end
[/code] [import]uid: 97852 topic_id: 21438 reply_id: 86531[/import]

@geek - Would your solution be here, look:

[lua]system.getInfo(“model”) ~= “iPhone4”[/lua]

So, are you sure the system returns iPhone4 and if so does it regards the iPhone4S too?? I think there may be your problem. I only do not know what the system “SEEs” and return as info about the iPhone 4S.

PS: One more time, just a try.
Rodrigo.

EDIT: I went to check it out closely and I found it:

“model” returns the device model (as specified by the manufacturer). These include:

“iPhone”
“iPad”
“iPhone Simulator”
“iPad Simulator”
“Nexus One”
“Droid”
“Galaxy Tab”

SO, after all I believe you should CHANGE/REPLACE that string where is typed [lua]“iPhone4”[/lua] at your build.settings file for [lua]“iPhone”[/lua]. Just it! Try please and inform here! .)
[import]uid: 89165 topic_id: 21438 reply_id: 86549[/import]

Nothing jumps out at me there although I do have a suggestion to try and isolate the issue, possibly.

Grab one of the build.settings files from some of our sample code (CoronaSDK > SampleCode) and place that in your project instead, temporarily.

Try to build with it and see if that will install on your device.

One other question (you may have mentioned this above but I didn’t see it skimming) - are you using Xcode or iTunes to add the app to your device? [import]uid: 52491 topic_id: 21438 reply_id: 86558[/import]

Peach and Rodrigo,

Thank you so much for your help.

Peach - you hit on the solution. I was uploading using iTunes. When I tried the XCode route, which I had never done before, I couldn’t get a green button next to my iPhone, just the iPad. Of course you can’t see that in iTunes which is why my problem kept on going an going.

The solution was to re-download my certificates and suddenly the button turned green. Then it was just drag and drop. It’s easy when you know what you’re doing :slight_smile:

Now I have to figure out how to actually get the app into the iTunes store. Can you send me some links to advice on how to do that effectively?

Thanks again for all your help.

Al [import]uid: 97852 topic_id: 21438 reply_id: 86995[/import]

Happy to hear that :slight_smile:

I actually wrote a walkthrough for publishing to the store, see here; http://developer.anscamobile.com/forum/2012/01/10/ios-walkthrough-building-app-store-0

Peach :slight_smile: [import]uid: 52491 topic_id: 21438 reply_id: 87054[/import]