暗号化および復号化のためにインターセプトされるアプリ API について説明します。
インターセプトされる API
特に指定のない限り、これらの API はラッパー内で暗号化および復号化されます。
C API はインターセプトとして考慮することができません。 C API によって処理されるファイルを暗号化する必要がある場合、代わりの Objective-C API に切り替えます。
NSData (NSData)
| クラス |
メソッド |
| NSData |
- initWithContentsOfFile: |
| |
- initWithContentsOfFile:options:error: |
| |
- writeToFile:atomically: |
| |
- writeToFile:options:error: |
| |
+ dataWithContentsOfFile: |
| |
+ dataWithContentsOfURL: |
| |
- writeToURL:atomically: |
NSString
| クラス |
メソッド |
| NSString |
- initWithContentsOfFile:encoding:error: |
| |
- initWithContentsOfFile:usedEncoding:error: |
| |
- writeToFile:atomically:encoding:error: |
| |
- writeToURL:atomically:encoding:error: |
NSFileHandle
| クラス |
メソッド |
| NSFileHandle |
+ fileHandleForReadingAtPath: |
| |
+ fileHandleForReadingFromURL:error: |
| |
+ fileHandleForWritingAtPath: |
| |
+ fileHandleForWritingToURL:error: |
| |
+ fileHandleForUpdatingAtPath: |
| |
+ fileHandleForUpdatingURL:error: |
| |
- initWithFileDescriptor: |
| |
- initWithFileDescriptor:closeOnDealloc: |
| |
- readDataOfLength: |
| |
- writeData: |
| |
- closeFile |
| |
- readDataToEndOfFile |
NSOutputStream (暗号化のみ)
| クラス |
メソッド |
| NSOutputStream |
- initWithURL:append: |
| |
- write:maxLength: |
| |
- close |
NSFileManager
| クラス |
メソッド |
| NSFileManager |
- createFileAtPath:contents:attributes: |
| |
- removeItemAtPath:error: |
| |
- copyItemAtPath:toPath:error: |
| |
- moveItemAtPath:toPath:error: |
NSUserDefaults
| クラス |
メソッド |
| NSUserDefaults |
- objectForKey: |
| |
- setObject:forKey: |
| |
- boolForKey: |
| |
- integerForKey: |
| |
- stringForKey: |
| |
- persistentDomainForName: |
AVPlayer (復号化のみ)
| クラス |
メソッド |
| AVPlayer |
- initWithPlayerItem: |
MPMoviePlayerController (復号化のみ。 iOS 9.0 で非推奨となりました)
| クラス |
メソッド |
| MPMoviePlayerController |
- initWithContentURL: |
NSPersistentStoreCoordinator
| クラス |
メソッド |
| NSPersistentStoreCoordinator |
- addPersistentStoreWithType:configuration:URL:options:error: |
NSDictionary (復号化のみ)
| クラス |
メソッド |
| NSDictionary |
+ dictionaryWithContentsOfFile: |
NSKeyedArchiver (暗号化のみ)
| クラス |
メソッド |
| NSKeyedArchiver |
+ archiveRootObject:toFile: |
NSKeyedUnarchiver
| クラス |
メソッド |
| NSKeyedUnarchiver |
+ archiveRootObject:toFile: |
(復号化のみ)
UIImage (復号化のみ)
| クラス |
メソッド |
| UIImage |
+ imageWithContentsOfFile: |
| |
+ imageNamed: |
AVURLAsset (AVURLAsset)
| クラス |
メソッド |
| AVURLAsset |
- initWithURL:options: |
| |
|
(復号化のみ)
sqlite3.c
| クラス |
メソッド |
| sqlite3.c |
sqlite3_open |
特殊なケース - コア・グラフィックス PDF のサポート
PDF ファイルを動的に復号化するには、Objective-C インターフェースを使用してインターセプトする必要があります。 MaaS360® は、PDF 参照の作成に使用される C 関数の Objective-C ラッパーを提供します。
thePDFDocRef = [MaaS360AppWrapUtility CGPDFDocumentCreateWithURL:theURL];MaaS360 Developer Support から 2 つのファイルをダウンロードし、それらのファイルをソース・コードに含める必要があります。
- MaaS360AppWrapUtility.m
- MaaS360AppWrapUtility.h
新しい Objective-C クラス・ファイルをターゲットに対するソース・コード内に含めます。 このファイルのヘッダーを、ファイル内で変更が必要な場所に含める必要があります。
インターセプトされる iOS 以外の API
サード・パーティー API
| クラス |
メソッド |
使用 |
| MaaS360AppWrapUtility |
+ CGPDFDocumentCreateWithURL: |
復号化 |
| MFDocumentManager |
- initWithFileUrl: |
復号化 |
| ReaderDocument |
+ isPDF: |
復号化 |
| SSZipArchive |
+ unzipFileAtPath:toDestination: |
復号化/暗号化 |
| ZipArchive |
- addFileToZip:newName: |
復号化/暗号化 |