diff --git a/Examples/apps/BasicExample/BasicExample/ViewController.swift b/Examples/apps/BasicExample/BasicExample/ViewController.swift index 87149003..31acb07d 100644 --- a/Examples/apps/BasicExample/BasicExample/ViewController.swift +++ b/Examples/apps/BasicExample/BasicExample/ViewController.swift @@ -6,9 +6,12 @@ // import UIKit +import Segment class ViewController: UIViewController { - var analytics = UIApplication.shared.delegate?.analytics + var analytics: Analytics? { + return UIApplication.shared.delegate?.analytics + } var usage: TimeInterval = 0 var timer: Timer? = nil diff --git a/Examples/apps/DestinationsExample/DestinationsExample.xcodeproj/xcshareddata/xcschemes/DestinationsExample.xcscheme b/Examples/apps/DestinationsExample/DestinationsExample.xcodeproj/xcshareddata/xcschemes/DestinationsExample.xcscheme new file mode 100644 index 00000000..210d4ec3 --- /dev/null +++ b/Examples/apps/DestinationsExample/DestinationsExample.xcodeproj/xcshareddata/xcschemes/DestinationsExample.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/apps/DestinationsExample/DestinationsExample/ViewController.swift b/Examples/apps/DestinationsExample/DestinationsExample/ViewController.swift index 2594b482..65f3ca84 100644 --- a/Examples/apps/DestinationsExample/DestinationsExample/ViewController.swift +++ b/Examples/apps/DestinationsExample/DestinationsExample/ViewController.swift @@ -40,7 +40,9 @@ class ViewController: UIViewController { @IBOutlet weak var propertiesStepper: UIStepper? @IBOutlet weak var eventField: UITextField? - var analytics = UIApplication.shared.delegate?.analytics + var analytics: Analytics? { + return UIApplication.shared.delegate?.analytics + } private var keysFields = [UITextField]() private var propertiesFields = [UITextField]() diff --git a/Examples/apps/MacExample/MacExample/MacExample.entitlements b/Examples/apps/MacExample/MacExample/MacExample.entitlements index f2ef3ae0..40b639e4 100644 --- a/Examples/apps/MacExample/MacExample/MacExample.entitlements +++ b/Examples/apps/MacExample/MacExample/MacExample.entitlements @@ -2,9 +2,13 @@ - com.apple.security.app-sandbox - - com.apple.security.files.user-selected.read-only - + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + com.apple.security.network.client + + com.apple.security.network.server + diff --git a/Examples/apps/MacExample/MacExample/ViewController.swift b/Examples/apps/MacExample/MacExample/ViewController.swift index 9ccc81d7..f06c4b19 100644 --- a/Examples/apps/MacExample/MacExample/ViewController.swift +++ b/Examples/apps/MacExample/MacExample/ViewController.swift @@ -6,9 +6,12 @@ // import Cocoa +import Segment class ViewController: NSViewController { - var analytics = NSApplication.shared.delegate?.analytics + var analytics: Analytics? { + return NSApplication.shared.delegate?.analytics + } override func viewDidLoad() { super.viewDidLoad() diff --git a/Examples/apps/watchOSExample/watchOSExample WatchKit Extension/ExtensionDelegate.swift b/Examples/apps/watchOSExample/watchOSExample WatchKit Extension/ExtensionDelegate.swift index 90e2981e..0d3b9f2c 100644 --- a/Examples/apps/watchOSExample/watchOSExample WatchKit Extension/ExtensionDelegate.swift +++ b/Examples/apps/watchOSExample/watchOSExample WatchKit Extension/ExtensionDelegate.swift @@ -13,7 +13,7 @@ class ExtensionDelegate: NSObject, WKExtensionDelegate { func applicationDidFinishLaunching() { // Perform any final initialization of your application. - let configuration = Configuration(writeKey: "lAtKCqFrmtnhIVV7LDPTrgoCbL0ujlBe") + let configuration = Configuration(writeKey: "WRITE KEY") .trackApplicationLifecycleEvents(true) .flushInterval(10) diff --git a/Examples/apps/watchOSExample/watchOSExample WatchKit Extension/InterfaceController.swift b/Examples/apps/watchOSExample/watchOSExample WatchKit Extension/InterfaceController.swift index d5f5932c..c151707f 100644 --- a/Examples/apps/watchOSExample/watchOSExample WatchKit Extension/InterfaceController.swift +++ b/Examples/apps/watchOSExample/watchOSExample WatchKit Extension/InterfaceController.swift @@ -11,7 +11,9 @@ import Segment class InterfaceController: WKInterfaceController { - var analytics = WKExtension.shared().delegate?.analytics + var analytics: Analytics? { + return WKExtension.shared().delegate?.analytics + } override func awake(withContext context: Any?) { // Configure interface objects here.