Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Amplitude plugin make app crash on iOS

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #25297

    Allan

    Hello,

     

    I’ve been using Amplitude in my app for some time.

    I need to build an update and when I try to use the plugin, it crashes instantly, without much explanations :

    Felgo [INFO]: Starting in "test" stage. Note: When you are ready to publish your app to the app stores, switch to Release mode and to "publish" stage in the config.json file located in the qml folder. For more information see: https://felgo.com/
    doc/felgo-publishing/
    libc++abi: terminating with uncaught exception of type NSException
    program received signal 6, thread:8ecea;00:0000000000000000;01:0000000000000000;02:0000000000000000;...

     

    The crash only occurs on iOS, working fine on Android.

     

    Do you have some explanation ?

    Thanks.

    #25300

    Günther
    Felgo Team

    Hi Allan,

    The crash doesn’t give much information about the issue.
    Does it crash directly at startup, or is everything fine until you log an event later?

    In case you already use plugin directly at startup, you can try to put the code into the pluginLoaded signal:

    Amplitude {
       onPluginLoaded: {
          // use the plugin
       }
     }

    It is possible that the plugin hasn’t fully initialzed yet if you e.g. work with it in a “Component.onCompleted” handler.

    Best,
    Günther

    #25306

    Allan

    Hi,

     

    Thanks for the tip, but it seems to be another case…

    This line is the culprit of the crash :

    amplitude.userProperties.last_device_connected = settings.getValue("paired")

     

    It’s done in the App Component.onCompleted

     

    Here some more code :

    let paired = settings.getValue("paired")
    if(paired === undefined) {
        settings.setValue("paired", [{}, {}, {}])
        amplitude.userProperties.device_amount = 0
    } else {
        amplitude.userProperties.device_amount = nombreObjetsRemplis(paired)
        amplitude.userProperties.last_device_connected = settings.getValue("paired")
    }

     

    I don’t really expect an answer on this one, for me it’s closed, I will fix this on my own.

    But if you have an idea of a potential limitation or something, feel free to give me more information 😀

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded