iosappceleratorappcelerator-titaniumtitanium-alloyios8.4

My application does not exit the splash screen when I try on the iPad Device - Titanium Appcelerator


I built an app for iOS ... it runs on the simulator perfectly, and on tests with TestFlight as well, except that when I try to put this app on my iPad, it even installs, but it stops on the splash screen.

#IOS version on iPad
    8.4.1
#Xcode Version:
    8.1
#IOS SDK'S: 
    10.1

#Operating System  
    Name = Mac OS X
    Version = 10.12  
    Architecture = 64bit  
    CPUs = 4  
    Memory = 4.0GB  

#Nodejs  

    Node.js Version = 4.6.0  
    Npm Version = 2.15.9

#Appcelerator CLI

    Installer = 4.2.7
    Core Package = 5.5.1

#Titanium Cli

    CLI Version = 5.0.9  
    Node-appc Version = 0.2.31

Solution

  • Whenever an application stops at the splash screen that means a critical error has occurred in your app which blocks any further code from executing. Usually in alloy.js, index controller or any other controller/js file you access before the first window opens.

    As this question is impossible to answer without full access to all code that is executed this is more a general kind of answer you can use as a guide to debug why your app doesn't work on certain platforms or OS's

    First, look at any code specific to your situation. In your case the iPad. As you can have code that only runs on an iPad look at that code first. Do you have controllers specific for iPads? Or code blocks? Look at those! There must be an error in there.

    If it doesn't happen in Simulator but it does on device look if you have any code that runs only on device and not on simulator. Faking geolocation for example.

    In Titanium there can be code specific for environments. For example on development or only on production. Look into any differences.

    If this all doesn't work for you, use try, catch handlers around all of your code and alert the errors, or send them by mail for example.

    You can also look into error loggers and catchers. For example this blogpost.

    There also is an uncaughtException event fired you can listen for:

    http://docs.appcelerator.com/platform/latest/#!/api/Titanium.App-event-uncaughtException

    Listen to it like this:

    Ti.App.addEventListener('uncaughtException', function(error){
        // handle error here
    }