{"id":384,"date":"2013-05-05T04:11:45","date_gmt":"2013-05-05T02:11:45","guid":{"rendered":"http:\/\/eiseler.synology.me\/wordpress\/?p=384"},"modified":"2013-05-05T04:12:46","modified_gmt":"2013-05-05T02:12:46","slug":"ios-mknetworkkit-send-xml-simple-easy-fast","status":"publish","type":"post","link":"https:\/\/eiseler.de\/wordpress\/?p=384","title":{"rendered":"iOS: MKNetworkKit send XML (simple, easy, fast)"},"content":{"rendered":"<p>Maybe this is what you&#8217;re looking for: Easy sending some XML with MKNetworkKit.<\/p>\n<p>This works for me:<br \/>\nMKNetworkOperation *op = [self operationWithPath:@&#8221;api\/0.6\/changeset\/create&#8221; params: nil httpMethod:@&#8221;PUT&#8221;];<br \/>\n[op setCustomPostDataEncodingHandler: ^NSString *(NSDictionary *aD){return @&#8221;<em>Put your XML here<\/em>&#8220;;} forType:@&#8221;text\/xml&#8221;];<\/p>\n<p>That&#8217;s it<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-384\" class=\"share-facebook sd-button share-icon\" href=\"https:\/\/eiseler.de\/wordpress\/?p=384&amp;share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-384\" class=\"share-twitter sd-button share-icon\" href=\"https:\/\/eiseler.de\/wordpress\/?p=384&amp;share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span>Twitter<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-384\" class=\"share-linkedin sd-button share-icon\" href=\"https:\/\/eiseler.de\/wordpress\/?p=384&amp;share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\"><span>LinkedIn<\/span><\/a><\/li><li class=\"share-pocket\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-pocket sd-button share-icon\" href=\"https:\/\/eiseler.de\/wordpress\/?p=384&amp;share=pocket\" target=\"_blank\" title=\"Click to share on Pocket\"><span>Pocket<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Maybe this is what you&#8217;re looking for: Easy sending some XML with MKNetworkKit. This works for me: MKNetworkOperation *op = [self operationWithPath:@&#8221;api\/0.6\/changeset\/create&#8221; params: nil httpMethod:@&#8221;PUT&#8221;]; [op setCustomPostDataEncodingHandler: ^NSString *(NSDictionary *aD){return @&#8221;Put your XML here&#8220;;} forType:@&#8221;text\/xml&#8221;]; That&#8217;s it<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-384\" class=\"share-facebook sd-button share-icon\" href=\"https:\/\/eiseler.de\/wordpress\/?p=384&amp;share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span>Facebook<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-384\" class=\"share-twitter sd-button share-icon\" href=\"https:\/\/eiseler.de\/wordpress\/?p=384&amp;share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span>Twitter<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-384\" class=\"share-linkedin sd-button share-icon\" href=\"https:\/\/eiseler.de\/wordpress\/?p=384&amp;share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\"><span>LinkedIn<\/span><\/a><\/li><li class=\"share-pocket\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-pocket sd-button share-icon\" href=\"https:\/\/eiseler.de\/wordpress\/?p=384&amp;share=pocket\" target=\"_blank\" title=\"Click to share on Pocket\"><span>Pocket<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[10],"tags":[],"class_list":["post-384","post","type-post","status-publish","format-standard","hentry","category-ios-app"],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8zAuQ-6c","jetpack-related-posts":[{"id":12,"url":"https:\/\/eiseler.de\/wordpress\/?p=12","url_meta":{"origin":384,"position":0},"title":"iLOE\u2018s back in town","date":"30\/06\/2011","format":false,"excerpt":"Today apple reviewed the new iLOE Version 1.9.4 so I could put it back in the store. If you are interested in iOS programming what happened? If you use a class from a external lib just in a xib there seems to be a chance that the compiler\/linker while optimizing\u2026","rel":"","context":"In &quot;iOS App&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11,"url":"https:\/\/eiseler.de\/wordpress\/?p=11","url_meta":{"origin":384,"position":1},"title":"iLOC - New in the App Store","date":"01\/09\/2012","format":false,"excerpt":"iLOC -iPhone Little OpenStreetMap Copilot is an app to assist you while driving, riding or walking. One of the main features are the possibility to easy post your position on Facebook. Though your friend and family know where you are. (If you like them to know it!).","rel":"","context":"In &quot;iOS App&quot;","img":{"alt_text":"","src":"https:\/\/i1.wp.com\/eiseler.de\/wordpress\/wp-content\/uploads\/2012\/09\/IMG_3291.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":13,"url":"https:\/\/eiseler.de\/wordpress\/?p=13","url_meta":{"origin":384,"position":2},"title":"Issue in iLOE newest version - fixed - waiting","date":"24\/06\/2011","format":false,"excerpt":"Sorry, it seems that the new iLOE release got a problem. I am working on this. It seems that the migration to XCode 4 didn\u2018t work out. Sunday Update: After a long search. I think I got it. Quit strange. The new version is uploaded and waiting for review. I\u2026","rel":"","context":"In &quot;iOS App&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":123,"url":"https:\/\/eiseler.de\/wordpress\/?p=123","url_meta":{"origin":384,"position":3},"title":"iLOS 2.1 finished","date":"28\/01\/2011","format":false,"excerpt":"Good news about iLOS 2.1 and also iLOE. Today we finished iLOS 2.1 with 2 new features. The user definied search can now be easiliy extended. As you see in the picture above 2 new keys made it by now: natural and craft. The server database will soon get all\u2026","rel":"","context":"In &quot;iOS App&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":542,"url":"https:\/\/eiseler.de\/wordpress\/?p=542","url_meta":{"origin":384,"position":4},"title":"Swift - Reach other Controller from a TabBarController","date":"15\/01\/2016","format":false,"excerpt":"Just a small Swift code snippet, how to reach other Controllers from TabBarController. First get all the view controllers. Then get a specific one. var anArrayViewControllers = self.tabBarController!.viewControllers var aSecondViewController: SecondViewController aSecondViewController = anArrayViewControllers![1] as! SecondViewController aSecondViewController.onlytest() \u00a0 iOS, Xcode, Swift, TabBarController","rel":"","context":"In &quot;iOS App&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":574,"url":"https:\/\/eiseler.de\/wordpress\/?p=574","url_meta":{"origin":384,"position":5},"title":"iOS SKAction playSoundFileNamed fails?","date":"28\/02\/2016","format":false,"excerpt":"On tvOs I tried SKAction playSoundFileNamed to play a short sound. Unfortunately it didn't work. After some research I found this as solution: \/\/SKAction.playSoundFileNamed(\"Achievement.caf\", waitForCompletion: true) self.runAction(SKAction.playSoundFileNamed(\"Achievement.caf\", waitForCompletion: false))","rel":"","context":"In &quot;iOS App&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eiseler.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=384"}],"version-history":[{"count":13,"href":"https:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/384\/revisions"}],"predecessor-version":[{"id":397,"href":"https:\/\/eiseler.de\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/384\/revisions\/397"}],"wp:attachment":[{"href":"https:\/\/eiseler.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eiseler.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eiseler.de\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}