davide-scalzo / react-native-mixpanel

A React Native wrapper for Mixpanel tracking
MIT License
455 stars 195 forks source link

Xcode 11 Compile Issues - Watchkit.h #195

Open pbr0ck3r opened 4 years ago

pbr0ck3r commented 4 years ago

In MixpanelWatchProperties.m xCode complains about not being able to find Watchkit.h

pbr0ck3r commented 4 years ago

I was able to fix the issue by wrapping the #import and MixpanelWatchProperties implementation with a #if !TARGET_OS_IOS.

hecmonn commented 4 years ago

By wrapping the file in an #if the ap is able to build, however it freezes as soon as it boots.

Any other solution on this?

pbr0ck3r commented 4 years ago

I am able to get the app to build/run just fine. The MixpanelWatchProperties.m file looks like this...

#import "MixpanelWatchProperties.h"
#if !TARGET_OS_IOS
#import <WatchKit/WatchKit.h>

@implementation MixpanelWatchProperties
...
@end
#endif