Upload NSURLSesssion becomes invalidated in sharing extension in ios8 with error NSURLErrorDomain Code=-995

前端 未结 1 1798
遇见更好的自我
遇见更好的自我 2021-02-07 16:40

I try to upload an image using NSURLSession in shared extension in iOS 8 but have this error instantly after calling

[task resume]         


        
1条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-07 16:56

    @Wisors great! It helped, just need to set

    sessionConfiguration.sharedContainerIdentifier = @“com.me.myapp.containerIdentifier”;
    

    In my case @“com.me.myapp.containerIdentifier” was @"group.mycompany.appname" which was crucial, another identifier didn't work. Thank you!

    0 讨论(0)
提交回复
热议问题