Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
iOS開發者或許需要知道的一些網路與網頁前端知識及其combo技並如何在iOS13被摧毀又在i...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
YodaWang
December 12, 2019
Programming
370
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アプリの話
akit37
0
480
ジョジョの世界をXRで再現する
mofurune
0
170
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
320
R8 の設定見直しでアプリサイズ削減
andpad
0
220
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
440
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.2k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
800
golang-bob.pdf
iwatsukayura
0
130
Next.js: The final boss of Web Performance
guaca
0
280
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
500
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
520
Writing Fast Ruby
sferik
630
63k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
740
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
380
How to make the Groovebox
asonas
2
2.5k
It's Worth the Effort
3n
188
29k
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 該怎麼辦 不要使⽤全螢幕模式