Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
iOS開發者或許需要知道的一些網路與網頁前端知識及其combo技並如何在iOS13被摧毀又在i...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
YodaWang
December 12, 2019
Programming
360
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
iOS開發者或許需要知道的一些網路與網頁前端知識及其combo技並如何在iOS13被摧毀又在iOS13.3被修復
YodaWang
December 12, 2019
Other Decks in Programming
See All in Programming
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
140
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
240
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
110
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
160
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
390
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
6.7k
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
350
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
150
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
850
関数型プログラミングのメリットって何だろう?
wanko_it
0
190
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
Featured
See All Featured
The Curse of the Amulet
leimatthew05
2
13k
WCS-LA-2024
lcolladotor
0
750
Everyday Curiosity
cassininazir
0
260
Building Applications with DynamoDB
mza
96
7.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
For a Future-Friendly Web
brad_frost
183
10k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
240
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
970
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
270
Un-Boring Meetings
codingconduct
0
350
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
Transcript
在桌⾯建立捷徑 iOS開發者或許需要知道的⼀些網路與網⾴前端知識及其combo 技並如何在iOS13被摧毀⼜在iOS13.3被修復
桌⾯捷徑是啥
None
1. 是個網⾴,最好可以離線使⽤ 2. 被加到桌⾯時看起來要像個APP 3. 需要2種狀態 『提醒使⽤者加到主畫⾯』(很久以前有Private API 可以⽤)
『跳轉到APP』 我們的⽬標
跳轉到APP ‛ Deep Link 被加到桌⾯時看起來要像個APP ‛ ? 最好可以離線使⽤‛ ? 需要2種狀態‛
?
跳轉到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 點擊這個連結
被加到桌⾯時看起來要像個APP <link rel="apple-touch-icon" href="/custom_icon.png"> apple-touch-icon Apple Document Configuring Web Applications
<meta name="apple-mobile-web-app-title" content="AppTitle"> apple-mobile-web-app-title
最好可以離線使⽤ Data URI data:[<mediatype>][;base64],<data> mediatype 為⼀ MIME type 字串,例如 JPEG
圖檔為「image/jpeg」,為非必要 參數,若省略的話,默認值為「text/plain;charset=US-ASCII」。 MIME type
需要2種狀態使⽤ <meta name="apple-mobile-web-app-capable" content="yes"> window.navigator.standalone true/false true false 跳轉 提醒
從桌⾯開啟時網⾴會是全螢幕狀態
guard let shortcutPage = URL(string: “data:text/html;base64,PGh0bWwPGh0bWw+Cjx…”) else { return }
UIApplication.shared.open(shortcutPage) 毫無反應 open(url:) 不⽀援 Data URI
About Apple URL Schemes 1. 找個server放個網⾴做轉址 https://swiftrocks.com/adding-deeplink-shortcuts-to-the-ios-home-screen.html 2. ⽤swifter 建
local server
iOS13…. 以上是iOS12之前的事
iOS12 之前在全螢幕模式下每次開啟都會reload並觸發JavaScript iOS13 只有launch時會load內容 iOS13.3 修好了
<meta name="apple-mobile-web-app-capable" content=“no"> ⽤ document.referrer 判斷 ⽅法1 ⽅法2 第⼀次開啟的時候在網址後⾯加 hash
tag,之後判斷 hash tag iOS13 ~ iOS13.2.1 該怎麼辦 不要使⽤全螢幕模式