Skip to content

Commit

Permalink
Add Package.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
tattn committed Sep 29, 2024
1 parent 4fc346d commit 52146a7
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 8 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.

45 changes: 45 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// swift-tools-version:5.10

import PackageDescription

let package = Package(
name: "SwipeTransition",
platforms: [.iOS(.v14)],
products: [
.library(
name: "SwipeTransition",
targets: ["SwipeTransition"]
),
.library(
name: "AutoSwipeBack",
targets: ["AutoSwipeBack"]
),
.library(
name: "AutoSwipeToDismiss",
targets: ["AutoSwipeToDismiss"]
)
],
targets: [
.target(
name: "SwipeTransition",
dependencies: ["STDelegateProxy"],
path: "Sources/SwipeTransition"
),
.target(
name: "STDelegateProxy",
path: "Sources/DelegateProxy"
),
.target(
name: "AutoSwipeBack",
dependencies: ["SwipeTransition"],
path: "Sources/Automation/AutoSwipeBack",
exclude: ["Info.plist", "AutoSwipeBack.h"]
),
.target(
name: "AutoSwipeToDismiss",
dependencies: ["SwipeTransition"],
path: "Sources/Automation/AutoSwipeToDismiss",
exclude: ["Info.plist", "AutoSwipeToDismiss.h"]
)
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

#import <UIKit/UIKit.h>
#import <objc/runtime.h>
#if SWIFT_PACKAGE
@import SwipeTransition;
#else
#import <SwipeTransition/SwipeTransition-Swift.h>
#endif
#import "UINavigationController+AutoSwipeBack.h"

@implementation UINavigationController (AutoSwipeBack)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

#import <UIKit/UIKit.h>
#import <objc/runtime.h>
#if SWIFT_PACKAGE
@import SwipeTransition;
#else
#import <SwipeTransition/SwipeTransition-Swift.h>
#endif
#import "UINavigationController+AutoSwipeToDismiss.h"

void AutoSwipeToDismiss_SwizzleInstanceMethod(Class class, SEL originalSelector, SEL swizzledSelector) {
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions Sources/SwipeTransition/DelegateProxy.swift
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
//
// DelegateProxyswift
// DelegateProxy.swift
// SwipeTransition
//
// Created by Tatsuya Tanaka on 20171226.
// Copyright © 2017年 tattn. All rights reserved.
//

import Foundation
import UIKit
#if SWIFT_PACKAGE
import STDelegateProxy
#endif

class DelegateProxy<T>: STDelegateProxy {
@nonobjc convenience init(delegates: [T]) {
Expand Down
44 changes: 38 additions & 6 deletions SwipeTransition.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,39 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
066149C32CA92CBF00DFF113 /* DelegateProxy */ = {
isa = PBXGroup;
children = (
066149C42CA92DEE00DFF113 /* include */,
2467A7A01FED4E43007A7AC9 /* DelegateProxy.m */,
);
path = DelegateProxy;
sourceTree = "<group>";
};
066149C42CA92DEE00DFF113 /* include */ = {
isa = PBXGroup;
children = (
2467A79F1FED4DEF007A7AC9 /* DelegateProxy.h */,
);
path = include;
sourceTree = "<group>";
};
066149C52CA92EC200DFF113 /* include */ = {
isa = PBXGroup;
children = (
2467A7D81FEF8ABD007A7AC9 /* UINavigationController+AutoSwipeBack.h */,
);
path = include;
sourceTree = "<group>";
};
066149C62CA92ECA00DFF113 /* include */ = {
isa = PBXGroup;
children = (
2467A8111FEFDA64007A7AC9 /* UINavigationController+AutoSwipeToDismiss.h */,
);
path = include;
sourceTree = "<group>";
};
241A24981FF7375300347055 /* Tests */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -286,6 +319,7 @@
isa = PBXGroup;
children = (
246C0B5B1FF55B170040E6BC /* Automation */,
066149C32CA92CBF00DFF113 /* DelegateProxy */,
246C0B5C1FF55C2A0040E6BC /* SwipeTransition */,
);
path = Sources;
Expand Down Expand Up @@ -329,9 +363,9 @@
2467A7B91FEF7E44007A7AC9 /* AutoSwipeBack */ = {
isa = PBXGroup;
children = (
2467A7BA1FEF7E44007A7AC9 /* AutoSwipeBack.h */,
066149C52CA92EC200DFF113 /* include */,
2467A7BB1FEF7E44007A7AC9 /* Info.plist */,
2467A7D81FEF8ABD007A7AC9 /* UINavigationController+AutoSwipeBack.h */,
2467A7BA1FEF7E44007A7AC9 /* AutoSwipeBack.h */,
2467A7C41FEF7F41007A7AC9 /* UINavigationController+AutoSwipeBack.m */,
);
path = AutoSwipeBack;
Expand All @@ -352,9 +386,9 @@
2467A7FC1FEFDA2B007A7AC9 /* AutoSwipeToDismiss */ = {
isa = PBXGroup;
children = (
2467A7FD1FEFDA2B007A7AC9 /* AutoSwipeToDismiss.h */,
066149C62CA92ECA00DFF113 /* include */,
2467A7FE1FEFDA2B007A7AC9 /* Info.plist */,
2467A8111FEFDA64007A7AC9 /* UINavigationController+AutoSwipeToDismiss.h */,
2467A7FD1FEFDA2B007A7AC9 /* AutoSwipeToDismiss.h */,
2467A8131FEFDA79007A7AC9 /* UINavigationController+AutoSwipeToDismiss.m */,
);
path = AutoSwipeToDismiss;
Expand Down Expand Up @@ -392,8 +426,6 @@
24914076203B39B300D3E4CD /* Context.swift */,
24914078203B475500D3E4CD /* TransitionHandleable.swift */,
241BA6EB1FECC571002E8902 /* InteractiveTransition.swift */,
2467A79F1FED4DEF007A7AC9 /* DelegateProxy.h */,
2467A7A01FED4E43007A7AC9 /* DelegateProxy.m */,
247E68A21FF2348600617B12 /* DelegateProxy.swift */,
2467A7C61FEF8938007A7AC9 /* AssocKey.swift */,
241A87AB2018367C00009390 /* OneFingerDirectionalPanGestureRecognizer.swift */,
Expand Down

0 comments on commit 52146a7

Please sign in to comment.