MKNetworkKit

iOS writing unit test involving Mknetworkkit

无人久伴 提交于 2019-12-25 03:12:49
问题 I tried to run MKNetworkKit in my project, it seemed to be fine. I then created a unit test project and call the engine to make some requests (using the MkNetworkOperation). I get no apparent error but the completionhandler block never get called, and so was the errorblock. I examined my unit test setup, there's no apparent error, and the whole thing "ran". I just dont get any response. If i switch and do this in my main project, it works. I have also added all the necessary framework to the

MKNetworkKit and GCD dispatch_group_t

不羁的心 提交于 2019-12-24 19:46:30
问题 I am trying to use MKNetworkKit to fetch an array of links from a web service, then parse each response on a background thread, and use the dispatch_group_t of GCD to wait until all threads are finished processing. Where I'm stuck is I can't figure out why my dispatch_group_notify is not waiting for all threads in the group to complete. Running this code will print: results count: 0 added into results, count: 1 added into results, count: 2 The dispatch group is not waiting on its threads. I

iOS app SSL .p12 Authentication - bad certificate error (-9825)

五迷三道 提交于 2019-12-21 05:21:11
问题 Updates Edit 2/6/14: I created a local Apache Tomcat server to test SSL w/ certificate authentication. I was successful! Everything works as expected, using both of my approaches below. (MKNetworkKit, and custom code). While this does tell me my code is working, my original issue is still not solved. I updated the title of the question to more specifically reflect the issue. Does anyone know if SAP Portal needs special settings to accept certificates from an iOS app? Remember, I was able to

iOS app SSL .p12 Authentication - bad certificate error (-9825)

本小妞迷上赌 提交于 2019-12-03 16:10:34
Updates Edit 2/6/14: I created a local Apache Tomcat server to test SSL w/ certificate authentication. I was successful! Everything works as expected, using both of my approaches below. (MKNetworkKit, and custom code). While this does tell me my code is working, my original issue is still not solved. I updated the title of the question to more specifically reflect the issue. Does anyone know if SAP Portal needs special settings to accept certificates from an iOS app? Remember, I was able to successfully authenticate using Safari mobile after importing the CA and .p12 into the shared keychain,

iOS网络请求框架:MKNetWorkKit的使用

江枫思渺然 提交于 2019-12-02 09:09:11
由于博客迁移至 www.coderyi.com ,文章请看 http://www.coderyi.com/archives/422 MKNetWorkKit是由一个印度小伙子写的,是用于网络请求的库,支持ARC,代码的网址这里给出。 作者源码地址(MugunthKumar): https://github.com/MugunthKumar/MKNetworkKit 作者关于类库介绍的地址(MugunthKumar): http://blog.mugunthkumar.com/products/ios-framework-introducing-mknetworkkit/ 作者类库介绍中文翻译地址(翻译作者,csdn博主kmyhy,杨宏焱): http://blog.csdn.net/kmyhy/article/details/12276287 这里面大多数时候会引用到它里面的demo,MKNetWorkKit-iOS-Demo,本文主要是根据作者原文以及作者的demo还有自己的使用写的文章。 在整个程序中只有一个全局队列 MKNetWorkKit中主要有两个类,MKNetworkEngine和MKNetworkOperation,MKNetworkOperation就是一个操作,是NSOperation的子类,每个HTTP操作通过MKNetworkEngine入队