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 platformTypeDeclared 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 *platformNameDeclared In
MBPlatform.h
isMacOS
Determines whether the code is running on a macOS system; YES if it
is, NO otherwise.
@property (nonatomic, readonly) BOOL isMacOSDeclared In
MBPlatform.h
isIOS
Determines whether the code is running on an iOS system; YES if it
is, NO otherwise.
@property (nonatomic, readonly) BOOL isIOSDeclared 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 isTVOSDeclared 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 isWatchOSDeclared 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 isUIKitDeclared In
MBPlatform.h