Simulator works perfectly but IOS build lags

Hi All.

i am having a lag problem, the problem does not exist when using the Corona simulator for my project but when i build my project using IOS build the project lags and does not produce the results i want.

I do get this error when i build the project would this be the problem?

"The version of iOS SDK (9.2) that’s installed on this computer does not match the target iOS version (9.0). You may encounter issues building or incompatibilities at runtime.

You should consider updating your version of Xcode or using xcode-select to enable a compatible version."

Let me get into a bit more detail about my problem:

The games opening screen has animation that does not lag and also prior to the game launching there is a slight animation that does not lag, the problem occurs when game actually starts and the user is required to click left or right to move the character. The animation slows down quite significantly and it ruins the game.

Please if anyone can assist or would give me some advise to fix this i would be very grateful. 

Thanking you in advance.

I’m not sure what’s causing the lag, but let me come back to that. It’s not due to the warning you’re getting. I don’t know what version of Corona SDK you’re running, but I suspect it’s the last public release (2016.2731). That build uses iOS 9.0 SDK and you need Xcode 7.0 to go with it. Later daily builds (2016.2828, which should be today’s) are using the iOS 9.2 SDK which needs Xcode 7.2 to go with it. To eliminate this warning, simply grab the latest daily build. It’s pretty stable.

Now as for your lagging. Without any idea of your config.lua, what size images you’re using and so on, all we can do is speculate.  The typical Mac laptop/desktop/mini that you would be developing on will have at least 4GB of memory. It has a huge hard drive to create virtual memory with. It’s got a lighting fast, multi-core CPU that doesn’t care much about power consumption. It allows huge textures to be loaded. It’s a rocket.  Your typical modern day iPhone may have 1GB of memory (or less) and no virtual memory. While it has a fast for a phone, CPU, it’s no where near the processing power of your computer. Textures have to be limited in size. The OS takes up a significant portion of the available memory.

I did an app for a client once where I had a 30 frame animation that at its 2X resolution was loading in 1024x768 size frames. The animation was a simple character that took up the middle half of the screen. Once I converted the background color to transparency and trimmed the images down to 512x360 or so I went from using over 200MB of memory to under 30MB of memory, the animation played at a normal pace and I wasn’t beating the phone up.

You could be running out of memory. You could have some processes doing too much work each frame (enterFrame listeners are a good place to look, or too many timers firing off).

But without seeing some screen shots, some code around the choppy animation, knowing your image sizes and such, all anyone can do is speculate.

Rob

I’m not sure what’s causing the lag, but let me come back to that. It’s not due to the warning you’re getting. I don’t know what version of Corona SDK you’re running, but I suspect it’s the last public release (2016.2731). That build uses iOS 9.0 SDK and you need Xcode 7.0 to go with it. Later daily builds (2016.2828, which should be today’s) are using the iOS 9.2 SDK which needs Xcode 7.2 to go with it. To eliminate this warning, simply grab the latest daily build. It’s pretty stable.

Now as for your lagging. Without any idea of your config.lua, what size images you’re using and so on, all we can do is speculate.  The typical Mac laptop/desktop/mini that you would be developing on will have at least 4GB of memory. It has a huge hard drive to create virtual memory with. It’s got a lighting fast, multi-core CPU that doesn’t care much about power consumption. It allows huge textures to be loaded. It’s a rocket.  Your typical modern day iPhone may have 1GB of memory (or less) and no virtual memory. While it has a fast for a phone, CPU, it’s no where near the processing power of your computer. Textures have to be limited in size. The OS takes up a significant portion of the available memory.

I did an app for a client once where I had a 30 frame animation that at its 2X resolution was loading in 1024x768 size frames. The animation was a simple character that took up the middle half of the screen. Once I converted the background color to transparency and trimmed the images down to 512x360 or so I went from using over 200MB of memory to under 30MB of memory, the animation played at a normal pace and I wasn’t beating the phone up.

You could be running out of memory. You could have some processes doing too much work each frame (enterFrame listeners are a good place to look, or too many timers firing off).

But without seeing some screen shots, some code around the choppy animation, knowing your image sizes and such, all anyone can do is speculate.

Rob