Shipbook SDK for iOS applications. Capture logs, errors, and exceptions from your iOS apps and view them in the Shipbook console. Learn more at shipbook.io.
Add the package URL in Xcode via Swift Package Manager:
https://github.com/ShipBook/ShipBookSDK-iOS.git
import ShipBookSDK
// Initialize Shipbook in AppDelegate (do this once at app startup)
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
ShipBook.start(appId: "YOUR_APP_ID", appKey: "YOUR_APP_KEY")
return true
}
// Get a logger for your class/component
let log = ShipBook.getLogger("MyViewController")
// Log messages at different severity levels
log.v("Detailed trace information")
log.d("Debug information")
log.i("General information")
log.w("Warning message")
log.e("Error message")- Remote Logging - View all your app logs in the Shipbook console
- Error Tracking - Automatically captures uncaught exceptions
- Session Tracking - Group logs by user session
- Offline Support - Logs are queued and sent when connectivity is restored
- Dynamic Configuration - Change log levels remotely without redeploying
- User Identification - Associate logs with specific users
ShipBook.enableInnerLog(enable: true)ShipBook.registerUser(userId: "user-123",
userName: "johndoe",
fullName: "John Doe",
email: "john@example.com",
phoneNumber: "+1234567890",
additionalInfo: ["role": "admin"])ShipBook.logout()ShipBook.screen(name: "HomePage")You can also use static methods without creating a logger instance:
Log.e("Something went wrong")
Log.w("This is a warning")
Log.i("General info")
Log.d("Debug info")
Log.v("Trace info")The SDK is fully compatible with Objective-C. Convenience macros are provided:
#import <ShipBookSDK/ShipBookSDK-Swift.h>
#import <ShipBookSDK/ShipBook.h>
LogE(@"Something went wrong");
LogW(@"This is a warning");
LogI(@"General info");
LogD(@"Debug info");
LogV(@"Trace info");- Sign up at shipbook.io
- Create a new application in the console
- Copy your App ID and App Key from the application settings
For full setup instructions, see the iOS documentation.
Elisha Sterngold (ShipBook Ltd.)
ShipBook SDK is available under the MIT license. See the LICENSE file for more info.