Where are the logs to diagnose runtime behaviour of gluonfx apps on iOS - gluon-mobile

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.

Related

Compiling app using Vmware OSX

I am trying to learn react Native for IOS development... I have researched a lot about Swift vs React native and came to this decision.
The question is I am poor as hell. But got a good PC. And I can run VMware OSX in my PC.
I understand that I can install an run Xcode and all that. But I am getting the question whether I can upload my app to an Iphone or Also Can I upload it to Apple Store using my VMware? There is a word comes up like final compiling can't be done without a Mac and All that. Since I got it using a VM is confusing and difficult and also slow. But still I can't spend on a MAC right now. But I have to learn and upload app into the Apple Store along with testing it on an Iphone.
So the question is, Is it a problem using VMware OSX to do these things?
please help, I researched a lot but could't get these things :)
TIA.
The answer is YES. You can make apps with VMware and upload them to App Store with no problems. I’ve done it myself previously.
However, since it is a virtual machine without full graphics support, you cannot simulate and run graphics-related apps and tools that use the GPU. For example,
You cannot use Simulator properly for iOS 11+
You cannot debug view hierarchy since it uses GPU for rendering and
debugging UI elements
You cannot debug SpriteKit or SceneKit projects properly etc.
AirPlay and AirDrop won’t work.
Other than those, you can do almost everything in a VMware macOS. For React native, I don’t think there would be a problem compiling apps with it. You are good to go. But as others said, it would be slower than a real Mac, so you have to bear with it.
You can do anything on your vm like a real mac . It will just be slower depending on your hardware. I installed macOS on a system and got my app to the app store with it.

How can I run my hybrid mobile app in debug/development mode on an iPhone?

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.

Cordova development on Windows for iOS

I'm a longtime Windows desktop developer (25+ years) who has been doing native Blackberry 10 mobile development for 18 months. For my next app I have to hit as many mobile platforms as possible and have decided on Cordova (NOT PhoneGap) for the job.
I have successfully built and deployed a test app on Blackberry 10 and Android with the Cordova CLI. Now I need to get the workflow for iOS figured out before I start actually coding the real app so I can test on all platforms as I go along. I have OSX Mavericks running in a VMware VM from Windows 8.1 and have Xcode installed on OSX. I'm only slightly knowledgeable in OSX, but I know that I must use it to build for iOS. What I'm trying to figure out is how much duplication of effort I have to expend within OSX to build for iOS. I suspect the challenges would be the same if I was using a physical Mac to package and test for iOS so hopefully there are others out there who have figured out the cleanest way to do this.
Can I use Cordova on Windows to create the iOS project and source or do I have to create a duplicate project platform using Cordova on the Mac and keep duplicate source code there too? If I can do all that from Windows, do I just copy it over to Mavericks after every Cordova build and use Xcode to package and run it in an emulator? If anyone out there is running OSX in a VM for this like I am, is it possible to map a host path into OSX so I don't have to recreate the platform source at all after I build it from Windows? I'm assuming there is not way to automate the whole thing from Windows Cordova like there is for the Android and Blackberry platforms, am I wrong?
My desire is to do ALL coding in Windows and only use Maverick for the final bundling for iOS. After 25 years of pro development I'm not used to being a complete newbie and I'm not crazy about it. LOL
Learn Mac OS X. I know you feel out of sorts in this environment, but honestly -- it's not that difficult. In fact, I made the transition from Windows 7 rather than upgrading to Windows 8, and I was comfortable very quickly. (Far more comfortable than I am with a Windows 8 laptop others in my family use.)
Remember that Mac OS X is a Unix underneath (BSD). This means that if you are in any way familiar with Linux or Unix but are put off by working with the Mac GUI, you can almost always fall back to the terminal. (In my not-so-humble opinion, Mac OS X makes for a very nice *nix machine!)
Your VM should be able to share drives across the network, just like it would if it were a real machine (Apple supports SMB reasonably well). This way both environments could point to the same Cordova project without having to worry about copies. (You can copy the projects around, but it would be easier, in my opinion, just to share across the network. Less risk of accidentally doing something stupid.)
The only things that require a Mac are:
Creation of certificates / provisioning profiles (and there are ways around this on Windows, but it is not supported)
Submission to the app store
Remote debugging using Safari (You can use Weinre to come close, but it doesn't support breakpoints and such)
Local compilation of your code (and there are other toolchains available that do this on other OSes, but again, not supported by Cordova).
Running the app in a simulator
The above means that you can develop your app on Windows and only run to the VM for compilation / submission. With the advent of the Phonegap Developer app (http://app.phonegap.com), you can skip the (re)build step during development and testing as well (as long as you use only core plugins).
Note: I know you indicate you are using Cordova and NOT PhoneGap. What's nice is that, ATM, the Phonegap Developer App works just fine with Cordova projects (whereas PG Build often requires config.xml to be moved and plugins to be handled differently). It does require the PhoneGap CLI to be installed. As long as you are using core plugins, it definitely saves time by eliminating the rebuild steps.
The Cordova project can be created on any platform -- but I know there was a time when adding the iOS platform to your project (cordova platform add ios) would check that all pre-reqs were met, but I'm not sure if that is still the case. It can't hurt to try. But if it is required, use a network share and add the platform on the VM. Keep in mind that the platforms should be thought of as build artifacts -- your app code should live in the root www, which doesn't depend on the added platforms.
Do not rely on the iOS Simulator to tell you anything about how the app works or performs on a real device. The simulator has all the power of your desktop (processor speed, memory, etc.) and lacks many on-device features as well. I suspect the visual performance of the iOS Simulator will be horrid, since it will rely on the GPU as routed through the VM. (Frankly, it's not always great on a real Mac.) You really, really, really must have a real device to test on. (Again, the PhoneGap Developer App can ease the pain of repeat deployments for testing.)

App crashes on iPhone 5S but not on iPhone 4S.

I have an iPhone app that I have developed and tested on my iPhone 4S. The app is released on the market and some users claim that the app is unusable as it crashes on start up.
I have done exactly the same things as the users have to their devices, running the same version of the app on my iPhone 4S and I cannot get it to crash.
I have been to the houses of users and plugged their phones into my computer to get the log read out and when I do, I get errors that I am not getting on my phone and my mac.
I am completely at a loss as to how I start to find the solution to a problem like this. Does anyone have even the faintest ideas?
A good start will be to integrate a crash log collecting, crash reporting SDK in your app like HockeyApp, TestFlight, Crittercism or QuincyKit.
This will send you the crash logs to you so you don't have to collect them manually. These tools can also automatically symbolicate the crash logs for you so you can find the source of the crash in your code.
You should test a release build before you ship it. Archive a release build and distribute it as an Ad-Hoc build. You can load a saved IPA file to your iDevice using iTunes or Organizer. The thing is that you can test a release build which is the same you would ship to the App Store (they are signed differently but the build configuration is the same unless you changed that).
iPhone 5S ships with 64-bit A7 processor. Your iPhone 4 is a 32-bit device. Most likely processor architecture is not the case but as Apple says: Before you distribute your app, you must test it on actual hardware. Some of the runtime changes can be detected only when the app is running on a device. I recommend you updating your set of test devices with different models. I still own an old iPhone 3GS which is great for spotting performance issues.
The general comments others have posted are correct. Add crash logging into your app with a pre-made SDK and test on an actual device. I can't add much more to those points, but I will tell a short story about a similar bug that I found in one of my apps in the hopes it helps you with your issue.
Our app was predominately iPad2 users. When the iPad4 was released, waves of our users upgraded and they started experiencing an issue that was not present on iPad2. Two network requests were fired off at the same time and the result from one of them was crashing. We eventually found out it was a concurrency bug. The result of the first request was being processed "too quickly" and the code was getting to a critical section of code that was not thread-safe with the other request handler.
While this bug was still possible on the iPad2 if the network latency fluctuated just right, it never happened that way. The iPad4 made it happen almost every time.
You can use https://github.com/CocoaLumberjack/CocoaLumberjack lib to collect crash data logs from users.
Have you considered installing a crash logger in your app? There are plenty out there (Flurry, TestFlight, Crittercism, Hockey App, etc).
Most are fairly straightforward to install - add a framework and a couple of lines of code. Once you've done this, you'll (hopefully) be able to see exactly where your app is crashing on the users' devices, without having physical access to them.

iOS app compiling and MacInCloud/similar

I am contemplating developing iOS apps use Delphi XE4 with iOS. In my research I saw MacInCloud, http://www.macincloud.com/features/tools/tools
Does anyone have practical experience with this? Can I hook up my Windows/Delphi/similar development tool to MacInCloud/xCode for cross compiling (to obey licensing terms) and have the app debugged on my iPhone?
Maybe over time it would be beneficial to buy an iMac, but if I could start creating apps without it would be great.
I recently tried exactly that with MacInCloud. XCode and Delphi XE4's PAServer is now automatically installed by MacInCloud so I had few issues hooking up my Windows and Delphi environment.
What I found was that running and debugging in the iOS simulator on the Mac in the cloud worked fine. However as my upload speed was quite slow a compilation took some considerable time. Each compilation seemed to require an upload of about 17MB for the app and another 50MB for the debug symbols.
There is no way of plugging in your iPhone into the mac in the cloud and MacInCloud therefore recommend that you use a further cloud provider (TestFlightApp.com) to deploy the app to your device. I couldn't test using the TestFlightApp service as I have not signed up for the required developer account with Apple and so cannot deploy to physical devices at all.
All in all, if I was doing serious work I would either buy a Mac or pay for faster upload speeds but despite that I found it an very educational experience.
Good luck with TestFlightApp. That is one of those great services we use to have but not anymore. It use to work at one time but has fallen in great disrepair and been neglected.
Even if that did work, you would go out of you mind if you was working on something that can only run on the device. Not all iOS features work on simulator, like in app purchase for instance.
Where with a real machine at hand it deploys right to device almost as fast as simulator. Just a few seconds longer. Doing it this other way would take 15 minutes or more and require many steps of your interaction. You will forget where you left off in your code by that time.

Resources