Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iOS開發者或許需要知道的一些網路與網頁前端知識及其combo技並如何在iOS13被摧毀又在iOS13.3被修復

YodaWang
December 12, 2019

 iOS開發者或許需要知道的一些網路與網頁前端知識及其combo技並如何在iOS13被摧毀又在iOS13.3被修復

YodaWang

December 12, 2019
Tweet

Other Decks in Programming

Transcript

  1. 跳轉到APP ‛ Deep Link <a id="deeplink" href=“deeplink://some”></a> <script type="text/javascript"> var

    element = document.getElementById(‘deeplink'); var event = document.createEvent('MouseEvents'); event.initEvent('click', true, true, document.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null); setTimeout(function() { element.dispatchEvent(event); }, 25); </script> 1. 建立⼀個連結 2. ⽤ javascript 點擊這個連結
  2. 最好可以離線使⽤ Data URI data:[<mediatype>][;base64],<data> mediatype 為⼀ MIME type 字串,例如 JPEG

    圖檔為「image/jpeg」,為非必要 參數,若省略的話,默認值為「text/plain;charset=US-ASCII」。 MIME type
  3. guard let shortcutPage = URL(string: “data:text/html;base64,PGh0bWwPGh0bWw+Cjx…”) else { return }

    UIApplication.shared.open(shortcutPage) 毫無反應 open(url:) 不⽀援 Data URI