Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS Black Screen: Launch Failed #34

Open
TobyKaos opened this issue Feb 16, 2018 · 22 comments
Open

IOS Black Screen: Launch Failed #34

TobyKaos opened this issue Feb 16, 2018 · 22 comments
Labels

Comments

@TobyKaos
Copy link

I have added uanalytics 0.8.0 for Air.

On launch of my app I create the Configuration and the tracker. All is ok on Android (Air27) and flash(Air28) versions.
But on IOS(Air27) the app does not start.

Note: I used Starling V1.8. FlashDevelop 5.3.

@zwetan
Copy link
Owner

zwetan commented Feb 16, 2018

Like that it's hard to see what's happening,
I doubt including the uanalytics lib would prevent an app to start

on iOS did you try to remove all reference of the lib uanalytics?
and if so, then does the app start?

on iOS you are supposed to only connect to HTTPS URL
so when you are including the lib uanalytics
do you configure it to use SSL?

eg.

var config:Configuration = new Configuration();
    config.forceSSL = true;

@TobyKaos
Copy link
Author

Then I only remove start code and it works. And no I have not use forceSSL.
I will try this and I think you are right about this.
I will tell you asap, thank you.

@zwetan
Copy link
Owner

zwetan commented Feb 16, 2018

if you absolutely need to not use HTTPS
you should be able to edit your AIR app xml iOS Settings

and add the key

<key>NSAppTransportSecurity</key>  
<dict>  
  <key>NSAllowsArbitraryLoads</key>  
  <true/>  
<dict>

that said, I would advise to always use HTTPS

@TobyKaos
Copy link
Author

arf, no. It is not better.
I have no crash logs and do not know how to active it (Starling framework)

@zwetan
Copy link
Owner

zwetan commented Feb 16, 2018

ok then, could you show me how you initialise all that in code?

@TobyKaos
Copy link
Author

TobyKaos commented Feb 16, 2018

in an initialize function, called by the constructor of the Document Class of the app:

config = new Configuration();
config.anonymizeIp = true;
config.forceSSL = true;

mTracker = new AppTracker(viewID, config);

var appinfo:ApplicationInfo = generateAIRAppInfo();

mTracker.add( appinfo.toDictionary() );

this works well on Android

Repository owner deleted a comment from TobyKaos Feb 16, 2018
@zwetan
Copy link
Owner

zwetan commented Feb 16, 2018

ok so basic check

in your main class, does those properties config and mTracker
are declared as static variables ?

@TobyKaos
Copy link
Author

TobyKaos commented Feb 16, 2018

private var mTracker:AppTracker = null;
private var config:Configuration = null;

@TobyKaos
Copy link
Author

TobyKaos commented Feb 16, 2018

Then I obtains this error in remote debug: [Fault] exception, information=TypeError: Error #1080: Illegal value for namespace

@zwetan
Copy link
Owner

zwetan commented Feb 16, 2018

ok so try to do something like that instead

eg.

package com.foobar.blah
{
    public class Main
    {
        public static var tracker: AppTracker;

        public function Main()
        {
            // ...
        }

        public function onStartStuff()
        {
            // ...
            tracker = new AppTracker(viewID, config);
            // ...
        }

    }
}

and so later in other part of the app you can still reference the tracker
eg. Main.tracker.doSomethign()

@zwetan
Copy link
Owner

zwetan commented Feb 16, 2018

humm #1080: Illegal value for namespace
maybe there is a bug with generateAIRAppInfo()

try to not use it and initialise by hand
eg.

var gameinfo:Dictionnary = new Dictionnary();
    gameinfo[ Tracker.APP_NAME ] = "My Game";
    gameinfo[ Tracker.APP_ID ] = "com.something.mygame";
    gameinfo[ Tracker.APP_VERSION ] = "1.0.0";
    gameinfo[ Tracker.APP_INSTALLER_ID ] = "Amazon App Store";

tracker.add( gameinfo );

@TobyKaos
Copy link
Author

Yes stack is in generateAIRAppInfo(). I will try without

@zwetan
Copy link
Owner

zwetan commented Feb 16, 2018

I would be interested in the error stack trace if possible (you can send it privately by email if you prefer), so I can fix that bug for later

in your AIR app descriptor do you use multiple languages?

eg.

<name> 
    <text xml:lang="en">Sample 1.0</text> 
    <text xml:lang="fr">Échantillon 1.0</text> 
    <text xml:lang="de">Stichprobe 1.0</text> 
</name>

@TobyKaos
Copy link
Author

This work without generateAIRIngo:
error is here: global/libraries.uanalytics.utils::generateAIRAppInfo at /Volumes/prototype/libraries/as3-universal-analytics/src/libraries/uanalytics/utils/generateAIRAppInfo.as:105

@zwetan
Copy link
Owner

zwetan commented Feb 16, 2018

yeah there is a bug

generateAIRAppInfo.as:105
is

app_name = descriptor.name.text.(@xml::lang == lang);

and before

// first we use the default system language
var lang:String = Capabilities.language;

but after thinking of it the default language on the phone is not necessarily the default language we want to define in the app, etc.

@zwetan zwetan added the bug label Feb 16, 2018
@TobyKaos
Copy link
Author

maybe on iPad air 2 ios 11 the namespace is not http://www.w3.org/XML/1998/namespace

I am not an expert on actionscript and XML

@zwetan
Copy link
Owner

zwetan commented Feb 16, 2018

I'm pretty sure it is an issue between the Capabilities.language and the AIR descriptor

either simple

<name>Sample Something</name> 

or complex

<name> 
    <text xml:lang="en">Sample 1.0</text> 
    <text xml:lang="fr">Échantillon 1.0</text> 
    <text xml:lang="de">Stichprobe 1.0</text> 
</name>

if you could tell me wether your app descriptor is simple or complex, it could help

@TobyKaos
Copy link
Author

TobyKaos commented Feb 16, 2018

Yes it is complex.

<name>
    <text aaa:lang="fr" xmlns:aaa="http://www.w3.org/XML/1998/namespace">Glucozor test</text>
    <text aaa:lang="en" xmlns:aaa="http://www.w3.org/XML/1998/namespace">Glucozor test</text>
    <text aaa:lang="de" xmlns:aaa="http://www.w3.org/XML/1998/namespace">Glucozor test</text>
    <text aaa:lang="es" xmlns:aaa="http://www.w3.org/XML/1998/namespace">Glucozor test</text>
    <text aaa:lang="it" xmlns:aaa="http://www.w3.org/XML/1998/namespace">Glucozor test</text>
    <text aaa:lang="zh" xmlns:aaa="http://www.w3.org/XML/1998/namespace">Glucozor test</text>
  </name>

@zwetan
Copy link
Owner

zwetan commented Feb 16, 2018

is that the output from debug stacktrace or is it how you defined the AIR descriptor XML?

@TobyKaos
Copy link
Author

TobyKaos commented Feb 16, 2018

`
var na:NativeApplication = NativeApplication.nativeApplication;
var desc:XML = na.applicationDescriptor;

trace(desc.toXMLString());
`

I defined multi app name in my application.xml file

@zwetan
Copy link
Owner

zwetan commented Feb 16, 2018

ok thanks for the information and the bug report

@llorenzo
Copy link

Hi, since starling flox will shut down this year, I will need something to analyse my app. Is this bug still happening. My XML also uses different names as per language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants