Migration guide for iOS
As you may have noticed, BugSense recently became Splunk MINT.
Apart from the rebranding, we improved some of the old features and we added many more really interesting ones. If you have already integrated BugSense into your application, it shouldn't take more than five minutes to migrate to the new Splunk MINT SDK.
This migration guide will help you migrate your iOS project from BugSense to Splunk MINT.
Basic changes
- The header is changed from <BugSense-iOS/BugSenseController.h> to <SplunkMint-iOS/SplunkMint-iOS.h>.
- The main class changed from BugSenseController to Mint.
New features
- Transactions
- Advanced events
- Network monitoring
Documentation
The documentation has been updated and there is now a separate API reference:
API changes for migrating
Change the import statement:
// Old: #import <BugSense-iOS/BugSenseController.h> // New: #import <SplunkMint-iOS/SplunkMInt-iOS.h>
Update the class name. The BugSenseController was a static class with static methods. Mint no longer offers static methods. Instead, access the Singleton [Mint sharedInstance]
to get the reference:
// Old: BugSenseController // New: [Mint sharedInstance]
Update the methods. Here's a comparison of old and new to show you how they changed.
- initAndStartSession:
- startSession, closeSession, and flush:
- addExtraData:
- removeExtraData and clearExtraData:
- setUserIdentifier:
- logException, BUGSENSE_LOG:
- leaveBreadcrumb:
- setLogMessagesLeveland setLogMessagesCount:
- sendCustomEventWithTag:
// Old: [BugSenseController sharedControllerWithBugSenseAPIKey:@"APIKEY"]; // New: [[Mint sharedInstance] initAndStartSession:@”APIKEY”];
// Old: - // New: [[Mint sharedInstance] startSessionAsyncWithCompletionBlock:nil]; // Old: - // New: [[Mint sharedInstance] closeSessionAsyncWithCompletionBlock:nil]; // Old: - // New: [[Mint sharedInstance] flushAsyncWithBlock:nil];
// Old: [BugSenseController sharedControllerWithBugSenseAPIKey:@"APIKEY" userDictionary:@{ @"key1": @"value1" }]; // New: [[Mint sharedInstance] addExtraData:[[ExtraData alloc] initWithKey:@"Global Extra Key1" andValue:@"Global Extra Value1"]];
// Old: - // New: [[Mint sharedInstance] removeExtraDataWithKey:@"Key"]; // Old: - // New: [[Mint sharedInstance] clearExtraData];
// Old: [BugSenseController setUserIdentifier:@"username"]; // New: [Mint sharedInstance].userIdentifier = @"username";
// Old: [BugSenseController logException:exception withExtraData:nil]; // New: [[Mint sharedInstance] logExceptionAsync:exception limitedExtraDataList:nil completionBlock:nil]; // Old: BUGSENSE_LOG(exception, nil); // New: MintLogException(exception, nil);
// Old: [BugSenseController leaveBreadcrumb:@"breadcrumb"]; // New: [[Mint sharedInstance] leaveBreadcrumb:@"breadcrumb"];
// Old: [BugSenseController setLogMessagesLevel:1]; [BugSenseController setLogMessagesCount:8]; // New: [[Mint sharedInstance] setLogging:1];
// Old: [BugSenseController sendCustomEventWithTag:@"eventTag"]; // New: [[Mint sharedInstance] logEventAsyncWithTag:@"Log Custom Event tag" completionBlock:nil]; [[Mint sharedInstance] logEventAsyncWithName:@"Test Log Event" logLevel:DebugLogLevel andCompletionBlock:nil];
MINT documentation | Requirements and installation for iOS |
This documentation applies to the following versions of Splunk MINT™ SDK for iOS (EOL): 4.0.x
Feedback submitted, thanks!