I have created a game in corona labs it works great when i run it on corona simulator but when i build it with android and run it on some android device it hangs on some levels and behave silly. So how can i debug it or any other suggestion why i am facing such problem.
When you have the error "it works in the sim but not the device", the first conclusion is that you are trying to access a file using the wrong case in the file name. The simulator is not case sensitive, the devices are. However, that's just an educated guess. Your best bet is to look at your device's console log and look for warnings or errors as to what's happening.
If you need to know how to do that, please read the Corona Labs basic debugging tutorial here:
http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/
Related
Environment is macOS 10.15.5, iOS 15.2 on iPad Pro. Encountering situations where a javafx app works fine with mvn gluonfx:run on macOS, then builds, packages and installs ok for iOS, but when run either with gluonfx:nativerun or launched from the iPad a black empty screen is presented.
I can go through regression approaches of removing change by change to help isolate which one is causing the issue, but due to native builds this is an extremely time consuming and ineffective way of trying to find out / learn what works ok on a jvm on macOS and not on compiled native code on iOS.
Looking through the various device logs with xcode I’m unable to find any run time diagnostic info, e.g. crash logs. Mvn gluonfx:nativerun doesn’t produce any additional info.
Am I looking in the wrong places, is there something I’m missing in terms of understanding how to see where stack traces or other stderr / stdout info might live while running on device, are there live debug capabilities or approaches while the native app is running on device that I haven’t discovered during all the reading of docs?
I’m confident this knowledge gap is entirely due to my newb status building javafx apps with gluon for this environment, there must be some way to collect runtime logs from the final app that I’ve missed.
TL;DR: I can run our app in development mode through VS2015 with remote debugging on the iPhone 5c that I have, but I cannot do the same on the iPhone 4s.
I'm having some difficulty getting a Cordova powered hybrid app to deploy on one particular device in my development environment... However I'm unsure if this is something I'm doing wrong or if there's some compatibility issue here. Posting a question here in the hopes that someone can help me work out what's going on.
Just for some background: The app in question was created using Intel XDK, then ported across to Visual Studio 2015 when Intel recently removed some of XDK's "Debug" functionality. A few things needed to be adapted, but the project does still include some of Intel's JS code as it was in the original project.
My environment includes:
Windows 10 Pro (primary desktop)
Apple Mac Mini with OSX "El Capitan" 10.11.6 (on the network as a build server)
iPhone 5c with iOS 8.3
iPhone 4s with iOS 9.0.2
While configuring this environment, I followed the instructions here. The remotebuild agent is configured to use http only to keep it simple, since this is all contained within a corporate network anyway.
After this I could run our app on the iPhone 5c without any problems, but trying to run it on the iPhone 4s gives an error in VS2015 stating:
Failed to deploy iOS remote for <project_path>\bld\ios\Debug\buildInfo.json to http://10.66.7.23:3000/cordova:
Error from http get [object Object]: Error: socket hang up
Note: There are no errors in the remotebuild console output on the Mac and VS builds the project correctly, but then fails to deploy it.
I've also tried multiple Provisioning Profiles on both devices, installed using iTunes, Xcode or Apple Configurator 2; but thanks to the provisioning profiles not showing up on devices with iOS 8 or newer, I can't even verify that they're installed at all.
Both of these devices can install and run the previous version of this app (available in app stores), but I need to be able to inspect the DOM in real-time, because even though they have the same screen size, the responsive break points are behaving differently.
So, before I pull out what little hair I do have left, please could somebody help me work out what the hell is going on here?? I've been fighting with this for over a week now and I feel like I'm going round in circles.
After all this backwards and forwards with the iPhone 4s, it turns out the device itself was actually faulty. Somehow this had translated to having a version of iOS that was not installed correctly, which resulted in software issues for apps running on the device.
This was not immediately apparent to us because of the unfortunate lack of devices we had access to for testing, but since I managed to get my hands on an iPad Mini with 9.3.5 and an iPhone 6 with 10.2.1, we've managed to verify our app's compatibility with the newer OS versions.
Anyways, in closing I just wanted to say a massive thank you for all the suggestions and ideas I got in the question comments (especially #Gandhi, sorry about the bounty story, I still feel like you deserve that just for being so helpful).
Despite the fact that my particular issue was not something that could be resolved here on SO, I have still learned a great deal during this process and I am so very grateful.
Even the answer is already posted by the Questioner himself, I m still posting mine for the benefit of others.
When a build deploys fine on one device running on iOS 8 and not on the one running on iOS 9, it could either be problem with iOS version due to the security changes or it could be the device compatibility problem.
In such case, the quick way to narrow down the problem is to test the build on other device with the same version (iOS 9). But unfortunately in #Zalithka's case he dint had device to test. But if someone encounters such problem, try out in different devices to narrow down the problem quickly and nail it.
I downloaded the iOS SDK for the Linea Pro device from their website and have successfully implemented some of it in my App - but I noticed the device never seems to work while its connected to the Mac via the USB cable. I've verified this 100% because as soon as I disconnect the LineaPro sled from the USB cable and run their Apps, it finds the Scanner and works. Otherwise, nothing.
This of course makes debugging near impossible because if you're not connected to Xcode you obviously can't see any output the App may have in Xcode's Console. You can't NSLog anything to the console, you can't put Breakpoints, you can't step-through your code - you pretty much can't do any of the things you'd normally do when developing an App.
I've actually had to resort to creating UITextViews and outputting everything I can to them during runtime ( which of course clutters up the interface big time) but even with that, if the App crashes, you never get to see your TextViews: you're thrown out and back to the iOS home screen, staring at all your little icons.
I've got some other ideas regarding work-arounds - but that's just it: they're all work-arounds. Does anyone out there know if there's any way to use the Linea Pro while its still connected to Xcode?
I don't think this is possible. For some reason lightning devices and USB don't seem to work together well.
I would suggest a combination of https://github.com/fpillet/NSLogger for logging and https://github.com/Shopify/superdb for sending messages to your app. You won't get breakpoints but you will have a few more tools at your disposal.
If you are using a device running iOS11 and you are using XCode 9, you no longer need to connect via lightning cable to debug your runtime build. XCode 9 introduced wireless debugging via a network connection:
Wireless Device Pairing Apple Documentation
Facing the same problem. I've resorted to using UIAlertViews instead of UITextFields to log messages on screen, but still its a huge pain the the buttocks.
You can also fire up a local server and hit it via localhost:8001?logmessage=myLogMessageWhichCanBeVeryVeryLong
and just print these GET requests to the terminal. Not pretty at all but its a workaround that could be of use if you want to get real creative...
Usually if you have a bug or error in your code it's going to be YOUR code, not the actual scanner or scanner input. So what I do while the app is in testing mode, is to have a button or other UIcontrol wired up to run an action AS IF there was scanner input, and I'll provide a mock string of input in a string (different inputs by incrementing a counter if needed). That way I can test away in the debugger for as long as necessary. Once my code works for me & I'm satisfied, I paste the same code into the scanner function and make the switch to the actual scanner. A little pain but not a big deal.
I have tried frank on iOS simulator. But need to know, how to run the tests on real device i.e on iPhone ? How will be the connection between device and Mac? through WIFI ?
I'm trying to do the same thig right now. This tutorial is listed on Frank's site, but I've been having problems with it, as I haven't had a lot of experience with terminal. You probably have already found out something on it, but this might help someone else.
What is minimal requirements for Android device for use Corona SDK???
I'm trying do run test app on Huawei SONIC - error force close;
on Sony Ericsson Live with Walkman - all correct.
The version android on this devices is 2.3.4
Some ideas or links?
Not sure about your specific issue as that could be a bug in Corona, a bug in what you are doing or just the device itself but check out this link http://producerism.com/blog/where-corona-sdk-falls-flat/ - it has a lot of info on coronas downfalls and might show you something useful for your situation.
I have found out by experience that there is at least one major thing to consider, especially if your app runs in the simulator, but not on your device. The simulator appears to not be case sensitive, but your device (phone/tablet) probably is case sensitive. Check any files you are using to make sure they are not mixed case. For example, myimage.png or myimage.PNG will both work on the simulator if it is coded as myimage.png in your lua code, but will install on your device, but fail to execute and usually force close when you touch the screen, or hit the back button several times.
Android devices should have :
Android OS 2.2+
ARMV7 architecture devices.
If you have device that has above specification then only you can run your CORONA application on the device.