nst / STTwitter

A stable, mature and comprehensive Objective-C library for Twitter REST API 1.1
BSD 3-Clause "New" or "Revised" License
999 stars 161 forks source link

NSURLErrorDomain Code -995 "(null)" When Used In UNNotificationContentExtension #260

Closed inb4ohnoes closed 8 years ago

inb4ohnoes commented 8 years ago

I'm trying to implement STTwitter in a notification center content extension on iOS 10. getAccountVerifyCredentialsWithSuccessBlock: works just fine and verifies correctly. However, when I try to post anything via postDirectMessage or postStatusUpdate I get Error Domain=NSURLErrorDomain Code=-995 "(null)". I've searched and found nothing at all on this issue...

For debugging purposes, I don't really have time right now to create an entirely separate project to try and reproduce the issue. However if you'd like to look at the project I currently have this issue in, I'd be more than happy to let you take a look!

nst commented 8 years ago

https://www.osstatus.com/search/results?platform=all&framework=all&search=-995

NSURLErrorBackgroundSessionRequiresSharedContainer
inb4ohnoes commented 8 years ago

Oh wow TIL about this site. Thanks a lot!

inb4ohnoes commented 8 years ago

Actually do you know what this error means? I've already got app groups and keychain sharing turned on... What else should I turn on?

inb4ohnoes commented 8 years ago

Reopening because this may be an issue with STTwitter after all. It seems the property sharedContainerIdentifier needs to be set properly, but STTwitter (or rather STHTTPRequest) provides no way to set this manually, but instead sets this to a unique globallyUniqueString...

inb4ohnoes commented 8 years ago

Please see https://github.com/nst/STTwitter/issues/261

nst commented 8 years ago

I hope that the issue is fixed. Please reopen if it's not.

inb4ohnoes commented 8 years ago

Can this be integrated into STTwitterAPI as an option as well? Something like self.api.sharedContainerIdentifier = @"com.example.Example.sharedContainer";