diff --git a/Pod/Classes/TUSAssetData.h b/Pod/Classes/TUSAssetData.h index f920c0bc..aa6a3690 100755 --- a/Pod/Classes/TUSAssetData.h +++ b/Pod/Classes/TUSAssetData.h @@ -15,7 +15,7 @@ #if TARGET_OS_IPHONE #import -#elif TARGET_OS_MAC +#elif defined TARGET_OS_OSX @import MediaLibrary; #endif @@ -23,7 +23,7 @@ #if TARGET_OS_IPHONE - (id)initWithAsset:(ALAsset*)asset; -#elif TARGET_OS_MAC +#elif defined TARGET_OS_OSX - (id)initWithAsset:(MLMediaObject*)asset; #endif diff --git a/Pod/Classes/TUSAssetData.m b/Pod/Classes/TUSAssetData.m index edbfe7a5..89bf5d09 100755 --- a/Pod/Classes/TUSAssetData.m +++ b/Pod/Classes/TUSAssetData.m @@ -14,7 +14,7 @@ @interface TUSAssetData () #if TARGET_OS_IPHONE @property (strong, nonatomic) ALAsset* asset; -#elif TARGET_OS_MAC +#elif defined TARGET_OS_OSX @property (strong, nonatomic) MLMediaObject* asset; #endif @end @@ -30,7 +30,8 @@ - (id)initWithAsset:(ALAsset*)asset } return self; } -#ELIF TARGET_OS_MAC +#endif +#if TARGET_OS_OSX - (id)initWithAsset:(MLMediaObject*)asset { self = [super init]; @@ -62,7 +63,8 @@ - (long long)length return [assetRepresentation size]; } -#ELIF TARGET_OS_MAC +#endif +#if TARGET_OS_OSX - (long long)length { if (!_asset) { @@ -93,7 +95,8 @@ - (NSUInteger)getBytes:(uint8_t *)buffer length:length error:error]; } -#ELIF TARGET_OS_MAC +#endif +#if TARGET_OS_OSX #endif diff --git a/Pod/Classes/TUSResumableUpload.m b/Pod/Classes/TUSResumableUpload.m index 4d3697aa..00d26133 100755 --- a/Pod/Classes/TUSResumableUpload.m +++ b/Pod/Classes/TUSResumableUpload.m @@ -283,7 +283,7 @@ - (BOOL)createFile #if TARGET_OS_IPHONE UIBackgroundTaskIdentifier bgTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{ [weakself cancel]; - }]; #elif TARGET_OS_MAC + }]; #endif self.currentTask = [self.delegate.session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error){ @@ -348,7 +348,7 @@ - (BOOL)createFile [weakself.delegate saveUpload:weakself]; // Save current state for reloading - only save when we get a call back, not at the start of one (because this is the only time the state changes) #if TARGET_OS_IPHONE [[UIApplication sharedApplication] endBackgroundTask:bgTask]; - #elif TARGET_OS_MAC + #elif defined TARGET_OS_OSX [weakself cancel]; #endif @@ -454,7 +454,7 @@ - (BOOL) checkFile [weakself.delegate saveUpload:weakself]; // Save current state for reloading - only save when we get a call back, not at the start of one (because this is the only time the state changes) #if TARGET_OS_IPHONE [[UIApplication sharedApplication] endBackgroundTask:bgTask]; - #elif TARGET_OS_MAC + #elif defined TARGET_OS_OSX [weakself cancel]; #endif if (delayTime > 0) { @@ -542,7 +542,7 @@ -(BOOL)uploadFile [weakself.delegate saveUpload:weakself]; // Save current state for reloading - only save when we get a call back, not at the start of one (because this is the only time the state changes) #if TARGET_OS_IPHONE [[UIApplication sharedApplication] endBackgroundTask:bgTask]; - #elif TARGET_OS_MAC + #elif defined TARGET_OS_OSX [weakself cancel]; #endif [weakself continueUpload]; // Continue upload, not resume, because we do not want to continue if cancelled. diff --git a/TUSKit.podspec b/TUSKit.podspec index c9fc4496..d268598d 100755 --- a/TUSKit.podspec +++ b/TUSKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "TUSKit" - s.version = "1.3.9" + s.version = "1.3.10" s.summary = "An iOS implementation of the tus resumable video upload protocol." s.description = <<-DESC An iOS implementation of the tus resumable video upload protocol.