Giter Site home page Giter Site logo

Comments (3)

bmourat avatar bmourat commented on June 9, 2024

Hey @damirdavletov

As it is stated in docs enableAppNotTerminatingCleanlyDetection api was tested only on iOS 6.1 and iOS 7 and may report false positives. I've tried to reproduce this issue today, but with no luck. To further investigate and reproduce this, i need some additional info:

  1. iOS version under test
  2. Device or simulator
  3. Setup code for CLLocationManager
  4. Code for handler locationManager:manager didUpdateLocations:locations

Best,
Murat

from hockeysdk-ios.

damirdavletov avatar damirdavletov commented on June 9, 2024

Hi @bmourat !

Thank you for the reply! We have used this detection for several years and it was very useful for us regardless of relatively small number of false positives. After we upgraded the Hockey SDK from v4.0.2 to v5.1.2 in one of our apps the number of such crashes rose from ~500pd to 60000pd. This number of false positives makes the feature useless for apps which wake up in background. After we downgraded to v4.1.6 the number when back down.

To answer your questions:

  1. The app's deployment target is iOS 10.0, so it happens on all iOS 10.x-11.x versions for us.
  2. We reliably reproduced it on devices when waking the process up with 'remote-notification' type of push. In hockeyApp we see that it's reproduced on all types of devices we support.
  3. CLLocationManager is set up like this for background [locationManager startMonitoringSignificantLocationChanges];
  4. In - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations method we perform some location filtering and send them to server that's it. Unfortunately, I can't copy-paste the code here. The fact that it crashes on location update is my assumption, I did not test it.

Exact steps to reproduce:

  1. Launch the app and send it to background
  2. Launch another app e.g. Facebook
  3. Launch a lot of apps like Safari, open videos there etc. as many as possible.
  4. Launch Facebook again check that it has been purged by iOS. If not do step 3 again.
  5. Send remote-notification push to the app so it's woken up by iOS. Make sure it's running, but don't launch it (We checked server logs).
  6. Do steps 2-4 again until the app is purged again.
  7. Open the app and check that the appNotTerminatedCleanly event is reported.

These steps were performed by manual QA to reproduce, I'm sure you can do it easier with kill(getpid(), SIGKILL); in background, but you get the idea. Please note that the app needs to be killed not by the user, but by iOS, otherwise it won't be woken up. For us it's easier to reproduce it with remote-notification push.

P.S. If you need more help reproducing let me know or ping me on Facebook: https://www.facebook.com/damir.davletov.12

from hockeysdk-ios.

ElektrojungeAtWork avatar ElektrojungeAtWork commented on June 9, 2024

Hey @damirdavletov,

could you please get in touch via support to share your code so we can repro the issue that you are seeing?

from hockeysdk-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.