Skip to content

Commit 3f96a9a

Browse files
Fabio TackeFabio Tacke
authored andcommitted
Add SPM support
1 parent 38a908f commit 3f96a9a

File tree

20 files changed

+92
-30
lines changed

20 files changed

+92
-30
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ playground.xcworkspace
5151
# Package.pins
5252
.build/
5353

54+
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
55+
# hence it is not needed unless you have added a package configuration file to your project
56+
.swiftpm
57+
5458
# CocoaPods - Refactored to standalone file
5559

5660
# Carthage - Refactored to standalone file

ConvAPI.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
1212
s.author = { "Andreas Ganske" => "[email protected]" }
1313
s.ios.deployment_target = "10.0"
1414
s.source = { :git => "https://github.com/ChaosCoder/ConvAPI.git", :tag => s.version }
15-
s.source_files = "ConvAPI", "ConvAPI/**/*.swift"
15+
s.source_files = "Sources/ConvAPI", "Sources/ConvAPI/**/*.swift"
1616
s.swift_version = "5.0"
1717
s.dependency "PromiseKit", "~> 6.8"
1818

ConvAPI.xcodeproj/project.pbxproj

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@
8787
7DDDFB0C20839BD700F3426C = {
8888
isa = PBXGroup;
8989
children = (
90+
E5A3311C25A8A47D002B0526 /* Sources */,
9091
7D3DCD5A221EAB68005E5875 /* ConvAPI.podspec */,
91-
7DDDFB1820839BD700F3426C /* ConvAPI */,
92-
7DDDFB2320839BD700F3426C /* ConvAPITests */,
9392
7DDDFB1720839BD700F3426C /* Products */,
9493
B14DD6682C81BE521D665ACE /* Pods */,
9594
4EA3AB4304A50CCCF61ECF80 /* Frameworks */,
@@ -140,6 +139,15 @@
140139
path = Pods;
141140
sourceTree = "<group>";
142141
};
142+
E5A3311C25A8A47D002B0526 /* Sources */ = {
143+
isa = PBXGroup;
144+
children = (
145+
7DDDFB1820839BD700F3426C /* ConvAPI */,
146+
7DDDFB2320839BD700F3426C /* ConvAPITests */,
147+
);
148+
path = Sources;
149+
sourceTree = "<group>";
150+
};
143151
/* End PBXGroup section */
144152

145153
/* Begin PBXHeadersBuildPhase section */
@@ -479,7 +487,7 @@
479487
DYLIB_COMPATIBILITY_VERSION = 1;
480488
DYLIB_CURRENT_VERSION = 1;
481489
DYLIB_INSTALL_NAME_BASE = "@rpath";
482-
INFOPLIST_FILE = ConvAPI/Info.plist;
490+
INFOPLIST_FILE = Sources/ConvAPI/Info.plist;
483491
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
484492
LD_RUNPATH_SEARCH_PATHS = (
485493
"$(inherited)",
@@ -508,7 +516,7 @@
508516
DYLIB_COMPATIBILITY_VERSION = 1;
509517
DYLIB_CURRENT_VERSION = 1;
510518
DYLIB_INSTALL_NAME_BASE = "@rpath";
511-
INFOPLIST_FILE = ConvAPI/Info.plist;
519+
INFOPLIST_FILE = Sources/ConvAPI/Info.plist;
512520
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
513521
LD_RUNPATH_SEARCH_PATHS = (
514522
"$(inherited)",
@@ -530,7 +538,7 @@
530538
buildSettings = {
531539
CODE_SIGN_STYLE = Automatic;
532540
DEVELOPMENT_TEAM = 49YH985E25;
533-
INFOPLIST_FILE = ConvAPITests/Info.plist;
541+
INFOPLIST_FILE = Sources/ConvAPITests/Info.plist;
534542
LD_RUNPATH_SEARCH_PATHS = (
535543
"$(inherited)",
536544
"@executable_path/Frameworks",
@@ -549,7 +557,7 @@
549557
buildSettings = {
550558
CODE_SIGN_STYLE = Automatic;
551559
DEVELOPMENT_TEAM = 49YH985E25;
552-
INFOPLIST_FILE = ConvAPITests/Info.plist;
560+
INFOPLIST_FILE = Sources/ConvAPITests/Info.plist;
553561
LD_RUNPATH_SEARCH_PATHS = (
554562
"$(inherited)",
555563
"@executable_path/Frameworks",

ConvAPI.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

ConvAPI.xcworkspace/xcshareddata/xcschemes/ConvAPI.xcscheme renamed to ConvAPI.xcodeproj/xcshareddata/xcschemes/ConvAPI.xcscheme

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1230"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,15 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<MacroExpansion>
31-
<BuildableReference
32-
BuildableIdentifier = "primary"
33-
BlueprintIdentifier = "7DDDFB1520839BD700F3426C"
34-
BuildableName = "ConvAPI.framework"
35-
BlueprintName = "ConvAPI"
36-
ReferencedContainer = "container:ConvAPI.xcodeproj">
37-
</BuildableReference>
38-
</MacroExpansion>
3930
<Testables>
4031
<TestableReference
4132
skipped = "NO">
@@ -59,15 +50,6 @@
5950
debugDocumentVersioning = "YES"
6051
debugServiceExtension = "internal"
6152
allowLocationSimulation = "YES">
62-
<MacroExpansion>
63-
<BuildableReference
64-
BuildableIdentifier = "primary"
65-
BlueprintIdentifier = "7DDDFB1520839BD700F3426C"
66-
BuildableName = "ConvAPI.framework"
67-
BlueprintName = "ConvAPI"
68-
ReferencedContainer = "container:ConvAPI.xcodeproj">
69-
</BuildableReference>
70-
</MacroExpansion>
7153
</LaunchAction>
7254
<ProfileAction
7355
buildConfiguration = "Release"

ConvAPI.xcworkspace/contents.xcworkspacedata

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.resolved

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// swift-tools-version:5.0
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "ConvAPI",
6+
platforms: [
7+
.iOS(.v10),
8+
],
9+
products: [
10+
.library(name: "ConvAPI", targets: ["ConvAPI"]),
11+
],
12+
dependencies: [
13+
.package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.8.0"),
14+
.package(url: "https://github.com/PromiseKit/Foundation.git", from: "3.0.0"),
15+
],
16+
targets: [
17+
.target(name: "ConvAPI", dependencies: ["PromiseKit", "PMKFoundation"]),
18+
.testTarget(name: "ConvAPITests", dependencies: ["ConvAPI"]),
19+
]
20+
)

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ firstly { () -> Promise<User> in
8282
pod 'ConvAPI'
8383
```
8484

85+
### Swift Package Manager
86+
87+
```swift
88+
.package(url: "https://github.com/ChaosCoder/ConvAPI.git", from: "1.0.0")
89+
```
8590

8691
## Acknowledgments
8792

0 commit comments

Comments
 (0)