Skip to content

iOS build still broken after 824111d #1230

@tido64

Description

@tido64

824111d still doesn't fix iOS builds because TARGET_OS_MAC is always set even if built for iOS. See TargetConditionals.h for iOS:

#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

    #if !DYNAMIC_TARGETS_ENABLED
        #define TARGET_OS_OSX               0
        #define TARGET_OS_IPHONE            1
        #define TARGET_OS_IOS               1
        #define TARGET_OS_WATCH             0
        
        #define TARGET_OS_TV                0
        #define TARGET_OS_SIMULATOR         0
        #define TARGET_OS_EMBEDDED          1 
        #define TARGET_OS_RTKIT             0 
    #endif

And for Simulator:

#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

    #if !DYNAMIC_TARGETS_ENABLED
        #define TARGET_OS_OSX               0
        #define TARGET_OS_IPHONE            1
        #define TARGET_OS_IOS               1
        #define TARGET_OS_WATCH             0
        
        #define TARGET_OS_TV                0
        #define TARGET_OS_SIMULATOR         1
        #define TARGET_OS_EMBEDDED          0 
        #define TARGET_OS_RTKIT             0 
    #endif

I suggest using !TARGET_OS_IOS instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions