TrustKit-Android icon indicating copy to clipboard operation
TrustKit-Android copied to clipboard

Clarify setting up TrustKit in the docs

Open myklosbotond opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe.

We just ran into the problem described in #21: when the main activity's onCreate is called a second time an IllegalStateException is thrown. The solution described in the issue works, but I think this can be avoided.

Describe the solution you'd like

Make it clearer in the Getting Started docs in the "Initializing TrustKit with the Pinning Policy" section that the code snippet applies to the Application's onCreate method, rather than the MainActivity's method.

myklosbotond avatar Feb 10 '21 06:02 myklosbotond

Agreed with this, as it was a common enough issue that in the Xamarin version I created I had to add logic to prevent a second initialization attempt.

alexanderdibenedetto avatar Aug 05 '23 07:08 alexanderdibenedetto