Skip to content
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

Use of API only available in iOS 8 #273

Open
ghugues opened this issue Feb 5, 2017 · 0 comments
Open

Use of API only available in iOS 8 #273

ghugues opened this issue Feb 5, 2017 · 0 comments

Comments

@ghugues
Copy link

ghugues commented Feb 5, 2017

[STHTTPRequest startAsynchronous] uses the sharedContainerIdentifier property of NSURLSessionConfiguration which is only available in iOS 8 and later. This results in a crash when using STTwitter on iOS 7.

Since STTwitter says it supports iOS 7, I consider it is a bug.

A simple solution is to wrap the call in a respondsToSelector: check like so :

if ([sessionConfiguration respondsToSelector:@selector(setSharedContainerIdentifier:)]) {
	NSString *containerIdentifier = _sharedContainerIdentifier ? _sharedContainerIdentifier : [[NSBundle mainBundle] bundleIdentifier];
	sessionConfiguration.sharedContainerIdentifier = containerIdentifier;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant