如何在Firebase控制台中使用Apple的新的.p8证书

随着近来苹果开发者账户的逐渐升级,我面临着一个难题,即在尝试创build推送通知证书时,它向我提供了(.p8)证书,而不是可以导出到(.p12)的APNs证书。 Firebase控制台只接受(.p12)证书,以便如何从这些新的(.p8)证书中获取证书。

Swift:在调用中缺less参数标签“xxx”

func say(name:String, msg:String) { println("\(name) say \(msg)") } say("Henry","Hi,Swift") <—- error because missing argument label 'msg' in call 我需要使用 say("Henry",msg:"Hi,Swift") 为什么? 如果我把超过两个var的func,所以我需要写var名​​称,而不是第一个var当我调用这个function 这真的很麻烦,我没有在iBook Swift教程中看到任何解释。

如何禁用UITextField编辑,但仍然接受触摸?

我正在UITextField有一个UIPickerView作为inputView 。 它的一切都很好,除了我可以通过复制,粘贴,剪切和select文本进行编辑,而我不想要它。 只有选取器应该修改文本字段。 我知道我可以通过设置setEnabled或setUserInteractionEnabled:NO来禁用编辑。 好的,但TextField停止响应触摸和select器不显示。 我能做些什么来实现它?

我如何使用iCloud在我的应用程序之间同步.zip文件?

是否可以将.zipfile upload到iCloud ,然后在所有用户的iOS设备上进行同步? 如果是这样,我该怎么做呢? 如果有任何文件大小限制,那么也提到最大。 文件大小允许。

一个代码库有三个稍微不同的应用程序

在那里,我想有三个应用程序,这是基于相同的代码: MyAppDevelopment (从部署到设备的Xcode生成) MyAppPreview (testing版) MyApp (发布) 应该可以将三个应用程序中的所有应用程序都安装在设备上,并且可以拥有自己的图标,以便在视觉上很好地区分它们。 现在我知道我可以有三个不同的目标与他们各自的Info.plist文件,但我宁愿使用Xcode的configuration,以便我不必维护三个不同的目标。 这是可能的使用configuration,问题是应用程序标识符存储在Info.plist文件,它可以定义每个目标…

NSURLSession和亚马逊S3上传

我有一个应用程序,目前正在上传图像到亚马逊S3。 我一直在尝试从使用NSURLConnection切换到NSURLSession,以便上传可以继续,而应用程序在后台! 我似乎遇到了一些问题。 NSURLRequest被创build并传递给NSURLSession,但是如果我把相同的请求传递给一个NSURLConnection,那么它就会发回一个403禁止的响应。 这是创build响应的代码: NSString *requestURLString = [NSString stringWithFormat:@"http://%@.%@/%@/%@", BUCKET_NAME, AWS_HOST, DIRECTORY_NAME, filename]; NSURL *requestURL = [NSURL URLWithString:requestURLString]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:requestURL cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:60.0]; // Configure request [request setHTTPMethod:@"PUT"]; [request setValue:[NSString stringWithFormat:@"%@.%@", BUCKET_NAME, AWS_HOST] forHTTPHeaderField:@"Host"]; [request setValue:[self formattedDateString] forHTTPHeaderField:@"Date"]; [request setValue:@"public-read" forHTTPHeaderField:@"x-amz-acl"]; [request setHTTPBody:imageData]; 然后这个回应(我认为这是来自另一个SO回答): NSString *contentMd5 = [request valueForHTTPHeaderField:@"Content-MD5"]; NSString *contentType = […]

IOS:animation从一条线到贝塞尔曲线的变换

我想创build一条弯曲成贝塞尔曲线(从“_”到“n”)的直线,有没有一个库可以帮助我做到这一点? 我知道如何用UIBezierPath绘制一条贝塞尔曲线,我可以快速重绘,并逐步进行转换,但是如果已经有这样的事情,那就太酷了:-)

在多个CGPath的内部边缘绘制光晕

图片http://img403.imageshack.us/img403/9582/paths.jpg 如果通过将左图像所示的两个圆形path相加来创buildCGMutablePathRef,是否可以获得最终的CGPathRef,该图像仅表示右边图像所示的外边框? 谢谢你的帮助!

UITableViewCell与AutoLayout性能不佳

我有点卡住了这个…任何帮助,非常感激。 我已经花了很多时间来debugging。 我已经得到了由NSFetchedResultsController提供的数据源的UITableView 。 在单独的视图控制器中,我使用[NSEntityDescription insertNewObjectForEntityForName:inManagedObjectContext:]向CoreData插入新logging,保存托pipe对象上下文并closures该控制器。 非常标准的东西。 被pipe理的对象上下文的变化然后由NSFetchedResultsController接收: – (void)controllerWillChangeContent:(NSFetchedResultsController *)controller { [self.tableView beginUpdates]; } – (void)controllerDidChangeContent:(NSFetchedResultsController *)controller { [self.tableView endUpdates]; } – (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath { switch (type) { case NSFetchedResultsChangeInsert: [self.tableView insertRowsAtIndexPaths:@[newIndexPath] withRowAnimation:UITableViewRowAnimationNone]; break; case NSFetchedResultsChangeDelete: [self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; break; case NSFetchedResultsChangeUpdate: [self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; break; case NSFetchedResultsChangeMove: […]

如何跟踪用户在后台的位置?

我正在寻找一个开源的应用程序或库来跟踪用户在后台的位置。 现在我正在尝试使用CLLocation和后台任务来做,但是对于我的情况来说,准确性还不够。 你能解释一下,“移动”,“跑步者”,“endmondo”等应用程序如何创build我的路线? 我应该使用加速度计还是/和指南针来创buildCLLocation背景点之间的路线? 一些代码: //location manager init self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.distanceFilter = kCLDistanceFilterNone; self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; self.locationManager.delegate = self; #pragma mark – CLLocationManager Delegate – (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { if ([self isInBackground]) { if (self.locationUpdatedInBackground) { bgTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler: ^{ [[UIApplication sharedApplication] endBackgroundTask:bgTask]; }]; self.locationUpdatedInBackground(newLocation); [self endBackgroundTask]; […]