Closed wlxo0401 closed 1 year ago
Hi @wlxo0401, Thanks for using amplitude. I added the swift example in the doc. It will be merged and released soon. Also sharing the snippet here.
let trackingOptions = AMPTrackingOptions().disableCity().disableCarrier();
Amplitude.instance().setTrackingOptions(trackingOptions!);
Closing this issue. Feel free to reopen this if you still have issues. Thanks.
Just want to share with you. We have a new iOS SDK which is developed using swift. It will be GA soon. And this is the SDK we are going to deprecate. Read more. There has been a lot of improvement in the latest iOS SDK. Please take a look at here. More information related to the latest architecture.
Summary
My project is Swif.
However, only Objective-C is available for how to use Disable tracking.
How can I apply it in Swift as well?? Or are there any related documents?
The code I want to do with Swift is below.
import "AMPTrackingOptions.h"
AMPTrackingOptions *options = [[[[AMPTrackingOptions options] disableLatLng]; [[Amplitude instance] setTrackingOptions:options];