我想要创建的是一个基于定义的计划运行Mobile Me同步的实用程序,并避免在Time Machine已经备份文件时启动它。
有没有办法从应用程序或守护程序调用Mobile Me同步?
答案 0 :(得分:1)
通过NSTask或NSAppleScript使用dotmacsyncclient
,位置:
/System/Library/PrivateFrameworks/DotMacSyncManager.framework/Versions/A/Resources/
用法:
Usage: mobilemesyncclient [options], version 446
--sync
Options:
--entitynames <entities to sync>
--dataclass <dataclass to sync>
--username <account username>
--password <account password>
--pushtruth
--pulltruth
--dumpchangelog <changelog path>
Options:
--tdir <target directory>
--dumpchanges <changelog number> --dataclass <dataclass name>
--listdataclasses
Required:
--username <account username>
--password <account password>
--listdataclass <dataclass name>
Required:
--username <account username>
--password <account password>
--downloaddc <dataclass name> --tdir <target directory>
Required:
--username <account username>
--password <account password>
--uploaddc <dataclass name> --sdir <source directory>
Required:
--username <account username>
--password <account password>
Options:
--clear
--needstruth
--removeclient <client name>
Required:
--username <account username>
--password <account password>
--listclients
Required:
--username <account username>
--password <account password>