Preprocessor macro for Apple Watch?

前端 未结 4 1942
南旧
南旧 2021-02-19 11:49

I was looking at Apple\'s Lister (for Apple Watch, iOS, and OS X) sample. The sample performs a test for iOS and OS X:

#import 

#if          


        
4条回答
  •  死守一世寂寞
    2021-02-19 12:20

    With the current WatchKit SDK, all code in a Watch application runs on the phone it’s paired with, so there’s no point at which your preprocessor is going to encounter code that’s going to run on the Watch and thus not much use for a macro to tell it what to do when it does. The code in the ListerWatch target of the sample you linked to will run as an extension on the iPhone and talk to its watch UI via WatchKit.

提交回复
热议问题