diff --git a/OpenVPN Adapter/OpenVPNAdapter+Public.h b/OpenVPN Adapter/OpenVPNAdapter+Public.h index d4a4bd8..8ea7d24 100644 --- a/OpenVPN Adapter/OpenVPNAdapter+Public.h +++ b/OpenVPN Adapter/OpenVPNAdapter+Public.h @@ -98,6 +98,11 @@ NS_SWIFT_NAME(handle(logMessage:)); */ @interface OpenVPNAdapter (Public) +/** + Returns platform description + */ +@property (class, nonnull, readonly, nonatomic) NSString *platform; + /** <#Description#> */ @@ -124,16 +129,6 @@ NS_SWIFT_NAME(handle(logMessage:)); */ @property (nonnull, readonly, nonatomic) OpenVPNInterfaceStats *interfaceStats; -/** - Returns date/time of app expiration - */ -+ (nonnull NSDate *)expiration; - -/** - Returns platform description - */ -+ (nonnull NSString *)platform; - /** <#Description#> diff --git a/OpenVPN Adapter/OpenVPNAdapter.mm b/OpenVPN Adapter/OpenVPNAdapter.mm index e342463..cfbc686 100644 --- a/OpenVPN Adapter/OpenVPNAdapter.mm +++ b/OpenVPN Adapter/OpenVPNAdapter.mm @@ -128,6 +128,11 @@ NSString * const OpenVPNAdapterErrorEventKey = @"me.ss-abramchuk.openvpn-adapter #pragma mark Properties ++ (NSString *)platform { + std::string platform = OpenVPNClient::platform(); + return [NSString stringWithUTF8String:platform.c_str()]; +} + - (void)setDelegate:(id)delegate { _delegate = delegate; } @@ -158,16 +163,6 @@ NSString * const OpenVPNAdapterErrorEventKey = @"me.ss-abramchuk.openvpn-adapter return [[OpenVPNInterfaceStats alloc] initWithInterfaceStats:stats]; } -+ (NSDate *)expiration { - NSNumber *time = [NSNumber numberWithInteger:OpenVPNClient::app_expire()]; - return [NSDate dateWithTimeIntervalSince1970:[time doubleValue]]; -} - -+ (NSString *)platform { - std::string platform = OpenVPNClient::platform(); - return [NSString stringWithUTF8String:platform.c_str()]; -} - #pragma mark Client Configuration - (OpenVPNProperties *)applyConfiguration:(nonnull OpenVPNConfiguration *)configuration error:(out NSError * __nullable * __nullable)error {