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

Added Swift Package Manager support #904

Merged
merged 1 commit into from
Jun 17, 2020
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ DerivedData
# Bundler
.bundle

# Swift Package Manager
.build
.swiftpm

Carthage

# CocoaPods typically recommends against ignoring the Pods directory
Expand Down
4 changes: 2 additions & 2 deletions Analytics.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Analytics"
s.version = "4.0.0-beta.1"
s.version = "4.0.0-beta.2"
s.summary = "The hassle-free way to add analytics to your iOS app."

s.description = <<-DESC
Expand All @@ -22,6 +22,6 @@ Pod::Spec.new do |s|

s.source_files = [
'Analytics/Classes/**/*',
'Analytics/Vendor/**/*'
'Analytics/Internal/**/*'
]
end
83 changes: 25 additions & 58 deletions Analytics.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,6 @@
name = Frameworks;
sourceTree = "<group>";
};
EAA5427A1EB42B8C00945DA7 /* Vendor */ = {
isa = PBXGroup;
children = (
EAA5427B1EB42B8C00945DA7 /* SEGReachability.h */,
EAA5427C1EB42B8C00945DA7 /* SEGReachability.m */,
);
name = Vendor;
path = Analytics/Vendor;
sourceTree = SOURCE_ROOT;
};
EADEB8511DECD080005322DA = {
isa = PBXGroup;
children = (
Expand All @@ -292,8 +282,8 @@
isa = PBXGroup;
children = (
EADEB8751DECD12B005322DA /* Classes */,
EADEB85E1DECD080005322DA /* Analytics.h */,
EADEB85F1DECD080005322DA /* Info.plist */,
EADEB88C1DECD12B005322DA /* Internal */,
);
path = Analytics;
sourceTree = "<group>";
Expand Down Expand Up @@ -329,94 +319,71 @@
EADEB8751DECD12B005322DA /* Classes */ = {
isa = PBXGroup;
children = (
EAA5427A1EB42B8C00945DA7 /* Vendor */,
EADEB8771DECD12B005322DA /* Crypto */,
EADEB87B1DECD12B005322DA /* Integrations */,
EADEB88C1DECD12B005322DA /* Internal */,
EADEB8A41DECD12B005322DA /* Middlewares */,
EA88A5971DED7608009FB66A /* SEGSerializableValue.h */,
EADEB85E1DECD080005322DA /* Analytics.h */,
EADEB87C1DECD12B005322DA /* SEGAliasPayload.h */,
EADEB87D1DECD12B005322DA /* SEGAliasPayload.m */,
EADEB8A91DECD12B005322DA /* SEGAnalytics.h */,
EADEB8AA1DECD12B005322DA /* SEGAnalytics.m */,
EADEB8AB1DECD12B005322DA /* SEGAnalyticsConfiguration.h */,
EADEB8AC1DECD12B005322DA /* SEGAnalyticsConfiguration.m */,
);
path = Classes;
sourceTree = "<group>";
};
EADEB8771DECD12B005322DA /* Crypto */ = {
isa = PBXGroup;
children = (
EADEB8781DECD12B005322DA /* SEGAES256Crypto.h */,
EADEB8791DECD12B005322DA /* SEGAES256Crypto.m */,
EADEB8A51DECD12B005322DA /* SEGContext.h */,
EADEB8A61DECD12B005322DA /* SEGContext.m */,
EADEB87A1DECD12B005322DA /* SEGCrypto.h */,
);
path = Crypto;
sourceTree = "<group>";
};
EADEB87B1DECD12B005322DA /* Integrations */ = {
isa = PBXGroup;
children = (
EADEB87C1DECD12B005322DA /* SEGAliasPayload.h */,
EADEB87D1DECD12B005322DA /* SEGAliasPayload.m */,
EADEB87E1DECD12B005322DA /* SEGGroupPayload.h */,
EADEB87F1DECD12B005322DA /* SEGGroupPayload.m */,
EADEB8931DECD12B005322DA /* SEGHTTPClient.h */,
EADEB8941DECD12B005322DA /* SEGHTTPClient.m */,
EADEB8801DECD12B005322DA /* SEGIdentifyPayload.h */,
EADEB8811DECD12B005322DA /* SEGIdentifyPayload.m */,
EADEB8821DECD12B005322DA /* SEGIntegration.h */,
EADEB8831DECD12B005322DA /* SEGIntegrationFactory.h */,
EADEB8841DECD12B005322DA /* SEGIntegrationsManager.h */,
EADEB8851DECD12B005322DA /* SEGIntegrationsManager.m */,
EADEB8A71DECD12B005322DA /* SEGMiddleware.h */,
EADEB8A81DECD12B005322DA /* SEGMiddleware.m */,
EADEB8861DECD12B005322DA /* SEGPayload.h */,
EADEB8871DECD12B005322DA /* SEGPayload.m */,
EAA5427B1EB42B8C00945DA7 /* SEGReachability.h */,
EAA5427C1EB42B8C00945DA7 /* SEGReachability.m */,
EADEB8881DECD12B005322DA /* SEGScreenPayload.h */,
EADEB8891DECD12B005322DA /* SEGScreenPayload.m */,
5AF0EDFEDC0EE79A0A0EB713 /* SEGScreenReporting.h */,
EADEB8971DECD12B005322DA /* SEGSegmentIntegration.h */,
EADEB8981DECD12B005322DA /* SEGSegmentIntegration.m */,
EADEB8991DECD12B005322DA /* SEGSegmentIntegrationFactory.h */,
EADEB89A1DECD12B005322DA /* SEGSegmentIntegrationFactory.m */,
EA88A5971DED7608009FB66A /* SEGSerializableValue.h */,
EADEB89B1DECD12B005322DA /* SEGStorage.h */,
EADEB88A1DECD12B005322DA /* SEGTrackPayload.h */,
EADEB88B1DECD12B005322DA /* SEGTrackPayload.m */,
);
path = Integrations;
path = Classes;
sourceTree = "<group>";
};
EADEB88C1DECD12B005322DA /* Internal */ = {
isa = PBXGroup;
children = (
EADEB88D1DECD12B005322DA /* NSData+SEGGZIP.h */,
EADEB88E1DECD12B005322DA /* NSData+SEGGZIP.m */,
EADEB8781DECD12B005322DA /* SEGAES256Crypto.h */,
EADEB8791DECD12B005322DA /* SEGAES256Crypto.m */,
EADEB88F1DECD12B005322DA /* SEGAnalyticsUtils.h */,
EADEB8901DECD12B005322DA /* SEGAnalyticsUtils.m */,
EADEB8911DECD12B005322DA /* SEGFileStorage.h */,
EADEB8921DECD12B005322DA /* SEGFileStorage.m */,
EADEB8931DECD12B005322DA /* SEGHTTPClient.h */,
EADEB8941DECD12B005322DA /* SEGHTTPClient.m */,
EADEB8971DECD12B005322DA /* SEGSegmentIntegration.h */,
EADEB8981DECD12B005322DA /* SEGSegmentIntegration.m */,
EADEB8991DECD12B005322DA /* SEGSegmentIntegrationFactory.h */,
EADEB89A1DECD12B005322DA /* SEGSegmentIntegrationFactory.m */,
EADEB89B1DECD12B005322DA /* SEGStorage.h */,
EADEB8841DECD12B005322DA /* SEGIntegrationsManager.h */,
EADEB8851DECD12B005322DA /* SEGIntegrationsManager.m */,
A352175F23AD5825005B07F6 /* SEGMacros.h */,
EADEB89C1DECD12B005322DA /* SEGStoreKitTracker.h */,
EADEB89D1DECD12B005322DA /* SEGStoreKitTracker.m */,
EADEB89E1DECD12B005322DA /* SEGUserDefaultsStorage.h */,
EADEB89F1DECD12B005322DA /* SEGUserDefaultsStorage.m */,
EADEB8A01DECD12B005322DA /* SEGUtils.h */,
EADEB8A11DECD12B005322DA /* SEGUtils.m */,
A352175F23AD5825005B07F6 /* SEGMacros.h */,
EADEB8A21DECD12B005322DA /* UIViewController+SEGScreen.h */,
EADEB8A31DECD12B005322DA /* UIViewController+SEGScreen.m */,
5AF0EDFEDC0EE79A0A0EB713 /* SEGScreenReporting.h */,
);
path = Internal;
sourceTree = "<group>";
};
EADEB8A41DECD12B005322DA /* Middlewares */ = {
isa = PBXGroup;
children = (
EADEB8A51DECD12B005322DA /* SEGContext.h */,
EADEB8A61DECD12B005322DA /* SEGContext.m */,
EADEB8A71DECD12B005322DA /* SEGMiddleware.h */,
EADEB8A81DECD12B005322DA /* SEGMiddleware.m */,
);
path = Middlewares;
sourceTree = "<group>";
};
EADEB8E11DECD335005322DA /* Utils */ = {
isa = PBXGroup;
children = (
Expand Down
Empty file removed Analytics/Classes/.gitkeep
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion Analytics/Classes/SEGAnalytics.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#import "SEGMiddleware.h"
#import "SEGContext.h"
#import "SEGIntegrationsManager.h"
#import "Internal/SEGUtils.h"
#import "SEGUtils.h"

static SEGAnalytics *__sharedInstance = nil;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import <Foundation/Foundation.h>
#import <Analytics/SEGSerializableValue.h>
#import "SEGSerializableValue.h"

NS_ASSUME_NONNULL_BEGIN

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 34 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "Analytics",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "Analytics",
type: .dynamic,
targets: ["Analytics"]),
],
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: "Analytics",
dependencies: [],
path: "Analytics/",
exclude: ["SwiftSources"],
sources: ["Classes", "Internal"],
publicHeadersPath: "Classes",
cSettings: [
.headerSearchPath("Internal"),
.headerSearchPath("Classes"),
]),
]
)