mixpanel-iphone: Apple Rejection - TMS-90338: Non-public API usage (WKInterfaceDevice)

Hello, we got a problem with the store that refused our application since Monday the 3rd, so 2 days ago. We use cordova-mixpanel-plugin, which is basically a copy/paste of mixpanel-iphone. I was wondering if someone using mixpanel-iphone had the same problem ?

The error message

ITMS-90338: Non-public API usage - The app contains or inherits from non-public classes in MyWonderfulApp: WKInterfaceDevice . If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions.

From the doc WKInterfaceDevice

Do not subclass or create instances of this class (WKInterfaceDevice) yourself. Always call the current() class method to get the shared device object.

When I look at the code in Mixpanel.m, I see

Class WKInterfaceDeviceClass = NSClassFromString(@"WKInterfaceDevice");

I know nothing about Objective-C, but I was wondering if this line is good ? On the other hand, on MixpanelWatchProperties, we can see that line:

WKInterfaceDevice *device = [WKInterfaceDevice currentDevice];

Maybe it make sense to you,

Regards from a JS dev.

Please help 😃

Integration Method: Manual Library Version: 3.4.5 Platform: iOS Language: Objective-C

Original issue https://github.com/samzilverberg/cordova-mixpanel-plugin/issues/104

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 11
  • Comments: 23 (7 by maintainers)

Most upvoted comments

This didn’t seem to fix the issue for us - anyone else have success?

Thanks so much @KevinKelchen ! We believe it’s a false positive and sent a support request to Apple yesterday as well.

In the meantime, for anyone having this issue, as a workaround you don’t have to remove Mixpanel entirely, you may

  1. Comment out the reference to MixpanelWatchProperties in Mixpanel.m image

  2. Comment out the reference to MixpanelWatchProperties in MixpanelPeople.m image

  3. Remove MixpanelWatchProperties.h and MixpanelWatchProperties.m from your app target

Alternatively you can also apply this patch for the above changes:

WKInterfaceDevice-patch.diff.zip

Hi @cyrilgandon , thanks for raising it. We have released a new version with a fix for this issue. https://github.com/mixpanel/mixpanel-iphone/releases/tag/v3.4.6

I’m closing this one now since it’s no longer an issue for the latest Mixpanel native SDK any more.

Thanks so much @KevinKelchen for the updates. I believe this is no longer an issue any more, will close this thread in 2 days.