简体   繁体   中英

iOS app integrated with Splunk MINT crashes when entering foreground

I have integrated Splunk MINT in my iOS project using this guide http://docs.splunk.com/Documentation/MintIOSSDK/4.4.x/DevGuide/Requirementsandinstallation using cocoapods.

After app launch, whenever the app goes into the foreground after spending some time in the background (anything more than couple of minutes), the app crashes because of some issue in the Splunk Mint as shown in the trace I have posted in image below. Reading it, I think it has got something to do with the Splunk framework posting some info to Splunk servers when the app goes to the foreground. Check the image below. My testing device is running iOS 8.4.1 and Splunk Mint 4.4.0

I have also integrated splunk mint with a blank new iOS project with no code in it (only boiler plate Xcode code) and still I get the same crash (with similar trace) when app goes foreground.

Thanks

在此处输入图片说明

Only Google could solve this problem by overriding respondsToSelector to return whether the target responds to delegate selector.

You can work around. Disable network monitoring before initializing the SDK.

For Objective-c:

[[Mint SharedInstance] disableNetworkMonitoring];

For Swift:

Mint.sharedInstance().disableNetworkMonitoring()
Mint.sharedInstance().initAndStartSessionWithAPIKey(XXXXX)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM