Skip to content

Commit

Permalink
Add SPM subspecs (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
mats-claassen authored Feb 9, 2021
1 parent 12b5cd2 commit 6de24f2
Show file tree
Hide file tree
Showing 18 changed files with 114 additions and 38 deletions.
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 62 additions & 18 deletions Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
28650D2F1C0DD21A008C1F27 /* TweetbotCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28650D281C0DD21A008C1F27 /* TweetbotCell.xib */; };
28650D301C0DD21A008C1F27 /* TwitterCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28650D291C0DD21A008C1F27 /* TwitterCell.xib */; };
28650D311C0DD21A008C1F27 /* YoutubeCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28650D2A1C0DD21A008C1F27 /* YoutubeCell.xib */; };
28A21F1E1C0E7DEE009FC30F /* ActionData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A21F1D1C0E7DEE009FC30F /* ActionData.swift */; };
28AD9C781C03F34F0044164E /* SkypeExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28AD9C771C03F34F0044164E /* SkypeExampleViewController.swift */; };
28AD9C7D1C04C63D0044164E /* XLActionController.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 28B3B8891BFA858D007337A2 /* XLActionController.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
28B3B85A1BFA7EEC007337A2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28B3B8591BFA7EEC007337A2 /* AppDelegate.swift */; };
Expand Down Expand Up @@ -88,7 +87,6 @@
28650D281C0DD21A008C1F27 /* TweetbotCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TweetbotCell.xib; sourceTree = "<group>"; };
28650D291C0DD21A008C1F27 /* TwitterCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TwitterCell.xib; sourceTree = "<group>"; };
28650D2A1C0DD21A008C1F27 /* YoutubeCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = YoutubeCell.xib; sourceTree = "<group>"; };
28A21F1D1C0E7DEE009FC30F /* ActionData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActionData.swift; sourceTree = "<group>"; };
28AD9C771C03F34F0044164E /* SkypeExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SkypeExampleViewController.swift; sourceTree = "<group>"; };
28B3B8561BFA7EEC007337A2 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
28B3B8591BFA7EEC007337A2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -135,19 +133,12 @@
28650D231C0DD21A008C1F27 /* CustomActionControllers */ = {
isa = PBXGroup;
children = (
28A21F1D1C0E7DEE009FC30F /* ActionData.swift */,
28650D251C0DD21A008C1F27 /* PeriscopeCell.xib */,
B297A9151C0E17AA00AF9559 /* Periscope.swift */,
28650D261C0DD21A008C1F27 /* SkypeCell.xib */,
B297A91A1C0E191600AF9559 /* Skype.swift */,
28650D271C0DD21A008C1F27 /* SpotifyCell.xib */,
B297A91F1C0E193B00AF9559 /* Spotify.swift */,
28650D281C0DD21A008C1F27 /* TweetbotCell.xib */,
B297A9231C0E195F00AF9559 /* Tweetbot.swift */,
28650D291C0DD21A008C1F27 /* TwitterCell.xib */,
B297A9261C0E198200AF9559 /* Twitter.swift */,
28650D2A1C0DD21A008C1F27 /* YoutubeCell.xib */,
B297A9291C0E19A500AF9559 /* Youtube.swift */,
C74DEDAE25D2C27D009A9DFA /* Youtube */,
C74DEDAD25D2C276009A9DFA /* Twitter */,
C74DEDAC25D2C268009A9DFA /* Tweetbot */,
C74DEDAB25D2C25A009A9DFA /* Spotify */,
C74DEDAA25D2C24D009A9DFA /* Skype */,
C74DEDA925D2C241009A9DFA /* Periscope */,
);
path = CustomActionControllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -210,6 +201,60 @@
name = Products;
sourceTree = "<group>";
};
C74DEDA925D2C241009A9DFA /* Periscope */ = {
isa = PBXGroup;
children = (
28650D251C0DD21A008C1F27 /* PeriscopeCell.xib */,
B297A9151C0E17AA00AF9559 /* Periscope.swift */,
);
path = Periscope;
sourceTree = "<group>";
};
C74DEDAA25D2C24D009A9DFA /* Skype */ = {
isa = PBXGroup;
children = (
28650D261C0DD21A008C1F27 /* SkypeCell.xib */,
B297A91A1C0E191600AF9559 /* Skype.swift */,
);
path = Skype;
sourceTree = "<group>";
};
C74DEDAB25D2C25A009A9DFA /* Spotify */ = {
isa = PBXGroup;
children = (
28650D271C0DD21A008C1F27 /* SpotifyCell.xib */,
B297A91F1C0E193B00AF9559 /* Spotify.swift */,
);
path = Spotify;
sourceTree = "<group>";
};
C74DEDAC25D2C268009A9DFA /* Tweetbot */ = {
isa = PBXGroup;
children = (
28650D281C0DD21A008C1F27 /* TweetbotCell.xib */,
B297A9231C0E195F00AF9559 /* Tweetbot.swift */,
);
path = Tweetbot;
sourceTree = "<group>";
};
C74DEDAD25D2C276009A9DFA /* Twitter */ = {
isa = PBXGroup;
children = (
28650D291C0DD21A008C1F27 /* TwitterCell.xib */,
B297A9261C0E198200AF9559 /* Twitter.swift */,
);
path = Twitter;
sourceTree = "<group>";
};
C74DEDAE25D2C27D009A9DFA /* Youtube */ = {
isa = PBXGroup;
children = (
28650D2A1C0DD21A008C1F27 /* YoutubeCell.xib */,
B297A9291C0E19A500AF9559 /* Youtube.swift */,
);
path = Youtube;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -365,7 +410,6 @@
B297A9161C0E17AA00AF9559 /* Periscope.swift in Sources */,
28B3B8801BFA8566007337A2 /* TwitterExampleViewController.swift in Sources */,
28B3B87D1BFA8566007337A2 /* PeriscopeExampleViewController.swift in Sources */,
28A21F1E1C0E7DEE009FC30F /* ActionData.swift in Sources */,
28AD9C781C03F34F0044164E /* SkypeExampleViewController.swift in Sources */,
28B3B85A1BFA7EEC007337A2 /* AppDelegate.swift in Sources */,
B297A91B1C0E191600AF9559 /* Skype.swift in Sources */,
Expand Down Expand Up @@ -536,7 +580,7 @@
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Example/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_SWIFT_FLAGS = "-DXLACTIONCONTROLLER_EXAMPLE";
OTHER_SWIFT_FLAGS = "-DIMPORT_BASE_XLACTIONCONTROLLER";
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -554,7 +598,7 @@
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Example/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_SWIFT_FLAGS = "-DXLACTIONCONTROLLER_EXAMPLE";
OTHER_SWIFT_FLAGS = "-DIMPORT_BASE_XLACTIONCONTROLLER";
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation
#if XLACTIONCONTROLLER_EXAMPLE
import UIKit
#if IMPORT_BASE_XLACTIONCONTROLLER
import XLActionController
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation
#if XLACTIONCONTROLLER_EXAMPLE
import UIKit
#if IMPORT_BASE_XLACTIONCONTROLLER
import XLActionController
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation
#if XLACTIONCONTROLLER_EXAMPLE
import UIKit
#if IMPORT_BASE_XLACTIONCONTROLLER
import XLActionController
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation
#if XLACTIONCONTROLLER_EXAMPLE
import UIKit
#if IMPORT_BASE_XLACTIONCONTROLLER
import XLActionController
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation
#if XLACTIONCONTROLLER_EXAMPLE
import UIKit
#if IMPORT_BASE_XLACTIONCONTROLLER
import XLActionController
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import Foundation
#if XLACTIONCONTROLLER_EXAMPLE
import UIKit
#if IMPORT_BASE_XLACTIONCONTROLLER
import XLActionController
#endif

Expand Down
29 changes: 24 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,37 @@

import PackageDescription

func getExampleTarget(name: String) -> Target {
return .target(name: "XLActionController_" + name,
dependencies: [Target.Dependency.target(name: "XLActionController")],
path: "Example/CustomActionControllers/\(name)",
sources: ["\(name).swift"],
resources: [Resource.process("\(name)Cell.xib")],
swiftSettings: [SwiftSetting.define("IMPORT_BASE_XLACTIONCONTROLLER")])
}

let package = Package(
name: "XLActionController",
platforms: [
.iOS(.v9)
],
products: [
.library(name: "XLActionController", targets: ["XLActionController"])
.library(name: "XLActionController", targets: ["XLActionController"]),
.library(name: "XLActionControllerSkype", targets: ["XLActionController_Skype"]),
.library(name: "XLActionControllerPeriscope", targets: ["XLActionController_Periscope"]),
.library(name: "XLActionControllerSpotify", targets: ["XLActionController_Spotify"]),
.library(name: "XLActionControllerTweetbot", targets: ["XLActionController_Tweetbot"]),
.library(name: "XLActionControllerTwitter", targets: ["XLActionController_Twitter"]),
.library(name: "XLActionControllerYoutube", targets: ["XLActionController_Youtube"])
],
targets: [
.target(
name: "XLActionController",
path: "Source"
)
.target(name: "XLActionController", path: "Source",
resources: [Resource.process("Resource/ActionCell.xib")]),
getExampleTarget(name: "Periscope"),
getExampleTarget(name: "Skype"),
getExampleTarget(name: "Spotify"),
getExampleTarget(name: "Tweetbot"),
getExampleTarget(name: "Twitter"),
getExampleTarget(name: "Youtube"),
]
)
File renamed without changes.
4 changes: 2 additions & 2 deletions XLActionController.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Pod::Spec.new do |spec|
spec.license = 'MIT'
spec.summary = 'Fully customizable and extensible action sheet controller written in Swift'
spec.homepage = 'https://github.com/xmartlabs/XLActionController'
spec.social_media_url = 'http://twitter.com/xmartlabs'
spec.social_media_url = 'https://twitter.com/xmartlabs'
spec.authors = { 'Miguel Revetria' => '[email protected]', 'Martin Barreto' => '[email protected]' }
spec.source = { :git => 'https://github.com/xmartlabs/XLActionController.git', :tag => spec.version }
spec.ios.deployment_target = '9.3'
Expand All @@ -31,7 +31,7 @@ Pod::Spec.new do |spec|
subspecs.each do |name|
spec.subspec name do |subspec|
subspec.dependency 'XLActionController/Core'
subspec.source_files = ["Example/CustomActionControllers/#{name}.swift", "Example/CustomActionControllers/ActionData.swift", "Example/CustomActionControllers/#{name}*.xib"]
subspec.source_files = ["Example/CustomActionControllers/#{name}/#{name}.swift", "Example/CustomActionControllers/#{name}/#{name}*.xib"]
end
end

Expand Down
8 changes: 7 additions & 1 deletion XLActionController.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
28B3B8471BFA668F007337A2 /* Action.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28B3B83C1BFA668F007337A2 /* Action.swift */; };
28B3B84C1BFA6E39007337A2 /* XLActionController.h in Headers */ = {isa = PBXBuildFile; fileRef = 28B3B84B1BFA6E39007337A2 /* XLActionController.h */; settings = {ATTRIBUTES = (Public, ); }; };
28E191721BFA618F00066B1C /* XLActionController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28E191671BFA618E00066B1C /* XLActionController.framework */; };
C74DEDA425D2C060009A9DFA /* ActionData.swift in Sources */ = {isa = PBXBuildFile; fileRef = C74DEDA225D2C060009A9DFA /* ActionData.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -31,7 +32,7 @@
/* Begin PBXFileReference section */
28473B851C109E3F00A8105F /* XLActionControllerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = XLActionControllerTests.swift; path = Tests/XLActionControllerTests.swift; sourceTree = SOURCE_ROOT; };
28B3B8361BFA668F007337A2 /* ActionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ActionCell.swift; path = Source/ActionCell.swift; sourceTree = SOURCE_ROOT; };
28B3B8371BFA668F007337A2 /* ActionCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ActionCell.xib; path = Resource/ActionCell.xib; sourceTree = SOURCE_ROOT; };
28B3B8371BFA668F007337A2 /* ActionCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ActionCell.xib; sourceTree = "<group>"; };
28B3B8381BFA668F007337A2 /* ActionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ActionController.swift; path = Source/ActionController.swift; sourceTree = SOURCE_ROOT; };
28B3B8391BFA668F007337A2 /* ActionControllerSettings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ActionControllerSettings.swift; path = Source/ActionControllerSettings.swift; sourceTree = SOURCE_ROOT; };
28B3B83A1BFA668F007337A2 /* DynamicCollectionViewFlowLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DynamicCollectionViewFlowLayout.swift; path = Source/DynamicCollectionViewFlowLayout.swift; sourceTree = SOURCE_ROOT; };
Expand All @@ -41,6 +42,8 @@
28E1916C1BFA618F00066B1C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
28E191711BFA618F00066B1C /* XLActionControllerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XLActionControllerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
28E191781BFA618F00066B1C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C74DED9925D2B82A009A9DFA /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
C74DEDA225D2C060009A9DFA /* ActionData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActionData.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -65,6 +68,7 @@
28E1915D1BFA618E00066B1C = {
isa = PBXGroup;
children = (
C74DED9925D2B82A009A9DFA /* Package.swift */,
EA2CFE281FBD2FBB00CAE00E /* Resource */,
28E191691BFA618E00066B1C /* Source */,
28E191751BFA618F00066B1C /* Tests */,
Expand All @@ -84,6 +88,7 @@
28E191691BFA618E00066B1C /* Source */ = {
isa = PBXGroup;
children = (
C74DEDA225D2C060009A9DFA /* ActionData.swift */,
28B3B84B1BFA6E39007337A2 /* XLActionController.h */,
28B3B8361BFA668F007337A2 /* ActionCell.swift */,
28B3B8381BFA668F007337A2 /* ActionController.swift */,
Expand Down Expand Up @@ -227,6 +232,7 @@
28B3B8471BFA668F007337A2 /* Action.swift in Sources */,
28B3B8451BFA668F007337A2 /* DynamicCollectionViewFlowLayout.swift in Sources */,
28B3B8411BFA668F007337A2 /* ActionCell.swift in Sources */,
C74DEDA425D2C060009A9DFA /* ActionData.swift in Sources */,
28B3B8441BFA668F007337A2 /* ActionControllerSettings.swift in Sources */,
28B3B8431BFA668F007337A2 /* ActionController.swift in Sources */,
);
Expand Down

0 comments on commit 6de24f2

Please sign in to comment.