qiniu / legacy-ios-sdk Goto Github PK
View Code? Open in Web Editor NEWQiniu Resource (Cloud) Storage SDK for iOS
Qiniu Resource (Cloud) Storage SDK for iOS
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 虽然是出来了,但是经验较浅的人,比如我,会觉得这个 SDK 真的没有一点用途。希望你们能够简化这个 SDK,同时提供一份相对完善的文档。谢谢。
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
目前的SDK的网络请求是要开发者手动去清理对应的delegate对象,如果开发者忘记清理Delegate对象会导致整个应用Crash。是否考虑添加类似ASIHTTPRequest的cancelRequestAndClearDelegate方法或者使用单例模式实现。
原来的版本是有的,今天升级版本一看没有了,
出于什么考虑呢?
通过 pod 安装的
obj-c sdk for arc
上传过程中, 如果进入了锁屏状态, 再回来, 上传将中止, 可以考虑设置 shouldExecuteAsBackgroundTaskWithExpirationHandler
https://github.com/aelam/AFNetworking-Qiniu.git
or
pod search AFQiniuClient
现在是把AFNetworking的目录放在qiniu下面,如果我本身也有使用AFNetworking的话就冲突了,建议使用依赖的方式引入AFNetworking就行
现在还是 6.2.2 的。
希望readme 里面添加 cocoapods 的 介绍 譬如库名,版本号什么的
希望能够提供针对iOS 7及以上的高级功能,迫切需要支持background transfer service
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.