<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=Xamarin.Mac%E3%81%A7plist%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E8%AA%AD%E3%81%BF%E6%9B%B8%E3%81%8D%E3%81%99%E3%82%8B</id>
	<title>Xamarin.Macでplistファイルを読み書きする - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=Xamarin.Mac%E3%81%A7plist%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E8%AA%AD%E3%81%BF%E6%9B%B8%E3%81%8D%E3%81%99%E3%82%8B"/>
	<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Xamarin.Mac%E3%81%A7plist%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E8%AA%AD%E3%81%BF%E6%9B%B8%E3%81%8D%E3%81%99%E3%82%8B&amp;action=history"/>
	<updated>2026-06-06T12:01:35Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://monobook.org/w/index.php?title=Xamarin.Mac%E3%81%A7plist%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E8%AA%AD%E3%81%BF%E6%9B%B8%E3%81%8D%E3%81%99%E3%82%8B&amp;diff=11840&amp;oldid=prev</id>
		<title>Administrator: Administrator がページ「Xamarin.Mac/plistファイルを読み書きする」を「Xamarin.Macでplistファイルを読み書きする」に移動しました</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Xamarin.Mac%E3%81%A7plist%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E8%AA%AD%E3%81%BF%E6%9B%B8%E3%81%8D%E3%81%99%E3%82%8B&amp;diff=11840&amp;oldid=prev"/>
		<updated>2019-12-25T08:04:09Z</updated>

		<summary type="html">&lt;p&gt;Administrator がページ「&lt;a href=&quot;/wiki/Xamarin.Mac/plist%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E8%AA%AD%E3%81%BF%E6%9B%B8%E3%81%8D%E3%81%99%E3%82%8B&quot; class=&quot;mw-redirect&quot; title=&quot;Xamarin.Mac/plistファイルを読み書きする&quot;&gt;Xamarin.Mac/plistファイルを読み書きする&lt;/a&gt;」を「&lt;a href=&quot;/wiki/Xamarin.Mac%E3%81%A7plist%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E8%AA%AD%E3%81%BF%E6%9B%B8%E3%81%8D%E3%81%99%E3%82%8B&quot; title=&quot;Xamarin.Macでplistファイルを読み書きする&quot;&gt;Xamarin.Macでplistファイルを読み書きする&lt;/a&gt;」に移動しました&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2019年12月25日 (水) 08:04時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Administrator</name></author>
	</entry>
	<entry>
		<id>https://monobook.org/w/index.php?title=Xamarin.Mac%E3%81%A7plist%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E8%AA%AD%E3%81%BF%E6%9B%B8%E3%81%8D%E3%81%99%E3%82%8B&amp;diff=7639&amp;oldid=prev</id>
		<title>153.220.4.222: ページの作成:「==概要== Mac OS Xではプロパティリスト（plistファイル）と呼ばれるデータを読み書きする際の標準形式が存在する。 この...」</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Xamarin.Mac%E3%81%A7plist%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E8%AA%AD%E3%81%BF%E6%9B%B8%E3%81%8D%E3%81%99%E3%82%8B&amp;diff=7639&amp;oldid=prev"/>
		<updated>2015-10-15T08:17:23Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「==概要== &lt;a href=&quot;/wiki/Mac_OS_X&quot; title=&quot;Mac OS X&quot;&gt;Mac OS X&lt;/a&gt;ではプロパティリスト（plistファイル）と呼ばれる&lt;a href=&quot;/wiki/%E3%83%87%E3%83%BC%E3%82%BF&quot; title=&quot;データ&quot;&gt;データ&lt;/a&gt;を読み書きする際の標準形式が存在する。 この...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==概要==&lt;br /&gt;
[[Mac OS X]]ではプロパティリスト（plistファイル）と呼ばれる[[データ]]を読み書きする際の標準形式が存在する。&lt;br /&gt;
このプロパティリストは[[Mac OS X]]での[[プログラミング]]では避けては通ることができないと思われる。&lt;br /&gt;
&lt;br /&gt;
プロパティリストの[[拡張子]]はplist一種類だが中身の形式は大きく分けて以下の3種類がある。&lt;br /&gt;
*NeXTSTEP&lt;br /&gt;
*Binary&lt;br /&gt;
*XML&lt;br /&gt;
&lt;br /&gt;
このプロパティリストを扱う方法は複数が存在するようだが、それぞれ対応する「読める」および「書ける」形式が若干異なるようだ。&lt;br /&gt;
&lt;br /&gt;
==方法：NSDictionaryで読み書きする==&lt;br /&gt;
NSDictionary.FromFileメソッドで読み込み、NSDictionary.WriteToFileメソッドで書き込むだけである。読み込みはバイナリ形式もXML形式も自動で判別し適切に処理してくれる。書き込みは問答無用でXML形式となる。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
using MonoMac.Foundation;&lt;br /&gt;
using MonoMac.AppKit;&lt;br /&gt;
&lt;br /&gt;
namespace DockAccess&lt;br /&gt;
{&lt;br /&gt;
    class MainClass&lt;br /&gt;
    {&lt;br /&gt;
        static void Main(string[] args)&lt;br /&gt;
        {&lt;br /&gt;
            NSApplication.Init();&lt;br /&gt;
&lt;br /&gt;
            // Dock情報が格納されているplistファイルのパス&lt;br /&gt;
            var file = Path.Combine(&lt;br /&gt;
                           Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),&lt;br /&gt;
                           &amp;quot;Library/Preferences/com.apple.dock.plist&amp;quot;);&lt;br /&gt;
            Console.WriteLine(file);&lt;br /&gt;
&lt;br /&gt;
            // 読み込む&lt;br /&gt;
            var dic = NSDictionary.FromFile(file);&lt;br /&gt;
            Console.WriteLine(dic);&lt;br /&gt;
&lt;br /&gt;
            // 書き込む&lt;br /&gt;
            dic.WriteToFile(file + &amp;quot;.tmp&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==関連項目==&lt;br /&gt;
*[[MonoMac/特殊ディレクトリのパスを取得する]]&lt;br /&gt;
*[[Xamarin.Mac/NSApplicationのサブクラスを使う]]&lt;br /&gt;
*[[Xamarin.Mac/Dockアイコンを非表示にする]]&lt;br /&gt;
*[[Xamarin.Mac/OSのバージョンを取得する]]&lt;br /&gt;
*[[Xamarin.Mac/アクセシビリティの許可の有無を取得する]]&lt;br /&gt;
&lt;br /&gt;
==参考文献==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;br /&gt;
&lt;br /&gt;
[[category:Xamarin.Mac]]&lt;br /&gt;
[[category:MonoMac]]&lt;/div&gt;</summary>
		<author><name>153.220.4.222</name></author>
	</entry>
</feed>