|
|
#1 |
|
Attach PKPass To Email in App
I am using PassSlot which creates a Pass on the fly that can be added to passbook. I am trying to get it downloaded to the device to allow attaching to an email. Here is what I have so far:
Code:
[PassSlot passFromTemplateWithName:@"LoveCouponCards" withValues:values pass:^(PSPass *pass) {
[PassSlot downloadPass:pass pass:^(PSPass *pass) {
PKPass *pkpass = [pass performSelector:@selector(pass)];
NSLog(@"Pass: %@", pkpass);
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
NSArray *toRecipients = [NSArray arrayWithObject:@"friend@example.com"];
[picker setToRecipients:toRecipients];
NSURL *url = pkpass.passURL;
NSData *thepassdata = [NSData dataWithContentsOfURL:url];
[picker addAttachmentData:thepassdata mimeType:@"application/vnd.apple.pkpass" fileName:@"HI"];
// Fill out the email body text
NSString *emailBody = @"TEST";
[picker setMessageBody:emailBody isHTML:NO];
[self presentViewController:picker animated:YES completion:nil];
}];
}];
|
|
|
|
0
|
|
|
#2 |
|
I'm not sure I understand, what is and is not working?
Is the email composer being presented to the user as it should be? If so, is there any attachment at all in the email?
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed. Like it on Facebook! |
|
|
|
0
|
|
|
#3 |
|
The composer shows up, but nothing gets attached to it. Apparently there is no way to attach a pkpass to email from within an app.
|
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 02:44 AM.







Linear Mode
