Skip to content

Commit 20e4277

Browse files
committed
Added support for Swift Package Manager
1 parent 86f22b2 commit 20e4277

File tree

5 files changed

+34
-0
lines changed

5 files changed

+34
-0
lines changed

LSDocument.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// Distributed under MIT license
55
//
66

7+
#import <TargetConditionals.h>
8+
#if !TARGET_OS_OSX
79
#import <UIKit/UIKit.h>
810

911
@class LSFileWrapper;
@@ -22,3 +24,4 @@
2224
completionHandler:(void (^)(BOOL success))completionHandler;
2325

2426
@end
27+
#endif

LSDocument.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// Distributed under MIT license
55
//
66

7+
#import <TargetConditionals.h>
8+
#if !TARGET_OS_OSX
79
#import "LSDocument.h"
810
#import "LSFileWrapper.h"
911

@@ -40,3 +42,4 @@ - (BOOL)readFromURL:(NSURL *)url error:(NSError *__autoreleasing *)outError
4042
}
4143

4244
@end
45+
#endif

LSFileWrapper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ FOUNDATION_EXPORT const unsigned char LSFileWrapperVersionString[];
5555
@property (readonly, strong, nonatomic) NSString *filename;
5656
@property (readonly, strong, nonatomic) NSString *fileType;
5757
@property (readonly, strong, nonatomic) NSMutableDictionary<NSString*, LSFileWrapper*> *fileWrappers;
58+
@property (readonly, strong, nonatomic) NSURL *writtenURL;
5859
@property (readonly, nonatomic) BOOL updated;
5960
@property (readonly, nonatomic) BOOL isDirectory;
6061
@property (assign, nonatomic) NSInteger reserve;

LSFileWrapper.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
3B1C07D022D893A900244E2D /* LSFileWrapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LSFileWrapper.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2525
3B1C07D222D893A900244E2D /* LSFileWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LSFileWrapper.h; sourceTree = "<group>"; };
2626
3B1C07D322D893A900244E2D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
27+
3B6C6ABD2353C47D00E989C2 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
2728
/* End PBXFileReference section */
2829

2930
/* Begin PBXFrameworksBuildPhase section */
@@ -47,6 +48,7 @@
4748
3B1C07B022D8922900244E2D = {
4849
isa = PBXGroup;
4950
children = (
51+
3B6C6ABD2353C47D00E989C2 /* Package.swift */,
5052
3B1C07D822D894BC00244E2D /* LSFileWrapper */,
5153
3B1C07BB22D8922900244E2D /* Products */,
5254
);

Package.swift

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// swift-tools-version:4.2
2+
3+
//
4+
// Package.swift
5+
// LSFileWrapper
6+
//
7+
// Created by Adam Kopeć on 10/13/19.
8+
// Copyright © 2019 Adam Kopeć. All rights reserved.
9+
//
10+
// Licensed under the MIT License
11+
//
12+
13+
14+
import PackageDescription
15+
16+
let package = Package(
17+
name: "LSFileWrapper",
18+
products: [
19+
.library(name: "LSFileWrapper", targets: ["LSFileWrapper"])
20+
],
21+
dependencies: [],
22+
targets: [
23+
.target(name: "LSFileWrapper", path: "")
24+
]
25+
)

0 commit comments

Comments
 (0)