How to enable SSL certificate pinning in nativescript angular app?

ios
android

#1

I am using nativescript Http module. Can we ping ssl certs using http module? I have done this approach (How to ignore invalid ssl certificate in Nativescript) to bypass ssl for my development server.
But for production server, i want to trust a specific cert chain.

In nativescript-htts plugin (https://www.npmjs.com/package/nativescript-https), there’s a way to enble ssl pinning. But the plugin seems not active anymore? Coz, don’t see any recent update


#2

Just because it hasn’t been updated recently doesn’t mean it stopped working! :slight_smile:


#3

Yep, plugin is working means I can install. But it gives several compilation errors on tns v4.0.1 for both ios and android.

Does anybody able to run the plugin with tns 4+?

node_modules/nativescript-https/AFNetworking.d.ts(676,26): error TS2304: Cannot find name 'NSCoder'.
node_modules/nativescript-https/AFNetworking.d.ts(678,41): error TS2304: Cannot find name 'NSURLSessionConfiguration'.

#4

Give it a few mins to check the ReadMe and pelase follow the installation steps as described.