To use Charles Proxy or a similar HTTP Proxy tool, you may need to turn off mParticle SSL pinning in your development build. Follow the steps noted below and in our docs to complete this configuration.
In step 1.2 of our SDK initialization, you will want to add the following three lines
to disable the SSL pinning.
Swift
let networkOptions = MPNetworkOptions()
let options = MParticleOptions(key: "API-KEY", secret: "API-SECRET")
networkOptions.pinningDisabledInDevelopment = true
options.networkOptions = networkOptions
options.environment = MPEnvironment.development
MParticle.sharedInstance().start(with: options)
Objective C
MPNetworkOptions *networkOptions = [MPNetworkOptions()];
MParticleOptions *options = [MParticleOptions optionsWithKey:@"API-KEY"
secret:@"API-SECRET"];
networkOptions.pinningDisabledInDevelopment = YES;
options.networkOptions = networkOptions;
options.environment = MPEnvironmentDevelopment;
[MParticle.sharedInstance startWithOptions:options];
Android
In our example SDK initialization code (step 1.3) you would want to disable pinning.
Kotlin
// Required to disable SSL pinning
val networkOptions = NetworkOptions.builder()
.setPinningDisabledInDevelopment(true).build()
val options = MParticleOptions.builder(this)
.credentials("API-KEY","API-SECRET")
.environment(MParticle.Environment.Development)
.networkOptions(networkOptions)// Required to disable SSL pinning
.build()
MParticle.start(options)
Java
// Required to disable SSL pinning
NetworkOptions networkOptions =NetworkOptions.builder()
.setPinningDisabledInDevelopment(true)
.build();
MParticleOptions options =MParticleOptions.builder(this)
.credentials("API-KEY","API-SECRET")
.environment(MParticle.Environment.Development)
.networkOptions(networkOptions)// Required to disable SSL pinning
.build();
MParticle.start(options);