-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make compatible with iOS Extensions #54
Conversation
@djih any chance you could take a look at this? |
@andyyc I can take a look next week. Have you tested this with your extension? |
thanks @djih. I've been using it in my app and haven't ran into any On Tue, Feb 9, 2016 at 3:05 PM, djih [email protected] wrote:
|
@andyyc so regarding the enterForeground, what kind of metrics are incorrect? All events logged will be in the "background" state, so if more than 5 minutes passes between logEvent calls, then it will start a new session. Maybe one temporary solution is just to increase the 5 min to something like 30 min. Also it looks like in iOS 8.2 they added NSExtensionHostWillEnterForegroundNotification, which might be useful: http://stackoverflow.com/a/29988550, although our SDK currently has to support iOS 6.0. I wonder if it might be possible to still use those 8.2 methods if available. Are there any issues with the background uploading? Do you need access to the app's data? Otherwise I don't think the NSURLSession and shared container is necessary. Also, can you update from master (looks like there aren't any conflicts)? I fixed a bunch of flakey tests so your tests should pass now. |
`setTrackingSessionEvents` method name corrected.
I'm trying to use the sdk with a keyboard extension. Unfortunately, sharedApplication is unavailable in iOS extensions.
This diff replaces calls to sharedApplication with performSelector. This has been done in other places like SDWebImage here: SDWebImage/SDWebImage#1082 and doesn't appear to present any issues with App Store review.