Skip to content

Commit

Permalink
Setup SPM for distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
antranapp committed Dec 8, 2020
1 parent 42347eb commit 21b3df1
Show file tree
Hide file tree
Showing 16 changed files with 75 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
uses: actions/checkout@master
- name: Build and test
run: |
xcodebuild clean test -project LeakDetectorDemo.xcodeproj -scheme LeakDetectorDemo -destination "${destination}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO
xcodebuild clean test -workspace LeakDetectorDemo.xcworkspace -scheme LeakDetectorDemo -destination "${destination}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO
env:
destination: ${{ matrix.destination }}
5 changes: 0 additions & 5 deletions LeakDetector/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions LeakDetector/README.md

This file was deleted.

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "RxSwift",
"repositoryURL": "https://github.com/ReactiveX/RxSwift",
"state": {
"branch": null,
"revision": "002d325b0bdee94e7882e1114af5ff4fe1e96afa",
"version": "5.1.1"
}
}
]
},
"version": 1
}
2 changes: 0 additions & 2 deletions LeakDetectorDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
D6FEB034255EBDE3009B2235 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
D6FEB037255EBDE3009B2235 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
D6FEB039255EBDE3009B2235 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D6FEB040255EBDFE009B2235 /* LeakDetector */ = {isa = PBXFileReference; lastKnownFileType = folder; path = LeakDetector; sourceTree = "<group>"; };
D6FEB047255EBF50009B2235 /* DelegateViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DelegateViewController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -297,7 +296,6 @@
isa = PBXGroup;
children = (
7F4F1C6F2562126900A90DA8 /* README.md */,
D6FEB040255EBDFE009B2235 /* LeakDetector */,
D6FEB02A255EBDE1009B2235 /* LeakDetectorDemo */,
7F4F1C4E2561726C00A90DA8 /* LeakDetectorDemoUITests */,
D6FEB029255EBDE1009B2235 /* Products */,
Expand Down
10 changes: 10 additions & 0 deletions LeakDetectorDemo.xcworkspace/contents.xcworkspacedata

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
16 changes: 16 additions & 0 deletions LeakDetectorDemo.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "RxSwift",
"repositoryURL": "https://github.com/ReactiveX/RxSwift",
"state": {
"branch": null,
"revision": "002d325b0bdee94e7882e1114af5ff4fe1e96afa",
"version": "5.1.1"
}
}
]
},
"version": 1
}
File renamed without changes.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# LeakDetector


## Introduction

This is a demo project for the [LeakDetector](https://github.com/antranapp/LeakDetectorCombine/tree/main/LeakDetector) package.
`LeakDetector` is based on the implementation from [leakdetector](https://github.com/duyquang91/leakdetector) packge, which in turn is derived from the implementation of a leak detecktor in [UBER's RIB](https://github.com/uber/RIBs/tree/master/ios/RIBs/Classes/LeakDetector) framework.

Instead of depending on `RxSwift`, `LeakDetectorCombine` uses `Combine` framework instead, hence it only supports iOS 13+.

I accidently found another implementation of this `LeakDetector` from [LifeCycleKit](https://github.com/ashare80/LifecycleKit) which shares many similar ideas. The implementation in `LifeCycleKit` has much nicer APIs though. So I recommend you to take a look at the implementation of the `LeakDetector` in `LifeCycleKit` as well.

## Demo

There is a demo project to demostrate different use cases of the library.

![demo](./Docs/demo.gif)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 21b3df1

Please sign in to comment.