Git Product home page Git Product logo

legacy-ios-sdk's Issues

The request timed out

I was using QiniuSimpleUploader
when i upload the image, i received this error:

ERROR: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0xd312210 {NSErrorFailingURLStringKey=http://up.qiniu.com/, NSErrorFailingURLKey=http://up.qiniu.com/, NSLocalizedDescription=The request timed out., NSUnderlyingError=0xd3c1430 "The request timed out."}

if i did something unproper?

感觉这 SDK 很不友好....

  • Docs 并没有详细的接口使用介绍。
  • 看了一下 Demo,发现整个 API 的设计有些难用。首先依赖的 frameworks 有点复杂,用了两个 C Frameworks,两个 Obj-C Framework。如果能够像 AFNetworking 一样零依赖就好了。我比较希望自己的项目里面,用到的 Frameworks 比较干净,便于管理。
  • Demo 里面最需要讲清楚 QBox 部分的 API,但是看了代码之后发现最重要的部分根本没有写更多的 Comments 让我们了解整个流程。甚至没有任何 Header 文件,让我们了解这个 SDK 到底提供了一些什么样的 API 接口。

SDK 虽然是出来了,但是经验较浅的人,比如我,会觉得这个 SDK 真的没有一点用途。希望你们能够简化这个 SDK,同时提供一份相对完善的文档。谢谢。

iOS 8 incompatibility - crash in AFURLRequestSerialization.m

Thread : Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x31394e83 exceptionPreprocess + 130
1 libobjc.A.dylib 0x3b6f16c7 objc_exception_throw + 38
2 CoreFoundation 0x31394dc5 -[NSException initWithCoder:]
3 Foundation 0x31d6bdf3 NSRequestConcreteImplementation + 182
4 Foundation 0x31d74055 -[NSStream(NSStream) streamStatus] + 32
5 Sobrr 0x000bcdd9 -AFMultipartBodyStream open
6 CoreFoundation 0x312e96eb CFReadStreamOpen + 110
7 CFNetwork 0x30f9db2b CoreReadStreamFromCFReadStream::streamImpl_Open(CFStreamError, unsigned char_) + 38
8 CFNetwork 0x3102cd6f non-virtual thunk to CoreReadStreamFromCFReadStream::streamImpl_Open(CFStreamError, unsigned char_) + 10
9 CFNetwork 0x30f86125 CoreStreamBase::streamInterface_Open() + 44
10 CFNetwork 0x30f9d19f HTTPNetConnection::prepareTransmission(HTTPNetStreamInfo
, CoreWriteStream) + 1070
11 CFNetwork 0x30f9c72b NetConnection::enqueue(void
, unsigned char) + 426
12 CFNetwork 0x30f9c507 HTTPNetStreamInfo::streamImpl_Open(CFStreamError, unsigned char_) + 62
13 CFNetwork 0x30fe1eef non-virtual thunk to HTTPNetStreamInfo::streamImpl_Open(CFStreamError, unsigned char_) + 10
14 CFNetwork 0x30f86125 CoreStreamBase::streamInterface_Open() + 44
15 CFNetwork 0x30f9bf25 HTTPProtocol::openStream() + 160
16 CFNetwork 0x30feba1f HTTPProtocol::useNetConnectionForRequest(NetConnection
, CFHTTPMessage, unsigned char) + 1298
17 CFNetwork 0x30f9b531 HTTPConnectionCacheEntry::dispatchConnectionToProtocol(NetConnection
, HTTPProtocol_, HTTPRequestMessage_, unsigned char) + 212
18 CFNetwork 0x30f9b391 HTTPConnectionCacheEntry::notifyNextProtocolOfOpenConnection(NetConnection_, unsigned char) + 240
19 CFNetwork 0x30f99685 HTTPConnectionCacheEntry::enqueueRequestForProtocol(HTTPProtocol_, _CFHTTPMessage) + 488
20 CFNetwork 0x30f991a9 HTTPConnectionCache::onqueue_enqueueRequestForProtocol(HTTPProtocol, _CFHTTPMessage) + 108
21 CFNetwork 0x30fefeb1 ___ZN19HTTPConnectionCache25enqueueRequestForProtocolEP12HTTPProtocolP15__CFHTTPMessage_block_invoke + 16
22 CFNetwork 0x3102f337 ___ZNK17CoreSchedulingSet13_performAsyncEPKcU13block_pointerFvvE_block_invoke + 18
23 CoreFoundation 0x312c7ea1 CFArrayApplyFunction + 36
24 CFNetwork 0x30f95e05 RunloopBlockContext::perform() + 164
25 CFNetwork 0x30f95cd5 MultiplexerSource::perform() + 220
26 CFNetwork 0x30f95b65 MultiplexerSource::perform(void) + 48
27 CoreFoundation 0x3135ff1f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
+ 14
28 CoreFoundation 0x3135f3e7 CFRunLoopDoSources0 + 206
29 CoreFoundation 0x3135dbd7 __CFRunLoopRun + 630
30 CoreFoundation 0x312c8471 CFRunLoopRunSpecific + 524
31 CoreFoundation 0x312c8253 CFRunLoopRunInMode + 106
32 Foundation 0x31d034c1 +[NSURLConnection(Loader) _resourceLoadLoop:] + 320
33 Foundation 0x31d78c37 __NSThread__main
+ 1062
34 libsystem_pthread.dylib 0x3bd07c5d _pthread_body + 140
35 libsystem_pthread.dylib 0x3bd07bcf _pthread_start + 102
36 libsystem_pthread.dylib 0x3bd05cd0 thread_start + 8

考虑添加后台运行支持

上传过程中, 如果进入了锁屏状态, 再回来, 上传将中止, 可以考虑设置 shouldExecuteAsBackgroundTaskWithExpirationHandler

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.