From a25c95891e59d170950f6355e5acf28170c29073 Mon Sep 17 00:00:00 2001 From: kdhingra07 Date: Fri, 31 Mar 2023 16:23:46 +0530 Subject: [PATCH] Added Obj C support --- .../xcshareddata/swiftpm/Package.resolved | 4 ++-- Package.resolved | 24 +++++++++---------- Package.swift | 4 ++-- .../SegmentFirebase/FirebaseDestination.swift | 4 ++++ 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Example/BasicExample/BasicExample.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Example/BasicExample/BasicExample.xcworkspace/xcshareddata/swiftpm/Package.resolved index 7380d1e..7a75c1b 100644 --- a/Example/BasicExample/BasicExample.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Example/BasicExample/BasicExample.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/segmentio/analytics-swift", "state": { "branch": null, - "revision": "af7f1d2fe6e48b1760538739f13f44ba71c1a61c", - "version": "1.3.4" + "revision": "26f23a2ae9b8dd47aeee1bdaa1e203f3bed6044e", + "version": "1.4.0" } }, { diff --git a/Package.resolved b/Package.resolved index e69e7dd..241800d 100644 --- a/Package.resolved +++ b/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/segmentio/analytics-swift.git", "state": { "branch": null, - "revision": "76316a5009502de6e7c2788c295e9afc68793cd3", - "version": "1.1.2" + "revision": "26f23a2ae9b8dd47aeee1bdaa1e203f3bed6044e", + "version": "1.4.0" } }, { @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/firebase/firebase-ios-sdk", "state": { "branch": null, - "revision": "e8828e8efc813817b3c2cbfde8e965f7a7a26641", - "version": "9.2.0" + "revision": "76de51f0e2be35ecb6ce05ed1ad0a73669b05a11", + "version": "10.7.0" } }, { @@ -42,8 +42,8 @@ "repositoryURL": "https://github.com/google/GoogleAppMeasurement.git", "state": { "branch": null, - "revision": "192cce3e0486aecfdb61102a9c694c78dc89dc48", - "version": "9.1.0" + "revision": "04351180d4c757c6c16127cb57b685fff9ef260b", + "version": "10.6.0" } }, { @@ -51,8 +51,8 @@ "repositoryURL": "https://github.com/google/GoogleDataTransport.git", "state": { "branch": null, - "revision": "b905c49326b72211531ed9d7baa02d724828a8dc", - "version": "9.1.4" + "revision": "f6b558e3f801f2cac336b04f615ce111fa9ddaa0", + "version": "9.2.1" } }, { @@ -60,8 +60,8 @@ "repositoryURL": "https://github.com/google/GoogleUtilities.git", "state": { "branch": null, - "revision": "f4abe56ce62a779e64b525eb133c8fc2a84bbc1f", - "version": "7.7.1" + "revision": "0543562f85620b5b7c510c6bcbef75b562a5127b", + "version": "7.11.0" } }, { @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/google/gtm-session-fetcher.git", "state": { "branch": null, - "revision": "19605024d59eaefdb1f6a2cb11ebe75df4421126", - "version": "2.0.0" + "revision": "96d7cc73a71ce950723aa3c50ce4fb275ae180b8", + "version": "3.1.0" } }, { diff --git a/Package.swift b/Package.swift index ef22981..ef4bab0 100644 --- a/Package.swift +++ b/Package.swift @@ -23,12 +23,12 @@ let package = Package( .package( name: "Segment", url: "https://github.com/segmentio/analytics-swift.git", - from: "1.3.4" + from: "1.4.0" ), .package( name: "Firebase", url: "https://github.com/firebase/firebase-ios-sdk", - from: "10.0.0" + from: "10.4.0" ) ], targets: [ diff --git a/Sources/SegmentFirebase/FirebaseDestination.swift b/Sources/SegmentFirebase/FirebaseDestination.swift index fc968a1..7435ebd 100644 --- a/Sources/SegmentFirebase/FirebaseDestination.swift +++ b/Sources/SegmentFirebase/FirebaseDestination.swift @@ -35,6 +35,10 @@ import FirebaseAnalytics /** An implmentation of the Firebase Analytics device mode destination as a plugin. */ +@objc(SEGFirebaseDestination) +public class ObjCSegmentFirebase: NSObject, ObjCDestination, ObjCDestinationShim { + public func instance() -> DestinationPlugin { return FirebaseDestination() } +} public class FirebaseDestination: DestinationPlugin { public let timeline = Timeline()