Skip to content
Open
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 @@ -5,6 +5,7 @@
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
.build/
build/
DerivedData

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 1.3.0

- Added: Swift Package Manager support

## 1.2.2

- **Added**: iPad 11 Inch
Expand Down
4 changes: 2 additions & 2 deletions Device.swift.podspec
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Pod::Spec.new do |s|
s.name = 'Device.swift'
s.version = '1.2.2'
s.version = '1.3.0'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.summary = 'Super-lightweight library to detect used device'
s.homepage = 'https://github.com/schickling/Device.swift'
s.source = { :git => 'https://github.com/schickling/Device.swift.git', :tag => s.version.to_s }

s.source_files = 'Device/**/*.{swift}'
s.source_files = 'Source/Device/**/*.{swift}'
s.ios.deployment_target = '8.0'
s.frameworks = 'UIKit'
s.requires_arc = true
Expand Down
15 changes: 9 additions & 6 deletions Device.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
8FBDE8AF1B5CFC1300C78486 /* UIDeviceExtension.swift */,
8FBDE89A1B5CFA1B00C78486 /* Info.plist */,
);
path = Device;
name = Device;
path = Sources/Device;
sourceTree = "<group>";
};
8FBDE8A31B5CFA1C00C78486 /* DeviceTests */ = {
Expand All @@ -86,7 +87,8 @@
8FBDE8A41B5CFA1C00C78486 /* DeviceTests.swift */,
8FBDE8A61B5CFA1C00C78486 /* Info.plist */,
);
path = DeviceTests;
name = DeviceTests;
path = Tests/DeviceTests;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand Down Expand Up @@ -163,6 +165,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 8FBDE88B1B5CFA1B00C78486;
Expand Down Expand Up @@ -343,7 +346,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Device/Info.plist;
INFOPLIST_FILE = Sources/Device/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = schickling.Device;
Expand All @@ -364,7 +367,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Device/Info.plist;
INFOPLIST_FILE = Sources/Device/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = schickling.Device;
Expand All @@ -377,7 +380,7 @@
8FBDE8AD1B5CFA1C00C78486 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = DeviceTests/Info.plist;
INFOPLIST_FILE = Tests/DeviceTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = schickling.DeviceTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -388,7 +391,7 @@
8FBDE8AE1B5CFA1C00C78486 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = DeviceTests/Info.plist;
INFOPLIST_FILE = Tests/DeviceTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = schickling.DeviceTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
28 changes: 28 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Device.swift",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "Device.swift",
targets: ["Device"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "Device",
dependencies: []),
.testTarget(
name: "DeviceTests",
dependencies: ["Device"]),
]
)
File renamed without changes.
4 changes: 3 additions & 1 deletion Device/Info.plist → Sources/Device/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.2.2</string>
<string>1.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
<key>LSApplicationCategoryType</key>
<string></string>
</dict>
</plist>
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import XCTest

import analytics_iosTests

var tests = [XCTestCaseEntry]()
tests += analytics_iosTests.allTests()
XCTMain(tests)