0

I have written static library for iOS and added in the same project static library for watchOS for which I want to be pretty same as iOS one.

I tried to add into watchOS header from iOS static library. But then it start to complain while it builds that UIViewController and UIApplicationState is unknown types. But into that header I already done this:

#if !TARGET_OS_WATCHOS
- (void)track:(UIViewController *_Nonnull)controller;
- (void)updateFirstSessionWith: (UIApplicationState) state;
#endif

How can I resolve this?

Dragisa Dragisic
  • 731
  • 2
  • 9
  • 19

1 Answers1

0

After a deeper research I found a really good example for it and resolve problem.

I have had extra 'OS' in if statement.

#if !TARGET_OS_WATCH
- (void)track:(UIViewController *_Nonnull)controller;
- (void)updateFirstSessionWith: (UIApplicationState) state;
#endif
Dragisa Dragisic
  • 731
  • 2
  • 9
  • 19