App runs fine in Corona Simulator, breaks in xCode

Hey all, I’ve got a weird issue. When I build and test the app in the Corona iPhone simulator, everything is fine. When I build it for xCode, nothing works.

Screenshots here: http://imgur.com/a/aKqNW

The first two shots are of the corona simulator, the last of the xcode simulator. Essentially, it’s show the middle scene, with no objects on top of it while completely by-passing the select screen.

Why the discrepency? I get no errors at all in the console, everything appears perfectly normal.

My build settings are:

[code]
settings =
{
orientation =
{
default = “landscapeRight”,
supported = { “landscapeRight” },
},

iphone =
{
plist =
{
UIPrerenderedIcon = true,
UIApplicationExitsOnSuspend = true,
CFBundleIconFile = “Icon.png”,
CFBundleIconFiles = {
“Icon.png”,
“Icon@2x.png”,
},
},
}
}
[/code] [import]uid: 228837 topic_id: 36170 reply_id: 336170[/import]

The #1 cause of this is a file name case sensitivity mis-match. Look to make sure your file names match their case correctly. The Corona Sim is not case sensitive.

Also on your Mac, you can run the “Console” app to see error messages from the XCode simulator.
[import]uid: 199310 topic_id: 36170 reply_id: 143646[/import]

I’m not really getting any errors in xcode or the simulator. All I can find is

2/22/13 12:20:59.620 PM defaults[83816]: Domain (xcode/dairy\_app.app/Info) not found. Defaults have not been changed. [import]uid: 228837 topic_id: 36170 reply_id: 143778[/import]

Are there any instances or examples of the Corona SDK that caches the working directory?

Because I’m not seeing any errors anywhere, I decided to go through my commits to try and find where I broke the xcode functionality and an interesting thing happens.

On my working directory, it displays fine in the corona simulator. When I export that commit, however, it does not work, instead it gives me what xcode displays.

All files are exactly the same, yet different results.

How is that possible? [import]uid: 228837 topic_id: 36170 reply_id: 143794[/import]

I’m not sure what you’re doing with working directories and commits. What are you using to manage your code?

Most people have a folder with their main.lua and other resources too, then they run Corona against that folder and hit the Build command. The resulting app is either run in the Xcode simulator or on Device depending on what you chose.

There are two main causes of "Works in the Simulator, not on Device (and the XCode simulator counts as a Device). 1. There is a file name case mismatch. It could be an image, audio, a .lua file or even a folder name. 2. There is an error in your build.settings file. The Corona simulator doesn’t use things like the plist array from that file, so errors there could cause the app to not run right.

Running “Console” from /Applications/Utilities should produce a bunch of messages and the ones for your app should have the bundle ID in them (like “com.mycompany.myapp”) indicating which ones your app is generating.

You can also add “print” statements around where you think the problem is happening, or periodically through your main.lua to try and find out how far your apps is getting before it stops. [import]uid: 199310 topic_id: 36170 reply_id: 143831[/import]

Coming back to this after a while. Sorry for the late response.

First thing’s first, the build settings, file names, function names, etc. Had no errors. The error was that I was having was happening because I had three old calls that were bundled into one function that I forgot to remove.

Then there is the issue of the weirdness. My directory is structured as you said. Is has main.lua in it, build.settings, all images, etc., in a single directory. The strangeness comes because in my main working directory (that housed all the files) I could simulate in Corona non-stop. No issues whatsoever. But as soon as I downloaded that directory from bitbucket into a fresh directory I’d get the build error.

The problem with that is that I should have been getting the Corona build error in my local directory without having to download fresh. Even if I just drug all the files out of that directory into a new one, the error would be present whereas if they stayed in the original directory it wouldn’t have been present. So I had two locations with the exact same files but one location generated the error, the other didn’t.

That is a pretty big issue to me. I had to go back roughly 20 commits to find the source of the error, even though the entire time it was present - Corona was just not showing it.

I now feel as though I need to build the app to xcode at every turn just to make sure this doesn’t happen again.

Is it possible that Corona Simulator caches certain files? [import]uid: 228837 topic_id: 36170 reply_id: 144463[/import]

The #1 cause of this is a file name case sensitivity mis-match. Look to make sure your file names match their case correctly. The Corona Sim is not case sensitive.

Also on your Mac, you can run the “Console” app to see error messages from the XCode simulator.
[import]uid: 199310 topic_id: 36170 reply_id: 143646[/import]

I’m not really getting any errors in xcode or the simulator. All I can find is

2/22/13 12:20:59.620 PM defaults[83816]: Domain (xcode/dairy\_app.app/Info) not found. Defaults have not been changed. [import]uid: 228837 topic_id: 36170 reply_id: 143778[/import]

Are there any instances or examples of the Corona SDK that caches the working directory?

Because I’m not seeing any errors anywhere, I decided to go through my commits to try and find where I broke the xcode functionality and an interesting thing happens.

On my working directory, it displays fine in the corona simulator. When I export that commit, however, it does not work, instead it gives me what xcode displays.

All files are exactly the same, yet different results.

How is that possible? [import]uid: 228837 topic_id: 36170 reply_id: 143794[/import]

I’m not sure what you’re doing with working directories and commits. What are you using to manage your code?

Most people have a folder with their main.lua and other resources too, then they run Corona against that folder and hit the Build command. The resulting app is either run in the Xcode simulator or on Device depending on what you chose.

There are two main causes of "Works in the Simulator, not on Device (and the XCode simulator counts as a Device). 1. There is a file name case mismatch. It could be an image, audio, a .lua file or even a folder name. 2. There is an error in your build.settings file. The Corona simulator doesn’t use things like the plist array from that file, so errors there could cause the app to not run right.

Running “Console” from /Applications/Utilities should produce a bunch of messages and the ones for your app should have the bundle ID in them (like “com.mycompany.myapp”) indicating which ones your app is generating.

You can also add “print” statements around where you think the problem is happening, or periodically through your main.lua to try and find out how far your apps is getting before it stops. [import]uid: 199310 topic_id: 36170 reply_id: 143831[/import]

Coming back to this after a while. Sorry for the late response.

First thing’s first, the build settings, file names, function names, etc. Had no errors. The error was that I was having was happening because I had three old calls that were bundled into one function that I forgot to remove.

Then there is the issue of the weirdness. My directory is structured as you said. Is has main.lua in it, build.settings, all images, etc., in a single directory. The strangeness comes because in my main working directory (that housed all the files) I could simulate in Corona non-stop. No issues whatsoever. But as soon as I downloaded that directory from bitbucket into a fresh directory I’d get the build error.

The problem with that is that I should have been getting the Corona build error in my local directory without having to download fresh. Even if I just drug all the files out of that directory into a new one, the error would be present whereas if they stayed in the original directory it wouldn’t have been present. So I had two locations with the exact same files but one location generated the error, the other didn’t.

That is a pretty big issue to me. I had to go back roughly 20 commits to find the source of the error, even though the entire time it was present - Corona was just not showing it.

I now feel as though I need to build the app to xcode at every turn just to make sure this doesn’t happen again.

Is it possible that Corona Simulator caches certain files? [import]uid: 228837 topic_id: 36170 reply_id: 144463[/import]

The #1 cause of this is a file name case sensitivity mis-match. Look to make sure your file names match their case correctly. The Corona Sim is not case sensitive.

Also on your Mac, you can run the “Console” app to see error messages from the XCode simulator.
[import]uid: 199310 topic_id: 36170 reply_id: 143646[/import]

I’m not really getting any errors in xcode or the simulator. All I can find is

2/22/13 12:20:59.620 PM defaults[83816]: Domain (xcode/dairy\_app.app/Info) not found. Defaults have not been changed. [import]uid: 228837 topic_id: 36170 reply_id: 143778[/import]

Are there any instances or examples of the Corona SDK that caches the working directory?

Because I’m not seeing any errors anywhere, I decided to go through my commits to try and find where I broke the xcode functionality and an interesting thing happens.

On my working directory, it displays fine in the corona simulator. When I export that commit, however, it does not work, instead it gives me what xcode displays.

All files are exactly the same, yet different results.

How is that possible? [import]uid: 228837 topic_id: 36170 reply_id: 143794[/import]

I’m not sure what you’re doing with working directories and commits. What are you using to manage your code?

Most people have a folder with their main.lua and other resources too, then they run Corona against that folder and hit the Build command. The resulting app is either run in the Xcode simulator or on Device depending on what you chose.

There are two main causes of "Works in the Simulator, not on Device (and the XCode simulator counts as a Device). 1. There is a file name case mismatch. It could be an image, audio, a .lua file or even a folder name. 2. There is an error in your build.settings file. The Corona simulator doesn’t use things like the plist array from that file, so errors there could cause the app to not run right.

Running “Console” from /Applications/Utilities should produce a bunch of messages and the ones for your app should have the bundle ID in them (like “com.mycompany.myapp”) indicating which ones your app is generating.

You can also add “print” statements around where you think the problem is happening, or periodically through your main.lua to try and find out how far your apps is getting before it stops. [import]uid: 199310 topic_id: 36170 reply_id: 143831[/import]

Coming back to this after a while. Sorry for the late response.

First thing’s first, the build settings, file names, function names, etc. Had no errors. The error was that I was having was happening because I had three old calls that were bundled into one function that I forgot to remove.

Then there is the issue of the weirdness. My directory is structured as you said. Is has main.lua in it, build.settings, all images, etc., in a single directory. The strangeness comes because in my main working directory (that housed all the files) I could simulate in Corona non-stop. No issues whatsoever. But as soon as I downloaded that directory from bitbucket into a fresh directory I’d get the build error.

The problem with that is that I should have been getting the Corona build error in my local directory without having to download fresh. Even if I just drug all the files out of that directory into a new one, the error would be present whereas if they stayed in the original directory it wouldn’t have been present. So I had two locations with the exact same files but one location generated the error, the other didn’t.

That is a pretty big issue to me. I had to go back roughly 20 commits to find the source of the error, even though the entire time it was present - Corona was just not showing it.

I now feel as though I need to build the app to xcode at every turn just to make sure this doesn’t happen again.

Is it possible that Corona Simulator caches certain files? [import]uid: 228837 topic_id: 36170 reply_id: 144463[/import]

The #1 cause of this is a file name case sensitivity mis-match. Look to make sure your file names match their case correctly. The Corona Sim is not case sensitive.

Also on your Mac, you can run the “Console” app to see error messages from the XCode simulator.
[import]uid: 199310 topic_id: 36170 reply_id: 143646[/import]

I’m not really getting any errors in xcode or the simulator. All I can find is

2/22/13 12:20:59.620 PM defaults[83816]: Domain (xcode/dairy\_app.app/Info) not found. Defaults have not been changed. [import]uid: 228837 topic_id: 36170 reply_id: 143778[/import]

Are there any instances or examples of the Corona SDK that caches the working directory?

Because I’m not seeing any errors anywhere, I decided to go through my commits to try and find where I broke the xcode functionality and an interesting thing happens.

On my working directory, it displays fine in the corona simulator. When I export that commit, however, it does not work, instead it gives me what xcode displays.

All files are exactly the same, yet different results.

How is that possible? [import]uid: 228837 topic_id: 36170 reply_id: 143794[/import]

I’m not sure what you’re doing with working directories and commits. What are you using to manage your code?

Most people have a folder with their main.lua and other resources too, then they run Corona against that folder and hit the Build command. The resulting app is either run in the Xcode simulator or on Device depending on what you chose.

There are two main causes of "Works in the Simulator, not on Device (and the XCode simulator counts as a Device). 1. There is a file name case mismatch. It could be an image, audio, a .lua file or even a folder name. 2. There is an error in your build.settings file. The Corona simulator doesn’t use things like the plist array from that file, so errors there could cause the app to not run right.

Running “Console” from /Applications/Utilities should produce a bunch of messages and the ones for your app should have the bundle ID in them (like “com.mycompany.myapp”) indicating which ones your app is generating.

You can also add “print” statements around where you think the problem is happening, or periodically through your main.lua to try and find out how far your apps is getting before it stops. [import]uid: 199310 topic_id: 36170 reply_id: 143831[/import]