Search code examples
iosobjective-cwatchkit

How to add iPhone application constant(.h class) and third party frameworks into watch kit extension?


I am trying to implement apple watch extension.Here i am trying to call my iPhone application method to send web service request.

For example in my project i have MyController.m and Constant.h classes. MyController.m class i have added target for watch kit extension but i can't add for Constant.h. In this case i am getting errors for where and all using constants in MyController.m class. How to add my all classes, constants and third party frameworks to watch kit extension? Every little help is appreciated.


Solution

  • Add your Constant.h file's path to "Header search paths" in build settings of your watch extension's target.

    Add your 3rd party frameworks to "Link Binary With Libraries" in "Build Phases" tab of your watch extension's target settings.

    enter image description here