diff --git a/Examples/destination_plugins/ExampleDestination.swift b/Examples/destination_plugins/ExampleDestination.swift index 1e4b9bc4..626ed6c6 100644 --- a/Examples/destination_plugins/ExampleDestination.swift +++ b/Examples/destination_plugins/ExampleDestination.swift @@ -41,16 +41,16 @@ import Segment An implementation of the Example Analytics device mode destination as a plugin. */ -class ExampleDestination: DestinationPlugin { - let timeline = Timeline() - let type = PluginType.destination +public class ExampleDestination: DestinationPlugin { + public let timeline = Timeline() + public let type = PluginType.destination // TODO: Fill this out with your settings key that matches your destination in the Segment App - let key = "Example" - var analytics: Analytics? = nil + public let key = "Example" + public var analytics: Analytics? = nil private var exampleSettings: ExampleSettings? - func update(settings: Settings, type: UpdateType) { + public func update(settings: Settings, type: UpdateType) { // Skip if you have a singleton and don't want to keep updating via settings. guard type == .initial else { return } @@ -62,7 +62,7 @@ class ExampleDestination: DestinationPlugin { // TODO: initialize partner SDK here } - func identify(event: IdentifyEvent) -> IdentifyEvent? { + public func identify(event: IdentifyEvent) -> IdentifyEvent? { if let _ = event.traits?.dictionaryValue { // TODO: Do something with traits if they exist @@ -73,7 +73,7 @@ class ExampleDestination: DestinationPlugin { return event } - func track(event: TrackEvent) -> TrackEvent? { + public func track(event: TrackEvent) -> TrackEvent? { var returnEvent = event @@ -88,7 +88,7 @@ class ExampleDestination: DestinationPlugin { return returnEvent } - func screen(event: ScreenEvent) -> ScreenEvent? { + public func screen(event: ScreenEvent) -> ScreenEvent? { if let _ = event.properties?.dictionaryValue { // TODO: Do something with properties if they exist @@ -99,7 +99,7 @@ class ExampleDestination: DestinationPlugin { return event } - func group(event: GroupEvent) -> GroupEvent? { + public func group(event: GroupEvent) -> GroupEvent? { if let _ = event.traits?.dictionaryValue { // TODO: Do something with traits if they exist @@ -110,7 +110,7 @@ class ExampleDestination: DestinationPlugin { return event } - func alias(event: AliasEvent) -> AliasEvent? { + public func alias(event: AliasEvent) -> AliasEvent? { // TODO: Do something with previousId & userId in partner SDK diff --git a/Segment.xcodeproj/project.pbxproj b/Segment.xcodeproj/project.pbxproj index dcbb6a22..489fe192 100644 --- a/Segment.xcodeproj/project.pbxproj +++ b/Segment.xcodeproj/project.pbxproj @@ -132,10 +132,6 @@ 46B1AC6827346D3D00846DE8 /* StressTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StressTests.swift; sourceTree = ""; }; 46D98E3D26D6FEF300E7A86A /* FlurryDestination.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlurryDestination.swift; sourceTree = ""; }; 46D98E3E26D6FEF300E7A86A /* AdjustDestination.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdjustDestination.swift; sourceTree = ""; }; - 46D98E3F26D6FEF300E7A86A /* MixpanelDestination.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixpanelDestination.swift; sourceTree = ""; }; - 46D98E4026D6FEF300E7A86A /* AppsFlyerDestination.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppsFlyerDestination.swift; sourceTree = ""; }; - 46D98E4126D6FEF300E7A86A /* FirebaseDestination.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebaseDestination.swift; sourceTree = ""; }; - 46D98E4226D6FEF300E7A86A /* AmplitudeSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AmplitudeSession.swift; sourceTree = ""; }; 46D98E4426D6FEF300E7A86A /* UIKitScreenTracking.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIKitScreenTracking.swift; sourceTree = ""; }; 46D98E4526D6FEF300E7A86A /* ConsentTracking.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsentTracking.swift; sourceTree = ""; }; 46D98E4626D6FEF300E7A86A /* IDFACollection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IDFACollection.swift; sourceTree = ""; }; @@ -150,6 +146,8 @@ 46FE4CFA25A6C671003A7362 /* TestUtilities.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestUtilities.swift; sourceTree = ""; }; 46FE4D1C25A7A850003A7362 /* Storage_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Storage_Tests.swift; sourceTree = ""; }; 759D6CD027B48ABB00AB900A /* DestinationMetadataPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DestinationMetadataPlugin.swift; sourceTree = ""; }; + 7B3C818F285BAD7600199D3E /* ComscoreDestination.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComscoreDestination.swift; sourceTree = ""; }; + 7B3C8190285BAD8700199D3E /* IntercomDestination.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntercomDestination.swift; sourceTree = ""; }; 9620862B2575C0C800314F8D /* Events.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Events.swift; sourceTree = ""; }; 962086482579CCC200314F8D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 9620864F257AA83E00314F8D /* iOSLifecycleMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSLifecycleMonitor.swift; sourceTree = ""; }; @@ -256,13 +254,11 @@ 46D98E3C26D6FEF300E7A86A /* destination_plugins */ = { isa = PBXGroup; children = ( + 7B3C8190285BAD8700199D3E /* IntercomDestination.swift */, + 7B3C818F285BAD7600199D3E /* ComscoreDestination.swift */, 46D98E3E26D6FEF300E7A86A /* AdjustDestination.swift */, - 46D98E4226D6FEF300E7A86A /* AmplitudeSession.swift */, - 46D98E4026D6FEF300E7A86A /* AppsFlyerDestination.swift */, 9679DD6226EFF00800A6933C /* ExampleDestination.swift */, - 46D98E4126D6FEF300E7A86A /* FirebaseDestination.swift */, 46D98E3D26D6FEF300E7A86A /* FlurryDestination.swift */, - 46D98E3F26D6FEF300E7A86A /* MixpanelDestination.swift */, ); name = destination_plugins; path = Examples/destination_plugins;