Castle adds real-time monitoring of your authentication stack, instantly notifying you and your users on potential account hijacks.
NOTE: Version 4.0.0 has small breaking changes compared to previous 3.x.x. Versions. The import statement changed to CastleSDK. configure is now a throwable, and createRequestToken returns nil before the sdk is initialized.
- iOS 13.0+
- Xcode 26.2 (swiftlang-6.2.3.3.20 clang-1700.6.3.2)
Castle is available through Switft Package Manager. Version < 4.0.0 are also avilable through CocoaPods and Carthage.
Add Castle as a dependency by adding it to the dependencies value of your Package.swift.
dependencies: [
.package(url: "https://github.com/castle/castle-ios.git", .upToNextMajor(from: "4.0.0"))
]
Download the zip file from the github release, unzip and drag Castle.xcframework to the Frameworks, Libraries and Embedded Content section of the target. They should all be set to Embed & Sign
Please see the Mobile Integration Guide.
Library size is approximately 700kb.