MBPlatform Class Reference

Inherits from NSObject
Conforms to MBSingleton
Declared in MBPlatform.h

Overview

The MBPlatform singleton provides a platform-independent mechanism for accessing information about the current execution environment.

Warning: You must not create instances of this class yourself; this class is a singleton. Call the instance class method (declared by the MBSingleton protocol) to acquire the singleton instance.

Platform information

  platformType

Determines whether the code is running on a Mac OS X system; YES if it is, NO otherwise.

@property (nonatomic, readonly) MBPlatformType platformType

Declared In

MBPlatform.h

  platformName

Returns a human-readable string containing the name of the platform on which the code is running.

@property (nonnull, nonatomic, readonly) NSString *platformName

Declared In

MBPlatform.h

  isMacOS

Determines whether the code is running on a macOS system; YES if it is, NO otherwise.

@property (nonatomic, readonly) BOOL isMacOS

Declared In

MBPlatform.h

  isIOS

Determines whether the code is running on an iOS system; YES if it is, NO otherwise.

@property (nonatomic, readonly) BOOL isIOS

Declared In

MBPlatform.h

  isTVOS

Determines whether the code is running on an Apple TV (tvOS) system; YES if it is, NO otherwise.

@property (nonatomic, readonly) BOOL isTVOS

Declared In

MBPlatform.h

  isWatchOS

Determines whether the code is running on an Apple Watch (watchOS) system; YES if it is, NO otherwise.

@property (nonatomic, readonly) BOOL isWatchOS

Declared In

MBPlatform.h

  isUIKit

Determines whether the code is running on a UIKit-based system such as an iPhone, iPad or Apple TV; YES if it is, NO otherwise.

@property (nonatomic, readonly) BOOL isUIKit

Declared In

MBPlatform.h