SecureiOS is a one-stop framework to implement security features in your iOS Application with minimum efforts requirement.
SecureiOS is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "SecureiOS"
SecureUserDefaults provides you the funtionality to store data in encrypted form. Its a wrapper that allows you to save data as well as retrieve it.
SecureiOS.secureUserDefaults().saveData(forKey: "intData", value: intData)
guard let value = SecureiOS.secureUserDefaults().getAnyData(forKey: "key") as? String else {return}
JailbreakDectection method is used to identify if the device is jailbroken. you can simply use below code to get jailbreak status of the device
SecureiOS.jailBreakCheck()
Attackers always configure decive proxy settings to get configure device for Man In The Middle Attack.You can use this method to identify if the device proxy is configured.
if SecureiOS.proxyCheck() {
print("Proxy is enabled")
}
This method determines if the device has implemented Biometrics or passcode. You can use this method to determince application action based on the results.
let deviceLockAndBiometricStatus = SecureiOS.getDeviceLockAndBiometryStatus()
if deviceLockAndBiometricStatus.isEnabled{
let type = deviceLockAndBiometricStatus.type
switch type {
case .touchId:
print(type.name)
case .faceId:
print(type.name)
case .passcode:
print(type.name)
case .none:
print(type.name)
@unknown default:
print("unknown")
}
}
This method allow your applications to know the device support biometry. You can use this method to determince application action based on the results.
switch SecureiOS.getSupportedBiometryType() {
case .faceId:
print("Face Id")
case .touchId:
print("Touch Id")
case .none:
print("None")
@unknown default:
print("unknown")
}
iOS takes screenshot of the current views of the app whenever app goes in the background. This screenshot can reveal some sensitive information on the screen which can cause confidentality breach. You can simply use SetupBackgroundSplashScreen method to implement the app background image of your choice.
SecureiOS.setupBackgroundSplashScreen(&window, image)
Apps can run on emulator which makes it easier for the hackers to hack the app. The emulator check method identifies if the app is running on an emulator. you can use below method for the check
if SecureiOS.emulatorCheck() {
print("Running on simulator")
}
SecureiOS is available under the MIT license. See the LICENSE file for more info.