{"id":17,"date":"2011-10-06T12:56:31","date_gmt":"2011-10-06T12:56:31","guid":{"rendered":"http:\/\/www.w3.org\/community\/native-web-apps\/?p=17"},"modified":"2011-10-09T19:37:53","modified_gmt":"2011-10-09T19:37:53","slug":"widget-uri-in-ios","status":"publish","type":"post","link":"https:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/06\/widget-uri-in-ios\/","title":{"rendered":"Widget URI in iOS"},"content":{"rendered":"<p>I asked a friend, Jimmy Ti, if he could make a rough prototype showing if it was possible to implement the Widget URI scheme in iOS. The critical bit I wanted to see working was faking HTTP responses. Here is what he came up with:<\/p>\n<p><a href=\"https:\/\/github.com\/marcoscaceres\/widget-URI-iOS-\" target=\"_blank\" rel=\"nofollow\">https:\/\/github.com\/marcoscaceres\/widget-URI-iOS-<\/a><\/p>\n<p>It&#8217;s an Xcode project that reuses some sample code provided by Apple for Mac OS X, which Jimmy retrofitted to work on iOS. The app is very simple: it contains a WebView that loads a HTML file named &#8220;test.html&#8221;, the web page has a few <img alt=\"\" \/> tags and AJAX image loading that loads from &#8220;widget:\/\/&#8221;.<\/p>\n<p>The app implements the widget:\/\/ scheme to return the images from local resources (the images are actually generated dynamically from the code, but it could very well be loaded locally).<\/p>\n<p>If you have Xcode installed, you can simply open up the .xcodeproj file, and &#8220;Build and Run&#8221; the code on iPhone simulator. Works a treat! Huge thanks to Jimmy Ti for taking the time to do this! It&#8217;s a great proof of concept.<\/p>\n<p>Ideally, next would be:<\/p>\n<ul>\n<li>Write the code to support other content types: generated images are cool, but not quite what we are trying to achieve right now \ud83d\ude42<\/li>\n<li>Make widget:\/\/ the document&#8217;s location so that everything can be resolved relatively to the start file.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I asked a friend, Jimmy Ti, if he could make a rough prototype showing if it was possible to implement the Widget URI scheme in iOS. The critical bit I wanted to see working was faking HTTP responses. Here is &hellip; <a href=\"https:\/\/www.w3.org\/community\/native-web-apps\/2011\/10\/06\/widget-uri-in-ios\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":233,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","footnotes":""},"categories":[1,6],"tags":[5],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-uncategorized","category-w3cwidgets","tag-w3c-widgets"],"_links":{"self":[{"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/users\/233"}],"replies":[{"embeddable":true,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":2,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":57,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/posts\/17\/revisions\/57"}],"wp:attachment":[{"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.w3.org\/community\/native-web-apps\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}