TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Oct 2015 |
Maintained by Maxime Epain.
A light Web Service client framework targeting iOS platform.
PicoKit is initially a fork of pico.
Pico (and related projects: mxjc, mwsc & nano) has been developed by bulldog2011 but stayed as is from 2013. As it is very well designed and implemented, I decided to fork it and upgrade it to support ARC and be available through CocoaPods.
PicoKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'PicoKit'
Include the whole Pico source in your project. If you use this option, make sure:
-ObjC
flag to your "Other Linker flags"./usr/include/libxml2
to your "Header Search Paths"libxml2.dylib
After the service proxy is generated from wsdl, service invocation through Pico runtime is extremely easy:
// start progress activity
[self.view makeToastActivity];
// Get shared service client
StockQuoteServiceClient *client = [StockQuoteServiceClient sharedClient];
client.debug = YES; // enable request/response message logging
// Build request object
GetQuote *request = [[GetQuote alloc] init];
request.symbol = _symbolText.text;
// make API call and register callbacks
[client getQuote:request success:^(GetQuoteResponse *responseObject) {
// stop progress activity
[self.view hideToastActivity];
// show result
_resultText.text = responseObject.getQuoteResult;
} failure:^(NSError *error, id<PicoBindable> soapFault) {
// stop progress activity
[self.view hideToastActivity];
if (error) { // http or parsing error
[self.view makeToast:[error localizedDescription] duration:3.0 position:@"center" title:@"Error"];
} else if (soapFault) {
SOAP11Fault *soap11Fault = (SOAP11Fault *)soapFault;
[self.view makeToast:soap11Fault.faultstring duration:3.0 position:@"center" title:@"SOAP Fault"];
}
}];
All samples are in the Examples folder, following samples are included:
XML Schema Data Types | Objective-C Data Types |
---|---|
xsd:base64Binary | NSData |
xsd:boolean | NSNumber |
xsd:byte | NSNumber |
xsd:date | NSDate |
xsd:dateTime | NSDate |
xsd:decimal | NSNumber |
xsd:double | NSNumber |
xsd:duration | NSString |
xsd:float | NSNumber |
xsd:g | NSDate |
xsd:hexBinary | NSData |
xsd:int | NSNumber |
xsd:integer | NSNumber |
xsd:long | NSNumber |
xsd:NOTATION | NSString |
xsd:Qname | NSString |
xsd:short | NSNumber |
xsd:string | NSString |
xsd:time | NSDate |
xsd:unsignedByte | NSNumber |
xsd:unsignedInt | NSNumber |
xsd:unsignedShort | NSNumber |
Version | Date | Description |
---|---|---|
0.5.0 | March 25, 2013 | Initial version |
0.6.1 | April 10, 2015 | ARC & CocoaPods support |
0.7.0 | August 10, 2015 | Upgrade to AFNetworking 2.5.4 |
0.7.1 | September 29, 2015 | Upgrade to iOS9 & AFNetworking 2.6.0 |
PicoKit is available under the MIT license. See the LICENSE file for more info.