Search code examples
iosxcodemixpanel

Can't install Mixpanel iOS SDK via manual install - Mixpanel/Mixpanel.h file not found


Following the steps to repro the issue:

  1. Cloned the code from https://github.com/mixpanel/mixpanel-iphone
  2. Copied the Mixpanel directory to my Xcode project directory
  3. Added the Mixpanel directory to Xcode, using the "Create group" and "Copy items if needed" options.
  4. Added the frameworks listed in the Podspec file in the Build Phases section of Xcode
  5. Added import "Mixpanel.h" to my AppDelegate.m file
  6. Cmd+R
  7. Compile error in Mixpanel+HostWatchOS.h - 'Mixpanel/Mixpanel.h' file not found

Also I tried adding $(SRCROOT)/Mixpanel to my Libarry Search Paths.

Any help would be greatly appreciated!


Solution

  • Try the next steps:

    1. Go to Mixpanel+HostWatchOS.h and rename #import <Mixpanel/Mixpanel.h> to #import "Mixpanel.h"
    2. Then you'll probably face the next problem, so try to do as comment says: add libicucore.tbd into your project under Project/Target/General/Linked Frameworks and Libraries.
    3. Build and Run

    But I recommend you to use CocoaPods' Mixpanel project