WordCamp Kansai 2014 登壇スライド。
コードのGit管理を前提とし、それを活かしたよりストレスフリーなデプロイメントを紹介しました。紹介したのはツール、サービス、そして最近海外では話題になりつつあるフルスタック系のツールキット。
Slide from my presentation at WordCamp Kansai 2014 (7 June 2014), titled "Considering WordPress Site Deployment - utilizing Git and Deployment Services-"
WordCamp Kansai 2014 登壇スライド。
コードのGit管理を前提とし、それを活かしたよりストレスフリーなデプロイメントを紹介しました。紹介したのはツール、サービス、そして最近海外では話題になりつつあるフルスタック系のツールキット。
Slide from my presentation at WordCamp Kansai 2014 (7 June 2014), titled "Considering WordPress Site Deployment - utilizing Git and Deployment Services-"
16. How does Apple File System handle filenames?
APFS accepts only valid UTF-8 encoded filenames for creation, and preserves both case and normalization of the filename on disk in all variants. APFS,
like HFS+, is case-sensitive on iOS and is available in case-sensitive and case-insensitive variants on macOS, with case-insensitive being the default.
In macOS High Sierra, APFS is normalization-insensitive in both the case-insensitive and case-sensitive variants, using a hash-based native normalization
scheme. In iOS 11, APFS is normalization-insensitive as well, using either a native normalization scheme (erase restores only) or runtime normalization
scheme (upgrades from previous versions). Runtime normalization will also be available in iOS 10.3.3 and macOS Sierra 10.12.6. Being normalization-
insensitive ensures that normalization variants of a filename cannot be created in the same directory, and that a filename can be found with any of its
normalization variants. This means that developers don’t need to do any additional work to ensure correct normalization behavior in these versions of
macOS and iOS.
Some differences between how APFS and HFS+ handle filenames include the following:
• APFS implements normalization and case insensitivity according to the Unicode 9.0 standard; this enables APFS to support a wider range
of languages for these features than HFS+, which is based on Unicode 3.2.
• APFS preserves the normalization of the filename and uses hashes of the normalized form of the filename to provide normalization
insensitivity, whereas HFS+ stores the normalized form of the filename on disk to provide normalization insensitivity.
• Calling readdir(2) on a directory in APFS returns filenames in hash order, whereas HFS+ returns filenames in lexicographical order.
• While both filesystems expect filenames to be encoded in UTF-8, APFS stores filenames on disk in UTF-8 encoding, whereas HFS stores
filenames on disk in UTF-16 encoding.
• APFS doesn’t allow files to be created with filenames that contain unassigned codepoints in the Unicode 9.0 standard, whereas HFS+ does.
In iOS 10.3 and in the case-sensitive variant of the developer preview of APFS in macOS Sierra, APFS is normalization-sensitive. For these versions,
developers should be aware of behavior differences between normalization sensitivity and insensitivity that may arise when a device upgrades macOS or
iOS and migrates the filesystem from HFS+ to APFS. For example, attempting to create a file using one normalization behavior and then opening that file
using another normalization behavior may result in ENOENT, or “File Not Found” errors. Additionally, storing filenames externally, such as in the defaults
database, Core Data, or iCloud storage may cause problems if the normalization scheme of the filename being stored is different from what exists on disk.
To avoid introducing bugs in your code with mismatched Unicode normalization (for iOS 10.3.0, 10.3.1 and 10.3.2) in filenames, do the following:
• Use high-level Foundation APIs such as NSFileManager and NSURL when interacting with the filesystem.
• Use the fileSystemRepresentation property of NSURL objects when creating and opening files with lower-level filesystem APIs such
as POSIX open(2), or when storing filenames externally from the filesystem.
20. • Day Oneという日記アプリを利用しています。
• 種類が増えて、今後が不安。
• Day One Classic
売り切り。発表者は、これのユーザ。新規購入不可。
• Day One 2.0
別アプリとしてリリース。新規購入不可。
• Day One Premium/Plus/Basic
定額制プラン。
21. Sync
• Day One
独自サーバ。
• iCloud
探せばデータを見つけることは出来るが、見えないと考
えるべきか。
~/Library/Mobile Documents/*~com~dayoneapp~dayone/Documents/Journal_dayone
• Dropbox
データは見える場所。
~/Dropbox/アプリ/Day One/Journal.dayone
22.
23. Day One
+- Journal.dayone
+- entries
| 1A573C0B559248A991C4AC0F0EA8B1E7.doentry
| 1FB23D983DF341079532B0F9381BCFCC.doentry
| :
+- photos
1A573C0B559248A991C4AC0F0EA8B1E7.jpg
2D37E853754E43EFBA0FFBAEEB6A8B40.jpg
:
58. アカウントの確認
CKContainer.default().accountStatus(completionHandler: {
accountStatus, error in
if error != nil {
print(error ?? "")
}
else if accountStatus == .noAccount {
let alert = UIAlertController.init(title: "Sign in to iCloud",
message: "Sign in to your iCloud account to write records.On the Home screen,
launch Settings, tap iCloud, and enter your Apple ID.Turn iCloud Drive on.If you don't have an iCloud
account, tap Create a new Apple ID.",
preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Okay", style: .cancel, handler: nil))
self.present(alert, animated: true, completion: nil)
}
else {
print(“Insert your just-in-time schema code here”)
}
})