将p12文件转换为pem文件时出现问题

时间:2015-06-17 09:52:26

标签: ios push-notification apple-push-notifications

我关注this tutorial推送通知。

我已完成该页面中的所有步骤。我创建了p12文件和cer文件,并成功将cer文件转换为pem。

但是,在将p12文件转换为pem文件时,它要求@interface YourViewController : UIViewController<QLPreviewControllerDataSource,QLPreviewControllerDelegate> arrImages = [[NSArray alloc] initWithObjects:@"img_1.jpg", @"img_2.jpg", nil]; QLPreviewController *previewController = [[QLPreviewController alloc]init]; previewController.delegate = self; previewController.dataSource = self; [self presentViewController:previewController animated:TRUE completion:^{ }]; #pragma mark - Preview Delegate - (NSInteger)numberOfPreviewItemsInPreviewController: (QLPreviewController *) controller { return [arrImages count]; } - (id <QLPreviewItem>)previewController: (QLPreviewController *)controller previewItemAtIndex:(NSInteger)index { NSArray *fileComponents = [[arrayOfDocuments objectAtIndex: index] componentsSeparatedByString:@"."]; NSString *path = [[NSBundle mainBundle] pathForResource:[fileComponents objectAtIndex:0] ofType:[fileComponents objectAtIndex:1]]; return [NSURL fileURLWithPath:path]; }

我应该在那里输入哪个密码?

它正在返回 NSString* path = [[NSBundle mainBundle] pathForResource:@"imgName" ofType:@"jpg"]; if (path) { NSURL* url = [NSURL fileURLWithPath:path]; UIDocumentInteractionController* docController = [UIDocumentInteractionController interactionControllerWithURL:url]; docController.delegate = self; [docController presentPreviewAnimated:YES]; } 请帮助我。

1 个答案:

答案 0 :(得分:3)

它是您在KeyChain中生成.p12文件时指定的密码。

您在此步骤中输入了密码:

  

将私钥保存为PushChatKey.p12并输入密码。