Tag: launchd

使用NSTimer安排多个日常事件?

我有一个计划caching存储在一个NSDictionary 。 对于以下示例,我有一个计划时间为20120年1月13日下午2:00和2012年1月13日下午2:05 。 我怎样才能将这两个添加到队列来自己开火? 构build计划caching: -(void) buildScheduleCache { NSCalendarDate *now = [NSCalendarDate calendarDate]; NSFileManager *manager = [[NSFileManager defaultManager] autorelease]; path = @"/var/mobile/Library/MobileProfiles/Custom Profiles"; theProfiles = [manager directoryContentsAtPath:path]; myPrimaryinfo = [[NSMutableArray arrayWithCapacity:6] retain]; keys = [NSArray arrayWithObjects:@"Profile",@"MPSYear",@"MPSMonth",@"MPSDay",@"MPSHour",@"MPSMinute",nil]; for (NSString *profile in theProfiles) { plistDict = [[[NSMutableDictionary alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@",path,profile]] autorelease]; [myPrimaryinfo addObject:[NSDictionary dictionaryWithObjects: [NSArray arrayWithObjects: […]

将Jenkins / Hudson用作iOS和Mac开发的持续集成时,缺less钥匙串中的证书和密钥

我正在努力改善iOS的Hudson CI,并在系统启动后立即启动Hudson。 为此,我使用以下launchd脚本: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>Hudson CI</string> <key>ProgramArguments</key> <array> <string>/usr/bin/java</string> <string>-jar</string> <string>/Users/user/Hudson/hudson.war</string> </array> <key>RunAtLoad</key> <true/> <key>UserName</key> <string>user</string> </dict> </plist> 这工作正常,但是当由Hudson启动的xcodebuild尝试签名应用程序时,它会失败,因为它无法在钥匙串中find正确的密钥/证书。 然而,密钥/证书对在那里,因为它正常工作,如果我从命令行启动Hudson。 你有什么想法,为什么发生?