Mobile App Threat Intelligence in Native iOS Apps

This Knowledge Base article describes how to build mobile app threat intelligence in native iOS apps. By using Threat-Events, add active defense for iOS apps. No Code, Zero Dev, No SDK. Appdome Threat Intelligence, Threat-Events™,  is part of the Appdome Mobile Security Suite. We hope you find it useful and enjoy using Appdome!

Prerequisites for Building Mobile App Threat Intelligence in Native iOS Apps

Here’s what you need to build secured native iOS apps with threat intelligence

Easy Steps to Build Mobile Threat Intelligence in Native iOS Apps

Before enabling Threat-Eventsfollow these steps below for iOS apps to handle the incoming security events in your application:

Download the code –  Native Code IOS

Add the following lines to your iOS app which follow and receive Appdome Security Events: 

   [[NSNotificationCenter defaultCenter] addObserverForName: @"BlockedKeyboardEvent" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *blocked = [[note userInfo] objectForKey:@"blocked"];// True/False
        NSString *keyboard = [[note userInfo] objectForKey:@"keyboard"];// keyboard package
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"BlockedClipboardEvent" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *blocked = [[note userInfo] objectForKey:@"blocked"];// True/false
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"JailbrokenDevice" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *internalError = [[note userInfo] objectForKey:@"internalError"];// root detection cause
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"SslCertificateValidationFailed" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *deveventDetailedErrorMessage = [[note userInfo] objectForKey:@"DeveventDetailedErrorMessage"];// detailed error message
        NSString *certificateSHA1 = [[note userInfo] objectForKey:@"certificateSHA1"];// the certificate sha1 fingerprint
        NSString *certificateCN = [[note userInfo] objectForKey:@"certificateCN"];// the certificate CN (common name)
        NSString *host = [[note userInfo] objectForKey:@"host"];// the host on which the error occurred
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"SslNonSslConnection" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *deveventDetailedErrorMessage = [[note userInfo] objectForKey:@"DeveventDetailedErrorMessage"];// detailed error message
        NSString *host = [[note userInfo] objectForKey:@"host"];// the host on which the error occurred
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"SslServerCertificatePinningFailed" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *deveventDetailedErrorMessage = [[note userInfo] objectForKey:@"DeveventDetailedErrorMessage"];// detailed error message
        NSString *certificateSHA1 = [[note userInfo] objectForKey:@"certificateSHA1"];// the certificate sha1 fingerprint
        NSString *certificateCN = [[note userInfo] objectForKey:@"certificateCN"];// the certificate CN (common name)
        NSString *host = [[note userInfo] objectForKey:@"host"];// the host on which the error occurred
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"UrlWhitelistFailed" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *host = [[note userInfo] objectForKey:@"host"];// the host on which the erro occurred
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"BlockedScreenCaptureEvent" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *context = [[note userInfo] objectForKey:@"context"];// capturing event type
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"SslIncompatibleCipher" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *incompatibleCipherId = [[note userInfo] objectForKey:@"incompatibleCipherId"];// the incompatible cipher id
        NSString *host = [[note userInfo] objectForKey:@"host"];// the host on which the error occurred
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"SslIncompatibleVersion" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *incompatibleSslVersion = [[note userInfo] objectForKey:@"incompatibleSslVersion"];// the incompatible SSL/TLS version
        NSString *host = [[note userInfo] objectForKey:@"host"];// the host on which the error occurred
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"SslInvalidCertificateChain" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *deveventDetailedErrorMessage = [[note userInfo] objectForKey:@"DeveventDetailedErrorMessage"];// detailed error message
        NSString *certificateSHA1 = [[note userInfo] objectForKey:@"certificateSHA1"];// the certificate sha1 fingerprint
        NSString *certificateCN = [[note userInfo] objectForKey:@"certificateCN"];// the certificate CN (common name)
        NSString *host = [[note userInfo] objectForKey:@"host"];// the host on which the error occurred
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"SslInvalidMinRSASignature" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *deveventDetailedErrorMessage = [[note userInfo] objectForKey:@"DeveventDetailedErrorMessage"];// detailed error message
        NSString *certificateSHA1 = [[note userInfo] objectForKey:@"certificateSHA1"];// the certificate sha1 fingerprint
        NSString *certificateCN = [[note userInfo] objectForKey:@"certificateCN"];// the certificate CN (common name)
        NSString *host = [[note userInfo] objectForKey:@"host"];// the host on which the error occurred
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"SslInvalidMinECCSignature" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *deveventDetailedErrorMessage = [[note userInfo] objectForKey:@"DeveventDetailedErrorMessage"];// detailed error message
        NSString *certificateSHA1 = [[note userInfo] objectForKey:@"certificateSHA1"];// the certificate sha1 fingerprint
        NSString *certificateCN = [[note userInfo] objectForKey:@"certificateCN"];// the certificate CN (common name)
        NSString *host = [[note userInfo] objectForKey:@"host"];// the host on which the error occurred
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
    [[NSNotificationCenter defaultCenter] addObserverForName: @"SslInvalidMinDigest" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *deveventDetailedErrorMessage = [[note userInfo] objectForKey:@"DeveventDetailedErrorMessage"];// detailed error message
        NSString *certificateSHA1 = [[note userInfo] objectForKey:@"certificateSHA1"];// the certificate sha1 fingerprint
        NSString *certificateCN = [[note userInfo] objectForKey:@"certificateCN"];// the certificate CN (common name)
        NSString *host = [[note userInfo] objectForKey:@"host"];// the host on which the error occurred
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];
 [[NSNotificationCenter defaultCenter] addObserverForName: @"AppIntegrityError" object:nil queue:nil usingBlock:^(NSNotification *note) {
        NSString *defaultMessage = [[note userInfo] objectForKey:@"defaultMessage"];// message passed during fusion
        NSString *deveventDetailedErrorMessage = [[note userInfo] objectForKey:@"DeveventDetailedErrorMessage"];// detailed error message
        NSString *reason = [[note userInfo] objectForKey:@"reason"];// the cause which triggered the Anti-Tampering protection
        NSString *timestamp = [[note userInfo] objectForKey:@"timestamp"];// UNIX timestamp when event happened
        NSString *deviceID = [[note userInfo] objectForKey:@"deviceID"];// unique mobile device identifier
        NSString *deviceModel = [[note userInfo] objectForKey:@"deviceModel"];// mobile device model
        NSString *osVersion = [[note userInfo] objectForKey:@"osVersion"];// The mobile device OS version
        NSString *kernelInfo = [[note userInfo] objectForKey:@"kernelInfo"];// Kernel information and details
        NSString *deviceManufacturer = [[note userInfo] objectForKey:@"deviceManufacturer"];// mobile device manufacturer
        NSString *fusedAppToken = [[note userInfo] objectForKey:@"fusedAppToken"];// Built App Token
        NSString *carrierPlmn = [[note userInfo] objectForKey:@"carrierPlmn"];// carrier identity number (PLMN code)

    }];

How to Add Threat-Events™ to Any Mobile App(s) on Appdome

Follow the step-by-step instructions in this knowledge base to add Threat-Events™ to your native mobile App.

That is it – Enjoy Appdome with Threat-Events™ in your app!

To zoom out on this topic, visit the Mobile App Security page on our website.

Thank you!

Thanks for visiting Appdome! Our mission is to make mobile integration easy. We hope we’re living up to the mission with your project. If you don’t already have an account, you can sign up for free.

Jan Sysmans

Have a question?

Ask an expert

EnrikaMaking your security project a success!

Get Your Copy
2021 Global Mobile
Consumer Security
Survey