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
UTI
Search
cockscomb
July 14, 2015
Programming
3.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
UTI
Presented at potatotips 19
cockscomb
July 14, 2015
More Decks by cockscomb
See All by cockscomb
はてなアカウント基盤 State of the Union
cockscomb
1
1.6k
jq at the Shortcuts
cockscomb
1
2.1k
GraphQL放談
cockscomb
4
2.2k
GraphQL Highway
cockscomb
28
8.9k
吉田を支える技術
cockscomb
0
2.6k
コーポレートサイトを静的化してAmplify Consoleにデプロイする
cockscomb
0
3.5k
ユーザインターフェイスと非同期処理
cockscomb
5
2.1k
GUIアプリケーションの構造と設計
cockscomb
10
10k
イカリング2におけるシングルページアプリケーション
cockscomb
2
7.8k
Other Decks in Programming
See All in Programming
Event is what happens
moro
2
4.1k
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
240
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
220
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
3
1.7k
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
130
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
330
Performance Optimization With LLMs
xleitix
0
250
小さなアプリを作って公開するまで
onozaty
0
160
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
16
8.9k
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
320
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
3.7k
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
620
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
510
Marketing to machines
jonoalderson
1
6k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
980
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
980
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
770
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
370
Between Models and Reality
mayunak
4
570
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
630
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
840
Transcript
UTI
cockscomb
None
None
gion-matsuri.jpg
ion-matsuri.jpg
JPEG
JPEG image/jpeg .jpeg public.jpeg
PNG image/png .png public.png
PNG image/png .png public.png Extension MIME Type UTI
File Types have many representations • Extension — .jpeg •
MIME Type — image/jpeg • UTI — public.jpeg
File Types have many representations • Extension • for file
name • MIME Type • for Internet (Content-Type) • UTI?
Uniform Type Identifier
Uniform Type Identifier • Used inside iOS/OS X • Have
inheritance • public.content/public.data → public.image → public.jpeg
let manager = PHImageManager.defaultManager() manager.requestImageDataForAsset(asset, options: options) { (data, dataUTI,
orientation, info) in // Do something } Get image data from Photos
let manager = PHImageManager.defaultManager() manager.requestImageDataForAsset(asset, options: options) { (data, dataUTI,
orientation, info) in // Do something } Get image data from Photos
UTI → Extension UTTypeCopyPreferredTagWithClass( "public.jpeg", kUTTagClassFilenameExtension ).takeRetainedValue() // jpeg
MIME Type → UTI UTTypeCreatePreferredIdentifierForTag( kUTTagClassMIMEType, "image/jpeg", nil ).takeRetainedValue() //
public.jpeg
MIME Type → Extension func extensionFromMIMEType(MIMEType: String) -> String {
let uti = UTTypeCreatePreferredIdentifierForTag( kUTTagClassMIMEType, MIMEType, nil ).takeRetainedValue() let ext = UTTypeCopyPreferredTagWithClass( uti, kUTTagClassFilenameExtension ).takeRetainedValue() return ext as String } extensionFromMIMEType("image/jpeg")
cockscomb/UTIKit
MIME Type → Extension func extensionFromMIMEType(MIMEType: String) -> String {
let uti = UTTypeCreatePreferredIdentifierForTag( kUTTagClassMIMEType, MIMEType, nil ).takeRetainedValue() let ext = UTTypeCopyPreferredTagWithClass( uti, kUTTagClassFilenameExtension ).takeRetainedValue() return ext as String } extensionFromMIMEType("image/jpeg")
MIME Type → Extension import UTIKit UTI(MIMEType: "image/jpeg").filenameExtension
Create your file type <array> <dict> <key>CFBundleTypeIconFiles</key> <array/> <key>CFBundleTypeName</key> <string>Awesome
File Format</string> <key>LSItemContentTypes</key> <array> <string>info.cockscomb.awesome</string> </array> </dict> </array>
Uniform Type Identifier • Can convert to file extension and
MIME Type • Can be simple to use with UTIKit ✌ • Can be defined your own one
৴ ౭ http://hatenacorp.jp/recruit/