mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
framework compatible CocoaLumberjack import
With previous import style, the `LOG_ASYNC_ENABLED, LOG_LEVEL_DEF` macros were not being defined. @import style module includes are handled differently in ObjC++, causing problems with out millisecondTimeStamp implementation. Rather than address that problem head on, I simple reimplemented our millisecond timestamp method in objective-c, removing our single ObjC++ file. // FREEBIE
This commit is contained in:
parent
7894a58769
commit
c5b0f7cd01
3 changed files with 5 additions and 6 deletions
|
@ -7,8 +7,8 @@
|
||||||
#ifdef __OBJC__
|
#ifdef __OBJC__
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <CocoaLumberjack/CocoaLumberjack.h>
|
|
||||||
|
|
||||||
|
@import CocoaLumberjack;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
static const NSUInteger ddLogLevel = DDLogLevelAll;
|
static const NSUInteger ddLogLevel = DDLogLevelAll;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -8,9 +8,10 @@
|
||||||
#import "OWSAnalytics.h"
|
#import "OWSAnalytics.h"
|
||||||
#import "OWSDispatch.h"
|
#import "OWSDispatch.h"
|
||||||
#import "iOSVersions.h"
|
#import "iOSVersions.h"
|
||||||
#import <CocoaLumberjack/CocoaLumberjack.h>
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
@import CocoaLumberjack;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
static const NSUInteger ddLogLevel = DDLogLevelAll;
|
static const NSUInteger ddLogLevel = DDLogLevelAll;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "NSDate+OWS.h"
|
#import "NSDate+OWS.h"
|
||||||
#import <chrono>
|
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@ -11,9 +10,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
+ (uint64_t)ows_millisecondTimeStamp
|
+ (uint64_t)ows_millisecondTimeStamp
|
||||||
{
|
{
|
||||||
uint64_t milliseconds
|
NSDate *now = [self new];
|
||||||
= (uint64_t)(std::chrono::system_clock::now().time_since_epoch() / std::chrono::milliseconds(1));
|
return (uint64_t)(now.timeIntervalSince1970 * 1000);
|
||||||
return milliseconds;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (NSDate *)ows_dateWithMillisecondsSince1970:(uint64_t)milliseconds
|
+ (NSDate *)ows_dateWithMillisecondsSince1970:(uint64_t)milliseconds
|
Loading…
Reference in a new issue