Last active
December 21, 2015 06:59
-
-
Save tkoki/6267745 to your computer and use it in GitHub Desktop.
iPhone simulator内からホストコンピュータ上のopenコマンドを叩く。この例ではiPhone simulator内のアプリの/tmpディレクトリ内にあるpngファイルをホストコンピュータ上のpngに関連付けられたアプリ(デフォルトではPreview.app)で開く。画像を生成するアプリのテストに重宝する。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[NSTask launchedTaskWithLaunchPath:@"/usr/bin/open" arguments:[NSArray arrayWithObject:[NSString stringWithFormat:@"/tmp/%@.png", filename]]]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment