CBLNetworkConfigurationHelper
Objective-C
@interface CBLNetworkConfigurationHelper : NSObject
Swift
class NetworkConfigurationHelper : NSObject
Helper class for working with the local device’s network configuration.
-
Returns all of the active network interfaces for the machine.
Declaration
Objective-C
+ (NSArray<NSString *> *_Nullable)allInterfaces;
Swift
class func allInterfaces() -> [String]?
-
Returns the interface most likely to be used for camera communication.
Declaration
Objective-C
+ (NSString *_Nullable)suggestedInterfaceForCameraCommunication;
Swift
class func suggestedInterfaceForCameraCommunication() -> String?
-
Returns the interface for accessing the given IP.
Declaration
Objective-C
+ (NSString *_Nullable)interfaceForAccessingIPAddress:(NSString *_Nonnull)ip;
Swift
class func interface(forAccessingIPAddress ip: String) -> String?
Parameters
ip
The IP address to access.
-
Returns the gateway/router address for the given interface. For self-hosting cameras, this is where you’ll connect.
Declaration
Objective-C
+ (NSString *_Nullable)ipAddressOfGatewayForInterface: (NSString *_Nonnull)interface;
Swift
class func ipAddressOfGateway(forInterface interface: String) -> String?
Parameters
interface
The interface (e.g.
en0
) for which to find the gateway address. -
Returns the local host’s IP address on the given interface.
Declaration
Objective-C
+ (NSString *_Nullable)ipAddressOfInterface:(NSString *_Nonnull)interface;
Swift
class func ipAddress(ofInterface interface: String) -> String?
Parameters
interface
The interface (e.g.
en0
) for which to find the IP address. -
Returns the IPv4 address from the given address data.
Declaration
Objective-C
+ (NSString *_Nullable)ipv4AddressFromNetServiceData: (NSData *_Nonnull)addressData;
Swift
class func ipv4Address(fromNetServiceData addressData: Data) -> String?
Parameters
addressData
The address data from which to find the IPv4 address.
-
Returns the SSID of the interface, if that interface is a Wi-Fi interface with a connected SSID.
Declaration
Objective-C
+ (NSString *_Nullable)ssidOfInterface:(NSString *_Nonnull)interface;
Swift
class func ssid(ofInterface interface: String) -> String?
Parameters
interface
The interface (e.g.
en0
) for which to find the SSID.