Skip to content

Commit

Permalink
fix: SPM 无法通过 exact version 集成 (#269)
Browse files Browse the repository at this point in the history
* chore: update Package.swift

* chore: import foundation in GrowingNetworkConfig

* style: code format

---------

Co-authored-by: runner <[email protected]>
  • Loading branch information
YoloMao and runner authored Jun 16, 2023
1 parent 93ecd44 commit c007055
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 47 deletions.
2 changes: 2 additions & 0 deletions GrowingTrackerCore/Network/Request/GrowingNetworkConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#ifndef GrowingConstApi_h
#define GrowingConstApi_h

#import <Foundation/Foundation.h>

#define kGrowingEventApiTemplate @"v3/projects/%@/collect?stm=%llu"

#endif /* GrowingConstApi_h */
Expand Down
94 changes: 47 additions & 47 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,26 @@ let package = Package(
.library(
name: "GrowingModule_APM",
targets: ["GrowingModule_APM"]
),
)
],
dependencies: [
.package(
url: "https://github.com/growingio/growingio-sdk-ios-utilities.git",
exact: "0.0.5"
"0.0.5" ..< "1.0.0"
),
.package(
url: "https://github.com/growingio/growingio-sdk-ios-performance-ext.git",
branch: "master"
"0.0.14" ..< "1.0.0"
),
.package(
url: "https://github.com/apple/swift-protobuf.git",
from: "1.21.0"
),
)
],
targets: [

// MARK: - GrowingAnalytics Wrapper

.target(
name: "GrowingAutotracker_cdp_Wrapper",
dependencies: [
Expand All @@ -101,7 +101,7 @@ let package = Package(
"GrowingModule_DefaultServices",
.target(name: "GrowingModule_Hybrid", condition: .when(platforms: [.iOS, .macCatalyst])),
.target(name: "GrowingModule_MobileDebugger", condition: .when(platforms: [.iOS])),
.target(name: "GrowingModule_WebCircle", condition: .when(platforms: [.iOS])),
.target(name: "GrowingModule_WebCircle", condition: .when(platforms: [.iOS]))
],
path: "SwiftPM-Wrap/GrowingAutotracker-cdp-Wrapper"
),
Expand All @@ -111,7 +111,7 @@ let package = Package(
"GrowingTracker_cdp",
"GrowingUserIdentifier",
"GrowingModule_DefaultServices",
.target(name: "GrowingModule_MobileDebugger", condition: .when(platforms: [.iOS])),
.target(name: "GrowingModule_MobileDebugger", condition: .when(platforms: [.iOS]))
],
path: "SwiftPM-Wrap/GrowingTracker-cdp-Wrapper"
),
Expand All @@ -123,7 +123,7 @@ let package = Package(
"GrowingModule_DefaultServices",
.target(name: "GrowingModule_Hybrid", condition: .when(platforms: [.iOS, .macCatalyst])),
.target(name: "GrowingModule_MobileDebugger", condition: .when(platforms: [.iOS])),
.target(name: "GrowingModule_WebCircle", condition: .when(platforms: [.iOS])),
.target(name: "GrowingModule_WebCircle", condition: .when(platforms: [.iOS]))
],
path: "SwiftPM-Wrap/GrowingAutotracker-Wrapper"
),
Expand All @@ -133,13 +133,13 @@ let package = Package(
"GrowingTracker",
"GrowingUserIdentifier",
"GrowingModule_DefaultServices",
.target(name: "GrowingModule_MobileDebugger", condition: .when(platforms: [.iOS])),
.target(name: "GrowingModule_MobileDebugger", condition: .when(platforms: [.iOS]))
],
path: "SwiftPM-Wrap/GrowingTracker-Wrapper"
),

// MARK: - GrowingAnalytics Public API

.target(
name: "GrowingAutotracker_cdp",
dependencies: [
Expand All @@ -148,7 +148,7 @@ let package = Package(
path: "GrowingAutotracker-cdp",
publicHeadersPath: ".",
cSettings: [
.headerSearchPath(".."),
.headerSearchPath("..")
]
),
.target(
Expand All @@ -157,7 +157,7 @@ let package = Package(
path: "GrowingTracker-cdp",
publicHeadersPath: ".",
cSettings: [
.headerSearchPath(".."),
.headerSearchPath("..")
]
),
.target(
Expand All @@ -166,7 +166,7 @@ let package = Package(
path: "GrowingAutotracker",
publicHeadersPath: ".",
cSettings: [
.headerSearchPath(".."),
.headerSearchPath("..")
]
),
.target(
Expand All @@ -175,20 +175,20 @@ let package = Package(
path: "GrowingTracker",
publicHeadersPath: ".",
cSettings: [
.headerSearchPath(".."),
.headerSearchPath("..")
]
),

// MARK: - GrowingAnalytics Core

.target(
name: "GrowingUserIdentifier",
dependencies: [],
path: "GrowingTrackerCore/Utils/UserIdentifier",
exclude: ["GrowingUserIdentifier_NoIDFA.m"],
publicHeadersPath: ".",
cSettings: [
.headerSearchPath("../../.."),
.headerSearchPath("../../..")
]
),
.target(
Expand All @@ -198,35 +198,35 @@ let package = Package(
exclude: ["GrowingUserIdentifier.m"],
publicHeadersPath: ".",
cSettings: [
.headerSearchPath("../../.."),
.headerSearchPath("../../..")
]
),
.target(
name: "GrowingTrackerCore",
dependencies: [
.product(name: "GrowingUtilsTrackerCore", package: "growingio-sdk-ios-utilities"),
.product(name: "GrowingUtilsTrackerCore", package: "growingio-sdk-ios-utilities")
],
path: "GrowingTrackerCore",
exclude: ["Utils/UserIdentifier"],
publicHeadersPath: "Public",
cSettings: [
.headerSearchPath(".."),
.headerSearchPath("..")
],
linkerSettings: [
.linkedLibrary("c++"),
.linkedFramework("UIKit", .when(platforms: [.iOS, .macCatalyst])),
.linkedFramework("UIKit", .when(platforms: [.iOS, .macCatalyst]))
]
),
.target(
name: "GrowingAutotrackerCore",
dependencies: [
"GrowingTrackerCore",
.product(name: "GrowingUtilsAutotrackerCore", package: "growingio-sdk-ios-utilities"),
.product(name: "GrowingUtilsAutotrackerCore", package: "growingio-sdk-ios-utilities")
],
path: "GrowingAutotrackerCore",
publicHeadersPath: "Public",
cSettings: [
.headerSearchPath(".."),
.headerSearchPath("..")
]
),

Expand All @@ -237,47 +237,47 @@ let package = Package(
dependencies: ["GrowingTrackerCore"],
path: "Services/Database",
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
]
),
.target(
name: "GrowingService_Network",
dependencies: ["GrowingTrackerCore"],
path: "Services/Network",
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
]
),
.target(
name: "GrowingService_WebSocket",
dependencies: ["GrowingTrackerCore"],
path: "Services/WebSocket",
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
]
),
.target(
name: "GrowingService_Compression",
dependencies: ["GrowingTrackerCore"],
path: "Services/Compression",
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
]
),
.target(
name: "GrowingService_Encryption",
dependencies: ["GrowingTrackerCore"],
path: "Services/Encryption",
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
]
),
.target(
name: "GrowingService_Screenshot",
dependencies: ["GrowingTrackerCore"],
path: "Services/Screenshot",
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
]
),

Expand All @@ -294,7 +294,7 @@ let package = Package(
],
path: "Modules/DefaultServices",
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
]
),
.target(
Expand All @@ -306,7 +306,7 @@ let package = Package(
],
path: "Modules/MobileDebugger",
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
]
),
.target(
Expand All @@ -319,38 +319,38 @@ let package = Package(
],
path: "Modules/WebCircle",
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
]
),
.target(
name: "GrowingModule_Hybrid",
dependencies: ["GrowingTrackerCore"],
path: "Modules/Hybrid",
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
],
linkerSettings: [
.linkedFramework("WebKit", .when(platforms: [.iOS, .macCatalyst])),
.linkedFramework("WebKit", .when(platforms: [.iOS, .macCatalyst]))
]
),
.target(
name: "GrowingModule_Protobuf",
dependencies: [
"GrowingTrackerCore",
"GrowingService_Database",
"GrowingModule_SwiftProtobuf",
"GrowingModule_SwiftProtobuf"
],
path: "Modules/Protobuf",
exclude: ["Proto", "Catagory"],
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
]
),
.target(
name: "GrowingModule_SwiftProtobuf",
dependencies: [
"GrowingTrackerCore",
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
.product(name: "SwiftProtobuf", package: "swift-protobuf")
],
path: "Modules/SwiftProtobuf"
),
Expand All @@ -360,24 +360,24 @@ let package = Package(
path: "Modules/Advert",
publicHeadersPath: "Public",
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
]
),
.target(
name: "GrowingModule_APM",
dependencies: [
"GrowingTrackerCore",
.product(name: "GrowingAPM", package: "growingio-sdk-ios-performance-ext"),
.product(name: "GrowingAPM", package: "growingio-sdk-ios-performance-ext")
],
path: "Modules/APM",
publicHeadersPath: "Public",
cSettings: [
.headerSearchPath("../.."),
.headerSearchPath("../..")
]
),

// MARK: - GrowingAnalytics Wrapper (No IDFA)

.target(
name: "GrowingAutotracker_cdp_NoIDFA_Wrapper",
dependencies: [
Expand All @@ -386,7 +386,7 @@ let package = Package(
"GrowingModule_DefaultServices",
.target(name: "GrowingModule_Hybrid", condition: .when(platforms: [.iOS, .macCatalyst])),
.target(name: "GrowingModule_MobileDebugger", condition: .when(platforms: [.iOS])),
.target(name: "GrowingModule_WebCircle", condition: .when(platforms: [.iOS])),
.target(name: "GrowingModule_WebCircle", condition: .when(platforms: [.iOS]))
],
path: "SwiftPM-Wrap/GrowingAutotracker-cdp-NoIDFA-Wrapper"
),
Expand All @@ -396,7 +396,7 @@ let package = Package(
"GrowingTracker_cdp",
"GrowingUserIdentifier_NoIDFA",
"GrowingModule_DefaultServices",
.target(name: "GrowingModule_MobileDebugger", condition: .when(platforms: [.iOS])),
.target(name: "GrowingModule_MobileDebugger", condition: .when(platforms: [.iOS]))
],
path: "SwiftPM-Wrap/GrowingTracker-cdp-NoIDFA-Wrapper"
),
Expand All @@ -408,7 +408,7 @@ let package = Package(
"GrowingModule_DefaultServices",
.target(name: "GrowingModule_Hybrid", condition: .when(platforms: [.iOS, .macCatalyst])),
.target(name: "GrowingModule_MobileDebugger", condition: .when(platforms: [.iOS])),
.target(name: "GrowingModule_WebCircle", condition: .when(platforms: [.iOS])),
.target(name: "GrowingModule_WebCircle", condition: .when(platforms: [.iOS]))
],
path: "SwiftPM-Wrap/GrowingAutotracker-NoIDFA-Wrapper"
),
Expand All @@ -418,7 +418,7 @@ let package = Package(
"GrowingTracker",
"GrowingUserIdentifier_NoIDFA",
"GrowingModule_DefaultServices",
.target(name: "GrowingModule_MobileDebugger", condition: .when(platforms: [.iOS])),
.target(name: "GrowingModule_MobileDebugger", condition: .when(platforms: [.iOS]))
],
path: "SwiftPM-Wrap/GrowingTracker-NoIDFA-Wrapper"
)
Expand Down

0 comments on commit c007055

Please sign in to comment.