2 Replies
      Latest reply on Sep 10, 2015 7:53 AM by chaingarden
      MindwarpJules Level 1 Level 1 (0 points)

        Obviously we need to use precompiler conditions to add and remove certain libraries.


        However, not sure what we should use?


        I know I could create my own precompiler variable in build settings, but this wouldn't tie in to a specific device.

        Future proofing it.

        • Re: What precompiler tag to determine tvOS
          trojanfoe Level 1 Level 1 (10 points)

          These are normally found in TargetConditionals.h, however I haven't got Xcode 7.1 beta yet, so I cannot tell you what values to use.


          If you have Xcode 7.1, it should be easy to find.

            • Re: What precompiler tag to determine tvOS
              chaingarden Level 1 Level 1 (10 points)

              Looks like, not surprisingly, it's TARGET_OS_TV.


              From TargetConditionals.h for tvOS 9.0 Simulator:


              *    gcc based compiler used on Mac OS X
              #if defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) )
                  #define TARGET_OS_MAC               1
                  #define TARGET_OS_WIN32             0
                  #define TARGET_OS_UNIX              0
                  #define TARGET_OS_IPHONE            1
                  #define TARGET_OS_IOS               0
                  #define TARGET_OS_WATCH             0
                  #define TARGET_OS_TV                1
                  #define TARGET_OS_SIMULATOR         1
                  #define TARGET_OS_EMBEDDED          0
                  #define TARGET_IPHONE_SIMULATOR     TARGET_OS_SIMULATOR / deprecated */
                  #define TARGET_OS_NANO              TARGET_OS_WATCH / deprecated */