Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPM support added #72

Merged
merged 6 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Utils/fastlane/Provisioning
Utils/fastlane/Build
Utils/fastlane/report.xml
Utils/buildData
.swiftpm
.DS_Store

# Bundler
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- cd Utils
- make init
- xcodebuild test -scheme Utils -workspace Utils.xcworkspace/ -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO -enableCodeCoverage YES -destination 'platform=iOS Simulator,name=iPhone 8,OS=12.2' | xcpretty -c
- swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios12.1-simulator" -Xswiftc "-lswiftUIKit"
- stage: Pod Lib Lint
name: Pod Lib Lint
script:
Expand Down
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": "CryptoSwift",
"repositoryURL": "https://github.com/krzyzanowskim/CryptoSwift",
"state": {
"branch": null,
"revision": "39f08ac5269361a50c08ce1e2f41989bfc4b1ec8",
"version": "1.3.1"
}
},
{
"package": "Device",
"repositoryURL": "https://github.com/Alelenka/Device",
"state": {
"branch": "spm-support",
"revision": "df290adc142a10ef73a9b62e9f03e54d1f2f62ee",
"version": null
}
}
]
},
"version": 1
}
44 changes: 44 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Utils",
platforms: [.iOS(.v11)],
products: [
.library(
name: "Utils",
targets: ["Utils"]),
],
dependencies: [
.package(
name: "CryptoSwift",
url: "https://github.com/krzyzanowskim/CryptoSwift",
.exact("1.3.1")
),
.package(
name: "Device",
url: "https://github.com/Alelenka/Device",
.branch("spm-support")
),
],
targets: [
.target(
name: "Utils",
dependencies: ["CryptoSwift", "Device"],
path: "Utils/Utils",
exclude: [
"Info.plist"
]
),
.testTarget(
name: "UtilsTests",
dependencies: ["Utils"],
path: "Utils/UtilsTests",
exclude: [
"Info.plist"
]
)
]
)
2 changes: 1 addition & 1 deletion SurfUtils.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "SurfUtils"
s.version = "11.0.0"
s.version = "11.1.0"
s.summary = "Contains a set of utils in subspecs"
s.description = <<-DESC
Contains:
Expand Down
5 changes: 5 additions & 0 deletions Utils/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
1 change: 1 addition & 0 deletions Utils/Utils/BrightSide/BrightSide.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import UIKit

public final class BrightSide {

Expand Down
1 change: 1 addition & 0 deletions Utils/Utils/LoadingView/LoadingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import UIKit

public protocol LoadingView: UIView {
func setNeedAnimating(_ needAnimating: Bool)
Expand Down
3 changes: 3 additions & 0 deletions Utils/Utils/LocalStorage/LocalStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
// Copyright © 2019 Surf. All rights reserved.
//

import Foundation
import UIKit

/// Local storage based on filemanager uses cache directory
final public class LocalStorage {

Expand Down
2 changes: 2 additions & 0 deletions Utils/Utils/OTPField/DigitFieldStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2019 Surf. All rights reserved.
//

import UIKit

public struct DigitFieldStyle {
public let font: UIFont
public let activeTextColor: UIColor
Expand Down
2 changes: 2 additions & 0 deletions Utils/Utils/OTPField/OTPFieldStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2019 Surf. All rights reserved.
//

import UIKit

public struct OTPFieldStyle {
public let digitStyle: DigitFieldStyle
public let errorTextColor: UIColor
Expand Down
1 change: 1 addition & 0 deletions Utils/Utils/SettingsRouter/SettingsRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import UIKit

/// Utils for opening various settings screens from the application
public final class SettingsRouter {
Expand Down
1 change: 1 addition & 0 deletions Utils/Utils/UIDevice/UIDevice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Device
import UIKit

public extension UIDevice {

Expand Down
1 change: 1 addition & 0 deletions Utils/Utils/UIImage/UIImage+badgedImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import Foundation
import UIKit

public extension UIImage {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
// Copyright © 2018 Surf. All rights reserved.
//

import Foundation
import UIKit

extension UIDevice {
enum FeedbackType: Int {
case base = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2018 Surf. All rights reserved.
//

import UIKit

extension UIDevice {
// haptic feedback support guarantees that device supports taptic engine too.
var hasHapticFeedback: Bool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2018 Surf. All rights reserved.
//

import UIKit

extension UIDevice {
var hasTapticEngine: Bool {
return feedbackType == .taptic || hasHapticFeedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
//

import AudioToolbox
import Foundation
import UIKit

/**
*
Expand Down