Skip to content

Leak on init in iOS #20

Closed
Closed

Description

@talkaboutdesign

screen shot 2016-03-21 at 10 05 49 pm

Activity

  1. jkasten2 commented on Mar 31, 2016

    @jkasten2
    Contributor

    Thanks for the information, this leak is 80 bytes and will only occur once during app startup so this won't have an impact on your app.

    We'll see if there is a way to clean this up so it doesn't pollute the log however going to make this a low priority issue.

  2. jeslyvarghese commented on Jul 4, 2016

    @jeslyvarghese

    +1

  3. skuske commented on Mar 1, 2018

    @skuske

    Any update on this? Any way to clean that up? Thanks.

  4. skuske commented on Mar 1, 2018

    @skuske

    Actually I am wondering why OneSignal calls

    SKPaymentQueue canMakePayments

    during init...

    Can someone shed some light on this, please?

    bildschirmfoto 2018-03-01 um 11 40 29

  5. jamesstout commented on Aug 9, 2018

    @jamesstout
    Contributor

    @skuske It's because OneSignal tracks IAPs: #276

    In initWithLaunchOptions:

    if (!trackIAPPurchase && [OneSignalTrackIAP canTrack])

    Which calls SKPaymentQueue canMakePayments:

    + (BOOL)canTrack {
    skPaymentQueue = NSClassFromString(@"SKPaymentQueue");
    return (skPaymentQueue != nil && [skPaymentQueue respondsToSelector:@selector(canMakePayments)] && [skPaymentQueue performSelector:@selector(canMakePayments)]);

    SKPaymentQueue canMakePayments is the source of the leak, so maybe a Radar to Apple?

    I did add a settings key kOSSettingsKeyIAPTracking to toggle OneSignal IAP tracking a while ago in a branch on my fork. I tidied it up a little and pushed it: master...jamesstout:opt-out-iap-tracking

    As you saw, with IAP tracking on, just an 80 byte leak:

    screen shot 2018-08-09 at 5 00 18 pm

    With the IAP tracking off:

    screen shot 2018-08-09 at 4 56 42 pm

    However, I'm not suggesting a PR; all tests pass, but I don't know what other impact the change could have.

  6. skuske commented on Aug 10, 2018

    @skuske

    @jamesstout

    Cool. Thanks a lot! :o)

  7. rgomezp commented on May 29, 2019

    @rgomezp
    Contributor

    Closing since no other reports of this being an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions