「iOS」の版間の差分
提供: MacWiki
(→URIスキーム) |
(→URIスキーム) |
||
行82: | 行82: | ||
* [http://ascii.jp/elem/000/000/668/668390/ Apple Geeks 第72回:iPhone/iPadの「アプリ間連携」を活用する] - ASCII.jp(2012-02-10) | * [http://ascii.jp/elem/000/000/668/668390/ Apple Geeks 第72回:iPhone/iPadの「アプリ間連携」を活用する] - ASCII.jp(2012-02-10) | ||
− | + | * [http://iphonedevwiki.net/index.php/NSURL NSURL - iPhone Development Wiki] | |
+ | * [http://x-callback-url.com/ x-callback-url] | ||
<center> | <center> | ||
{| class="wikitable" | {| class="wikitable" | ||
行108: | 行109: | ||
| メッセージ || sms || sms:<i>携帯電話番号</i><br />sms:<i>メールアドレス</i> | | メッセージ || sms || sms:<i>携帯電話番号</i><br />sms:<i>メールアドレス</i> | ||
|- | |- | ||
− | | 電話 || tel || tel:<i>電話番号</i> | + | | 電話 || tel<br />telprompt || tel:<i>電話番号</i>(すぐに発信する)<br />telprompt:<i>電話番号</i>(プロンプトが表示され、発信かキャンセルを選択できる) |
|- | |- | ||
| Trunk Notes || tn || ノートを開く tn://<i>ノート名</i><br />新規ノート(テキスト) tn://Special:NewText<br />新規ノート(イメージ) tn://Special:NewImage<br />新規ノート(カメラ) tn://Special:NewCamera | | Trunk Notes || tn || ノートを開く tn://<i>ノート名</i><br />新規ノート(テキスト) tn://Special:NewText<br />新規ノート(イメージ) tn://Special:NewImage<br />新規ノート(カメラ) tn://Special:NewCamera |
2012年11月17日 (土) 21:15時点における版
iOSとは?
iPad, iPhone, iPod touch に搭載されているOS。詳しくは以下のところを参照して下さい。
- iOS - アップル
- Wikipedia:IOS_(アップル)
iOS アプリケーション(iOS App)
iOSアプリは、(iTunes) App Storeから購入できる。
- iTunes サポート - アップル
- Wikipedia:App_Store
iOSアプリは /Users/username/Music/iTunes/iTunes Media/Mobile Applications/ といったディレクトリに.ipaのファイルとして保存されている。この.ipaファイルはzip圧縮されたもので(必要ならば拡張子を.zipに変更して)適当な解凍ツールで展開できる。展開して得られるプロパティリスト(.plist)のファイルからは、様々な情報が確認できる。
- 【コラム】OS X ハッキング! (283) 速攻GETした「iPhone 3G」をあれこれイジる (1) - マイナビニュース(2008-07-12)
.ipaファイルからURI(URL)スキーム名を調べるAppleScript(テキストエディットに出力)
set ipaFiles to choose file of type "com.apple.itunes.ipa" default location (alias ((path to music folder as string) & "iTunes:iTunes Media:Mobile Applications:")) with prompt "iOS Appファイル(.ipa)を選択して下さい" with multiple selections allowed repeat with idx from 1 to (count every item of ipaFiles) set item idx of ipaFiles to POSIX path of item idx of ipaFiles end repeat repeat with ipaFile in ipaFiles do shell script "unzip -o " & quoted form of ipaFile & " iTunesMetadata.plist -d " & quoted form of POSIX path of (path to temporary items from user domain as string) set tmpiTunesMetadata to POSIX path of ((path to temporary items from user domain as string) & "iTunesMetadata.plist") do shell script "chmod u+r " & quoted form of tmpiTunesMetadata -- set appName to (do shell script "defaults read " & quoted form of tmpiTunesMetadata & " itemName") -- 日本語が\uxxxx、®が\256といった形式になってこのままではダメ tell application "System Events" -- get value of contents of property list file tmpiTunesMetadata set appName to value of property list item "itemName" of property list file tmpiTunesMetadata end tell -- set appName to (do shell script "/usr/libexec/PlistBuddy -c 'Print itemName' " & quoted form of tmpiTunesMetadata) -- これでもいい(日本語等もOK) set pathInfo to (do shell script "zipinfo -1 " & quoted form of ipaFile & " | grep -E 'Payload/[^/]+\\.app/Info\\.plist' | perl -pe 's/\\[/[[]/g'") -- unzipコマンドのためにパスに[が含まれる場合に[[]に置換しておく do shell script "unzip -jo " & quoted form of ipaFile & space & quoted form of pathInfo & " -d " & quoted form of POSIX path of (path to temporary items from user domain as string) tell application "System Events" set tmpInfo to property list file ((path to temporary items from user domain as string) & "Info.plist") set listSchemes to {} if (name of every property list item of tmpInfo) contains "CFBundleURLTypes" then repeat with aCFBundleURLType in (value of property list item "CFBundleURLTypes" of tmpInfo) as list set listSchemes to listSchemes & CFBundleURLSchemes of (aCFBundleURLType & {CFBundleURLSchemes:{}}) -- CFBundleURLSchemes は aCFBundleURLType になければ {} として追加 end repeat end if end tell if listSchemes is {} then set theSchemes to "URIスキームなし" else set theSchemes to item 1 of listSchemes & ":" repeat with aScheme in rest of listSchemes set theSchemes to theSchemes & ", " & aScheme & ":" end repeat end if set theText to appName & " (" & (do shell script "basename " & quoted form of ipaFile) & ") => " & theSchemes & return tell application "TextEdit" try tell theDoc to make new paragraph at after last paragraph of it with data theText on error activate set theDoc to make new document tell theDoc to make new paragraph at after last paragraph of it with data theText end try end tell end repeat tell theDoc activate set msgText to "iOS Appファイル" & (count items of ipaFiles) & "個を調べ終わりました" display dialog msgText buttons {"OK"} giving up after 5 default button 1 -- do shell script "say -v Kyoko " & msgText end tell
URIスキーム
他のアプリを呼び出す方法の1つとして、URI(URL)が使われる。
- Apple Geeks 第72回:iPhone/iPadの「アプリ間連携」を活用する - ASCII.jp(2012-02-10)
- NSURL - iPhone Development Wiki
- x-callback-url
iOSアプリ | URIスキーム | 説明など |
---|---|---|
iTunes | itms | 各項目を開くには基本的にリンクのhttpをitmsに置き換えればいい(URIの一部を省略してもいいようです) ミュージック itms://itunes.apple.com/jp/genre/id34 花は咲く itms://itunes.apple.com/jp/album/id534047162?i=534047598 ミュージックビデオ itms://itunes.apple.com/jp/genre/id31 映画 itms://itunes.apple.com/jp/genre/id33 はやぶさ/HAYABUSA itms://itunes.apple.com/jp/movie/hayabusa-hayabusa/id504814728 Podcast itms://itunes.apple.com/jp/genre/id26 TEDTalks (日本語) itms://itunes.apple.com/WebObjects/DZR.woa/wa/viewTagged?id=204040224&tag=Japanese+-+%E6%97%A5%E6%9C%AC%E8%AA%9E トーマス・トウェイツ:トースターを1から作る方法 itms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=537261907&i=117020285 オーディオブック itms://itunes.apple.com/jp/genre/id50000024 99.9%は仮説 思いこみで判断しないための考え方 itms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewAudiobook?id=173331930 検索する itms://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?term=検索語 |
App Store | itms-apps | 教育 itms-apps://itunes.apple.com/jp/genre/id6017 辞書/辞典/その他 itms-apps://itunes.apple.com/jp/genre/id6006 WolframAlpha itms-apps://itunes.apple.com/jp/app/wolframalpha/id334989259 検索する itms-apps://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&term=検索語 |
iBooks | itms-books | 科学/自然 itms-books://itunes.apple.com/jp/genre/bukku-ke-xue-zi-ran/id9019 フィクション/文学 itms-books://itunes.apple.com/jp/genre/bukku-fikushon-wen-xue/id9031 Bushido, the Soul of Japan itms-books://itunes.apple.com/jp/book/bushido-the-soul-of-japan/id505978399 検索する itms-books://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=ebook&term=検索語 |
iTunes U | itms-itunesu | 大学: 日本 itms-itunesu://itunes.apple.com/WebObjects/DZR.woa/wa/viewiTunesUProviders?id=EDU&mzcc=JP 研究機関: 日本 itms-itunesu://itunes.apple.com/WebObjects/DZR.woa/wa/viewiTunesUProviders?id=ORG&mzcc=JP サイエンス チャンネル itms-itunesu://itunes.apple.com/jp/institution/science-channel/id505896311 松江から世界へ!プログラミング言語Ruby itms-itunesu://itunes.apple.com/jp/itunes-u/28-shirizu-zhong-xiao-qi-yeno/id529722670?i=115796354 |
Podcast | itms-podcast | |
メール | mailto | mailto:メールアドレス mailto:?subject=Good%20News&body=Dear%20Sir,%0A(スペースは%20、改行は%0Aとする,%0D%0Aではダメ?) mailto:メールアドレス?subject=Good%20News&body=Dear%20Sir,%0A |
マップ | maps | キーワードで開く maps:q=キーワード 緯度,経度を指定して開く maps:q=緯度,経度(南緯、西経には-をつける,qの代わりにllでもいい) 場所を指定して開く maps:cid=Googleマップのcid値 |
ミュージック | music | アプリの起動 music: |
ビデオ | videos | アプリの起動 videos: |
メッセージ | sms | sms:携帯電話番号 sms:メールアドレス |
電話 | tel telprompt |
tel:電話番号(すぐに発信する) telprompt:電話番号(プロンプトが表示され、発信かキャンセルを選択できる) |
Trunk Notes | tn | ノートを開く tn://ノート名 新規ノート(テキスト) tn://Special:NewText 新規ノート(イメージ) tn://Special:NewImage 新規ノート(カメラ) tn://Special:NewCamera |
YouTube | youtube | 動画を指定して開く youtube:YouTubeのv値 |