Skip to content

Commit

Permalink
Merge pull request #19 from infinum/chore/spm-support
Browse files Browse the repository at this point in the history
Add SPM Support
  • Loading branch information
Dejan Skledar authored Aug 4, 2022
2 parents e62de8c + c6c49df commit 9dee530
Show file tree
Hide file tree
Showing 40 changed files with 203 additions and 79 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.

16 changes: 8 additions & 8 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
PODS:
- Sentinel (1.0.0):
- Sentinel/Default (= 1.0.0)
- Sentinel/Core (1.0.0)
- Sentinel/CustomLocation (1.0.0):
- Sentinel (1.1.1):
- Sentinel/Default (= 1.1.1)
- Sentinel/Core (1.1.1)
- Sentinel/CustomLocation (1.1.1):
- Sentinel/Core
- Sentinel/Default (1.0.0):
- Sentinel/Default (1.1.1):
- Sentinel/Core
- Sentinel/CustomLocation
- Sentinel/TextEditing
- Sentinel/UserDefaults
- Sentinel/TextEditing (1.0.0):
- Sentinel/TextEditing (1.1.1):
- Sentinel/Core
- Sentinel/UserDefaults (1.0.0):
- Sentinel/UserDefaults (1.1.1):
- Sentinel/Core

DEPENDENCIES:
Expand All @@ -22,7 +22,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
Sentinel: 2805e6de525f8c38d828045aea0c3acd24ca487d
Sentinel: 620185762371cdd6615c4f5e21519dfa3a9ad3fd

PODFILE CHECKSUM: b1ea13fb80f56c4238650f0da0299d23734a6421

Expand Down
4 changes: 2 additions & 2 deletions Example/Pods/Local Podspecs/Sentinel.podspec.json

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

16 changes: 8 additions & 8 deletions Example/Pods/Manifest.lock

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

4 changes: 2 additions & 2 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

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

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

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

25 changes: 25 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"object": {
"pins": [
{
"package": "Collar",
"repositoryURL": "https://github.com/infinum/ios-collar.git",
"state": {
"branch": null,
"revision": "f3c483ee7721146e4f846eb8d494542e5337c624",
"version": "1.0.3"
}
},
{
"package": "Loggie",
"repositoryURL": "https://github.com/infinum/iOS-Loggie.git",
"state": {
"branch": null,
"revision": "52180de1deabc66fda6e974dcf335e10e0f86036",
"version": "2.3.3"
}
}
]
},
"version": 1
}
53 changes: 53 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Sentinel",
platforms: [
.iOS(.v11)
],
products: [
.library(
name: "Sentinel",
targets: ["Sentinel"]
),
.library(
name: "SentinelLoggie",
targets: ["SentinelLoggie"]
),
.library(
name: "SentinelCollar",
targets: ["SentinelCollar"]
)
],
dependencies: [
.package(name: "Loggie", url: "https://github.com/infinum/iOS-Loggie.git", .upToNextMajor(from: "2.3.3")),
.package(name: "Collar", url: "https://github.com/infinum/ios-collar.git", .upToNextMajor(from: "1.0.3"))
],
targets: [
.target(
name: "Sentinel",
dependencies: [],
path: "Sentinel",
exclude: [
"Classes/Loggie/LoggieTool.swift",
"Classes/Collar/CollarTool.swift"
],
resources: [
.process("Assets")
]
),
.target(
name: "SentinelLoggie",
dependencies: ["Sentinel", "Loggie"],
path: "Sentinel/Classes/Loggie"
),
.target(
name: "SentinelCollar",
dependencies: ["Sentinel", "Collar"],
path: "Sentinel/Classes/Collar"
)
]
)
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,25 @@ To run the example project, clone the repo, and run `pod install` from the Examp

## Installation

### CocoaPods

Sentinel is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'Sentinel'
```

### Swift Package Manager

If you are using SPM for your dependency manager, add this to the dependencies in your `Package.swift` file:

```swift
dependencies: [
.package(url: "https://github.com/infinum/ios-sentinel.git")
]
```

## Usage

### Features
Expand Down
2 changes: 1 addition & 1 deletion Sentinel.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'Sentinel'
s.version = '1.1.0'
s.version = '1.1.1'
s.summary = 'Developer\'s toolbox for debugging applications'

s.description = <<-DESC
Expand Down
3 changes: 3 additions & 0 deletions Sentinel/Classes/Collar/CollarTool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
//

import UIKit
#if SWIFT_PACKAGE
import Sentinel
#endif
import Collar

public class CollarTool: Tool {
Expand Down
2 changes: 1 addition & 1 deletion Sentinel/Classes/Core/CustomInfoTool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Vlaho Poluta on 30/07/2020.
//

import Foundation
import UIKit

@objcMembers
public class CustomInfoTool: NSObject, Tool {
Expand Down
10 changes: 5 additions & 5 deletions Sentinel/Classes/Core/Internal/Sentinel.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Sdy-Ei-cBG">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Sdy-Ei-cBG">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment version="4096" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
<deployment version="4368" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand All @@ -28,7 +28,7 @@
<!--Sentinel Table View Controller-->
<scene sceneID="FDi-AI-Vt5">
<objects>
<viewController storyboardIdentifier="SentinelTableViewController" id="rmC-9c-kFK" customClass="SentinelTableViewController" customModule="Sentinel" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="SentinelTableViewController" id="rmC-9c-kFK" customClass="SentinelTableViewController" customModule="Sentinel" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="aU9-Yk-LHE">
<rect key="frame" x="0.0" y="0.0" width="414" height="808"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand Down Expand Up @@ -63,7 +63,7 @@
<!--Sentinel Tab Bar Controller-->
<scene sceneID="B2D-lr-0y9">
<objects>
<tabBarController storyboardIdentifier="SentinelTabBarController" id="n1S-5p-dpw" customClass="SentinelTabBarController" customModule="Sentinel" customModuleProvider="target" sceneMemberID="viewController">
<tabBarController storyboardIdentifier="SentinelTabBarController" id="n1S-5p-dpw" customClass="SentinelTabBarController" customModule="Sentinel" sceneMemberID="viewController">
<navigationItem key="navigationItem" id="HPj-di-FwW">
<barButtonItem key="rightBarButtonItem" systemItem="done" id="aCt-BR-H3G">
<connections>
Expand Down
1 change: 0 additions & 1 deletion Sentinel/Classes/Core/Internal/SentinelInternal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// Created by Vlaho Poluta on 30/07/2020.
//

import Foundation
import UIKit

extension Sentinel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Zvonimir Medak on 28.09.2021..
//

import Foundation
import UIKit

final class SentinelTabBarController: UITabBarController {

Expand Down
8 changes: 7 additions & 1 deletion Sentinel/Classes/Core/Internal/SentinelUIKitExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
import UIKit

extension Bundle {
static var sentinel: Bundle { Bundle(for: Sentinel.self) }
static var sentinel: Bundle {
#if SWIFT_PACKAGE
.module
#else
Bundle(for: Sentinel.self)
#endif
}
}

extension UIStoryboard {
Expand Down
2 changes: 1 addition & 1 deletion Sentinel/Classes/Core/Internal/UIImage+Assets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Zvonimir Medak on 15.11.2021..
//

import Foundation
import UIKit

extension UIImage {
enum SentinelImages{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Nikola Majcen on 18/11/2020.
//

import Foundation
import UIKit

class PerformanceInfoItem: NSObject {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17126"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="PerformanceInfoTableViewCell" id="NUF-bl-auo" customClass="PerformanceInfoTableViewCell" customModule="ToolBox" customModuleProvider="target">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="PerformanceInfoTableViewCell" id="NUF-bl-auo" customClass="PerformanceInfoTableViewCell" customModule="Sentinel">
<rect key="frame" x="0.0" y="0.0" width="414" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="NUF-bl-auo" id="2WE-a2-yhl">
Expand Down
10 changes: 5 additions & 5 deletions Sentinel/Classes/Core/PerformanceInfo/PerformanceInfo.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand All @@ -12,7 +12,7 @@
<!--Performance Info View Controller-->
<scene sceneID="pfq-In-raC">
<objects>
<viewController storyboardIdentifier="PerformanceInfoViewController" id="PQf-hC-S7N" customClass="PerformanceInfoViewController" customModule="ToolBox" customModuleProvider="target" sceneMemberID="viewController">
<viewController storyboardIdentifier="PerformanceInfoViewController" id="PQf-hC-S7N" customClass="PerformanceInfoViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="V6M-Il-AHB">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand All @@ -21,8 +21,8 @@
<rect key="frame" x="0.0" y="44" width="414" height="852"/>
<color key="backgroundColor" systemColor="systemGroupedBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="PerformanceInfoTableViewCell" id="unY-ZM-oPM" customClass="PerformanceInfoTableViewCell" customModule="ToolBox" customModuleProvider="target">
<rect key="frame" x="0.0" y="55.5" width="414" height="43"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="PerformanceInfoTableViewCell" id="unY-ZM-oPM" customClass="PerformanceInfoTableViewCell" customModule="Sentinel">
<rect key="frame" x="0.0" y="49.5" width="414" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="unY-ZM-oPM" id="e1p-K7-kYu">
<rect key="frame" x="0.0" y="0.0" width="414" height="43"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Nikola Majcen on 02/10/2020.
//

import Foundation
import UIKit

/// Provides option to change enabled state of the feature.
@objcMembers
Expand Down
Loading

0 comments on commit 9dee530

Please sign in to comment.