Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
プログラムでデバイスのメモリ統計にアクセスするにはどうすればよいですか? デバイスの総メモリ容量を知りたいとします。たとえば、16GB、32GB、または 64GB のどれで、どれくらい使用されていますか?
メソッドで確認できますattributesOfFileSystemForPath:。戻り値をディクショナリに保存し、 key を使用してNSFileSystemSize合計メモリ サイズを確認し、キーでNSFileSystemFreeSize使用可能なメモリを確認できます。
attributesOfFileSystemForPath:
NSFileSystemSize
NSFileSystemFreeSize