Skip to content

Commit

Permalink
no need for required init in EVReflection
Browse files Browse the repository at this point in the history
  • Loading branch information
evermeer committed Apr 8, 2016
1 parent b891a18 commit 280385f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AlamofireXmlToObjects.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Pod::Spec.new do |s|
#

s.name = "AlamofireXmlToObjects"
s.version = "1.0.1"
s.version = "1.1.0"
s.summary = "An Alamofire extension which converts XML response data into swift objects using EVReflection and XMLDictionary"
s.description = "An Alamofire extension which converts XML response data into swift objects using EVReflection and XMLDictionary. "
s.homepage = "https://github.com/evermeer/AlamofireXmlToObjects"
Expand Down
4 changes: 3 additions & 1 deletion AlamofireXmlToObjects/AlamofireXmlToObjects.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ extension Request {
switch response.result {
case .Success(let xml):
let result = NSDictionary(XMLString: xml)
completionHandler(self.request, self.response, Result.Success(T(dictionary: result)))
let t = T()
EVReflection.setPropertiesfromDictionary(result, anyObject: t)
completionHandler(self.request, self.response, Result.Success(t))
case .Failure(let error):
completionHandler(self.request, self.response, Result.Failure(error ?? NSError(domain: "NaN", code: 1, userInfo: nil)))
}
Expand Down

0 comments on commit 280385f

Please sign in to comment.