Showing preview only (383K chars total). Download the full file or copy to clipboard to get everything.
Repository: Airmail/AirmailPlugIn-Framework
Branch: master
Commit: f2f8458ac0fa
Files: 145
Total size: 347.7 KB
Directory structure:
gitextract_zaxo75me/
├── .gitignore
├── .gitmodules
├── AMPCrypto/
│ ├── AMPCrypto/
│ │ ├── AMPCrypto-Info.plist
│ │ ├── AMPCrypto-Prefix.pch
│ │ ├── AMPCrypto.h
│ │ ├── AMPCrypto.m
│ │ ├── AMPCryptoView.h
│ │ ├── AMPCryptoView.m
│ │ ├── NSData+AESCrypt.h
│ │ ├── NSData+AESCrypt.m
│ │ ├── NSData+Base64.h
│ │ ├── NSData+Base64.m
│ │ ├── NSString+AESCrypt.h
│ │ ├── NSString+AESCrypt.m
│ │ ├── SSKeychain.h
│ │ ├── SSKeychain.m
│ │ ├── Unlocked.psd
│ │ ├── en.lproj/
│ │ │ └── InfoPlist.strings
│ │ └── locked.psd
│ └── AMPCrypto.xcodeproj/
│ ├── project.pbxproj
│ └── project.xcworkspace/
│ └── contents.xcworkspacedata
├── AMPCustomTemplates/
│ ├── AMPCustomTemplate.xcodeproj/
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace/
│ │ └── contents.xcworkspacedata
│ └── CssComposer/
│ ├── AMPCssComposerView.h
│ ├── AMPCssComposerView.m
│ ├── AMPCustomTemplate-Info.plist
│ ├── AMPCustomTemplate-Prefix.pch
│ ├── AMPCustomTemplate.h
│ ├── AMPCustomTemplate.m
│ ├── Taxi.css
│ ├── Yellow.css
│ ├── base1.css
│ ├── base2.css
│ ├── base3.css
│ ├── base4.css
│ ├── en.lproj/
│ │ └── InfoPlist.strings
│ └── helvetica.css
├── AMPFramework.xcworkspace/
│ └── contents.xcworkspacedata
├── AMPGpg/
│ ├── AMPGpg/
│ │ ├── AMPGpg-Info.plist
│ │ ├── AMPGpg-Prefix.pch
│ │ ├── AMPGpg.h
│ │ ├── AMPGpg.m
│ │ ├── AMPGpgBodyView.h
│ │ ├── AMPGpgBodyView.m
│ │ ├── AMPGpgButton.h
│ │ ├── AMPGpgButton.m
│ │ ├── AMPGpgEncryption.h
│ │ ├── AMPGpgEncryption.m
│ │ ├── AMPGpgView.h
│ │ ├── AMPGpgView.m
│ │ ├── en.lproj/
│ │ │ └── InfoPlist.strings
│ │ ├── g_active.psd
│ │ ├── g_inactive.psd
│ │ ├── g_locked.psd
│ │ ├── g_unlocked.psd
│ │ ├── gpg_active.psd
│ │ ├── gpg_bad.psd
│ │ ├── gpg_locked.psd
│ │ ├── gpg_unlocked.psd
│ │ ├── pluginsGPG.psd
│ │ └── s_active.psd
│ └── AMPGpg.xcodeproj/
│ └── project.pbxproj
├── AMPMessageStyle/
│ ├── AMPMessageStyle.xcodeproj/
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace/
│ │ └── contents.xcworkspacedata
│ └── AirmailCss/
│ ├── AMPMessageStyle-Info.plist
│ ├── AMPMessageStyle-Prefix.pch
│ ├── AMPMessageStyle.h
│ ├── AMPMessageStyle.m
│ ├── AMPMessageStyleView.h
│ ├── AMPMessageStyleView.m
│ ├── AirmailCss.h
│ ├── AirmailCss.m
│ ├── Taxi.css
│ ├── Yellow.css
│ ├── base1.css
│ ├── base2.css
│ ├── base3.css
│ ├── base4.css
│ ├── en.lproj/
│ │ └── InfoPlist.strings
│ └── es-419.lproj/
│ └── InfoPlist.strings
├── AMPNotify/
│ ├── AMPSimpleNotifier.xcodeproj/
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace/
│ │ └── contents.xcworkspacedata
│ └── Notify/
│ ├── AMPNotifyWindow.h
│ ├── AMPNotifyWindow.m
│ ├── AMPNotifyWindowController.h
│ ├── AMPNotifyWindowController.m
│ ├── AMPNotifyWindowView.h
│ ├── AMPNotifyWindowView.m
│ ├── AMPSimpleNotifier-Info.plist
│ ├── AMPSimpleNotifier-Prefix.pch
│ ├── AMPSimpleNotifier.h
│ ├── AMPSimpleNotifier.m
│ ├── AMPSimpleNotifierView.h
│ ├── AMPSimpleNotifierView.m
│ ├── en.lproj/
│ │ └── InfoPlist.strings
│ └── es-419.lproj/
│ └── InfoPlist.strings
├── AMPTranslate/
│ ├── AMPTranslate-Info.plist
│ ├── AMPTranslate-Prefix.pch
│ ├── AMPTranslate.h
│ ├── AMPTranslate.m
│ ├── AMPTranslateView.h
│ ├── AMPTranslateView.m
│ ├── GTMDefines.h
│ ├── GTMNSString+HTML.h
│ ├── GTMNSString+HTML.m
│ ├── NSString+HTML.h
│ ├── NSString+HTML.m
│ └── en.lproj/
│ └── InfoPlist.strings
├── AMPluginFramework.framework/
│ └── Versions/
│ └── A/
│ ├── AMPluginFramework
│ ├── Headers/
│ │ ├── AMPAccount.h
│ │ ├── AMPAddress.h
│ │ ├── AMPAlias.h
│ │ ├── AMPAttachment.h
│ │ ├── AMPCallBack.h
│ │ ├── AMPComposerInfo.h
│ │ ├── AMPFolder.h
│ │ ├── AMPGroup.h
│ │ ├── AMPMCOAbstractMessage.h
│ │ ├── AMPMCOAbstractMessagePart.h
│ │ ├── AMPMCOAbstractMultipart.h
│ │ ├── AMPMCOAbstractPart.h
│ │ ├── AMPMCOAddress.h
│ │ ├── AMPMCOAttachment.h
│ │ ├── AMPMCOMessageBuilder.h
│ │ ├── AMPMCOMessageHeader.h
│ │ ├── AMPMCOMessageParser.h
│ │ ├── AMPMCOMessagePart.h
│ │ ├── AMPMCOMultiPart.h
│ │ ├── AMPMenuAction.h
│ │ ├── AMPMessage.h
│ │ ├── AMPObject.h
│ │ ├── AMPProvider.h
│ │ ├── AMPSendResult.h
│ │ ├── AMPSignature.h
│ │ ├── AMPSignatureVerify.h
│ │ ├── AMPUidFlag.h
│ │ ├── AMPView.h
│ │ ├── AMPlugin.h
│ │ ├── AMPluginFramework.h
│ │ ├── NSData+AMPBase64.h
│ │ └── NSScanner+Utility.h
│ └── Resources/
│ ├── Info.plist
│ └── en.lproj/
│ └── InfoPlist.strings
├── LICENSE
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Xcode
.DS_Store
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
*.xccheckout
#CocoaPods
Pods
================================================
FILE: .gitmodules
================================================
[submodule "AMPGpg/Dependencies/Libmacgpg"]
path = AMPGpg/Dependencies/Libmacgpg
url = https://github.com/GPGTools/Libmacgpg.git
[submodule "AMPGpg/Dependencies/Libmacgpg/Dependencies/GPGTools_Core"]
path = AMPGpg/Dependencies/Libmacgpg/Dependencies/GPGTools_Core
url = https://github.com/GPGTools/GPGTools_Core.git
================================================
FILE: AMPCrypto/AMPCrypto/AMPCrypto-Info.plist
================================================
<?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>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>it.bloop.airmail.plugin.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2014 bloop. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string>AMPCrypto</string>
</dict>
</plist>
================================================
FILE: AMPCrypto/AMPCrypto/AMPCrypto-Prefix.pch
================================================
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
================================================
FILE: AMPCrypto/AMPCrypto/AMPCrypto.h
================================================
//
// AMPCrypto.h
// AMPCrypto
//
// Created by Gio on 11/04/14.
// Copyright (c) 2014 bloop. All rights reserved.
//
#import <AMPluginFramework/AMPluginFramework.h>
@interface AMPCrypto : AMPlugin
{
BOOL encrypt;
}
@property (strong) NSString *password, *mail;
- (BOOL) savePswd:(NSString*)pswd;
- (void) saveMail:(NSString*)mailIn;
@end
================================================
FILE: AMPCrypto/AMPCrypto/AMPCrypto.m
================================================
//
// AMPCrypto.m
// AMPCrypto
//
// Created by Gio on 11/04/14.
// Copyright (c) 2014 bloop. All rights reserved.
//
#import "AMPCrypto.h"
#import "AMPCryptoView.h"
#import "SSKeychain.h"
#import "NSString+AESCrypt.h"
#import "NSData+Base64.h"
@implementation AMPCrypto
NSString *myCryptoCtype = @"Content-Type: myCrypto";
NSString *myCryptoBoundary = @"5347b703_327b23c6_6e65_crypto";
const NSString *amp_crypto_option = @"amp_crypto_option";
- (id)init
{
self = [super init];
if (self)
{
}
return self;
}
- (NSString*) cryptoCtype
{
return [NSString stringWithFormat:@"%@; %@\r\nContent-Transfer-Encoding: base64",myCryptoCtype,myCryptoBoundary];
}
- (BOOL) Load
{
if(![super Load])
return NO;
self.password = [self loadPswd];
self.mail = [self savedMail];
return YES;
}
- (void) Enable
{
}
- (void) Disable
{
}
- (void) Invalid
{
}
- (void) Reload
{
return [self.myView ReloadView];
}
- (AMPView*) pluginview
{
if(!self.myView)
self.myView = [[AMPCryptoView alloc] initWithFrame:NSZeroRect plugin:self];
return self.myView;
}
- (NSString*) nametext
{
return @"AMPlugin Crypto SDK Sample";
}
- (NSString*) description
{
return self.nametext;
}
- (NSString*) descriptiontext
{
return @"This plugin show how to implement an encryption system";
}
- (NSString*) authortext
{
return @"Airmail SDK Sample";
}
- (NSString*) supportlink
{
return @"http://airmail.zendesk.com/entries/46555427-AMPlug-Translate-SDK-Sample";
}
- (NSImage*) icon
{
return [NSImage imageNamed:@"iconx"];
}
#pragma mark - preferences
- (NSString*) savedMail
{
return [self.preferences objectForKey:amp_crypto_option];
}
- (void) saveMail:(NSString*)mailIn
{
self.mail = mailIn;
[self.preferences removeObjectForKey:amp_crypto_option];
[self.preferences setObject:mailIn forKey:amp_crypto_option];
[self SavePreferences];
}
#pragma mark - actions
- (void) BtnClicked:(id)sender
{
NSButton *btn = (NSButton*)sender;
encrypt = NO;
if(btn.state == NSOnState)
encrypt = YES;
NSImage *currentImage = btn.image;
[btn setImage:btn.alternateImage];
[btn setAlternateImage:currentImage];
NSLog(@"BtnClicked %d",encrypt);
}
#pragma mark - pswd
- (NSString*) loadPswd
{
return [SSKeychain passwordForService:@"AMPCrypto" account:@"MyAccount"];
}
- (BOOL) savePswd:(NSString*)pswd
{
if(pswd)
{
if([SSKeychain setPassword:pswd forService:@"AMPCrypto" account:@"MyAccount"])
{
self.password = pswd;
return YES;
}
}
return NO;
}
#pragma mark - crypto_decrypto
//This is an encryption fast sample the methods used are not reliable
- (NSString*) Encrypt:(NSString*)rfc
{
//Split Rfc to divide the body from the headers
NSArray *arr = [self ParseRfc:rfc];
NSString *header = arr[0];
NSString *body = arr[1];
NSString *cType = arr[2];
header = [header stringByReplacingOccurrencesOfString:cType withString:@""]; //remove old Content-Type
header = [header stringByAppendingFormat:@"%@",self.cryptoCtype]; //add a new one Content-Type for test purpose
body = [cType stringByAppendingString:body]; //add the old Content-Type to the start of the body
NSString* finalBoundary = [NSString stringWithFormat:@"\r\n--%@--\r\n",myCryptoBoundary];
NSData *data = [body dataUsingEncoding:NSUTF8StringEncoding];
NSString *encryptedBody = [[data AES256EncryptWithKey:self.password] base64Encoding];
encryptedBody = [encryptedBody stringByAppendingString:finalBoundary];
NSString *ret = [NSString stringWithFormat:@"%@\r\n\r\n%@",header,encryptedBody];
return ret;
}
- (NSString*) Decrypt:(NSString*)rfc message:(AMPMessage*)message
{
NSArray *arr = [self ParseRfc:rfc];
NSString *header = arr[0];
NSString *body = arr[1];
//NSString *cType = arr[2];
header = [header stringByReplacingOccurrencesOfString:self.cryptoCtype withString:@""]; //remove crypto Content-Type
NSString* finalBoundary = [NSString stringWithFormat:@"\r\n--%@--\r\n",myCryptoBoundary];
body = [body stringByReplacingOccurrencesOfString:finalBoundary withString:@""]; //remove final boundary Content-Type
NSData *decodedData = [[NSData dataWithBase64EncodedString:body] AES256DecryptWithKey:self.password];
NSString *decryptedBody = [[NSString alloc] initWithData:decodedData encoding:NSUTF8StringEncoding];
NSString *ret = [NSString stringWithFormat:@"%@%@",header,decryptedBody];
return ret;
}
#pragma mark - calls
//Composer
//IS ALL TIME CALLED IN A BACKGORUND THREAD
- (NSNumber*) ampPileChangedRecipients:(AMPComposerInfo *)info
{
NSLog(@"ampPileChangedRecipients");
NSButton *composerBtn = [info composerBtn:self];
if(!composerBtn)
[self LogError:@"No Button for the plugin"];
//recipients are changed we need to check if there is a mail that cparmits encryption
NSLog(@"From: %@",info.localMessage.from.mail);
NSMutableArray *arr = [NSMutableArray array];
NSLog(@"To:");
[arr addObjectsFromArray:[self GetMails:info.localMessage.to]];
NSLog(@"Cc:");
[arr addObjectsFromArray:[self GetMails:info.localMessage.cc]];
NSLog(@"Bcc:");
[arr addObjectsFromArray:[self GetMails:info.localMessage.bcc]];
for(NSString *mail in arr)
{
if([mail.lowercaseString isEqualToString:self.mail])
{
dispatch_async(dispatch_get_main_queue(), ^{
[composerBtn setState:NSOnState];
[composerBtn setEnabled:YES];
});
return @(YES);
}
}
dispatch_async(dispatch_get_main_queue(), ^{
[composerBtn setState:NSOffState];
[composerBtn setEnabled:NO];
encrypt = NO;
});
return @(NO);
}
//GIVES AM A BUTTON IN THE COMPOSER WINDOW
- (NSArray*) ampPileComposerView:(AMPComposerInfo *)info
{
//Return a new composer btn for new created the composer
NSButton *composerBtn = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 20, 20)]; //it will be rendered with the size 20,20
[composerBtn setTitle:@"En"];
[composerBtn setTarget:self];
[composerBtn setAction:@selector(BtnClicked:)];
[composerBtn setEnabled:NO];
[composerBtn setState:NSOffState];
[composerBtn setBordered:NO];
[composerBtn setImage:[NSImage imageNamed:@"locked"]];
[composerBtn setAlternateImage:[NSImage imageNamed:@"unlocked"]];
[composerBtn setButtonType:NSToggleButton];
[[composerBtn cell] setRepresentedObject:self];
return composerBtn;
}
//USED BY AM TO CHECK IF THE RFC IS ENCRYPTED
- (NSNumber*) ampPileIsEncrypted:(AMPMCOMessageParser*)parser
{
// //Is encrypted?
// if([rfc rangeOfString:myCryptoCtype].location != NSNotFound)
// return @(YES);
return @(NO);
}
//USED BY AM TO DECRYPT BEFORE RENDERING
- (NSData*) ampStackDecrypt:(AMPMessage*)message
{
return nil; //[self Decrypt:message];
}
//USED BY AM TO CHANGETHE RFC BEFORE SENDING
- (AMPSendResult*) ampStackSendRfc:(NSString*)rfc composer:(AMPComposerInfo*)info
{
if(encrypt)
return [self Encrypt:rfc];
return rfc;
}
#pragma mark - utilities
-(NSArray*) GetMails:(NSArray*)arr
{
NSMutableArray *ret = [NSMutableArray array];
for(id obj in arr)
{
if([obj isKindOfClass:[AMPAddress class]])
{
AMPAddress *addr = (AMPAddress*)obj;
if(addr.mail)
{
NSLog(@"%@",addr.mail);
[ret addObject:addr.mail];
}
}
else if([obj isKindOfClass:[AMPGroup class]])
{
AMPGroup *group = (AMPGroup*)obj;
for(AMPAddress *addr in group.addresses)
{
if(addr.mail)
{
NSLog(@"Group %@ %@",group.name, addr.mail);
[ret addObject:addr.mail];
}
}
}
}
return ret;
}
-(NSArray*) ParseRfc:(NSString*)rfc
{
NSMutableArray *ret = [NSMutableArray array];
//Split Rfc to divide the body from the headers
NSScanner *scanner = [NSScanner scannerWithString:rfc];
NSString *header = nil;
[scanner scanUpToString:@"\r\n\r\n" intoString:&header]; //split body from headers
if(!header)
return nil;
[ret addObject:header];
NSString *body = [rfc substringFromIndex:scanner.scanLocation];
if(!body)
return nil;
[ret addObject:body];
//Search for Content-Type
//Content-Type: multipart/alternative; boundary="5347b703_327b23c6_6e65"
NSString *contentType = nil;
NSScanner *scanner2 = [NSScanner scannerWithString:header];
[scanner2 scanUpToString:@"\r\nContent-Type:" intoString:nil];
[scanner2 scanUpToString:@"\r\n" intoString:&contentType]; //scan till the boundary
if(!contentType)
return nil;
[ret addObject:contentType];
return ret;
}
@end
================================================
FILE: AMPCrypto/AMPCrypto/AMPCryptoView.h
================================================
//
// AMPCryptoView.h
// AMPCrypto
//
// Created by Gio on 11/04/14.
// Copyright (c) 2014 bloop. All rights reserved.
//
#import <AMPluginFramework/AMPluginFramework.h>
@interface AMPCryptoView : AMPView
{
NSSecureTextField *secureField;
NSTextField *mailField;
}
@end
================================================
FILE: AMPCrypto/AMPCrypto/AMPCryptoView.m
================================================
//
// AMPCryptoView.m
// AMPCrypto
//
// Created by Gio on 11/04/14.
// Copyright (c) 2014 bloop. All rights reserved.
//
#import "AMPCryptoView.h"
#import "AMPCrypto.h"
#import "SSKeychain.h"
@implementation AMPCryptoView
- (id)initWithFrame:(NSRect)frame plugin:(AMPlugin *)pluginIn
{
self = [super initWithFrame:frame plugin:pluginIn];
if (self) {
// Initialization code here.
NSInteger x = 20;
NSInteger y = 20;
NSTextField *textField = [[NSTextField alloc] initWithFrame:NSMakeRect(x+3, y, 100, 20)];
[textField setStringValue:NSLocalizedString(@"Password:",@"Password:")];
[textField setBezeled:NO];
[textField setDrawsBackground:NO];
[textField setEditable:NO];
[textField setSelectable:NO];
[textField setFont:[NSFont systemFontOfSize:13]];
[[textField cell] setBackgroundStyle:NSBackgroundStyleRaised];
[textField setAlignment: NSRightTextAlignment];
[self addSubview:textField];
secureField = [[NSSecureTextField alloc] initWithFrame:NSMakeRect(x+170, y, 150, 20)];
[secureField setBezeled:NO];
[secureField setDrawsBackground:YES];
[secureField setEditable:YES];
[secureField setSelectable:YES];
[secureField setFont:[NSFont systemFontOfSize:13]];
[[secureField cell] setBackgroundStyle:NSBackgroundStyleRaised];
[self addSubview:secureField];
x = 20;
y += 30;
NSTextField *textField2 = [[NSTextField alloc] initWithFrame:NSMakeRect(x+3, y, 100, 20)];
[textField2 setStringValue:NSLocalizedString(@"Email:",@"Email:")];
[textField2 setBezeled:NO];
[textField2 setDrawsBackground:NO];
[textField2 setEditable:NO];
[textField2 setSelectable:NO];
[textField2 setFont:[NSFont systemFontOfSize:13]];
[[textField2 cell] setBackgroundStyle:NSBackgroundStyleRaised];
[textField2 setAlignment: NSRightTextAlignment];
[self addSubview:textField2];
mailField = [[NSTextField alloc] initWithFrame:NSMakeRect(x+170, y, 150, 20)];
[mailField setBezeled:NO];
[mailField setDrawsBackground:YES];
[mailField setEditable:YES];
[mailField setSelectable:YES];
[mailField setFont:[NSFont systemFontOfSize:13]];
[[mailField cell] setBackgroundStyle:NSBackgroundStyleRaised];
[self addSubview:mailField];
NSButton *btn = [[NSButton alloc] initWithFrame:NSMakeRect(x+170, y+60, 200, 30)];
[btn setTitle:@"Save"];
[btn setTarget:self];
[btn setAction:@selector(Save:)];
[self addSubview:btn];
[self LoadView];
}
return self;
}
- (AMPCrypto*) myPlugin
{
return (AMPCrypto*)self.plugin;
}
- (void) ReloadView
{
dispatch_async(dispatch_get_main_queue(), ^{
[self LoadView];
});
}
- (void) LoadView
{
}
- (void) RenderView
{
if(secureField.stringValue.length == 0 && self.myPlugin.password)
[secureField setStringValue:self.myPlugin.password];
if(mailField.stringValue.length == 0 && self.myPlugin.mail)
[mailField setStringValue:self.myPlugin.mail];
// [[secureField currentEditor] setSelectedRange:NSMakeRange([[secureField stringValue] length], 0)];
}
-(void) Save:(id)sender
{
[self.myPlugin saveMail:mailField.stringValue];
if(![self.myPlugin savePswd:secureField.stringValue])
{
NSAlert *alert = [[NSAlert alloc] init];
[alert addButtonWithTitle:@"OK"];
[alert setMessageText:@"Save Password"];
[alert setInformativeText:@"Cannot save the password"];
[alert setAlertStyle:NSWarningAlertStyle];
[alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:nil];
}
}
- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo
{
}
- (void)drawRect:(NSRect)dirtyRect
{
[super drawRect:dirtyRect];
// Drawing code here.
}
@end
================================================
FILE: AMPCrypto/AMPCrypto/NSData+AESCrypt.h
================================================
//
// NSData+AESCrypt.h
//
// AES Encrypt/Decrypt
// Created by Jim Dovey and 'Jean'
// See http://iphonedevelopment.blogspot.com/2009/02/strong-encryption-for-cocoa-cocoa-touch.html
//
// BASE64 Encoding/Decoding
// Copyright (c) 2001 Kyle Hammond. All rights reserved.
// Original development by Dave Winer.
//
// Put together by Michael Sedlaczek, Gone Coding on 2011-02-22
//
#import <Foundation/Foundation.h>
@interface NSData (AESCrypt)
- (NSData *)AES256EncryptWithKey:(NSString *)key;
- (NSData *)AES256DecryptWithKey:(NSString *)key;
+ (NSData *)dataWithBase64EncodedString:(NSString *)string;
- (id)initWithBase64EncodedString:(NSString *)string;
- (NSString *)base64Encoding;
- (NSString *)base64EncodingWithLineLength:(NSUInteger)lineLength;
- (BOOL)hasPrefixBytes:(const void *)prefix length:(NSUInteger)length;
- (BOOL)hasSuffixBytes:(const void *)suffix length:(NSUInteger)length;
@end
================================================
FILE: AMPCrypto/AMPCrypto/NSData+AESCrypt.m
================================================
//
// NSData+AESCrypt.m
//
// AES Encrypt/Decrypt
// Created by Jim Dovey and 'Jean'
// See http://iphonedevelopment.blogspot.com/2009/02/strong-encryption-for-cocoa-cocoa-touch.html
//
// BASE64 Encoding/Decoding
// Copyright (c) 2001 Kyle Hammond. All rights reserved.
// Original development by Dave Winer.
//
// Put together by Michael Sedlaczek, Gone Coding on 2011-02-22
//
#import "NSData+AESCrypt.h"
#import <CommonCrypto/CommonCryptor.h>
static char encodingTable[64] =
{
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',
'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f',
'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',
'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/'
};
@implementation NSData (AESCrypt)
- (NSData *)AES256EncryptWithKey:(NSString *)key
{
// 'key' should be 32 bytes for AES256, will be null-padded otherwise
char keyPtr[kCCKeySizeAES256 + 1]; // room for terminator (unused)
bzero( keyPtr, sizeof( keyPtr ) ); // fill with zeroes (for padding)
// fetch key data
[key getCString:keyPtr maxLength:sizeof( keyPtr ) encoding:NSUTF8StringEncoding];
NSUInteger dataLength = [self length];
//See the doc: For block ciphers, the output size will always be less than or
//equal to the input size plus the size of one block.
//That's why we need to add the size of one block here
size_t bufferSize = dataLength + kCCBlockSizeAES128;
void *buffer = malloc( bufferSize );
size_t numBytesEncrypted = 0;
CCCryptorStatus cryptStatus = CCCrypt( kCCEncrypt, kCCAlgorithmAES128, kCCOptionPKCS7Padding,
keyPtr, kCCKeySizeAES256,
NULL /* initialization vector (optional) */,
[self bytes], dataLength, /* input */
buffer, bufferSize, /* output */
&numBytesEncrypted );
if( cryptStatus == kCCSuccess )
{
//the returned NSData takes ownership of the buffer and will free it on deallocation
return [NSData dataWithBytesNoCopy:buffer length:numBytesEncrypted];
}
free( buffer ); //free the buffer
return nil;
}
- (NSData *)AES256DecryptWithKey:(NSString *)key
{
// 'key' should be 32 bytes for AES256, will be null-padded otherwise
char keyPtr[kCCKeySizeAES256+1]; // room for terminator (unused)
bzero( keyPtr, sizeof( keyPtr ) ); // fill with zeroes (for padding)
// fetch key data
[key getCString:keyPtr maxLength:sizeof( keyPtr ) encoding:NSUTF8StringEncoding];
NSUInteger dataLength = [self length];
//See the doc: For block ciphers, the output size will always be less than or
//equal to the input size plus the size of one block.
//That's why we need to add the size of one block here
size_t bufferSize = dataLength + kCCBlockSizeAES128;
void *buffer = malloc( bufferSize );
size_t numBytesDecrypted = 0;
CCCryptorStatus cryptStatus = CCCrypt( kCCDecrypt, kCCAlgorithmAES128, kCCOptionPKCS7Padding,
keyPtr, kCCKeySizeAES256,
NULL /* initialization vector (optional) */,
[self bytes], dataLength, /* input */
buffer, bufferSize, /* output */
&numBytesDecrypted );
if( cryptStatus == kCCSuccess )
{
//the returned NSData takes ownership of the buffer and will free it on deallocation
return [NSData dataWithBytesNoCopy:buffer length:numBytesDecrypted];
}
free( buffer ); //free the buffer
return nil;
}
#pragma mark -
+ (NSData *)dataWithBase64EncodedString:(NSString *)string
{
return [[[NSData allocWithZone:nil] initWithBase64EncodedString:string] autorelease];
}
- (id)initWithBase64EncodedString:(NSString *)string
{
NSMutableData *mutableData = nil;
if( string )
{
unsigned long ixtext = 0;
unsigned long lentext = 0;
unsigned char ch = 0;
unsigned char inbuf[4], outbuf[3];
short i = 0, ixinbuf = 0;
BOOL flignore = NO;
BOOL flendtext = NO;
NSData *base64Data = nil;
const unsigned char *base64Bytes = nil;
// Convert the string to ASCII data.
base64Data = [string dataUsingEncoding:NSASCIIStringEncoding];
base64Bytes = [base64Data bytes];
mutableData = [NSMutableData dataWithCapacity:base64Data.length];
lentext = base64Data.length;
while( YES )
{
if( ixtext >= lentext ) break;
ch = base64Bytes[ixtext++];
flignore = NO;
if( ( ch >= 'A' ) && ( ch <= 'Z' ) ) ch = ch - 'A';
else if( ( ch >= 'a' ) && ( ch <= 'z' ) ) ch = ch - 'a' + 26;
else if( ( ch >= '0' ) && ( ch <= '9' ) ) ch = ch - '0' + 52;
else if( ch == '+' ) ch = 62;
else if( ch == '=' ) flendtext = YES;
else if( ch == '/' ) ch = 63;
else flignore = YES;
if( ! flignore )
{
short ctcharsinbuf = 3;
BOOL flbreak = NO;
if( flendtext )
{
if( ! ixinbuf ) break;
if( ( ixinbuf == 1 ) || ( ixinbuf == 2 ) ) ctcharsinbuf = 1;
else ctcharsinbuf = 2;
ixinbuf = 3;
flbreak = YES;
}
inbuf [ixinbuf++] = ch;
if( ixinbuf == 4 )
{
ixinbuf = 0;
outbuf [0] = ( inbuf[0] << 2 ) | ( ( inbuf[1] & 0x30) >> 4 );
outbuf [1] = ( ( inbuf[1] & 0x0F ) << 4 ) | ( ( inbuf[2] & 0x3C ) >> 2 );
outbuf [2] = ( ( inbuf[2] & 0x03 ) << 6 ) | ( inbuf[3] & 0x3F );
for( i = 0; i < ctcharsinbuf; i++ )
[mutableData appendBytes:&outbuf[i] length:1];
}
if( flbreak ) break;
}
}
}
self = [self initWithData:mutableData];
return self;
}
#pragma mark -
- (NSString *)base64Encoding
{
return [self base64EncodingWithLineLength:0];
}
- (NSString *)base64EncodingWithLineLength:(NSUInteger)lineLength
{
const unsigned char *bytes = [self bytes];
NSMutableString *result = [NSMutableString stringWithCapacity:self.length];
unsigned long ixtext = 0;
unsigned long lentext = self.length;
long ctremaining = 0;
unsigned char inbuf[3], outbuf[4];
unsigned short i = 0;
unsigned short charsonline = 0, ctcopy = 0;
unsigned long ix = 0;
while( YES )
{
ctremaining = lentext - ixtext;
if( ctremaining <= 0 ) break;
for( i = 0; i < 3; i++ )
{
ix = ixtext + i;
if( ix < lentext ) inbuf[i] = bytes[ix];
else inbuf [i] = 0;
}
outbuf [0] = (inbuf [0] & 0xFC) >> 2;
outbuf [1] = ((inbuf [0] & 0x03) << 4) | ((inbuf [1] & 0xF0) >> 4);
outbuf [2] = ((inbuf [1] & 0x0F) << 2) | ((inbuf [2] & 0xC0) >> 6);
outbuf [3] = inbuf [2] & 0x3F;
ctcopy = 4;
switch( ctremaining )
{
case 1:
ctcopy = 2;
break;
case 2:
ctcopy = 3;
break;
}
for( i = 0; i < ctcopy; i++ )
[result appendFormat:@"%c", encodingTable[outbuf[i]]];
for( i = ctcopy; i < 4; i++ )
[result appendString:@"="];
ixtext += 3;
charsonline += 4;
if( lineLength > 0 )
{
if( charsonline >= lineLength )
{
charsonline = 0;
[result appendString:@"\n"];
}
}
}
return [NSString stringWithString:result];
}
#pragma mark -
- (BOOL)hasPrefixBytes:(const void *)prefix length:(NSUInteger)length
{
if( ! prefix || ! length || self.length < length ) return NO;
return ( memcmp( [self bytes], prefix, length ) == 0 );
}
- (BOOL)hasSuffixBytes:(const void *)suffix length:(NSUInteger)length
{
if( ! suffix || ! length || self.length < length ) return NO;
return ( memcmp( ((const char *)[self bytes] + (self.length - length)), suffix, length ) == 0 );
}
@end
================================================
FILE: AMPCrypto/AMPCrypto/NSData+Base64.h
================================================
//
// NSData+Base64.h
// base64
//
// Created by Matt Gallagher on 2009/06/03.
// Copyright 2009 Matt Gallagher. All rights reserved.
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software. Permission is granted to anyone to
// use this software for any purpose, including commercial applications, and to
// alter it and redistribute it freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source
// distribution.
//
#import <Foundation/Foundation.h>
void *NewBase64Decode(
const char *inputBuffer,
size_t length,
size_t *outputLength);
char *NewBase64Encode(
const void *inputBuffer,
size_t length,
bool separateLines,
size_t *outputLength);
@interface NSData (Base64)
+ (NSData *)dataFromBase64String:(NSString *)aString;
- (NSString *)base64EncodedString;
@end
================================================
FILE: AMPCrypto/AMPCrypto/NSData+Base64.m
================================================
//
// NSData+Base64.m
// base64
//
// Created by Matt Gallagher on 2009/06/03.
// Copyright 2009 Matt Gallagher. All rights reserved.
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software. Permission is granted to anyone to
// use this software for any purpose, including commercial applications, and to
// alter it and redistribute it freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would be
// appreciated but is not required.
// 2. Altered source versions must be plainly marked as such, and must not be
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source
// distribution.
//
#import "NSData+Base64.h"
//
// Mapping from 6 bit pattern to ASCII character.
//
static unsigned char base64EncodeLookup[65] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
//
// Definition for "masked-out" areas of the base64DecodeLookup mapping
//
#define xx 65
//
// Mapping from ASCII character to 6 bit pattern.
//
static unsigned char base64DecodeLookup[256] =
{
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 62, xx, xx, xx, 63,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, xx, xx, xx, xx, xx, xx,
xx, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, xx, xx, xx, xx, xx,
xx, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
};
//
// Fundamental sizes of the binary and base64 encode/decode units in bytes
//
#define BINARY_UNIT_SIZE 3
#define BASE64_UNIT_SIZE 4
//
// NewBase64Decode
//
// Decodes the base64 ASCII string in the inputBuffer to a newly malloced
// output buffer.
//
// inputBuffer - the source ASCII string for the decode
// length - the length of the string or -1 (to specify strlen should be used)
// outputLength - if not-NULL, on output will contain the decoded length
//
// returns the decoded buffer. Must be free'd by caller. Length is given by
// outputLength.
//
void *NewBase64Decode(
const char *inputBuffer,
size_t length,
size_t *outputLength)
{
if (length == -1)
{
length = strlen(inputBuffer);
}
size_t outputBufferSize =
((length+BASE64_UNIT_SIZE-1) / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE;
unsigned char *outputBuffer = (unsigned char *)malloc(outputBufferSize);
size_t i = 0;
size_t j = 0;
while (i < length)
{
//
// Accumulate 4 valid characters (ignore everything else)
//
unsigned char accumulated[BASE64_UNIT_SIZE];
size_t accumulateIndex = 0;
while (i < length)
{
unsigned char decode = base64DecodeLookup[inputBuffer[i++]];
if (decode != xx)
{
accumulated[accumulateIndex] = decode;
accumulateIndex++;
if (accumulateIndex == BASE64_UNIT_SIZE)
{
break;
}
}
}
//
// Store the 6 bits from each of the 4 characters as 3 bytes
//
// (Uses improved bounds checking suggested by Alexandre Colucci)
//
if(accumulateIndex >= 2)
outputBuffer[j] = (accumulated[0] << 2) | (accumulated[1] >> 4);
if(accumulateIndex >= 3)
outputBuffer[j + 1] = (accumulated[1] << 4) | (accumulated[2] >> 2);
if(accumulateIndex >= 4)
outputBuffer[j + 2] = (accumulated[2] << 6) | accumulated[3];
j += accumulateIndex - 1;
}
if (outputLength)
{
*outputLength = j;
}
return outputBuffer;
}
//
// NewBase64Encode
//
// Encodes the arbitrary data in the inputBuffer as base64 into a newly malloced
// output buffer.
//
// inputBuffer - the source data for the encode
// length - the length of the input in bytes
// separateLines - if zero, no CR/LF characters will be added. Otherwise
// a CR/LF pair will be added every 64 encoded chars.
// outputLength - if not-NULL, on output will contain the encoded length
// (not including terminating 0 char)
//
// returns the encoded buffer. Must be free'd by caller. Length is given by
// outputLength.
//
char *NewBase64Encode(
const void *buffer,
size_t length,
bool separateLines,
size_t *outputLength)
{
const unsigned char *inputBuffer = (const unsigned char *)buffer;
#define MAX_NUM_PADDING_CHARS 2
#define OUTPUT_LINE_LENGTH 64
#define INPUT_LINE_LENGTH ((OUTPUT_LINE_LENGTH / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE)
#define CR_LF_SIZE 2
//
// Byte accurate calculation of final buffer size
//
size_t outputBufferSize =
((length / BINARY_UNIT_SIZE)
+ ((length % BINARY_UNIT_SIZE) ? 1 : 0))
* BASE64_UNIT_SIZE;
if (separateLines)
{
outputBufferSize +=
(outputBufferSize / OUTPUT_LINE_LENGTH) * CR_LF_SIZE;
}
//
// Include space for a terminating zero
//
outputBufferSize += 1;
//
// Allocate the output buffer
//
char *outputBuffer = (char *)malloc(outputBufferSize);
if (!outputBuffer)
{
return NULL;
}
size_t i = 0;
size_t j = 0;
const size_t lineLength = separateLines ? INPUT_LINE_LENGTH : length;
size_t lineEnd = lineLength;
while (true)
{
if (lineEnd > length)
{
lineEnd = length;
}
for (; i + BINARY_UNIT_SIZE - 1 < lineEnd; i += BINARY_UNIT_SIZE)
{
//
// Inner loop: turn 48 bytes into 64 base64 characters
//
outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
| ((inputBuffer[i + 1] & 0xF0) >> 4)];
outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i + 1] & 0x0F) << 2)
| ((inputBuffer[i + 2] & 0xC0) >> 6)];
outputBuffer[j++] = base64EncodeLookup[inputBuffer[i + 2] & 0x3F];
}
if (lineEnd == length)
{
break;
}
//
// Add the newline
//
outputBuffer[j++] = '\r';
outputBuffer[j++] = '\n';
lineEnd += lineLength;
}
if (i + 1 < length)
{
//
// Handle the single '=' case
//
outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
| ((inputBuffer[i + 1] & 0xF0) >> 4)];
outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i + 1] & 0x0F) << 2];
outputBuffer[j++] = '=';
}
else if (i < length)
{
//
// Handle the double '=' case
//
outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0x03) << 4];
outputBuffer[j++] = '=';
outputBuffer[j++] = '=';
}
outputBuffer[j] = 0;
//
// Set the output length and return the buffer
//
if (outputLength)
{
*outputLength = j;
}
return outputBuffer;
}
@implementation NSData (Base64)
//
// dataFromBase64String:
//
// Creates an NSData object containing the base64 decoded representation of
// the base64 string 'aString'
//
// Parameters:
// aString - the base64 string to decode
//
// returns the autoreleased NSData representation of the base64 string
//
+ (NSData *)dataFromBase64String:(NSString *)aString
{
NSData *data = [aString dataUsingEncoding:NSASCIIStringEncoding];
size_t outputLength;
void *outputBuffer = NewBase64Decode([data bytes], [data length], &outputLength);
NSData *result = [NSData dataWithBytes:outputBuffer length:outputLength];
free(outputBuffer);
return result;
}
//
// base64EncodedString
//
// Creates an NSString object that contains the base 64 encoding of the
// receiver's data. Lines are broken at 64 characters long.
//
// returns an autoreleased NSString being the base 64 representation of the
// receiver.
//
- (NSString *)base64EncodedString
{
size_t outputLength = 0;
char *outputBuffer = NewBase64Encode([self bytes], [self length], true, &outputLength);
NSString *result =
[[[NSString alloc]
initWithBytes:outputBuffer
length:outputLength
encoding:NSASCIIStringEncoding]
autorelease];
free(outputBuffer);
return result;
}
@end
================================================
FILE: AMPCrypto/AMPCrypto/NSString+AESCrypt.h
================================================
//
// NSString+AESCrypt.h
//
// Created by Michael Sedlaczek, Gone Coding on 2011-02-22
//
#import <Foundation/Foundation.h>
#import "NSData+AESCrypt.h"
@interface NSString (AESCrypt)
- (NSString *)AES256EncryptWithKey:(NSString *)key;
- (NSString *)AES256DecryptWithKey:(NSString *)key;
@end
================================================
FILE: AMPCrypto/AMPCrypto/NSString+AESCrypt.m
================================================
//
// NSString+AESCrypt.m
//
// Created by Michael Sedlaczek, Gone Coding on 2011-02-22
//
#import "NSString+AESCrypt.h"
@implementation NSString (AESCrypt)
- (NSString *)AES256EncryptWithKey:(NSString *)key
{
NSData *plainData = [self dataUsingEncoding:NSUTF8StringEncoding];
NSData *encryptedData = [plainData AES256EncryptWithKey:key];
NSString *encryptedString = [encryptedData base64Encoding];
return encryptedString;
}
- (NSString *)AES256DecryptWithKey:(NSString *)key
{
NSData *encryptedData = [NSData dataWithBase64EncodedString:self];
NSData *plainData = [encryptedData AES256DecryptWithKey:key];
NSString *plainString = [[NSString alloc] initWithData:plainData encoding:NSUTF8StringEncoding];
return plainString;
}
@end
================================================
FILE: AMPCrypto/AMPCrypto/SSKeychain.h
================================================
//
// SSKeychain.h
// SSToolkit
//
// Created by Sam Soffes on 5/19/10.
// Copyright (c) 2009-2011 Sam Soffes. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Security/Security.h>
/** Error codes that can be returned in NSError objects. */
typedef enum {
/** No error. */
SSKeychainErrorNone = noErr,
/** Some of the arguments were invalid. */
SSKeychainErrorBadArguments = -1001,
/** There was no password. */
SSKeychainErrorNoPassword = -1002,
/** One or more parameters passed internally were not valid. */
SSKeychainErrorInvalidParameter = errSecParam,
/** Failed to allocate memory. */
SSKeychainErrorFailedToAllocated = errSecAllocate,
/** No trust results are available. */
SSKeychainErrorNotAvailable = errSecNotAvailable,
/** Authorization/Authentication failed. */
SSKeychainErrorAuthorizationFailed = errSecAuthFailed,
/** The item already exists. */
SSKeychainErrorDuplicatedItem = errSecDuplicateItem,
/** The item cannot be found.*/
SSKeychainErrorNotFound = errSecItemNotFound,
/** Interaction with the Security Server is not allowed. */
SSKeychainErrorInteractionNotAllowed = errSecInteractionNotAllowed,
/** Unable to decode the provided data. */
SSKeychainErrorFailedToDecode = errSecDecode
} SSKeychainErrorCode;
extern NSString *const kSSKeychainErrorDomain;
/** Account name. */
extern NSString *const kSSKeychainAccountKey;
/**
Time the item was created.
The value will be a string.
*/
extern NSString *const kSSKeychainCreatedAtKey;
/** Item class. */
extern NSString *const kSSKeychainClassKey;
/** Item description. */
extern NSString *const kSSKeychainDescriptionKey;
/** Item label. */
extern NSString *const kSSKeychainLabelKey;
/** Time the item was last modified.
The value will be a string.
*/
extern NSString *const kSSKeychainLastModifiedKey;
/** Where the item was created. */
extern NSString *const kSSKeychainWhereKey;
/**
Simple wrapper for accessing accounts, getting passwords, setting passwords, and deleting passwords using the system
Keychain on Mac OS X and iOS.
This was originally inspired by EMKeychain and SDKeychain (both of which are now gone). Thanks to the authors.
SSKeychain has since switched to a simpler implementation that was abstracted from [SSToolkit](http://sstoolk.it).
*/
@interface SSKeychain : NSObject
///-----------------------
/// @name Getting Accounts
///-----------------------
/**
Returns an array containing the Keychain's accounts, or `nil` if the Keychain has no accounts.
See the `NSString` constants declared in SSKeychain.h for a list of keys that can be used when accessing the
dictionaries returned by this method.
@return An array of dictionaries containing the Keychain's accounts, or `nil` if the Keychain doesn't have any
accounts. The order of the objects in the array isn't defined.
@see allAccounts:
*/
+ (NSArray *)allAccounts;
/**
Returns an array containing the Keychain's accounts, or `nil` if the Keychain doesn't have any
accounts.
See the `NSString` constants declared in SSKeychain.h for a list of keys that can be used when accessing the
dictionaries returned by this method.
@param error If accessing the accounts fails, upon return contains an error that describes the problem.
@return An array of dictionaries containing the Keychain's accounts, or `nil` if the Keychain doesn't have any
accounts. The order of the objects in the array isn't defined.
@see allAccounts
*/
+ (NSArray *)allAccounts:(NSError **)error;
/**
Returns an array containing the Keychain's accounts for a given service, or `nil` if the Keychain doesn't have any
accounts for the given service.
See the `NSString` constants declared in SSKeychain.h for a list of keys that can be used when accessing the
dictionaries returned by this method.
@param serviceName The service for which to return the corresponding accounts.
@return An array of dictionaries containing the Keychain's accountsfor a given `serviceName`, or `nil` if the Keychain
doesn't have any accounts for the given `serviceName`. The order of the objects in the array isn't defined.
@see accountsForService:error:
*/
+ (NSArray *)accountsForService:(NSString *)serviceName;
/**
Returns an array containing the Keychain's accounts for a given service, or `nil` if the Keychain doesn't have any
accounts for the given service.
@param serviceName The service for which to return the corresponding accounts.
@param error If accessing the accounts fails, upon return contains an error that describes the problem.
@return An array of dictionaries containing the Keychain's accountsfor a given `serviceName`, or `nil` if the Keychain
doesn't have any accounts for the given `serviceName`. The order of the objects in the array isn't defined.
@see accountsForService:
*/
+ (NSArray *)accountsForService:(NSString *)serviceName error:(NSError **)error;
///------------------------
/// @name Getting Passwords
///------------------------
/**
Returns a string containing the password for a given account and service, or `nil` if the Keychain doesn't have a
password for the given parameters.
@param serviceName The service for which to return the corresponding password.
@param account The account for which to return the corresponding password.
@return Returns a string containing the password for a given account and service, or `nil` if the Keychain doesn't
have a password for the given parameters.
@see passwordForService:account:error:
*/
+ (NSString *)passwordForService:(NSString *)serviceName account:(NSString *)account;
/**
Returns a string containing the password for a given account and service, or `nil` if the Keychain doesn't have a
password for the given parameters.
@param serviceName The service for which to return the corresponding password.
@param account The account for which to return the corresponding password.
@param error If accessing the password fails, upon return contains an error that describes the problem.
@return Returns a string containing the password for a given account and service, or `nil` if the Keychain doesn't
have a password for the given parameters.
@see passwordForService:account:
*/
+ (NSString *)passwordForService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error;
/**
Returns the password data for a given account and service, or `nil` if the Keychain doesn't have data
for the given parameters.
@param serviceName The service for which to return the corresponding password.
@param account The account for which to return the corresponding password.
@param error If accessing the password fails, upon return contains an error that describes the problem.
@return Returns a the password data for the given account and service, or `nil` if the Keychain doesn't
have data for the given parameters.
@see passwordDataForService:account:error:
*/
+ (NSData *)passwordDataForService:(NSString *)serviceName account:(NSString *)account;
/**
Returns the password data for a given account and service, or `nil` if the Keychain doesn't have data
for the given parameters.
@param serviceName The service for which to return the corresponding password.
@param account The account for which to return the corresponding password.
@param error If accessing the password fails, upon return contains an error that describes the problem.
@return Returns a the password data for the given account and service, or `nil` if the Keychain doesn't
have a password for the given parameters.
@see passwordDataForService:account:
*/
+ (NSData *)passwordDataForService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error;
///-------------------------
/// @name Deleting Passwords
///-------------------------
/**
Deletes a password from the Keychain.
@param serviceName The service for which to delete the corresponding password.
@param account The account for which to delete the corresponding password.
@return Returns `YES` on success, or `NO` on failure.
@see deletePasswordForService:account:error:
*/
+ (BOOL)deletePasswordForService:(NSString *)serviceName account:(NSString *)account;
/**
Deletes a password from the Keychain.
@param serviceName The service for which to delete the corresponding password.
@param account The account for which to delete the corresponding password.
@param error If deleting the password fails, upon return contains an error that describes the problem.
@return Returns `YES` on success, or `NO` on failure.
@see deletePasswordForService:account:
*/
+ (BOOL)deletePasswordForService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error;
///------------------------
/// @name Setting Passwords
///------------------------
/**
Sets a password in the Keychain.
@param password The password to store in the Keychain.
@param serviceName The service for which to set the corresponding password.
@param account The account for which to set the corresponding password.
@return Returns `YES` on success, or `NO` on failure.
@see setPassword:forService:account:error:
*/
+ (BOOL)setPassword:(NSString *)password forService:(NSString *)serviceName account:(NSString *)account;
/**
Sets a password in the Keychain.
@param password The password to store in the Keychain.
@param serviceName The service for which to set the corresponding password.
@param account The account for which to set the corresponding password.
@param error If setting the password fails, upon return contains an error that describes the problem.
@return Returns `YES` on success, or `NO` on failure.
@see setPassword:forService:account:
*/
+ (BOOL)setPassword:(NSString *)password forService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error;
/**
Sets arbirary data in the Keychain.
@param password The data to store in the Keychain.
@param serviceName The service for which to set the corresponding password.
@param account The account for which to set the corresponding password.
@param error If setting the password fails, upon return contains an error that describes the problem.
@return Returns `YES` on success, or `NO` on failure.
@see setPasswordData:forService:account:error:
*/
+ (BOOL)setPasswordData:(NSData *)password forService:(NSString *)serviceName account:(NSString *)account;
/**
Sets arbirary data in the Keychain.
@param password The data to store in the Keychain.
@param serviceName The service for which to set the corresponding password.
@param account The account for which to set the corresponding password.
@param error If setting the password fails, upon return contains an error that describes the problem.
@return Returns `YES` on success, or `NO` on failure.
@see setPasswordData:forService:account:
*/
+ (BOOL)setPasswordData:(NSData *)password forService:(NSString *)serviceName account:(NSString *)account error:(NSError **)error;
///--------------------
/// @name Configuration
///--------------------
#if __IPHONE_4_0 && TARGET_OS_IPHONE
/**
Returns the accessibility type for all future passwords saved to the Keychain.
@return Returns the accessibility type.
The return value will be `NULL` or one of the "Keychain Item Accessibility Constants" used for determining when a
keychain item should be readable.
@see accessibilityType
*/
+ (CFTypeRef)accessibilityType;
/**
Sets the accessibility type for all future passwords saved to the Keychain.
@param accessibilityType One of the "Keychain Item Accessibility Constants" used for determining when a keychain item
should be readable.
If the value is `NULL` (the default), the Keychain default will be used.
@see accessibilityType
*/
+ (void)setAccessibilityType:(CFTypeRef)accessibilityType;
#endif
@end
================================================
FILE: AMPCrypto/AMPCrypto/SSKeychain.m
================================================
//
// SSKeychain.m
// SSToolkit
//
// Created by Sam Soffes on 5/19/10.
// Copyright (c) 2009-2011 Sam Soffes. All rights reserved.
//
#import "SSKeychain.h"
NSString *const kSSKeychainErrorDomain = @"com.samsoffes.sskeychain";
NSString *const kSSKeychainAccountKey = @"acct";
NSString *const kSSKeychainCreatedAtKey = @"cdat";
NSString *const kSSKeychainClassKey = @"labl";
NSString *const kSSKeychainDescriptionKey = @"desc";
NSString *const kSSKeychainLabelKey = @"labl";
NSString *const kSSKeychainLastModifiedKey = @"mdat";
NSString *const kSSKeychainWhereKey = @"svce";
#if __IPHONE_4_0 && TARGET_OS_IPHONE
CFTypeRef SSKeychainAccessibilityType = NULL;
#endif
@interface SSKeychain ()
+ (NSMutableDictionary *)_queryForService:(NSString *)service account:(NSString *)account;
@end
@implementation SSKeychain
#pragma mark - Getting Accounts
+ (NSArray *)allAccounts {
return [self accountsForService:nil error:nil];
}
+ (NSArray *)allAccounts:(NSError **)error {
return [self accountsForService:nil error:error];
}
+ (NSArray *)accountsForService:(NSString *)service {
return [self accountsForService:service error:nil];
}
+ (NSArray *)accountsForService:(NSString *)service error:(NSError **)error {
OSStatus status = SSKeychainErrorBadArguments;
NSMutableDictionary *query = [self _queryForService:service account:nil];
#if __has_feature(objc_arc)
[query setObject:(__bridge id)kCFBooleanTrue forKey:(__bridge id)kSecReturnAttributes];
[query setObject:(__bridge id)kSecMatchLimitAll forKey:(__bridge id)kSecMatchLimit];
#else
[query setObject:(id)kCFBooleanTrue forKey:(id)kSecReturnAttributes];
[query setObject:(id)kSecMatchLimitAll forKey:(id)kSecMatchLimit];
#endif
CFTypeRef result = NULL;
#if __has_feature(objc_arc)
status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &result);
#else
status = SecItemCopyMatching((CFDictionaryRef)query, &result);
#endif
if (status != noErr && error != NULL) {
*error = [NSError errorWithDomain:kSSKeychainErrorDomain code:status userInfo:nil];
return nil;
}
#if __has_feature(objc_arc)
return (__bridge_transfer NSArray *)result;
#else
return [(NSArray *)result autorelease];
#endif
}
#pragma mark - Getting Passwords
+ (NSString *)passwordForService:(NSString *)service account:(NSString *)account {
return [self passwordForService:service account:account error:nil];
}
+ (NSString *)passwordForService:(NSString *)service account:(NSString *)account error:(NSError **)error {
NSData *data = [self passwordDataForService:service account:account error:error];
if (data.length > 0) {
NSString *string = [[NSString alloc] initWithData:(NSData *)data encoding:NSUTF8StringEncoding];
#if !__has_feature(objc_arc)
[string autorelease];
#endif
return string;
}
return nil;
}
+ (NSData *)passwordDataForService:(NSString *)service account:(NSString *)account {
return [self passwordDataForService:service account:account error:nil];
}
+ (NSData *)passwordDataForService:(NSString *)service account:(NSString *)account error:(NSError **)error {
OSStatus status = SSKeychainErrorBadArguments;
if (!service || !account) {
if (error) {
*error = [NSError errorWithDomain:kSSKeychainErrorDomain code:status userInfo:nil];
}
return nil;
}
CFTypeRef result = NULL;
NSMutableDictionary *query = [self _queryForService:service account:account];
#if __has_feature(objc_arc)
[query setObject:(__bridge id)kCFBooleanTrue forKey:(__bridge id)kSecReturnData];
[query setObject:(__bridge id)kSecMatchLimitOne forKey:(__bridge id)kSecMatchLimit];
status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &result);
#else
[query setObject:(id)kCFBooleanTrue forKey:(id)kSecReturnData];
[query setObject:(id)kSecMatchLimitOne forKey:(id)kSecMatchLimit];
status = SecItemCopyMatching((CFDictionaryRef)query, &result);
#endif
if (status != noErr && error != NULL) {
*error = [NSError errorWithDomain:kSSKeychainErrorDomain code:status userInfo:nil];
return nil;
}
#if __has_feature(objc_arc)
return (__bridge_transfer NSData *)result;
#else
return [(NSData *)result autorelease];
#endif
}
#pragma mark - Deleting Passwords
+ (BOOL)deletePasswordForService:(NSString *)service account:(NSString *)account {
return [self deletePasswordForService:service account:account error:nil];
}
+ (BOOL)deletePasswordForService:(NSString *)service account:(NSString *)account error:(NSError **)error {
OSStatus status = SSKeychainErrorBadArguments;
if (service && account) {
NSMutableDictionary *query = [self _queryForService:service account:account];
#if __has_feature(objc_arc)
status = SecItemDelete((__bridge CFDictionaryRef)query);
#else
status = SecItemDelete((CFDictionaryRef)query);
#endif
}
if (status != noErr && error != NULL) {
*error = [NSError errorWithDomain:kSSKeychainErrorDomain code:status userInfo:nil];
}
return (status == noErr);
}
#pragma mark - Setting Passwords
+ (BOOL)setPassword:(NSString *)password forService:(NSString *)service account:(NSString *)account {
return [self setPassword:password forService:service account:account error:nil];
}
+ (BOOL)setPassword:(NSString *)password forService:(NSString *)service account:(NSString *)account error:(NSError **)error {
NSData *data = [password dataUsingEncoding:NSUTF8StringEncoding];
return [self setPasswordData:data forService:service account:account error:error];
}
+ (BOOL)setPasswordData:(NSData *)password forService:(NSString *)service account:(NSString *)account {
return [self setPasswordData:password forService:service account:account error:nil];
}
+ (BOOL)setPasswordData:(NSData *)password forService:(NSString *)service account:(NSString *)account error:(NSError **)error {
OSStatus status = SSKeychainErrorBadArguments;
if (password && service && account) {
[self deletePasswordForService:service account:account];
NSMutableDictionary *query = [self _queryForService:service account:account];
#if __has_feature(objc_arc)
[query setObject:password forKey:(__bridge id)kSecValueData];
#else
[query setObject:password forKey:(id)kSecValueData];
#endif
#if __IPHONE_4_0 && TARGET_OS_IPHONE
if (SSKeychainAccessibilityType) {
#if __has_feature(objc_arc)
[query setObject:(id)[self accessibilityType] forKey:(__bridge id)kSecAttrAccessible];
#else
[query setObject:(id)[self accessibilityType] forKey:(id)kSecAttrAccessible];
#endif
}
#endif
#if __has_feature(objc_arc)
status = SecItemAdd((__bridge CFDictionaryRef)query, NULL);
#else
status = SecItemAdd((CFDictionaryRef)query, NULL);
#endif
}
if (status != noErr && error != NULL) {
*error = [NSError errorWithDomain:kSSKeychainErrorDomain code:status userInfo:nil];
}
return (status == noErr);
}
#pragma mark - Configuration
#if __IPHONE_4_0 && TARGET_OS_IPHONE
+ (CFTypeRef)accessibilityType {
return SSKeychainAccessibilityType;
}
+ (void)setAccessibilityType:(CFTypeRef)accessibilityType {
CFRetain(accessibilityType);
if (SSKeychainAccessibilityType) {
CFRelease(SSKeychainAccessibilityType);
}
SSKeychainAccessibilityType = accessibilityType;
}
#endif
#pragma mark - Private
+ (NSMutableDictionary *)_queryForService:(NSString *)service account:(NSString *)account {
NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithCapacity:3];
#if __has_feature(objc_arc)
[dictionary setObject:(__bridge id)kSecClassGenericPassword forKey:(__bridge id)kSecClass];
#else
[dictionary setObject:(id)kSecClassGenericPassword forKey:(id)kSecClass];
#endif
if (service) {
#if __has_feature(objc_arc)
[dictionary setObject:service forKey:(__bridge id)kSecAttrService];
#else
[dictionary setObject:service forKey:(id)kSecAttrService];
#endif
}
if (account) {
#if __has_feature(objc_arc)
[dictionary setObject:account forKey:(__bridge id)kSecAttrAccount];
#else
[dictionary setObject:account forKey:(id)kSecAttrAccount];
#endif
}
return dictionary;
}
@end
================================================
FILE: AMPCrypto/AMPCrypto/en.lproj/InfoPlist.strings
================================================
/* Localized versions of Info.plist keys */
================================================
FILE: AMPCrypto/AMPCrypto.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
B30FF5A618FADCD40053FD49 /* AMPluginFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8DB0EA018F755C800FA795F /* AMPluginFramework.framework */; };
B30FF5DD18FF19AD0053FD49 /* locked.psd in Resources */ = {isa = PBXBuildFile; fileRef = B30FF5DC18FF19AD0053FD49 /* locked.psd */; };
D89DF28118F7D598004319A9 /* SSKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = D89DF28018F7D598004319A9 /* SSKeychain.m */; };
D89DF28318F7D5A1004319A9 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D89DF28218F7D5A1004319A9 /* Security.framework */; };
D89DF29F18F7EBC5004319A9 /* NSData+AESCrypt.m in Sources */ = {isa = PBXBuildFile; fileRef = D89DF29C18F7EBC5004319A9 /* NSData+AESCrypt.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
D89DF2A018F7EBC5004319A9 /* NSString+AESCrypt.m in Sources */ = {isa = PBXBuildFile; fileRef = D89DF29E18F7EBC5004319A9 /* NSString+AESCrypt.m */; };
D8DB0E4D18F7548700FA795F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8DB0E4C18F7548700FA795F /* Cocoa.framework */; };
D8DB0E5718F7548700FA795F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D8DB0E5518F7548700FA795F /* InfoPlist.strings */; };
D8DB0EA418F755F700FA795F /* AMPCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = D8DB0EA318F755F700FA795F /* AMPCrypto.m */; };
D8DB0EA718F7565400FA795F /* AMPCryptoView.m in Sources */ = {isa = PBXBuildFile; fileRef = D8DB0EA618F7565400FA795F /* AMPCryptoView.m */; };
D8DB0EAA18F7714400FA795F /* AMPCrypto.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = D8DB0E4918F7548700FA795F /* AMPCrypto.bundle */; };
D8F9FF2118F81E8C00A47564 /* unlocked.psd in Resources */ = {isa = PBXBuildFile; fileRef = D8F9FF2018F81E8C00A47564 /* unlocked.psd */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
D8DB0EA918F770CB00FA795F /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "~/Library/Containers/it.bloop.airmail.beta8/Data/Library/Application Support/Airmail/General/Plugins";
dstSubfolderSpec = 0;
files = (
D8DB0EAA18F7714400FA795F /* AMPCrypto.bundle in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
B30FF58D18F827FE0053FD49 /* AMPluginFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AMPluginFramework.framework; sourceTree = "<group>"; };
B30FF5DC18FF19AD0053FD49 /* locked.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = locked.psd; sourceTree = "<group>"; };
D89DF27F18F7D598004319A9 /* SSKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSKeychain.h; sourceTree = "<group>"; };
D89DF28018F7D598004319A9 /* SSKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSKeychain.m; sourceTree = "<group>"; };
D89DF28218F7D5A1004319A9 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
D89DF29B18F7EBC5004319A9 /* NSData+AESCrypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+AESCrypt.h"; sourceTree = "<group>"; };
D89DF29C18F7EBC5004319A9 /* NSData+AESCrypt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+AESCrypt.m"; sourceTree = "<group>"; };
D89DF29D18F7EBC5004319A9 /* NSString+AESCrypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+AESCrypt.h"; sourceTree = "<group>"; };
D89DF29E18F7EBC5004319A9 /* NSString+AESCrypt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+AESCrypt.m"; sourceTree = "<group>"; };
D8DB0E4918F7548700FA795F /* AMPCrypto.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AMPCrypto.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
D8DB0E4C18F7548700FA795F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
D8DB0E4F18F7548700FA795F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D8DB0E5018F7548700FA795F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
D8DB0E5118F7548700FA795F /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
D8DB0E5418F7548700FA795F /* AMPCrypto-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AMPCrypto-Info.plist"; sourceTree = "<group>"; };
D8DB0E5618F7548700FA795F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
D8DB0E5818F7548700FA795F /* AMPCrypto-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AMPCrypto-Prefix.pch"; sourceTree = "<group>"; };
D8DB0EA018F755C800FA795F /* AMPluginFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AMPluginFramework.framework; path = ../AMPluginFramework/build/Debug/AMPluginFramework.framework; sourceTree = "<group>"; };
D8DB0EA218F755F700FA795F /* AMPCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPCrypto.h; sourceTree = "<group>"; };
D8DB0EA318F755F700FA795F /* AMPCrypto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPCrypto.m; sourceTree = "<group>"; };
D8DB0EA518F7565400FA795F /* AMPCryptoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPCryptoView.h; sourceTree = "<group>"; };
D8DB0EA618F7565400FA795F /* AMPCryptoView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPCryptoView.m; sourceTree = "<group>"; };
D8F9FF2018F81E8C00A47564 /* unlocked.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = unlocked.psd; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D8DB0E4618F7548700FA795F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B30FF5A618FADCD40053FD49 /* AMPluginFramework.framework in Frameworks */,
D89DF28318F7D5A1004319A9 /* Security.framework in Frameworks */,
D8DB0E4D18F7548700FA795F /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
D8DB0E4018F7548600FA795F = {
isa = PBXGroup;
children = (
D8DB0E5218F7548700FA795F /* AMPCrypto */,
D8DB0E4B18F7548700FA795F /* Frameworks */,
D8DB0E4A18F7548700FA795F /* Products */,
);
sourceTree = "<group>";
};
D8DB0E4A18F7548700FA795F /* Products */ = {
isa = PBXGroup;
children = (
D8DB0E4918F7548700FA795F /* AMPCrypto.bundle */,
);
name = Products;
sourceTree = "<group>";
};
D8DB0E4B18F7548700FA795F /* Frameworks */ = {
isa = PBXGroup;
children = (
B30FF58D18F827FE0053FD49 /* AMPluginFramework.framework */,
D89DF28218F7D5A1004319A9 /* Security.framework */,
D8DB0EA018F755C800FA795F /* AMPluginFramework.framework */,
D8DB0E4C18F7548700FA795F /* Cocoa.framework */,
D8DB0E4E18F7548700FA795F /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
D8DB0E4E18F7548700FA795F /* Other Frameworks */ = {
isa = PBXGroup;
children = (
D8DB0E4F18F7548700FA795F /* Foundation.framework */,
D8DB0E5018F7548700FA795F /* CoreData.framework */,
D8DB0E5118F7548700FA795F /* AppKit.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
D8DB0E5218F7548700FA795F /* AMPCrypto */ = {
isa = PBXGroup;
children = (
D8DB0EA218F755F700FA795F /* AMPCrypto.h */,
D8DB0EA318F755F700FA795F /* AMPCrypto.m */,
D8DB0EA518F7565400FA795F /* AMPCryptoView.h */,
D8DB0EA618F7565400FA795F /* AMPCryptoView.m */,
D89DF27F18F7D598004319A9 /* SSKeychain.h */,
D89DF28018F7D598004319A9 /* SSKeychain.m */,
D89DF29B18F7EBC5004319A9 /* NSData+AESCrypt.h */,
D89DF29C18F7EBC5004319A9 /* NSData+AESCrypt.m */,
D89DF29D18F7EBC5004319A9 /* NSString+AESCrypt.h */,
D89DF29E18F7EBC5004319A9 /* NSString+AESCrypt.m */,
D8DB0E5318F7548700FA795F /* Supporting Files */,
);
path = AMPCrypto;
sourceTree = "<group>";
};
D8DB0E5318F7548700FA795F /* Supporting Files */ = {
isa = PBXGroup;
children = (
B30FF5DC18FF19AD0053FD49 /* locked.psd */,
D8F9FF2018F81E8C00A47564 /* unlocked.psd */,
D8DB0E5418F7548700FA795F /* AMPCrypto-Info.plist */,
D8DB0E5518F7548700FA795F /* InfoPlist.strings */,
D8DB0E5818F7548700FA795F /* AMPCrypto-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
D8DB0E4818F7548700FA795F /* AMPCrypto */ = {
isa = PBXNativeTarget;
buildConfigurationList = D8DB0E5B18F7548700FA795F /* Build configuration list for PBXNativeTarget "AMPCrypto" */;
buildPhases = (
D8DB0E4518F7548700FA795F /* Sources */,
D8DB0E4618F7548700FA795F /* Frameworks */,
D8DB0E4718F7548700FA795F /* Resources */,
D8DB0EA918F770CB00FA795F /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = AMPCrypto;
productName = AMPCrypto;
productReference = D8DB0E4918F7548700FA795F /* AMPCrypto.bundle */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
D8DB0E4118F7548600FA795F /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = bloop;
};
buildConfigurationList = D8DB0E4418F7548600FA795F /* Build configuration list for PBXProject "AMPCrypto" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = D8DB0E4018F7548600FA795F;
productRefGroup = D8DB0E4A18F7548700FA795F /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D8DB0E4818F7548700FA795F /* AMPCrypto */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
D8DB0E4718F7548700FA795F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D8DB0E5718F7548700FA795F /* InfoPlist.strings in Resources */,
D8F9FF2118F81E8C00A47564 /* unlocked.psd in Resources */,
B30FF5DD18FF19AD0053FD49 /* locked.psd in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
D8DB0E4518F7548700FA795F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D8DB0EA718F7565400FA795F /* AMPCryptoView.m in Sources */,
D89DF2A018F7EBC5004319A9 /* NSString+AESCrypt.m in Sources */,
D89DF29F18F7EBC5004319A9 /* NSData+AESCrypt.m in Sources */,
D8DB0EA418F755F700FA795F /* AMPCrypto.m in Sources */,
D89DF28118F7D598004319A9 /* SSKeychain.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
D8DB0E5518F7548700FA795F /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
D8DB0E5618F7548700FA795F /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
D8DB0E5918F7548700FA795F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
D8DB0E5A18F7548700FA795F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
};
name = Release;
};
D8DB0E5C18F7548700FA795F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
/Users/Shared/DevelopMac/Airmail_1.4/AMPCrypto,
"\"$(SRCROOT)/../AMPluginFramework/build/Debug/\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AMPCrypto/AMPCrypto-Prefix.pch";
INFOPLIST_FILE = "AMPCrypto/AMPCrypto-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = bundle;
};
name = Debug;
};
D8DB0E5D18F7548700FA795F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
/Users/Shared/DevelopMac/Airmail_1.4/AMPCrypto,
"\"$(SRCROOT)/../AMPluginFramework/build/Debug/\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AMPCrypto/AMPCrypto-Prefix.pch";
INFOPLIST_FILE = "AMPCrypto/AMPCrypto-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = bundle;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
D8DB0E4418F7548600FA795F /* Build configuration list for PBXProject "AMPCrypto" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D8DB0E5918F7548700FA795F /* Debug */,
D8DB0E5A18F7548700FA795F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D8DB0E5B18F7548700FA795F /* Build configuration list for PBXNativeTarget "AMPCrypto" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D8DB0E5C18F7548700FA795F /* Debug */,
D8DB0E5D18F7548700FA795F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = D8DB0E4118F7548600FA795F /* Project object */;
}
================================================
FILE: AMPCrypto/AMPCrypto.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:AMPCrypto.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: AMPCustomTemplates/AMPCustomTemplate.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
880B3309183ACF6A0053B7E4 /* AMPluginFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 887975F81837F69B00C008FB /* AMPluginFramework.framework */; };
880B330C183ACF7D0053B7E4 /* AMPCustomTemplate.m in Sources */ = {isa = PBXBuildFile; fileRef = 880B330B183ACF7D0053B7E4 /* AMPCustomTemplate.m */; };
887975FE1837F74100C008FB /* AMPCssComposerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 887975FD1837F74100C008FB /* AMPCssComposerView.m */; };
887975FF1837F85B00C008FB /* AMPCustomTemplate.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 88DB2C0C1837C234003CC988 /* AMPCustomTemplate.bundle */; };
88DB2C101837C234003CC988 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88DB2C0F1837C234003CC988 /* Cocoa.framework */; };
88DB2C1A1837C234003CC988 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 88DB2C181837C234003CC988 /* InfoPlist.strings */; };
D86D3C751838F81E0097697F /* helvetica.css in Resources */ = {isa = PBXBuildFile; fileRef = D86D3C6F1838F81E0097697F /* helvetica.css */; };
D86D3C771838F81E0097697F /* Taxi.css in Resources */ = {isa = PBXBuildFile; fileRef = D86D3C711838F81E0097697F /* Taxi.css */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
887975FA1837F6B500C008FB /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "~/Library/Containers/it.bloop.airmail.beta8/Data/Library/Application Support/Airmail/General/Plugins";
dstSubfolderSpec = 0;
files = (
887975FF1837F85B00C008FB /* AMPCustomTemplate.bundle in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
880B330A183ACF7D0053B7E4 /* AMPCustomTemplate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPCustomTemplate.h; sourceTree = "<group>"; };
880B330B183ACF7D0053B7E4 /* AMPCustomTemplate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPCustomTemplate.m; sourceTree = "<group>"; };
887975F81837F69B00C008FB /* AMPluginFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AMPluginFramework.framework; path = ../AMPluginFramework/build/Debug/AMPluginFramework.framework; sourceTree = "<group>"; };
887975FC1837F74100C008FB /* AMPCssComposerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPCssComposerView.h; sourceTree = "<group>"; };
887975FD1837F74100C008FB /* AMPCssComposerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPCssComposerView.m; sourceTree = "<group>"; };
88DB2C0C1837C234003CC988 /* AMPCustomTemplate.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AMPCustomTemplate.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
88DB2C0F1837C234003CC988 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
88DB2C121837C234003CC988 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
88DB2C131837C234003CC988 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
88DB2C141837C234003CC988 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
88DB2C171837C234003CC988 /* AMPCustomTemplate-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AMPCustomTemplate-Info.plist"; sourceTree = "<group>"; };
88DB2C191837C234003CC988 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
88DB2C1B1837C234003CC988 /* AMPCustomTemplate-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AMPCustomTemplate-Prefix.pch"; sourceTree = "<group>"; };
D86D3C6F1838F81E0097697F /* helvetica.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = helvetica.css; sourceTree = "<group>"; };
D86D3C711838F81E0097697F /* Taxi.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = Taxi.css; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
88DB2C091837C234003CC988 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
880B3309183ACF6A0053B7E4 /* AMPluginFramework.framework in Frameworks */,
88DB2C101837C234003CC988 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
88DB2C031837C234003CC988 = {
isa = PBXGroup;
children = (
88DB2C151837C234003CC988 /* CssComposer */,
88DB2C0E1837C234003CC988 /* Frameworks */,
88DB2C0D1837C234003CC988 /* Products */,
);
sourceTree = "<group>";
};
88DB2C0D1837C234003CC988 /* Products */ = {
isa = PBXGroup;
children = (
88DB2C0C1837C234003CC988 /* AMPCustomTemplate.bundle */,
);
name = Products;
sourceTree = "<group>";
};
88DB2C0E1837C234003CC988 /* Frameworks */ = {
isa = PBXGroup;
children = (
887975F81837F69B00C008FB /* AMPluginFramework.framework */,
88DB2C0F1837C234003CC988 /* Cocoa.framework */,
88DB2C111837C234003CC988 /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
88DB2C111837C234003CC988 /* Other Frameworks */ = {
isa = PBXGroup;
children = (
88DB2C121837C234003CC988 /* Foundation.framework */,
88DB2C131837C234003CC988 /* CoreData.framework */,
88DB2C141837C234003CC988 /* AppKit.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
88DB2C151837C234003CC988 /* CssComposer */ = {
isa = PBXGroup;
children = (
880B330A183ACF7D0053B7E4 /* AMPCustomTemplate.h */,
880B330B183ACF7D0053B7E4 /* AMPCustomTemplate.m */,
887975FC1837F74100C008FB /* AMPCssComposerView.h */,
887975FD1837F74100C008FB /* AMPCssComposerView.m */,
88DB2C161837C234003CC988 /* Supporting Files */,
);
path = CssComposer;
sourceTree = "<group>";
};
88DB2C161837C234003CC988 /* Supporting Files */ = {
isa = PBXGroup;
children = (
D86D3C791838F8230097697F /* css */,
88DB2C171837C234003CC988 /* AMPCustomTemplate-Info.plist */,
88DB2C181837C234003CC988 /* InfoPlist.strings */,
88DB2C1B1837C234003CC988 /* AMPCustomTemplate-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
D86D3C791838F8230097697F /* css */ = {
isa = PBXGroup;
children = (
D86D3C6F1838F81E0097697F /* helvetica.css */,
D86D3C711838F81E0097697F /* Taxi.css */,
);
name = css;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
88DB2C0B1837C234003CC988 /* AMPCustomTemplate */ = {
isa = PBXNativeTarget;
buildConfigurationList = 88DB2C1E1837C234003CC988 /* Build configuration list for PBXNativeTarget "AMPCustomTemplate" */;
buildPhases = (
88DB2C081837C234003CC988 /* Sources */,
88DB2C091837C234003CC988 /* Frameworks */,
88DB2C0A1837C234003CC988 /* Resources */,
887975FA1837F6B500C008FB /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = AMPCustomTemplate;
productName = CssComposer;
productReference = 88DB2C0C1837C234003CC988 /* AMPCustomTemplate.bundle */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
88DB2C041837C234003CC988 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = Joe;
};
buildConfigurationList = 88DB2C071837C234003CC988 /* Build configuration list for PBXProject "AMPCustomTemplate" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 88DB2C031837C234003CC988;
productRefGroup = 88DB2C0D1837C234003CC988 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
88DB2C0B1837C234003CC988 /* AMPCustomTemplate */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
88DB2C0A1837C234003CC988 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D86D3C771838F81E0097697F /* Taxi.css in Resources */,
D86D3C751838F81E0097697F /* helvetica.css in Resources */,
88DB2C1A1837C234003CC988 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
88DB2C081837C234003CC988 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
880B330C183ACF7D0053B7E4 /* AMPCustomTemplate.m in Sources */,
887975FE1837F74100C008FB /* AMPCssComposerView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
88DB2C181837C234003CC988 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
88DB2C191837C234003CC988 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
88DB2C1C1837C234003CC988 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
88DB2C1D1837C234003CC988 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
SDKROOT = macosx;
};
name = Release;
};
88DB2C1F1837C234003CC988 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
/Users/Shared/DevelopMac/Airmail/AMPluginFramework/build/Debug,
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "CssComposer/AMPCustomTemplate-Prefix.pch";
INFOPLIST_FILE = "CssComposer/AMPCustomTemplate-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
PRODUCT_NAME = AMPCustomTemplate;
WRAPPER_EXTENSION = bundle;
};
name = Debug;
};
88DB2C201837C234003CC988 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
/Users/Shared/DevelopMac/Airmail/AMPluginFramework/build/Debug,
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "CssComposer/AMPCustomTemplate-Prefix.pch";
INFOPLIST_FILE = "CssComposer/AMPCustomTemplate-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
PRODUCT_NAME = AMPCustomTemplate;
WRAPPER_EXTENSION = bundle;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
88DB2C071837C234003CC988 /* Build configuration list for PBXProject "AMPCustomTemplate" */ = {
isa = XCConfigurationList;
buildConfigurations = (
88DB2C1C1837C234003CC988 /* Debug */,
88DB2C1D1837C234003CC988 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
88DB2C1E1837C234003CC988 /* Build configuration list for PBXNativeTarget "AMPCustomTemplate" */ = {
isa = XCConfigurationList;
buildConfigurations = (
88DB2C1F1837C234003CC988 /* Debug */,
88DB2C201837C234003CC988 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 88DB2C041837C234003CC988 /* Project object */;
}
================================================
FILE: AMPCustomTemplates/AMPCustomTemplate.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:AMPCustomTemplate.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: AMPCustomTemplates/CssComposer/AMPCssComposerView.h
================================================
//
// AMPCssComposerView.h
// AirmailCssComposer
//
// Created by Joe on 16/11/13.
// Copyright (c) 2013 Joe. All rights reserved.
//
#import <AMPluginFramework/AMPluginFramework.h>
@interface AMPCssComposerView : AMPView
{
NSPopUpButton *popUpBtnRender;
}
@end
================================================
FILE: AMPCustomTemplates/CssComposer/AMPCssComposerView.m
================================================
//
// AMPCssComposerView.m
// AirmailCssComposer
//
// Created by Joe on 16/11/13.
// Copyright (c) 2013 Joe. All rights reserved.
//
#import "AMPCssComposerView.h"
#import "AMPCustomTemplate.h"
@implementation AMPCssComposerView
- (id)initWithFrame:(NSRect)frame plugin:(AMPlugin *)pluginIn
{
self = [super initWithFrame:frame plugin:pluginIn];
if (self) {
// Initialization code here.
NSInteger x = 20;
NSInteger y = 20;
NSTextField *textField = [[NSTextField alloc] initWithFrame:NSMakeRect(x+3, y+5, 250, 20)];
[textField setStringValue:NSLocalizedString(@"Template Selector:",@"Template Selector:")];
[textField setBezeled:NO];
[textField setDrawsBackground:NO];
[textField setEditable:NO];
[textField setSelectable:NO];
[textField setFont:[NSFont systemFontOfSize:13]];
[[textField cell] setBackgroundStyle:NSBackgroundStyleRaised];
[textField setAlignment: NSRightTextAlignment];
[self addSubview:textField];
popUpBtnRender = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(x+270, y, 200, 30) pullsDown:NO];
[(NSPopUpButtonCell *)[popUpBtnRender cell] setBezelStyle:NSTexturedRoundedBezelStyle];
[[popUpBtnRender cell] setArrowPosition:NSPopUpArrowAtBottom];
[popUpBtnRender setAutoresizingMask:NSViewMaxYMargin];
[self addSubview:popUpBtnRender];
[self LoadView];
}
return self;
}
- (AMPCustomTemplate*) myPlugin
{
return (AMPCustomTemplate*)self.plugin;
}
- (void) ReloadView
{
dispatch_async(dispatch_get_main_queue(), ^{
[self LoadView];
});
}
- (void) LoadView
{
NSMenu *menu = [self.myPlugin stylesMenu];
[popUpBtnRender setMenu:menu];
//Selection
NSString *pathRender = [self.myPlugin savedPath];
if(pathRender && [pathRender isKindOfClass:[NSString class]])
{
for(NSMenuItem *item in popUpBtnRender.menu.itemArray)
{
if([item.representedObject isEqualToString:pathRender])
{
[popUpBtnRender selectItem:item];
break;
}
}
}
}
- (void) RenderView
{
}
@end
================================================
FILE: AMPCustomTemplates/CssComposer/AMPCustomTemplate-Info.plist
================================================
<?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>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>it.bloop.airmail.plugin.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2013 Joe. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string>AMPCssComposer</string>
</dict>
</plist>
================================================
FILE: AMPCustomTemplates/CssComposer/AMPCustomTemplate-Prefix.pch
================================================
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
================================================
FILE: AMPCustomTemplates/CssComposer/AMPCustomTemplate.h
================================================
//
// AMPCssComposer.h
// CssComposer
//
// Created by Joe on 16/11/13.
// Copyright (c) 2013 Joe. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AMPluginFramework/AMPluginFramework.h>
@interface AMPCustomTemplate : AMPlugin
{
}
@property (strong) NSMutableArray *cssList;
@property (strong) NSString *cssString,*cssStringComposer;
-(NSString*)savedPath;
-(void) changeCss:(NSString*)str;
- (NSMenu*) stylesMenuComposerButton;
- (NSMenu*) stylesMenu;
@end
================================================
FILE: AMPCustomTemplates/CssComposer/AMPCustomTemplate.m
================================================
//
// AMPCssComposer.m
// CssComposer
//
// Created by Joe on 16/11/13.
// Copyright (c) 2013 Joe. All rights reserved.
//
#import "AMPCustomTemplate.h"
#import "AMPCssComposerView.h"
const NSString *ampcss_composer_css_option = @"ampcss_composer_css_option";
@implementation AMPCustomTemplate
- (id)init
{
self = [super init];
if (self)
{
self.cssString = @"";
}
return self;
}
- (BOOL) Load
{
if(![super Load])
return NO;
self.cssList = [NSMutableArray array];
//Load Bundle
NSMutableArray *allpaths = [NSMutableArray array];
NSArray *bundlesPath = [self bundlepathContents];
if(!bundlesPath)
return NO;
[allpaths addObjectsFromArray:bundlesPath];
NSArray *dirPaths = [self suggestedpathContents];
if(!dirPaths)
return NO;
[allpaths addObjectsFromArray:dirPaths];
for(NSString *path in allpaths)
{
if([path.pathExtension isEqualToString:@"css"])
[self.cssList addObject:path];
}
//Load Preference
NSString *path = [self.preferences objectForKey:ampcss_composer_css_option];
if(path && [path isKindOfClass:[NSString class]])
self.cssString = [self LoadCssStringForPath:path];
[self Reload];
return YES;
}
- (void) Enable
{
}
- (void) Disable
{
}
- (void) Invalid
{
}
- (void) Reload
{
return [(AMPCssComposerView*)self.myView ReloadView];
}
- (AMPView*) pluginview
{
if(!self.myView)
self.myView = [[AMPCssComposerView alloc] initWithFrame:NSZeroRect plugin:self];
return self.myView;
}
- (NSString*) nametext
{
return @"Composer Template SDK";
}
- (NSString*) description
{
return self.nametext;
}
- (NSString*) descriptiontext
{
return @"This plugin is a Composert Template sample to show how to customize your message,";
}
- (NSString*) authortext
{
return @"Airmail SDK Sample";
}
- (NSString*) supportlink
{
return @"http://adv.bloop.info/airmail/sdk.php";
}
- (NSImage*) icon
{
return [NSImage imageNamed:@"iconx"];
}
#pragma mark - AM called methods
-(NSMenuItem*) ampMenuComposerItem:(AMPComposerInfo *)info
{
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Change Style", @"Change Style") action:nil keyEquivalent:@""];
[item setState:NSOffState];
NSMenu *menu = [self stylesMenuComposerButton];
[item setSubmenu:menu];
return item;
}
- (NSString*) ampStackComposerRenderHtmlFromHtml:(NSString *)html composerInfo:(AMPComposerInfo *)info
{
if(self.cssString.length == 0)
return html;
NSString *htmlRet = [NSString stringWithFormat:@"<style id=\"%@\">%@</style>%@",ampcss_composer_css_option,self.cssString,html];
return htmlRet;
}
#pragma mark - manage css
-(NSString*) savedPath
{
return [self.preferences objectForKey:ampcss_composer_css_option];
}
- (NSString*) LoadCssStringForPath:(NSString*)path
{
NSError *err = nil;
NSString *str = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&err];
if(err)
{
str = @"";
[self LogError:[NSString stringWithFormat:@"Cannot load css %@",path]];
}
return str;
}
- (NSMenu*) stylesMenu
{
NSMenu *menu = [NSMenu new];
NSArray *csss = [self.cssList sortedArrayUsingComparator:^NSComparisonResult(id a, id b) {
return [a caseInsensitiveCompare:b];
}];
NSMenuItem *itemRender = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"None", @"None") action:nil keyEquivalent:@""];
[itemRender setRepresentedObject:@""];
[itemRender setAction:@selector(changeCss:)];
[itemRender setTarget:self];
[menu addItem:itemRender];
[csss enumerateObjectsUsingBlock:^(NSString *path, NSUInteger idx, BOOL *stop) {
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:path.lastPathComponent.stringByDeletingPathExtension action:nil keyEquivalent:@""];
[item setRepresentedObject:path];
[item setAction:@selector(changeCss:)];
[item setTarget:self];
[menu addItem:item];
}];
return menu;
}
- (NSMenu*) stylesMenuComposerButton
{
NSMenu *menu = [self stylesMenu];
[menu.itemArray enumerateObjectsUsingBlock:^(NSMenuItem *item, NSUInteger idx, BOOL *stop) {
if([item.representedObject isEqualToString:self.cssStringComposer])
[item setState:NSOnState];
[item setAction:@selector(changeCssComposer:)];
[item setTarget:self];
}];
return menu;
}
- (void) changeCss:(NSMenuItem*)item
{
[self changeCssString:item.representedObject];
}
- (void) changeCssString:(NSString*)str
{
if(str.length == 0)
{
[self.preferences removeObjectForKey:ampcss_composer_css_option];
self.cssString = @"";
}
else
{
[self.preferences removeObjectForKey:ampcss_composer_css_option];
[self.preferences setObject:str forKey:ampcss_composer_css_option];
self.cssString = [self LoadCssStringForPath:str];
}
[self SavePreferences];
}
//From composer
- (void) changeCssComposer:(NSMenuItem*)item
{
//NSLog(@"changeCssComposer %@",str);
if([item.representedObject isKindOfClass:[AMPComposerInfo class]])
{
AMPComposerInfo *info = item.representedObject;
if([info.representedObject isKindOfClass:[NSString class]])
{
NSString *path = (NSString*)info.representedObject;
self.cssStringComposer = [self LoadCssStringForPath:path];
if(info.webView)
{
DOMDocument *domDoc = [[info.webView mainFrame] DOMDocument];
NSString *idx = [NSString stringWithFormat:@"%@",ampcss_composer_css_option];
DOMHTMLStyleElement *cssNode = (DOMHTMLStyleElement*)[domDoc createElement:@"style"];
[cssNode setInnerHTML:self.cssStringComposer];
[cssNode setIdName:idx];
DOMElement *el = [domDoc getElementById:idx];
if(el && el.parentNode)
{
[el.parentNode replaceChild:cssNode oldChild:el];
}
else
{
DOMNodeList *list = [domDoc getElementsByTagName:@"head"];;
if(list.length > 0)
{
DOMHTMLHeadElement *head = (DOMHTMLHeadElement*)[list item:0];
[head appendChild:cssNode];
}
}
}
}
}
}
@end
================================================
FILE: AMPCustomTemplates/CssComposer/Taxi.css
================================================
*,tr,td,table,html,th,hr,body,tbody,div {
font-size: 18px !important;
font-family:"avenir next" !important;
color:Black; !important;
background-color:Yellow !important;
border:0px!important;
border-top: 0px;
background-color:Yellow !important;
background-image:url('') !important;
}
img {
Display:none;
}
a * {
color:green; !important;
}
================================================
FILE: AMPCustomTemplates/CssComposer/Yellow.css
================================================
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
* {
font-size: 25px !important;
font-family:"lucida-grande" !important;
Color-Black; !important;
Background-Color:Yellow; !important;
}
img {
display: none !important;
}
================================================
FILE: AMPCustomTemplates/CssComposer/base1.css
================================================
* {
font-size: 25px;
font-family:"helvetica";
}
================================================
FILE: AMPCustomTemplates/CssComposer/base2.css
================================================
* {
font-size: 11px;
font-family:"helvetica";
}
================================================
FILE: AMPCustomTemplates/CssComposer/base3.css
================================================
* {
font-size: 35px;
font-family:"helvetica";
}
================================================
FILE: AMPCustomTemplates/CssComposer/base4.css
================================================
* {
font-size: 49px;
font-family:"helvetica";
}
================================================
FILE: AMPCustomTemplates/CssComposer/en.lproj/InfoPlist.strings
================================================
/* Localized versions of Info.plist keys */
================================================
FILE: AMPCustomTemplates/CssComposer/helvetica.css
================================================
* {
font-size: 35px;
font-family:"helvetica" !important;
}
================================================
FILE: AMPFramework.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "container:AMPCrypto/AMPCrypto.xcodeproj">
</FileRef>
<FileRef
location = "group:AMPCustomTemplates/AMPCustomTemplate.xcodeproj">
</FileRef>
<FileRef
location = "group:AMPGpg/AMPGpg.xcodeproj">
</FileRef>
<FileRef
location = "group:AMPMessageStyle/AMPMessageStyle.xcodeproj">
</FileRef>
<FileRef
location = "group:AMPNotify/AMPSimpleNotifier.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: AMPGpg/AMPGpg/AMPGpg-Info.plist
================================================
<?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>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>it.bloop.airmail.plugin.gpg</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>8</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2014 bloop. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string>AMPGpg</string>
</dict>
</plist>
================================================
FILE: AMPGpg/AMPGpg/AMPGpg-Prefix.pch
================================================
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
================================================
FILE: AMPGpg/AMPGpg/AMPGpg.h
================================================
//
// AMPGpg.h
// AMPGpg
//
// Created by Gio on 16/04/14.
// Copyright (c) 2014 bloop. All rights reserved.
//
#import <AMPluginFramework.h>
extern NSString * const AMPGpgRemeberChoice;
@interface AMPGpg : AMPlugin
{
}
@property NSInteger rememberChoice;
@end
================================================
FILE: AMPGpg/AMPGpg/AMPGpg.m
================================================
//
// AMPGpg.m
// AMPGpg
//
// Created by Gio on 16/04/14.
// Copyright (c) 2014 bloop. All rights reserved.
//
#import "AMPGpg.h"
#import "AMPGpgView.h"
#import "AMPGpgEncryption.h"
#import "AMPGpgButton.h"
#import "AMPGpgBodyView.h"
//#import "Libmacgpg.h"
#import <Libmacgpg/Libmacgpg.h>
enum amp_composer_gpg_btn_type {
AMP_GPG_COMPOSER_TYPE_BTN_ENCRYPT = 123456,
AMP_GPG_COMPOSER_TYPE_BTN_SIGN = 234567,
};
NSString * const AMPGpgRemeberChoice = @"AMPGpgRemeberChoices";
@interface AMPGpg()
{
}
@property (strong) AMPGpgEncryption *encryption;
@property (strong) NSImage *imSignOn,*imSignOff,*imEncryptOn,*imEncryptOff,*imSignedOK,*imSignedBad,*imLockedKPI,*imUnLockedKPI,*imIcon;
@property (strong) NSMutableDictionary *encryptedMessages, *signedMessages,*composerViews;
@end
@implementation AMPGpg
@synthesize rememberChoice;
- (id)init
{
self = [super init];
if (self)
{
self.encryptedMessages = [NSMutableDictionary dictionary];
self.signedMessages = [NSMutableDictionary dictionary];
self.encryption = [AMPGpgEncryption new];
}
return self;
}
- (BOOL) Load
{
if(![super Load])
return NO;
self.imIcon = [self loadImage:@"pluginsGPG.psd"];
self.imSignOn = [self loadImage:@"g_active.psd"];
self.imSignOff = [self loadImage:@"g_inactive.psd"];
self.imEncryptOn = [self loadImage:@"g_locked.psd"];
self.imEncryptOff = [self loadImage:@"g_unlocked.psd"];
self.imSignedOK = [self loadImage:@"gpg_active.psd"];
self.imSignedBad = [self loadImage:@"gpg_bad.psd"];
self.imLockedKPI = [self loadImage:@"gpg_locked.psd"];
self.imUnLockedKPI = [self loadImage:@"gpg_unlocked.psd"];
return YES;
}
- (void) Enable
{
}
- (void) Disable
{
}
- (void) Invalid
{
}
- (void) Reload
{
return [self.myView ReloadView];
}
- (AMPView*) pluginview
{
if(!self.myView)
self.myView = [[AMPGpgView alloc] initWithFrame:NSZeroRect plugin:self];
return self.myView;
}
- (NSString*) nametext
{
return @"GPG BETA";
}
- (NSString*) description
{
return self.nametext;
}
- (NSString*) descriptiontext
{
return @"This plug-in implements the PGP/GPG email security standard for encryption and signing.";
}
- (NSString*) authortext
{
return @"Airmail GPG Beta";
}
- (NSString*) supportlink
{
return @"http://airmailapp.com/gpg";
}
- (NSImage*) icon
{
return self.imIcon;
}
#pragma mark - calls
//GIVES AM A BUTTON IN THE COMPOSER WINDOW
- (NSArray*) ampPileComposerView:(AMPComposerInfo *)info
{
//Return a new composer btn for new created the composer
NSView *v = [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 44, 20)];
AMPGpgButton *lockBtn = [[AMPGpgButton alloc] initWithFrame:NSMakeRect(0, 0, 22, 20)
image:self.imEncryptOn
alt:self.imEncryptOff
tag:AMP_GPG_COMPOSER_TYPE_BTN_ENCRYPT
rememberChoice:self.rememberChoice];
[lockBtn setToolTip:NSLocalizedString(@"PGP Encrypt/Decrypt",@"PGP Sign/Unsign")];
[v addSubview:lockBtn];
AMPGpgButton *signBtn = [[AMPGpgButton alloc] initWithFrame:NSMakeRect(22, 0, 22, 20)
image:self.imSignOn
alt:self.imSignOff
tag:AMP_GPG_COMPOSER_TYPE_BTN_SIGN
rememberChoice:self.rememberChoice];
[signBtn setToolTip:NSLocalizedString(@"PGP Sign/Unsign",@"PGP Sign/Unsign")];
[v addSubview:signBtn];
return @[v];
}
//Composer
//IS ALL TIME CALLED IN A BACKGROUND THREAD
- (NSNumber*) ampPileChangedRecipients:(AMPComposerInfo *)info
{
AMPGpgButton *encryptBtn = [self btnForTag:AMP_GPG_COMPOSER_TYPE_BTN_ENCRYPT info:info];
AMPGpgButton *signBtn = [self btnForTag:AMP_GPG_COMPOSER_TYPE_BTN_SIGN info:info];
NSInteger canSign = [self.encryption CheckSender:info];
NSInteger canEncrypt = [self.encryption CheckRecipients:info];
//Some unicors will die for such nested if... structure :)
dispatch_async(dispatch_get_main_queue(), ^{
if(canSign)
{
[signBtn ManageState:YES];
if(canEncrypt)
[encryptBtn ManageState:YES];
else
[encryptBtn ManageState:NO];
}
else
{
[encryptBtn ManageState:NO];
[signBtn ManageState:NO];
}
});
return @(1);
}
//USED BY AM TO CHECK IF THE RFC IS ENCRYPTED
- (NSNumber*) ampPileIsEncrypted:(AMPMCOMessageParser*)parser
{
// NSLog(@"CHECKING ENCRYPTION");
return @([self.encryption isEncrypted:parser]);
}
//USED BY AM TO CHECK IF THE RFC IS Signed
- (AMPSignatureVerify*) ampPileVerifySignature:(AMPMessage*)message
{
AMPSignatureVerify *sv = nil;
@try
{
sv = [self.encryption VerifySignature:message];
if(sv)
[self.signedMessages setObject:@(sv.signatureVerify) forKey:message.idx];
}
@catch (NSException *exception) {
[self LogError:exception.reason];
}
return sv;
}
//USED BY AM TO DECRYPT BEFORE RENDERING
- (NSData*) ampStackDecrypt:(AMPMessage*)message
{
NSData *data = nil;
@try{
data = [self.encryption Decrypt:message];
if(data) {
[self.encryptedMessages setObject:@(YES) forKey:message.idx];
}
}
@catch (NSException *exception) {
NSLog(@"Failed to decrypt message due to %@", exception.reason);
[self LogError:exception.reason];
[self.encryptedMessages setObject:@(NO) forKey:message.idx];
}
@finally {
}
return data;
}
//USED BY AM TO CHANGE THE RFC BEFORE SENDING
- (AMPSendResult*) ampStackSendRfc:(NSString*)rfc composer:(AMPComposerInfo*)info
{
AMPSendResult *sr = [AMPSendResult new];
sr.result = AMP_SEND_RESULT_NONE;
AMPGpgButton *encryptBtn = [self btnForTag:AMP_GPG_COMPOSER_TYPE_BTN_ENCRYPT info:info];
AMPGpgButton *signBtn = [self btnForTag:AMP_GPG_COMPOSER_TYPE_BTN_SIGN info:info];
if(encryptBtn.isActive || signBtn.isActive)
{
@try{
sr.rfc = [self.encryption Envelope:rfc info:info enc:encryptBtn.isActive sign:signBtn.isActive];
sr.result = AMP_SEND_RESULT_SUCCESS;
}
@catch (NSException *exception) {
[self LogError:exception.reason];
sr.err = exception.reason;
sr.result = AMP_SEND_RESULT_FAIL;
}
}
return sr;
}
- (NSString*) ampUniqueMessageRender:(AMPMessage*)message
{
// XXX this is very much of a hack to just be able to read email.
// Many thing actually don't work.
// The root of the problem, I suspect, is that the callback ampPileMessageView does not get called with all messages
NSData *data = nil;
NSString *rfc = [[NSString alloc] initWithData:message.rfcData encoding:NSUTF8StringEncoding];
@try{
NSScanner *scanner = [NSScanner scannerWithString:rfc];
[scanner setCharactersToBeSkipped:nil];
NSString *ctype = [self.encryption GetHeader:scanner header:@"Content-Type"];
if (!ctype || ![ctype hasPrefix:@" multipart/encrypted"]) {
return message.htmlBody;
}
/*Content-Type: multipart/encrypted; boundary="Apple-Mail=_45365103-713A-4FD2-B339-A5A401563C8F"; protocol="application/pgp-encrypted";
*/
data = [self.encryption Decrypt:message];
if (data) {
[self.encryptedMessages setObject:@(YES) forKey:message.idx];
}
}
@catch (NSException *exception) {
NSLog(@"Failed to decrypt message due to %@", exception.reason);
return nil;
}
@finally {
}
return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
}
//USED BY AM TO RENDER IN THE BODYVIEW
- (NSArray*) ampPileMessageView:(AMPMessage*)message
{
NSMutableArray *ret = [NSMutableArray array];
NSNumber *enc = [self.encryptedMessages objectForKey:message.idx];
if(enc.integerValue > 0)
{
NSImageView *imvEncrypted = [[NSImageView alloc] initWithFrame:NSMakeRect(0, 0, 16, 16)];
[imvEncrypted setImageAlignment:NSImageAlignTopLeft];
[imvEncrypted setImageScaling:NSImageScaleProportionallyUpOrDown];
if(enc.boolValue)
{
[imvEncrypted setImage:self.imUnLockedKPI];
[imvEncrypted setToolTip:NSLocalizedString(@"Decrypted",@"Decrypted")];
}
else
{
[imvEncrypted setImage:self.imLockedKPI];
[imvEncrypted setToolTip:NSLocalizedString(@"Failed to Decrypt",@"Failed to Decrypt")];
}
[ret addObject:imvEncrypted];
[self.encryptedMessages removeObjectForKey:message.idx];
}
NSNumber *sign = [self.signedMessages objectForKey:message.idx];
if(sign.integerValue > 0)
{
NSImageView *imvSign = [[NSImageView alloc] initWithFrame:NSMakeRect(0, 0, 16, 16)];
if(sign.integerValue == AMP_SIGNED_SUCCESS)
{
[imvSign setImage:self.imSignedOK];
[imvSign setToolTip:NSLocalizedString(@"Verified",@"Verified")];
}
else if(sign.integerValue == AMP_SIGNED_FAILS)
{
[imvSign setImage:self.imSignedBad];
[imvSign setToolTip:NSLocalizedString(@"Not Verified",@"Not Verified")];
}
[ret addObject:imvSign];
[self.signedMessages removeObjectForKey:message.idx];
}
return ret;
}
#pragma mark - utilities
-(AMPGpgButton*) btnForTag:(NSInteger)tag info:(AMPComposerInfo*)info
{
NSArray *composerBtns = [info composerBtn:self];
if(!composerBtns || composerBtns.count == 0)
{
[self LogError:@"No Button for the plugin"];
return nil;
}
NSView *v = composerBtns[0];
for(AMPGpgButton *btn in v.subviews)
{
if(btn.tag == tag)
return btn;
}
return nil;
}
@end
================================================
FILE: AMPGpg/AMPGpg/AMPGpgBodyView.h
================================================
//
// AMPGpgBodyView.h
// AMPGpg
//
// Created by Giovanni Simonicca on 17/04/14.
// Copyright (c) 2014 bloop. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface AMPGpgBodyView : NSView
@end
================================================
FILE: AMPGpg/AMPGpg/AMPGpgBodyView.m
================================================
//
// AMPGpgBodyView.m
// AMPGpg
//
// Created by Giovanni Simonicca on 17/04/14.
// Copyright (c) 2014 bloop. All rights reserved.
//
#import "AMPGpgBodyView.h"
@implementation AMPGpgBodyView
- (id)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code here.
}
return self;
}
- (void)drawRect:(NSRect)dirtyRect
{
[super drawRect:dirtyRect];
// Drawing code here.
[[NSColor redColor] set];
NSRectFill(dirtyRect);
}
@end
================================================
FILE: AMPGpg/AMPGpg/AMPGpgButton.h
================================================
//
// AMPSwitchButton.h
// AMPSmime
//
// Created by Gio on 15/04/14.
// Copyright (c) 2014 Bloop. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface AMPGpgButton : NSButton
{
}
- (id)initWithFrame:(NSRect)frame
image:(NSImage*)image
alt:(NSImage*)altImage
tag:(NSInteger)tag
rememberChoice:(NSInteger)rememberChoiceIn;
- (void) ManageState:(BOOL)enable;
- (BOOL) isActive;
@end
================================================
FILE: AMPGpg/AMPGpg/AMPGpgButton.m
================================================
//
// AMPSwitchButton.m
// AMPSmime
//
// Created by Gio on 15/04/14.
// Copyright (c) 2014 Bloop. All rights reserved.
//
#import "AMPGpgButton.h"
@interface AMPGpgButton()
{
BOOL firstInit;
NSInteger rememberChoice;
NSInteger savedState;
}
@end
@implementation AMPGpgButton
- (id)initWithFrame:(NSRect)frame
image:(NSImage*)image
alt:(NSImage*)altImage
tag:(NSInteger)tag
rememberChoice:(NSInteger)rememberChoiceIn
{
self = [super initWithFrame:frame];
if (self)
{
rememberChoice = rememberChoiceIn;
[self setAction:@selector(SwitchBtn:)];
[self setTarget:self];
[self setBordered:NO];
[self setButtonType:NSToggleButton];
[self setTitle:@""];
[self setTag:tag];
[self setImage:altImage];
[self setAlternateImage:image];
savedState = [[NSUserDefaults standardUserDefaults] integerForKey:[NSString stringWithFormat:@"AMPGpgButton_%ld",self.tag]];
[self setState:NSOffState];
}
return self;
}
- (void) SwitchBtn:(NSButton*)btn
{
[[NSUserDefaults standardUserDefaults] setInteger:self.state forKey:[NSString stringWithFormat:@"AMPGpgButton_%ld",self.tag]];
[[NSUserDefaults standardUserDefaults] synchronize];
}
- (BOOL) isActive;
{
return (BOOL)self.state;
}
- (void) ManageState:(BOOL)enable
{
if(enable)
{
[self setEnabled:YES];
if(rememberChoice == 2 && !firstInit)
{
firstInit = YES;
[self setState:savedState];
}
else
{
[self setState:enable];
}
}
else
{
[self setState:NSOffState];
[self setEnabled:NO];
}
}
@end
================================================
FILE: AMPGpg/AMPGpg/AMPGpgEncryption.h
================================================
//
// AMPGpgEncryption.h
// AMPGpg
//
// Created by Giovanni Simonicca on 16/04/14.
// Copyright (c) 2014 bloop. All rights reserved.
//
#import <Foundation/Foundation.h>
@class AMPMessage;
@class AMPMCOMessageParser;
@class AMPComposerInfo;
@class AMPCertManager;
@class AMPComposerInfo;
@class AMPSignatureVerify;
@interface AMPGpgEncryption : NSObject
- (NSInteger) isEncrypted:(AMPMCOMessageParser*)parser;
- (NSInteger) CheckSender:(AMPComposerInfo *)info;
- (NSInteger) CheckRecipients:(AMPComposerInfo *)info;
- (NSString*) Envelope:(NSString*)rfc info:(AMPComposerInfo*)info enc:(BOOL)enc sign:(BOOL)sign;
- (NSData*) Decrypt:(AMPMessage*)message;
- (AMPSignatureVerify*) VerifySignature:(AMPMessage*)message;
- (NSString*) GetHeader:(NSScanner*)scanner header:(NSString*)headerName;
@end
================================================
FILE: AMPGpg/AMPGpg/AMPGpgEncryption.m
================================================
//
// AMPGpgEncryption.m
// AMPGpg
//
// Created by Giovanni Simonicca on 16/04/14.
// Copyright (c) 2014 bloop. All rights reserved.
//
#import "AMPGpgEncryption.h"
#import <AMPluginFramework.h>
#import <Libmacgpg/Libmacgpg.h>
//#import "Libmacgpg.h"
NSString * const AMPGpgEncryptionException = @"AMPGpgEncryption_Exception";
@implementation AMPGpgEncryption
#pragma mark - Calls
- (NSInteger) isEncrypted:(AMPMCOMessageParser*)parser
{
NSInteger flag = AMP_ENCRYPTED_NONE;
if(!parser) {
return flag;
}
for(AMPMCOAbstractPart *part in [parser.mainPart AllParts])
{
if(part.mimeType)
{
if([part.mimeType isEqualToString:@"application/pgp-signature"])
flag |= AMP_ENCRYPTED_SIGNED;
if([part.mimeType isEqualToString:@"application/pgp-encrypted"]) //or check multipart/encrypted
flag |= AMP_ENCRYPTED;
}
}
return flag;
}
- (NSInteger) CheckSender:(AMPComposerInfo *)info
{
GPGKey *key = [self GetValidKeyForMail:info.localMessage.from.mail];
if(key.canAnySign)
return 1;
return 0;
}
- (GPGKey*) GetValidKeyForMail:(NSString*)mail
{
NSSet *keys = [[GPGKeyManager sharedInstance] allKeys];
for (GPGKey *key in keys)
{
if ([self isKey: key forEmail: mail] && [self checkValidityOfKey: key])
{
return key;
}
}
return nil;
}
- (BOOL)isKey: (GPGKey *)key
forEmail: (NSString *)email
{
for (GPGUserID *uid in key.userIDs)
{
if([uid.email isEqualToString: email])
{
return true;
}
}
return false;
}
- (BOOL)checkValidityOfKey: (GPGKey *)key
{
if(key.validity == GPGValidityFull || key.validity == GPGValidityUltimate)
{
return true;
}
return false;
}
- (GPGKey *) getKeyFromMail: (NSString *)mail
{
for(GPGKey *key in [[GPGKeyManager sharedInstance] allKeys])
{
for (GPGUserID *uid in key.userIDs) {
if([uid.email isEqualToString:mail])
{
return key;
}
}
}
return nil;
}
- (NSInteger) CheckRecipients:(AMPComposerInfo *)info
{
NSArray *mails = [info.localMessage GetMails];
if(mails.count == 0)
return 0;
NSSet *keys = [[GPGKeyManager sharedInstance] allKeys];
if(keys.count == 0)
return 0;
for(NSString *mail in mails)
{
GPGKey *key = [self GetValidKeyForMail:mail];
if(!key || !key.canAnyEncrypt || key.validity >= GPGValidityInvalid)
return 0;
}
return 1;
}
- (NSString*) Envelope:(NSString*)rfc info:(AMPComposerInfo*)info enc:(BOOL)enc sign:(BOOL)sign
{
if(!rfc)
@throw [NSException exceptionWithName:AMPGpgEncryptionException reason:@"GPG Envelope missing rfc input" userInfo:nil];
NSString *from = info.localMessage.from.mail;
if(!from)
@throw ([NSException exceptionWithName:AMPGpgEncryptionException reason:@"GPG Envelope cannot get the from of the message" userInfo:nil]);
NSDictionary *maps = [info.localMessage GetMailsMaps];
NSMutableArray *recipients = [NSMutableArray array];
[recipients addObjectsFromArray:maps[@"to"]];
[recipients addObjectsFromArray:maps[@"cc"]];
[recipients addObject:from]; //Encrypt also with my key to read it in sent messages
NSArray *hiddenRecipients = maps[@"bcc"];
NSString *rfcFinal = rfc;
//SIGN
if(sign)
rfcFinal = [self Sign:rfc from:from recipients:recipients hiddenRecipients:hiddenRecipients];
if(!rfcFinal)
@throw ([NSException exceptionWithName:AMPGpgEncryptionException reason:@"GPG Envelope cannot sign the message" userInfo:nil]);
//ENCRYPT
if(enc)
rfcFinal = [self Encrypt:rfcFinal from:from recipients:recipients hiddenRecipients:hiddenRecipients];
if(!rfcFinal)
@throw [NSException exceptionWithName:AMPGpgEncryptionException reason:@"GPG Envelope cannot encrypt the message" userInfo:nil];
return rfcFinal;
}
- (NSData*) Decrypt:(AMPMessage*)message
{
NSData *data = message.rfcData;
if(!data)
@throw [NSException exceptionWithName:AMPGpgEncryptionException reason:@"GPG Decrypt missing data to decrypt" userInfo:nil];
AMPMCOMessageParser *parser = [AMPMCOMessageParser messageParserWithData:data];
if(!parser)
@throw [NSException exceptionWithName:AMPGpgEncryptionException reason:@"GPG Decrypt cannot parse the data" userInfo:nil];;
NSArray *encParts = [parser.mainPart PartsForMime:@"application/octet-stream"];
for (int i = 0; i < [encParts count]; i++) {
AMPMCOAbstractPart *part = [encParts objectAtIndex:i];
if(![part.filename hasSuffix:@".asc"])
continue;
/*@throw [NSException exceptionWithName:AMPGpgEncryptionException reason:@"GPG Decrypt cannot find encrypted.asc" userInfo:nil];;*/
NSData *dataAttachment = [part callSelector:@selector(data)];
if(!dataAttachment || dataAttachment.length == 0) {
NSLog(@"GPG Decrypt cannot get data from encrypted attachment");
@throw [NSException exceptionWithName:AMPGpgEncryptionException reason:@"GPG Decrypt cannot get data from encrypted attachment" userInfo:nil];
}
NSData *decodedData = [[GPGController gpgController] decryptData:dataAttachment];
if(!decodedData || decodedData.length == 0) {
NSLog(@"GPG Decrypt cannot decryptData");
continue;
/*@throw [NSException exceptionWithName:AMPGpgEncryptionException reason:@"GPG Decrypt cannot decryptData" userInfo:nil];*/
}
return decodedData;
}
NSLog(@"GPG Decrypt Failed");
return nil;
}
- (AMPSignatureVerify*) VerifySignature:(AMPMessage*)message
{
AMPSignatureVerify *ver = [AMPSignatureVerify new];
ver.signatureVerify = AMP_SIGNED_NONE;
ver.mimetoRemove = @[@"application/pgp-signature"];
NSData *messageData = message.rfcData;
if(!messageData)
@throw [NSException exceptionWithName:AMPGpgEncryptionException reason:@"GPG VerifySignature missing data to decrypt" userInfo:nil];;
NSData *detachedData = nil;
//Se e' signed uso detached content
AMPMCOMessageParser *parser = [AMPMCOMessageParser messageParserWithData:messageData];
if(parser.mainPart.partType == AMPMCOPartTypeMultipartSigned)
{
NSString *rfc = [[NSString alloc] initWithData:messageData encoding:NSUTF8StringEncoding];
detachedData = [self GetSignedPart:rfc];
if(!detachedData)
@throw [NSException exceptionWithName:AMPGpgEncryptionException reason:@"GPG VerifySignature cannot extract detached data" userInfo:nil];;
}
NSArray *encParts = [parser.mainPart PartsForMime:@"application/pgp-signature"];
if(encParts.count == 1)
{
ver.signatureVerify = AMP_SIGNED_FAILS;
AMPMCOAbstractPart *part = encParts[0];
if(![part.filename isEqualToString:@"signature.asc"])
return ver;
NSData *dataAttachment = [part callSelector:@selector(data)];
if(!dataAttachment)
return ver;
NSArray *arr = [[GPGController gpgController] verifySignature:dataAttachment originalData:detachedData];
//CASE 1 Signer >> multi-signer does not work we have only 1 sender
for(GPGSignature *sign in arr)
{
if(sign.trust < GPGValidityInvalid )
{
for(GPGKey *key in [[GPGKeyManager sharedInstance] allKeys])
{
if( [sign.email isEqualToString:key.email] ) {
for (GPGUserID *uid in key.userIDs) {
if([uid.email isEqualToString:message.from.mail])
{
ver.signatureVerify = AMP_SIGNED_SUCCESS;
return ver;
}
}
}
}
}
}
}
return ver;
}
#pragma mark - Encrypt/Sign
- (NSString*) Encrypt:(NSString*)rfc from:(NSString*)mail recipients:(NSArray*)recipients hiddenRecipients:(NSArray*)hiddenRecipients
{
//Exctract ctype + body
NSString *stringToEncrypt = [self GetBodyPartWithHeaders:rfc];
if(!stringToEncrypt) return nil;
NSData *dataToEncrypt = [stringToEncrypt dataUsingEncoding:NSUTF8StringEncoding];
if(!dataToEncrypt || dataToEncrypt.length == 0) return nil;
GPGController *gpgc = [GPGController gpgController];
gpgc.useArmor = YES;
gpgc.useTextMode = YES;
// gpgc.trustAllKeys = YES;
NSData *dataEncrypted = nil;
@try {
dataEncrypted = [gpgc processData:dataToEncrypt withEncryptSignMode:GPGPublicKeyEncrypt recipients:recipients hiddenRecipients:hiddenRecipients];
}
@catch (NSException *exception) {
return nil;
}
if(!dataEncrypted || dataEncrypted.length == 0) return nil;
//NSData *decodedData = [[GPGController gpgController] decryptData:dataEncrypted];
NSString *rfcret = [self CreateRfcEncrypted:rfc dataEncrypted:dataEncrypted];
return rfcret;
}
- (NSString*) Sign:(NSString*)rfc from:(NSString*)from recipients:(NSArray*)recipients hiddenRecipients:(NSArray*)hiddenRecipients
{
NSString *stringToSign = [self GetBodyPartWithHeaders:rfc];
stringToSign = [stringToSign stringByAppendingString:@"\r\n"];
if(!stringToSign) return nil;
//Sign the content
NSData *dataToSign = [stringToSign dataUsingEncoding:NSUTF8StringEncoding];
if(!dataToSign) return nil;
GPGController *gpgc = [GPGController gpgController];
gpgc.useArmor = YES;
gpgc.useTextMode = YES;
// gpgc.trustAllKeys = YES;
GPGKey *key = [self GetValidKeyForMail:from];
if(!key)
{
return nil;
}
[gpgc setSignerKey:key];
NSData *dataSigned = [gpgc processData:dataToSign withEncryptSignMode: GPGDetachedSign recipients:NULL hiddenRecipients:NULL];
if(!dataSigned) return nil;
NSString *nameForHashAlgorithm = [GPGController nameForHashAlgorithm: [gpgc hashAlgorithm]];
return [self CreateRfcSigned:rfc stringToSign:stringToSign dataSigned:dataSigned nameForHashAlgorithm:nameForHashAlgorithm];
}
#pragma mark Mime
- (NSString*) CreateRfcEncrypted:(NSString*)rfc dataEncrypted:(NSData*)dataEncrypted
{
CFUUIDRef theUUID = CFUUIDCreate(NULL);
CFStringRef string = CFUUIDCreateString(NULL, theUUID);
CFRelease(theUUID);
NSString *boundary = (__bridge_transfer NSString *)string;
if(!boundary)
boundary = @"------=_Part_68593_50468503.1397487740428";
// Content-Type: multipart/encrypted;
// boundary="Apple-Mail=_A3AEE18D-B565-4A74-B695-C9C48DBE43AC";
// protocol="application/pgp-encrypted";
NSString *multipartSignedCtype = @"Content-Type: multipart/encrypted;\r\n";
multipartSignedCtype = [multipartSignedCtype stringByAppendingFormat:@"\tboundary=\"%@\";\r\n",boundary];
multipartSignedCtype = [multipartSignedCtype stringByAppendingString:@"\tprotocol=\"application/pgp-encrypted\";\r\n"];
multipartSignedCtype = [multipartSignedCtype stringByAppendingString:@"Content-Description: OpenPGP encrypted message"];
NSString *dataEncryptedStr = [[NSString alloc] initWithData:dataEncrypted encoding:NSASCIIStringEncoding];
NSString *body = @"This is an OpenPGP/MIME encrypted message (RFC 2440 and 3156)\r\n";
body = [body stringByAppendingFormat:@"--%@\r\n",boundary];
body = [body stringByAppendingString:@"Content-Transfer-Encoding: 7bit\r\n"];
body = [body stringByAppendingString:@"Content-Type: application/pgp-encrypted\r\n"];
body = [body stringByAppendingString:@"Content-Description: PGP/MIME Versions Identification\r\n"];
body = [body stringByAppendingString:@"\r\n"];
body = [body stringByAppendingString:@"Version: 1\r\n"];
body = [body stringByAppendingString:@"\r\n"];
body = [body stringByAppendingFormat:@"--%@\r\n",boundary];
body = [body stringByAppendingString:@"Content-Transfer-Encoding: 7bit\r\n"];
body = [body stringByAppendingString:@"Content-Disposition: inline; filename=encrypted.asc\r\n"];
body = [body stringByAppendingString:@"Content-Type: application/octet-stream; name=encrypted.asc\r\n"];
body = [body stringByAppendingString:@"Content-Description: OpenPGP encrypted message\r\n"];
body = [body stringByAppendingString:@"\r\n"];
body = [body stringByAppendingString:dataEncryptedStr];
body = [body stringByAppendingString:@"\r\n"];
body = [body stringByAppendingFormat:@"--%@--",boundary];
NSMutableString *rfcOut = [NSMutableString new];
NSString *headersWithNewCType = [self TrascriptHeaders:rfc withNewContentType:multipartSignedCtype];
[rfcOut appendString:headersWithNewCType];
[rfcOut appendString:body];
return rfcOut;
}
- (NSString*) CreateRfcSigned:(NSString*)rfc stringToSign:(NSString*)stringToSign dataSigned:(NSData*)dataSigned nameForHashAlgorithm:(NSString*)nameForHashAlgorithm
{
// Recreate RFC
CFUUIDRef theUUID = CFUUIDCreate(NULL);
CFStringRef string = CFUUIDCreateString(NULL, theUUID);
CFRelease(theUUID);
NSString *boundary = (__bridge_transfer NSString *)string;
if(!boundary)
boundary = @"------=_Part_68593_50468503.1397487740428";
//Content-Type: multipart/signed; boundary="Apple-Mail=_1DF223E0-8C6F-4931-9C66-57559AD94CB5"; protocol="application/pgp-signature"; micalg=pgp-sha512
NSString *multipartSignedCtype = @"Content-Type: multipart/signed;\r\n";
multipartSignedCtype = [multipartSignedCtype stringByAppendingFormat:@"\tboundary=\"%@\";\r\n",boundary];
multipartSignedCtype = [multipartSignedCtype stringByAppendingString:@"\tprotocol=\"application/pgp-signature\";\r\n"];
multipartSignedCtype = [multipartSignedCtype stringByAppendingFormat:@"\tmicalg=pgp-%@\r\n",nameForHashAlgorithm];
// ------=_Part_68593_50468503.1397487740429
NSString *partSigned = [NSString stringWithFormat:@"--%@\r\n",boundary];
NSString *dataSignedStr = [[NSString alloc] initWithData:dataSigned encoding:NSASCIIStringEncoding];
// --Apple-Mail=_1DF223E0-8C6F-4931-9C66-57559AD94CB5
// Content-Transfer-Encoding: 7bit
// Content-Disposition: attachment; filename=signature.asc
// Content-Type: application/pgp-signature; name=signature.asc
// Content-Description: Message signed with OpenPGP using GPGMail
NSString *partSignature = [NSString stringWithFormat:@"--%@\r\n",boundary];
partSignature = [partSignature stringByAppendingString:@"Content-Transfer-Encoding: 7bit\r\n"];
partSignature = [partSignature stringByAppendingString:@"Content-Disposition: attachment; filename=signature.asc\r\n"];
partSignature = [partSignature stringByAppendingString:@"Content-Type: application/pgp-signature; name=signature.asc\r\n"];
partSignature = [partSignature stringByAppendingString:@"Content-Description: Message signed with OpenPGP using AMPGpg\r\n"];
partSignature = [partSignature stringByAppendingString:@"\r\n"];
partSignature = [partSignature stringByAppendingString: dataSignedStr];
partSignature = [partSignature stringByAppendingString:@"\r\n"];
partSignature = [partSignature stringByAppendingFormat:@"--%@--",boundary];
NSMutableString *rfcOut = [NSMutableString new];
NSString *headersWithNewCType = [self TrascriptHeaders:rfc withNewContentType:multipartSignedCtype];
[rfcOut appendString:headersWithNewCType];
[rfcOut appendString:partSigned];
[rfcOut appendString:stringToSign];
[rfcOut appendString:@"\r\n"];
[rfcOut appendString:partSignature];
return rfcOut;
}
//Extract the detached content signed
- (NSData*) GetSignedPart:(NSString*)rfc
{
//Content-Type: multipart/signed; boundary="Apple-Mail=_9A3F1E72-6E76-46E6-A41E-A410E2637A5A"; protocol="application/pkcs7-signature"; micalg=sha1
if(!rfc) return nil;
NSScanner *scan = [NSScanner scannerWithString:rfc];
[scan setCharactersToBeSkipped:nil];
if(![scan scanUpAndScan:@"Content-Type:" intoString:nil]) return nil;
NSString *boundary = [self ParseBoundary:scan];
if(!boundary) return nil;
NSArray *boundaries = [self ParsePartsForBoundary:scan boundary:boundary];
if(boundaries && boundaries.count > 0)
{
NSString *detachedString = boundaries[0];
if(detachedString)
return [detachedString dataUsingEncoding:NSASCIIStringEncoding];
}
return nil;
}
//Extract the part to sign/encrypt with its headers
- (NSString*) GetBodyPartWithHeaders:(NSString*)rfc
{
//Content-Type: multipart/signed; boundary="Apple-Mail=_9A3F1E72-6E76-46E6-A41E-A410E2637A5A"; protocol="application/pkcs7-signature"; micalg=sha1
if(!rfc)
return nil;
NSScanner *scanner = [NSScanner scannerWithString:rfc];
[scanner setCharactersToBeSkipped:nil];
NSString *ctype = [self GetHeader:scanner header:@"Content-Type"];
if(!ctype) return nil;
NSScanner *scanner2 = [NSScanner scannerWithString:ctype];
[scanner2 setCharactersToBeSkipped:nil];
NSString *boundary = [self ParseBoundary:scanner2];
if(!boundary)
{
NSScanner *scannerSinglePart = [NSScanner scannerWithString:rfc];
[scannerSinglePart setCharactersToBeSkipped:nil];
if(![scannerSinglePart scanUpAndScan:@"\r\n\r\n" intoString:nil])return nil;
NSString *rfcToSign = [rfc substringFromIndex:scannerSinglePart.scanLocation];
return rfcToSign;
}
NSString *preBoundary = [NSString stringWithFormat:@"--%@",boundary];
NSString *closeBoundary = [NSString stringWithFormat:@"--%@--",boundary];
if(![scanner scanUpToString:preBoundary intoString:nil]) return nil;
NSString *detachedString = nil;
if(![scanner scanUpToString:closeBoundary intoString:&detachedString]) return nil;
if(!detachedString) return nil;
detachedString = [NSString stringWithFormat:@"Content-Type:%@\r\n\r\n%@%@",ctype,detachedString,closeBoundary];
return detachedString; //[detachedString dataUsingEncoding:NSASCIIStringEncoding];
}
- (NSString*) ParseBoundary:(NSScanner*)scanner
{
if(![scanner scanUpToString:@"boundary" intoString:nil]) return nil;
if(![scanner scanUpToString:@"=" intoString:nil]) return nil;
if(![scanner scanUpToString:@"\"" intoString:nil]) return nil;
if(![scanner scanString:@"\"" intoString:nil]) return nil;
NSString *boundary = nil;
if(![scanner scanUpToString:@"\"" intoString:&boundary]) return nil;
if(!boundary) return nil;
return boundary;
}
//Extract the part2 for a given boudary
- (NSArray*) ParsePartsForBoundary:(NSScanner*)scanner boundary:(NSString*)boundary
{
NSMutableArray *ret = [NSMutableArray array];
NSString *preBoundary = [NSString stringWithFormat:@"--%@",boundary];
while(YES)
{
if(![scanner scanUpAndScan:preBoundary intoString:nil]) break;
if([scanner scanString:@"--" intoString:nil]) //chiusura
break;
if(![scanner scanUpAndScan:@"\n" intoString:nil]) break;
NSString *detachedString = nil;
if(![scanner scanUpToString:[NSString stringWithFormat:@"\n%@",preBoundary] intoString:&detachedString])
break;
[ret addObject:detachedString];
}
return ret;
}
//Extract an header from an rfc
- (NSString*) GetHeader:(NSScanner*)scanner header:(NSString*)headerName
{
NSString *header = [headerName stringByAppendingString:@":"];
NSString *newline = @"\r\n";
//Content-Type: application/pkcs7-mime; name=smime.p7m; smime-type=enveloped-data
//Content-Transfer-Encoding: base64
//Content-Disposition:
//Se e' il primo o e' dopo alcuni caratteri
if(![scanner scanUpAndScan:header intoString:nil]) return nil;
NSMutableString *valuex = [NSMutableString new];
while(YES)
{
NSString *valueNext = nil;
if([scanner nextString:newline])
{
valueNext = @"";
}
else if(![scanner scanUpToString:newline intoString:&valueNext])
{
NSLog(@"Error Cannot parse multi header next values in ParseHeader %@",headerName);
return nil;
}
//[valuex appendString:valueNext stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]];
[valuex appendString:valueNext];
//skippo la newline
if(![scanner scanNext:2])
{
NSLog(@"Error Cannot scan multi header next 2 chars MA_NEWLINE in ParseHeader %@",headerName);
return nil;
}
unichar c = scanner.currentCharacter;
if ([[NSCharacterSet letterCharacterSet] characterIsMember:c] ||
[[NSCharacterSet decimalDigitCharacterSet] characterIsMember:c] ||
[scanner nextString:newline])
{
if(!valuex)
{
NSLog(@"Error value is null in ParseHeader %@",headerName);
return nil;
}
break;
}
else
{
[valuex appendString:newline]; //appendo la newline che ho torvato e continuo a parsare l'header
}
}
return valuex;
}
//Rewrite headers with a new ContentType
- (NSString*) TrascriptHeaders:(NSString*)rfc withNewContentType:(NSString*)ctype
{
NSMutableString *rfcOut = [NSMutableString new];
__block NSInteger ctypeMode = 0;
[rfc enumerateLinesUsingBlock:^(NSString *line, BOOL *stop) {
if([line isEqualToString:@""]) //end of header
{
[rfcOut appendString:@"\r\n"];
*stop = YES;
return;
}
if([line hasPrefix:@"Content-Type"])
ctypeMode = 1; //start
switch (ctypeMode)
{
case 0:
{
[rfcOut appendFormat:@"%@\r\n",line];
}
break;
case 1: //start ctype
{
[rfcOut appendFormat:@"%@\r\n",ctype];
ctypeMode = 2;
}
break;
case 2: //during ctype
{
if([line rangeOfString:@":"].location != NSNotFound) //nuovo header
ctypeMode = 0;
}
break;
}
}];
return rfcOut;
}
@end
================================================
FILE: AMPGpg/AMPGpg/AMPGpgView.h
================================================
//
// AMPGpgView.h
// AMPGpg
//
// Created by Giovanni Simonicca on 16/04/14.
// Copyright (c) 2014 bloop. All rights reserved.
//
#import <AMPView.h>
@interface AMPGpgView : AMPView
{
}
@end
================================================
FILE: AMPGpg/AMPGpg/AMPGpgView.m
================================================
//
// AMPGpgView.m
// AMPGpg
//
// Created by Giovanni Simonicca on 16/04/14.
// Copyright (c) 2014 bloop. All rights reserved.
//
#import "AMPGpgView.h"
#import "AMPGpg.h"
#import <AMPluginFramework.h>
@interface AMPGpgView()
{
NSPopUpButton *popUpBtnRender;
}
@end
@implementation AMPGpgView
- (id)initWithFrame:(NSRect)frame plugin:(AMPlugin *)pluginIn
{
self = [super initWithFrame:frame plugin:pluginIn];
if (self) {
// Initialization code here.
NSInteger x = 20;
NSInteger y = 20;
NSTextField *textSystem = [[NSTextField alloc] initWithFrame:NSMakeRect(x, y+5, 140, 30)];
[textSystem setStringValue:NSLocalizedString(@"Composer:",@"Composer:")];
[textSystem setBezeled:NO];
[textSystem setDrawsBackground:NO];//deprecated
[textSystem setEditable:NO];
[textSystem setSelectable:NO];
[textSystem setAlignment: NSRightTextAlignment];
[self addSubview:textSystem];
NSButton *savePref = [[NSButton alloc] initWithFrame:NSMakeRect(x+160, y, 250, 30)]; //[savePref AssignTEXTUREDROUNDED];
[savePref setButtonType:NSSwitchButton];
[savePref setTitle:NSLocalizedString(@"Remember Choice",@"Remember Choice")];
[savePref setAction:@selector(RememberChoice:)];
[savePref setTarget:self];
[self addSubview:savePref];
[savePref setState:self.myPlugin.rememberChoice-1];
[self LoadView];
}
return self;
}
- (void) RememberChoice:(id)sender
{
self.myPlugin.rememberChoice = [sender state]+1;
[[NSUserDefaults standardUserDefaults] setInteger:self.myPlugin.rememberChoice forKey:AMPGpgRemeberChoice];
[[NSUserDefaults standardUserDefaults] synchronize];
}
- (AMPGpg*) myPlugin
{
return (AMPGpg*)self.plugin;
}
- (void) ReloadView
{
dispatch_async(dispatch_get_main_queue(), ^{
[self LoadView];
});
}
- (void) LoadView
{
// NSDictionary *xxx = [AMPCertManager listCertificates];
// NSMenu *menu = [NSMenu new];
//
// [xxx enumerateKeysAndObjectsUsingBlock:^(NSString *name, NSArray *mails, BOOL *stop) {
//
// if(mails.count == 0)
// return;
//
// NSMenuItem *itemRender = [[NSMenuItem alloc] initWithTitle:name action:nil keyEquivalent:@""];
// [itemRender setRepresentedObject:@""];
// [itemRender setTarget:self];
//
// NSMenu *menu2 = [NSMenu new];
// for(NSString *mail in mails)
// {
// NSMenuItem *itemRender2 = [[NSMenuItem alloc] initWithTitle:mail action:@selector(selectedMail:) keyEquivalent:@""];
// [itemRender2 setRepresentedObject:@""];
// [itemRender2 setTarget:self];
// [menu2 addItem:itemRender2];
// }
// [itemRender setSubmenu:menu2];
// [menu addItem:itemRender];
// }];
// [popUpBtnRender setMenu:menu];
}
- (void) selectedMail:(id)sender
{
}
- (void) RenderView
{
}
-(void) Save:(id)sender
{
}
- (void)drawRect:(NSRect)dirtyRect
{
[super drawRect:dirtyRect];
// Drawing code here.
}
@end
================================================
FILE: AMPGpg/AMPGpg/en.lproj/InfoPlist.strings
================================================
/* Localized versions of Info.plist keys */
================================================
FILE: AMPGpg/AMPGpg.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
4EBCCA801A975DF7009532B2 /* Libmacgpg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EBCCA751A975DDB009532B2 /* Libmacgpg.framework */; };
B30FF64518FFFCE40053FD49 /* g_unlocked.psd in Resources */ = {isa = PBXBuildFile; fileRef = B30FF64118FFFCE40053FD49 /* g_unlocked.psd */; };
B30FF64618FFFCE40053FD49 /* g_locked.psd in Resources */ = {isa = PBXBuildFile; fileRef = B30FF64218FFFCE40053FD49 /* g_locked.psd */; };
B30FF64718FFFCE40053FD49 /* g_inactive.psd in Resources */ = {isa = PBXBuildFile; fileRef = B30FF64318FFFCE40053FD49 /* g_inactive.psd */; };
B30FF64818FFFCE40053FD49 /* g_active.psd in Resources */ = {isa = PBXBuildFile; fileRef = B30FF64418FFFCE40053FD49 /* g_active.psd */; };
B30FF67019009F430053FD49 /* gpg_active.psd in Resources */ = {isa = PBXBuildFile; fileRef = B30FF66C19009F430053FD49 /* gpg_active.psd */; };
B30FF67119009F430053FD49 /* gpg_bad.psd in Resources */ = {isa = PBXBuildFile; fileRef = B30FF66D19009F430053FD49 /* gpg_bad.psd */; };
B30FF67219009F430053FD49 /* gpg_locked.psd in Resources */ = {isa = PBXBuildFile; fileRef = B30FF66E19009F430053FD49 /* gpg_locked.psd */; };
B30FF67319009F430053FD49 /* gpg_unlocked.psd in Resources */ = {isa = PBXBuildFile; fileRef = B30FF66F19009F430053FD49 /* gpg_unlocked.psd */; };
B30FF68919017D2B0053FD49 /* pluginsGPG.psd in Resources */ = {isa = PBXBuildFile; fileRef = B30FF68819017D2B0053FD49 /* pluginsGPG.psd */; };
D83863E32180666D000BE713 /* AMPluginFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F57AC48619E222D7001BE387 /* AMPluginFramework.framework */; };
D84DFB0018FECEDA007B4E49 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D84DFAFF18FECEDA007B4E49 /* Cocoa.framework */; };
D84DFB0A18FECEDA007B4E49 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D84DFB0818FECEDA007B4E49 /* InfoPlist.strings */; };
D84DFB3318FECF12007B4E49 /* AMPGpg.m in Sources */ = {isa = PBXBuildFile; fileRef = D84DFB3218FECF12007B4E49 /* AMPGpg.m */; };
D8E1A6E518FEDF5F00352E29 /* AMPGpgView.m in Sources */ = {isa = PBXBuildFile; fileRef = D8E1A6E418FEDF5F00352E29 /* AMPGpgView.m */; };
D8E1A6E818FEE0BF00352E29 /* AMPGpgEncryption.m in Sources */ = {isa = PBXBuildFile; fileRef = D8E1A6E718FEE0BF00352E29 /* AMPGpgEncryption.m */; };
D8E1A71F18FEEC7100352E29 /* AMPGpgButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D8E1A71E18FEEC7100352E29 /* AMPGpgButton.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
173A8A601F03EB3600E65436 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D8CCFE97198A01A900503D22 /* Libmacgpg.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 30BE73BE1B54015C001A2137;
remoteInfo = UnitTests;
};
4EBCCA741A975DDB009532B2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D8CCFE97198A01A900503D22 /* Libmacgpg.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
remoteInfo = Libmacgpg;
};
4EBCCA781A975DDB009532B2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D8CCFE97198A01A900503D22 /* Libmacgpg.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 1B46CFCC161555DF00CF9C5F;
remoteInfo = org.gpgtools.Libmacgpg.xpc;
};
4EBCCA7C1A975DDB009532B2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D8CCFE97198A01A900503D22 /* Libmacgpg.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 1BD78B9F1726B2820005F251;
remoteInfo = LeakFinder;
};
4EBCCA7E1A975DF1009532B2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D8CCFE97198A01A900503D22 /* Libmacgpg.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
remoteInfo = Libmacgpg;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
D8CCFE93198A00FA00503D22 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
D8E1A71718FEE7B800352E29 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
B30FF64118FFFCE40053FD49 /* g_unlocked.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = g_unlocked.psd; sourceTree = "<group>"; };
B30FF64218FFFCE40053FD49 /* g_locked.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = g_locked.psd; sourceTree = "<group>"; };
B30FF64318FFFCE40053FD49 /* g_inactive.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = g_inactive.psd; sourceTree = "<group>"; };
B30FF64418FFFCE40053FD49 /* g_active.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = g_active.psd; sourceTree = "<group>"; };
B30FF66C19009F430053FD49 /* gpg_active.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = gpg_active.psd; sourceTree = "<group>"; };
B30FF66D19009F430053FD49 /* gpg_bad.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = gpg_bad.psd; sourceTree = "<group>"; };
B30FF66E19009F430053FD49 /* gpg_locked.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = gpg_locked.psd; sourceTree = "<group>"; };
B30FF66F19009F430053FD49 /* gpg_unlocked.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = gpg_unlocked.psd; sourceTree = "<group>"; };
B30FF68819017D2B0053FD49 /* pluginsGPG.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = pluginsGPG.psd; sourceTree = "<group>"; };
D84DFAFC18FECEDA007B4E49 /* AMPGpg.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AMPGpg.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
D84DFAFF18FECEDA007B4E49 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
D84DFB0218FECEDA007B4E49 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D84DFB0318FECEDA007B4E49 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
D84DFB0418FECEDA007B4E49 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
D84DFB0718FECEDA007B4E49 /* AMPGpg-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AMPGpg-Info.plist"; sourceTree = "<group>"; };
D84DFB0918FECEDA007B4E49 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
D84DFB0B18FECEDA007B4E49 /* AMPGpg-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AMPGpg-Prefix.pch"; sourceTree = "<group>"; };
D84DFB3118FECF12007B4E49 /* AMPGpg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPGpg.h; sourceTree = "<group>"; };
D84DFB3218FECF12007B4E49 /* AMPGpg.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPGpg.m; sourceTree = "<group>"; };
D8CCFE97198A01A900503D22 /* Libmacgpg.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Libmacgpg.xcodeproj; path = Dependencies/Libmacgpg/Libmacgpg.xcodeproj; sourceTree = "<group>"; };
D8E1A6E318FEDF5F00352E29 /* AMPGpgView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPGpgView.h; sourceTree = "<group>"; };
D8E1A6E418FEDF5F00352E29 /* AMPGpgView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPGpgView.m; sourceTree = "<group>"; };
D8E1A6E618FEE0BF00352E29 /* AMPGpgEncryption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPGpgEncryption.h; sourceTree = "<group>"; };
D8E1A6E718FEE0BF00352E29 /* AMPGpgEncryption.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPGpgEncryption.m; sourceTree = "<group>"; };
D8E1A71D18FEEC7100352E29 /* AMPGpgButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPGpgButton.h; sourceTree = "<group>"; };
D8E1A71E18FEEC7100352E29 /* AMPGpgButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPGpgButton.m; sourceTree = "<group>"; };
F57AC48619E222D7001BE387 /* AMPluginFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AMPluginFramework.framework; path = ../AMPluginFramework.framework; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D84DFAF918FECEDA007B4E49 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4EBCCA801A975DF7009532B2 /* Libmacgpg.framework in Frameworks */,
D84DFB0018FECEDA007B4E49 /* Cocoa.framework in Frameworks */,
D83863E32180666D000BE713 /* AMPluginFramework.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
4EBCCA6D1A975DDB009532B2 /* Products */ = {
isa = PBXGroup;
children = (
4EBCCA751A975DDB009532B2 /* Libmacgpg.framework */,
173A8A611F03EB3600E65436 /* UnitTests.xctest */,
4EBCCA7D1A975DDB009532B2 /* LeakFinder.app */,
4EBCCA791A975DDB009532B2 /* org.gpgtools.Libmacgpg.xpc */,
);
name = Products;
sourceTree = "<group>";
};
D84DFAF318FECEDA007B4E49 = {
isa = PBXGroup;
children = (
D8CCFE97198A01A900503D22 /* Libmacgpg.xcodeproj */,
D84DFB0518FECEDA007B4E49 /* AMPGpg */,
D84DFAFE18FECEDA007B4E49 /* Frameworks */,
D84DFAFD18FECEDA007B4E49 /* Products */,
);
sourceTree = "<group>";
};
D84DFAFD18FECEDA007B4E49 /* Products */ = {
isa = PBXGroup;
children = (
D84DFAFC18FECEDA007B4E49 /* AMPGpg.bundle */,
);
name = Products;
sourceTree = "<group>";
};
D84DFAFE18FECEDA007B4E49 /* Frameworks */ = {
isa = PBXGroup;
children = (
F57AC48619E222D7001BE387 /* AMPluginFramework.framework */,
D84DFAFF18FECEDA007B4E49 /* Cocoa.framework */,
D84DFB0118FECEDA007B4E49 /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
D84DFB0118FECEDA007B4E49 /* Other Frameworks */ = {
isa = PBXGroup;
children = (
D84DFB0218FECEDA007B4E49 /* Foundation.framework */,
D84DFB0318FECEDA007B4E49 /* CoreData.framework */,
D84DFB0418FECEDA007B4E49 /* AppKit.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
D84DFB0518FECEDA007B4E49 /* AMPGpg */ = {
isa = PBXGroup;
children = (
D84DFB3118FECF12007B4E49 /* AMPGpg.h */,
D84DFB3218FECF12007B4E49 /* AMPGpg.m */,
D8E1A6E318FEDF5F00352E29 /* AMPGpgView.h */,
D8E1A6E418FEDF5F00352E29 /* AMPGpgView.m */,
D8E1A6E618FEE0BF00352E29 /* AMPGpgEncryption.h */,
D8E1A6E718FEE0BF00352E29 /* AMPGpgEncryption.m */,
D8E1A71D18FEEC7100352E29 /* AMPGpgButton.h */,
D8E1A71E18FEEC7100352E29 /* AMPGpgButton.m */,
D84DFB0618FECEDA007B4E49 /* Supporting Files */,
);
path = AMPGpg;
sourceTree = "<group>";
};
D84DFB0618FECEDA007B4E49 /* Supporting Files */ = {
isa = PBXGroup;
children = (
B30FF68819017D2B0053FD49 /* pluginsGPG.psd */,
B30FF66C19009F430053FD49 /* gpg_active.psd */,
B30FF66D19009F430053FD49 /* gpg_bad.psd */,
B30FF66E19009F430053FD49 /* gpg_locked.psd */,
B30FF66F19009F430053FD49 /* gpg_unlocked.psd */,
B30FF64118FFFCE40053FD49 /* g_unlocked.psd */,
B30FF64218FFFCE40053FD49 /* g_locked.psd */,
B30FF64318FFFCE40053FD49 /* g_inactive.psd */,
B30FF64418FFFCE40053FD49 /* g_active.psd */,
D84DFB0718FECEDA007B4E49 /* AMPGpg-Info.plist */,
D84DFB0818FECEDA007B4E49 /* InfoPlist.strings */,
D84DFB0B18FECEDA007B4E49 /* AMPGpg-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
D84DFAFB18FECEDA007B4E49 /* AMPGpg */ = {
isa = PBXNativeTarget;
buildConfigurationList = D84DFB0E18FECEDA007B4E49 /* Build configuration list for PBXNativeTarget "AMPGpg" */;
buildPhases = (
D84DFAF818FECEDA007B4E49 /* Sources */,
D84DFAF918FECEDA007B4E49 /* Frameworks */,
D8E1A71718FEE7B800352E29 /* CopyFiles */,
D84DFAFA18FECEDA007B4E49 /* Resources */,
D8CCFE93198A00FA00503D22 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
4EBCCA7F1A975DF1009532B2 /* PBXTargetDependency */,
);
name = AMPGpg;
productName = AMPGpg;
productReference = D84DFAFC18FECEDA007B4E49 /* AMPGpg.bundle */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
D84DFAF418FECEDA007B4E49 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0610;
ORGANIZATIONNAME = bloop;
TargetAttributes = {
D84DFAFB18FECEDA007B4E49 = {
DevelopmentTeam = 2E337YPCZY;
};
};
};
buildConfigurationList = D84DFAF718FECEDA007B4E49 /* Build configuration list for PBXProject "AMPGpg" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = D84DFAF318FECEDA007B4E49;
productRefGroup = D84DFAFD18FECEDA007B4E49 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 4EBCCA6D1A975DDB009532B2 /* Products */;
ProjectRef = D8CCFE97198A01A900503D22 /* Libmacgpg.xcodeproj */;
},
);
projectRoot = "";
targets = (
D84DFAFB18FECEDA007B4E49 /* AMPGpg */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
173A8A611F03EB3600E65436 /* UnitTests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = UnitTests.xctest;
remoteRef = 173A8A601F03EB3600E65436 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4EBCCA751A975DDB009532B2 /* Libmacgpg.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Libmacgpg.framework;
remoteRef = 4EBCCA741A975DDB009532B2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4EBCCA791A975DDB009532B2 /* org.gpgtools.Libmacgpg.xpc */ = {
isa = PBXReferenceProxy;
fileType = "wrapper.xpc-service";
path = org.gpgtools.Libmacgpg.xpc;
remoteRef = 4EBCCA781A975DDB009532B2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4EBCCA7D1A975DDB009532B2 /* LeakFinder.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = LeakFinder.app;
remoteRef = 4EBCCA7C1A975DDB009532B2 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
D84DFAFA18FECEDA007B4E49 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B30FF67319009F430053FD49 /* gpg_unlocked.psd in Resources */,
B30FF64718FFFCE40053FD49 /* g_inactive.psd in Resources */,
B30FF64818FFFCE40053FD49 /* g_active.psd in Resources */,
B30FF67219009F430053FD49 /* gpg_locked.psd in Resources */,
B30FF64518FFFCE40053FD49 /* g_unlocked.psd in Resources */,
B30FF68919017D2B0053FD49 /* pluginsGPG.psd in Resources */,
B30FF64618FFFCE40053FD49 /* g_locked.psd in Resources */,
B30FF67019009F430053FD49 /* gpg_active.psd in Resources */,
D84DFB0A18FECEDA007B4E49 /* InfoPlist.strings in Resources */,
B30FF67119009F430053FD49 /* gpg_bad.psd in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
D84DFAF818FECEDA007B4E49 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D8E1A71F18FEEC7100352E29 /* AMPGpgButton.m in Sources */,
D8E1A6E518FEDF5F00352E29 /* AMPGpgView.m in Sources */,
D8E1A6E818FEE0BF00352E29 /* AMPGpgEncryption.m in Sources */,
D84DFB3318FECF12007B4E49 /* AMPGpg.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
4EBCCA7F1A975DF1009532B2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = Libmacgpg;
targetProxy = 4EBCCA7E1A975DF1009532B2 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
D84DFB0818FECEDA007B4E49 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
D84DFB0918FECEDA007B4E49 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
D84DFB0C18FECEDA007B4E49 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
D84DFB0D18FECEDA007B4E49 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
};
name = Release;
};
D84DFB0F18FECEDA007B4E49 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = "";
CODE_SIGN_IDENTITY = "Developer ID Application";
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 2E337YPCZY;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
"\"$(SRCROOT)/../",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AMPGpg/AMPGpg-Prefix.pch";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"\"$(SRCROOT)/Dependencies/Libmacgpg/build/Debug/Libmacgpg.framework/Headers/\"",
"\"$(SRCROOT)/../AMPluginFramework.framework/Headers/\"",
);
INFOPLIST_FILE = "AMPGpg/AMPGpg-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
OTHER_CODE_SIGN_FLAGS = "--deep";
OTHER_LDFLAGS = "-L/usr/local/opt/openssl/lib/";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = bundle;
};
name = Debug;
};
D84DFB1018FECEDA007B4E49 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = "";
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
"\"$(SRCROOT)/../",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AMPGpg/AMPGpg-Prefix.pch";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"\"$(SRCROOT)/Dependencies/Libmacgpg/build/Debug/Libmacgpg.framework/Headers/\"",
"\"$(SRCROOT)/../AMPluginFramework.framework/Headers/\"/**",
);
INFOPLIST_FILE = "AMPGpg/AMPGpg-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
OTHER_CODE_SIGN_FLAGS = "--deep";
OTHER_LDFLAGS = "-L/usr/local/opt/openssl/lib/";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = bundle;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
D84DFAF718FECEDA007B4E49 /* Build configuration list for PBXProject "AMPGpg" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D84DFB0C18FECEDA007B4E49 /* Debug */,
D84DFB0D18FECEDA007B4E49 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D84DFB0E18FECEDA007B4E49 /* Build configuration list for PBXNativeTarget "AMPGpg" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D84DFB0F18FECEDA007B4E49 /* Debug */,
D84DFB1018FECEDA007B4E49 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = D84DFAF418FECEDA007B4E49 /* Project object */;
}
================================================
FILE: AMPMessageStyle/AMPMessageStyle.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
88468D42183AB9B800E0E092 /* AMPluginFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D8E492341832308F00E39B37 /* AMPluginFramework.framework */; };
889343EC1838499E00DCC2F9 /* AMPMessageStyle.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = D87723AA18321026001C10AE /* AMPMessageStyle.bundle */; };
D876CA4A18334FAB00FFB561 /* Taxi.css in Resources */ = {isa = PBXBuildFile; fileRef = D876CA4618334FAB00FFB561 /* Taxi.css */; };
D876CA4B18334FAB00FFB561 /* base2.css in Resources */ = {isa = PBXBuildFile; fileRef = D876CA4718334FAB00FFB561 /* base2.css */; };
D876CA4C18334FAB00FFB561 /* base3.css in Resources */ = {isa = PBXBuildFile; fileRef = D876CA4818334FAB00FFB561 /* base3.css */; };
D876CA4D18334FAB00FFB561 /* base4.css in Resources */ = {isa = PBXBuildFile; fileRef = D876CA4918334FAB00FFB561 /* base4.css */; };
D87723B818321026001C10AE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D87723B618321026001C10AE /* InfoPlist.strings */; };
D87723C118321074001C10AE /* AMPMessageStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = D87723C018321074001C10AE /* AMPMessageStyle.m */; };
D8E0A41E1832234C00A294AF /* AMPMessageStyleView.m in Sources */ = {isa = PBXBuildFile; fileRef = D8E0A41D1832234C00A294AF /* AMPMessageStyleView.m */; };
D8E4922718322F1400E39B37 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D87723AD18321026001C10AE /* Cocoa.framework */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
889343EB1838497E00DCC2F9 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "~/Library/Containers/it.bloop.airmail.beta8/Data/Library/Application Support/Airmail/General/Plugins";
dstSubfolderSpec = 0;
files = (
889343EC1838499E00DCC2F9 /* AMPMessageStyle.bundle in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
B3F625B718D7ABB000A3AA80 /* es-419 */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-419"; path = "es-419.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
D876CA4618334FAB00FFB561 /* Taxi.css */ = {isa = PBXFileReference; explicitFileType = text.css; fileEncoding = 4; path = Taxi.css; sourceTree = "<group>"; };
D876CA4718334FAB00FFB561 /* base2.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = base2.css; sourceTree = "<group>"; };
D876CA4818334FAB00FFB561 /* base3.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = base3.css; sourceTree = "<group>"; };
D876CA4918334FAB00FFB561 /* base4.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = base4.css; sourceTree = "<group>"; };
D87723AA18321026001C10AE /* AMPMessageStyle.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AMPMessageStyle.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
D87723AD18321026001C10AE /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
D87723B018321026001C10AE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D87723B118321026001C10AE /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
D87723B218321026001C10AE /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
D87723B518321026001C10AE /* AMPMessageStyle-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AMPMessageStyle-Info.plist"; sourceTree = "<group>"; };
D87723B718321026001C10AE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
D87723B918321026001C10AE /* AMPMessageStyle-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AMPMessageStyle-Prefix.pch"; sourceTree = "<group>"; };
D87723BF18321074001C10AE /* AMPMessageStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPMessageStyle.h; sourceTree = "<group>"; };
D87723C018321074001C10AE /* AMPMessageStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPMessageStyle.m; sourceTree = "<group>"; };
D8E0A41C1832234C00A294AF /* AMPMessageStyleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AMPMessageStyleView.h; sourceTree = "<group>"; };
D8E0A41D1832234C00A294AF /* AMPMessageStyleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AMPMessageStyleView.m; sourceTree = "<group>"; };
D8E492341832308F00E39B37 /* AMPluginFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AMPluginFramework.framework; path = ../AMPluginFramework/build/Debug/AMPluginFramework.framework; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D87723A718321026001C10AE /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
88468D42183AB9B800E0E092 /* AMPluginFramework.framework in Frameworks */,
D8E4922718322F1400E39B37 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
886FF103183783C100247F22 /* css */ = {
isa = PBXGroup;
children = (
D876CA4618334FAB00FFB561 /* Taxi.css */,
D876CA4718334FAB00FFB561 /* base2.css */,
D876CA4818334FAB00FFB561 /* base3.css */,
D876CA4918334FAB00FFB561 /* base4.css */,
);
name = css;
sourceTree = "<group>";
};
D87723A118321026001C10AE = {
isa = PBXGroup;
children = (
D87723B318321026001C10AE /* AirmailCss */,
D87723AC18321026001C10AE /* Frameworks */,
D87723AB18321026001C10AE /* Products */,
);
sourceTree = "<group>";
};
D87723AB18321026001C10AE /* Products */ = {
isa = PBXGroup;
children = (
D87723AA18321026001C10AE /* AMPMessageStyle.bundle */,
);
name = Products;
sourceTree = "<group>";
};
D87723AC18321026001C10AE /* Frameworks */ = {
isa = PBXGroup;
children = (
D87723AD18321026001C10AE /* Cocoa.framework */,
D87723AF18321026001C10AE /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
D87723AF18321026001C10AE /* Other Frameworks */ = {
isa = PBXGroup;
children = (
D8E492341832308F00E39B37 /* AMPluginFramework.framework */,
D87723B018321026001C10AE /* Foundation.framework */,
D87723B118321026001C10AE /* CoreData.framework */,
D87723B218321026001C10AE /* AppKit.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
D87723B318321026001C10AE /* AirmailCss */ = {
isa = PBXGroup;
children = (
D87723BF18321074001C10AE /* AMPMessageStyle.h */,
D87723C018321074001C10AE /* AMPMessageStyle.m */,
D8E0A41C1832234C00A294AF /* AMPMessageStyleView.h */,
D8E0A41D1832234C00A294AF /* AMPMessageStyleView.m */,
D87723B418321026001C10AE /* Supporting Files */,
);
path = AirmailCss;
sourceTree = "<group>";
};
D87723B418321026001C10AE /* Supporting Files */ = {
isa = PBXGroup;
children = (
886FF103183783C100247F22 /* css */,
D87723B518321026001C10AE /* AMPMessageStyle-Info.plist */,
D87723B618321026001C10AE /* InfoPlist.strings */,
D87723B918321026001C10AE /* AMPMessageStyle-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
D87723A918321026001C10AE /* AMPMessageStyle */ = {
isa = PBXNativeTarget;
buildConfigurationList = D87723BC18321026001C10AE /* Build configuration list for PBXNativeTarget "AMPMessageStyle" */;
buildPhases = (
D87723A618321026001C10AE /* Sources */,
D87723A718321026001C10AE /* Frameworks */,
D87723A818321026001C10AE /* Resources */,
889343EB1838497E00DCC2F9 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = AMPMessageStyle;
productName = AirmailCss;
productReference = D87723AA18321026001C10AE /* AMPMessageStyle.bundle */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
D87723A218321026001C10AE /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = Bloop;
};
buildConfigurationList = D87723A518321026001C10AE /* Build configuration list for PBXProject "AMPMessageStyle" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
"es-419",
);
mainGroup = D87723A118321026001C10AE;
productRefGroup = D87723AB18321026001C10AE /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D87723A918321026001C10AE /* AMPMessageStyle */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
D87723A818321026001C10AE /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D876CA4A18334FAB00FFB561 /* Taxi.css in Resources */,
D876CA4B18334FAB00FFB561 /* base2.css in Resources */,
D876CA4C18334FAB00FFB561 /* base3.css in Resources */,
D876CA4D18334FAB00FFB561 /* base4.css in Resources */,
D87723B818321026001C10AE /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
D87723A618321026001C10AE /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D8E0A41E1832234C00A294AF /* AMPMessageStyleView.m in Sources */,
D87723C118321074001C10AE /* AMPMessageStyle.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
D87723B618321026001C10AE /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
D87723B718321026001C10AE /* en */,
B3F625B718D7ABB000A3AA80 /* es-419 */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
D87723BA18321026001C10AE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
D87723BB18321026001C10AE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
};
name = Release;
};
D87723BD18321026001C10AE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
/Users/Shared/DevelopMac/Airmail/AMPluginFramework/build/Debug,
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AirmailCss/AMPMessageStyle-Prefix.pch";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Users/Shared/DevelopMac/AMPluginFramework/build/Debug/AMPluginFramework.framework/Versions/A/Headers,
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
);
INFOPLIST_FILE = "AirmailCss/AMPMessageStyle-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
PRODUCT_NAME = AMPMessageStyle;
WRAPPER_EXTENSION = bundle;
};
name = Debug;
};
D87723BE18321026001C10AE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
/Users/Shared/DevelopMac/Airmail/AMPluginFramework/build/Debug,
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AirmailCss/AMPMessageStyle-Prefix.pch";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Users/Shared/DevelopMac/AMPluginFramework/build/Debug/AMPluginFramework.framework/Versions/A/Headers,
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
);
INFOPLIST_FILE = "AirmailCss/AMPMessageStyle-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
PRODUCT_NAME = AMPMessageStyle;
WRAPPER_EXTENSION = bundle;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
D87723A518321026001C10AE /* Build configuration list for PBXProject "AMPMessageStyle" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D87723BA18321026001C10AE /* Debug */,
D87723BB18321026001C10AE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
D87723BC18321026001C10AE /* Build configuration list for PBXNativeTarget "AMPMessageStyle" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D87723BD18321026001C10AE /* Debug */,
D87723BE18321026001C10AE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = D87723A218321026001C10AE /* Project object */;
}
================================================
FILE: AMPMessageStyle/AMPMessageStyle.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:AirmailCss.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: AMPMessageStyle/AirmailCss/AMPMessageStyle-Info.plist
================================================
<?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>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>it.bloop.airmail.plugin.css.render</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2013 Bloop. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string>AMPMessageStyle</string>
</dict>
</plist>
================================================
FILE: AMPMessageStyle/AirmailCss/AMPMessageStyle-Prefix.pch
================================================
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
================================================
FILE: AMPMessageStyle/AirmailCss/AMPMessageStyle.h
================================================
//
// AirmailCss.h
// AirmailCss
//
// Created by Joe on 12/11/13.
// Copyright (c) 2013 Bloop. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AMPluginFramework/AMPluginFramework.h>
@interface AMPMessageStyle : AMPlugin
{
}
@property (strong) NSMutableArray *cssList;
@property (strong) NSString *cssString;
- (NSString*) savedPath;
- (void) changeCss:(NSString*)str;
@end
================================================
FILE: AMPMessageStyle/AirmailCss/AMPMessageStyle.m
================================================
//
// AirmailCss.m
// AirmailCss
//
// Created by Joe on 12/11/13.
// Copyright (c) 2013 Bloop. All rights reserved.
//
#import "AMPMessageStyle.h"
#import "AMPMessageStyleView.h"
const NSString *ampcss_render_css_option = @"ampcss_render_css_option";
@implementation AMPMessageStyle
- (id)init
{
self = [super init];
if (self)
{
self.cssString = @"";
}
return self;
}
- (BOOL) Load
{
if(![super Load])
return NO;
self.cssList = [NSMutableArray array];
//Load Bundle
NSMutableArray *allpaths = [NSMutableArray array];
NSArray *bundlesPath = [self bundlepathContents];
if(!bundlesPath)
return NO;
[allpaths addObjectsFromArray:bundlesPath];
NSArray *dirPaths = [self suggestedpathContents];
if(!dirPaths)
return NO;
[allpaths addObjectsFromArray:dirPaths];
for(NSString *path in allpaths)
{
if([path.pathExtension isEqualToString:@"css"])
[self.cssList addObject:path];
}
//Load Preference
NSString *path = [self.preferences objectForKey:ampcss_render_css_option];
if(path && [path isKindOfClass:[NSString class]])
self.cssString = [self LoadCssStringForPath:path];
[self Reload];
return YES;
}
- (void) Enable
{
}
- (void) Disable
{
}
- (void) Invalid
{
}
- (void) Reload
{
[self.myView ReloadView];
}
- (AMPView*) pluginview
{
if(!self.myView)
self.myView = [[AMPMessageStyleView alloc] initWithFrame:NSZeroRect plugin:self];
return self.myView;
}
- (NSString*) nametext
{
return @"Message Style SDK";
}
- (NSString*) description
{
return self.nametext;
}
- (NSString*) descriptiontext
{
return @"With this plugin you can override the rendering css of the messages.";
}
- (NSString*) authortext
{
return @"Airmail SDK Sample";
}
- (NSString*) supportlink
{
return @"http://adv.bloop.info/airmail/sdk.php";
}
- (NSImage*) icon
{
return [NSImage imageNamed:@"iconx"];
}
#pragma mark - AM called methods
- (NSString*) ampStackMessageRenderFromHtml:(NSString*)html message:(AMPMessage*)message
{
if(self.cssString.length == 0 || !message)
return html;
NSString *htmlRet = [NSString stringWithFormat:@"<style>%@</style>%@",self.cssString,html];
return htmlRet;
}
#pragma mark - manage css
-(NSString*) savedPath
{
return [self.preferences objectForKey:ampcss_render_css_option];
}
- (NSString*) LoadCssStringForPath:(NSString*)path
{
NSError *err = nil;
NSString *str = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&err];
if(err)
{
str = @"";
[self LogError:[NSString stringWithFormat:@"Cannot load css %@",path]];
}
return str;
}
- (void) changeCss:(NSString*)str
{
if(str.length == 0)
{
[self.preferences removeObjectForKey:ampcss_render_css_option];
self.cssString = @"";
}
else
{
[self.preferences removeObjectForKey:ampcss_render_css_option];
[self.preferences setObject:str forKey:ampcss_render_css_option];
self.cssString = [self LoadCssStringForPath:str];
}
[self SavePreferences];
}
@end
================================================
FILE: AMPMessageStyle/AirmailCss/AMPMessageStyleView.h
================================================
//
// CssView.h
// AirmailCss
//
// Created by Joe on 12/11/13.
// Copyright (c) 2013 Bloop. All rights reserved.
//
#import <AMPluginFramework/AMPluginFramework.h>
@class AMPMessageStyle;
@interface AMPMessageStyleView : AMPView
{
NSPopUpButton *popUpBtnRender;
}
@end
================================================
FILE: AMPMessageStyle/AirmailCss/AMPMessageStyleView.m
================================================
//
// CssView.m
// AirmailCss
//
// Created by Joe on 12/11/13.
// Copyright (c) 2013 Bloop. All rights reserved.
//
#import "AMPMessageStyleView.h"
#import "AMPMessageStyle.h"
@implementation AMPMessageStyleView
- (id)initWithFrame:(NSRect)frame plugin:(AMPlugin *)pluginIn
{
self = [super initWithFrame:frame plugin:pluginIn];
if (self) {
// Initialization code here.
NSInteger x = 20;
NSInteger y = 20;
NSTextField *textField = [[NSTextField alloc] initWithFrame:NSMakeRect(x+3, y, 250, 20)];
[textField setStringValue:NSLocalizedString(@"Style Selector:",@"Style Selector:")];
[textField setBezeled:NO];
[textField setDrawsBackground:NO];
[textField setEditable:NO];
[textField setSelectable:NO];
[textField setFont:[NSFont systemFontOfSize:13]];
[[textField cell] setBackgroundStyle:NSBackgroundStyleRaised];
[textField setAlignment: NSRightTextAlignment];
[self addSubview:textField];
popUpBtnRender = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(x+270, y, 200, 30) pullsDown:NO];
[(NSPopUpButtonCell *)[popUpBtnRender cell] setBezelStyle:NSTexturedRoundedBezelStyle];
[[popUpBtnRender cell] setArrowPosition:NSPopUpArrowAtBottom];
[popUpBtnRender setAutoresizingMask:NSViewMaxYMargin];
[self addSubview:popUpBtnRender];
[self LoadView];
}
return self;
}
- (AMPMessageStyle*) myPlugin
{
return (AMPMessageStyle*)self.plugin;
}
- (void) ReloadView
{
dispatch_async(dispatch_get_main_queue(), ^{
[self LoadView];
});
}
- (void) LoadView
{
//Render
NSArray *csss = [self.myPlugin.cssList sortedArrayUsingComparator:^NSComparisonResult(id a, id b) {
return [a caseInsensitiveCompare:b];
}];
[popUpBtnRender.menu removeAllItems];
NSMenuItem *itemRender = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"None", @"None") action:nil keyEquivalent:@""];
[itemRender setRepresentedObject:@""];
[itemRender setAction:@selector(changeCss:)];
[itemRender setTarget:self];
[popUpBtnRender.menu addItem:itemRender];
[csss enumerateObjectsUsingBlock:^(NSString *path, NSUInteger idx, BOOL *stop) {
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:path.lastPathComponent.stringByDeletingPathExtension action:nil keyEquivalent:@""];
[item setRepresentedObject:path];
[item setAction:@selector(changeCss:)];
[item setTarget:self];
[popUpBtnRender.menu addItem:item];
}];
NSString *pathRender = [self.myPlugin savedPath];
if(pathRender && [pathRender isKindOfClass:[NSString class]])
{
for(NSMenuItem *item in popUpBtnRender.menu.itemArray)
{
if([item.representedObject isEqualToString:pathRender])
{
[popUpBtnRender selectItem:item];
break;
}
}
}
}
- (void) RenderView
{
}
- (void) changeCss:(NSMenuItem*)item
{
[self.myPlugin changeCss:item.representedObject];
}
//- (void)drawRect:(NSRect)dirtyRect
//{
// [super drawRect:dirtyRect];
//
// // Drawing code here.
// [[NSColor purpleColor] set];
// NSRectFill(dirtyRect);
//}
@end
================================================
FILE: AMPMessageStyle/AirmailCss/AirmailCss.h
================================================
//
// AirmailCss.h
// AirmailCss
//
// Created by Joe on 12/11/13.
// Copyright (c) 2013 Bloop. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AMPluginFramework/AMPluginFramework.h>
@interface AirmailCss : AMPlugin
{
}
@property (strong) NSMutableArray *cssList;
@end
================================================
FILE: AMPMessageStyle/AirmailCss/AirmailCss.m
================================================
//
// AirmailCss.m
// AirmailCss
//
// Created by Joe on 12/11/13.
// Copyright (c) 2013 Bloop. All rights reserved.
//
#import "AirmailCss.h"
#import "AMPCssView.h"
@implementation AirmailCss
- (id)init
{
self = [super init];
if (self)
{
}
return self;
}
- (BOOL) Load
{
if([super Load])
{
NSError *err = nil;
NSArray *arr = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:self.suggestedpath error:&err];
if(err)
{
NSLog(@"Load directory %@ %@", self,self.suggestedpath);
return NO;
}
self.cssList = [NSMutableArray array];
if(arr && arr.count > 0)
{
for(NSString *s in arr)
{
if([s hasPrefix:@"."] == NO)
{
NSString *sx = [self.suggestedpath stringByAppendingPathComponent:s];
[self.cssList addObject:sx];
}
}
}
}
return NO;
}
- (void) Enable
{
}
- (void) Disable
{
}
- (void) Invalid
{
}
- (AMPView*) pluginview
{
if(!self.myView)
self.myView = [[AMPCssView alloc] initWithFrame:NSZeroRect];
return self.myView;
}
- (NSString*) nametext
{
return @"Airmail Css
gitextract_zaxo75me/ ├── .gitignore ├── .gitmodules ├── AMPCrypto/ │ ├── AMPCrypto/ │ │ ├── AMPCrypto-Info.plist │ │ ├── AMPCrypto-Prefix.pch │ │ ├── AMPCrypto.h │ │ ├── AMPCrypto.m │ │ ├── AMPCryptoView.h │ │ ├── AMPCryptoView.m │ │ ├── NSData+AESCrypt.h │ │ ├── NSData+AESCrypt.m │ │ ├── NSData+Base64.h │ │ ├── NSData+Base64.m │ │ ├── NSString+AESCrypt.h │ │ ├── NSString+AESCrypt.m │ │ ├── SSKeychain.h │ │ ├── SSKeychain.m │ │ ├── Unlocked.psd │ │ ├── en.lproj/ │ │ │ └── InfoPlist.strings │ │ └── locked.psd │ └── AMPCrypto.xcodeproj/ │ ├── project.pbxproj │ └── project.xcworkspace/ │ └── contents.xcworkspacedata ├── AMPCustomTemplates/ │ ├── AMPCustomTemplate.xcodeproj/ │ │ ├── project.pbxproj │ │ └── project.xcworkspace/ │ │ └── contents.xcworkspacedata │ └── CssComposer/ │ ├── AMPCssComposerView.h │ ├── AMPCssComposerView.m │ ├── AMPCustomTemplate-Info.plist │ ├── AMPCustomTemplate-Prefix.pch │ ├── AMPCustomTemplate.h │ ├── AMPCustomTemplate.m │ ├── Taxi.css │ ├── Yellow.css │ ├── base1.css │ ├── base2.css │ ├── base3.css │ ├── base4.css │ ├── en.lproj/ │ │ └── InfoPlist.strings │ └── helvetica.css ├── AMPFramework.xcworkspace/ │ └── contents.xcworkspacedata ├── AMPGpg/ │ ├── AMPGpg/ │ │ ├── AMPGpg-Info.plist │ │ ├── AMPGpg-Prefix.pch │ │ ├── AMPGpg.h │ │ ├── AMPGpg.m │ │ ├── AMPGpgBodyView.h │ │ ├── AMPGpgBodyView.m │ │ ├── AMPGpgButton.h │ │ ├── AMPGpgButton.m │ │ ├── AMPGpgEncryption.h │ │ ├── AMPGpgEncryption.m │ │ ├── AMPGpgView.h │ │ ├── AMPGpgView.m │ │ ├── en.lproj/ │ │ │ └── InfoPlist.strings │ │ ├── g_active.psd │ │ ├── g_inactive.psd │ │ ├── g_locked.psd │ │ ├── g_unlocked.psd │ │ ├── gpg_active.psd │ │ ├── gpg_bad.psd │ │ ├── gpg_locked.psd │ │ ├── gpg_unlocked.psd │ │ ├── pluginsGPG.psd │ │ └── s_active.psd │ └── AMPGpg.xcodeproj/ │ └── project.pbxproj ├── AMPMessageStyle/ │ ├── AMPMessageStyle.xcodeproj/ │ │ ├── project.pbxproj │ │ └── project.xcworkspace/ │ │ └── contents.xcworkspacedata │ └── AirmailCss/ │ ├── AMPMessageStyle-Info.plist │ ├── AMPMessageStyle-Prefix.pch │ ├── AMPMessageStyle.h │ ├── AMPMessageStyle.m │ ├── AMPMessageStyleView.h │ ├── AMPMessageStyleView.m │ ├── AirmailCss.h │ ├── AirmailCss.m │ ├── Taxi.css │ ├── Yellow.css │ ├── base1.css │ ├── base2.css │ ├── base3.css │ ├── base4.css │ ├── en.lproj/ │ │ └── InfoPlist.strings │ └── es-419.lproj/ │ └── InfoPlist.strings ├── AMPNotify/ │ ├── AMPSimpleNotifier.xcodeproj/ │ │ ├── project.pbxproj │ │ └── project.xcworkspace/ │ │ └── contents.xcworkspacedata │ └── Notify/ │ ├── AMPNotifyWindow.h │ ├── AMPNotifyWindow.m │ ├── AMPNotifyWindowController.h │ ├── AMPNotifyWindowController.m │ ├── AMPNotifyWindowView.h │ ├── AMPNotifyWindowView.m │ ├── AMPSimpleNotifier-Info.plist │ ├── AMPSimpleNotifier-Prefix.pch │ ├── AMPSimpleNotifier.h │ ├── AMPSimpleNotifier.m │ ├── AMPSimpleNotifierView.h │ ├── AMPSimpleNotifierView.m │ ├── en.lproj/ │ │ └── InfoPlist.strings │ └── es-419.lproj/ │ └── InfoPlist.strings ├── AMPTranslate/ │ ├── AMPTranslate-Info.plist │ ├── AMPTranslate-Prefix.pch │ ├── AMPTranslate.h │ ├── AMPTranslate.m │ ├── AMPTranslateView.h │ ├── AMPTranslateView.m │ ├── GTMDefines.h │ ├── GTMNSString+HTML.h │ ├── GTMNSString+HTML.m │ ├── NSString+HTML.h │ ├── NSString+HTML.m │ └── en.lproj/ │ └── InfoPlist.strings ├── AMPluginFramework.framework/ │ └── Versions/ │ └── A/ │ ├── AMPluginFramework │ ├── Headers/ │ │ ├── AMPAccount.h │ │ ├── AMPAddress.h │ │ ├── AMPAlias.h │ │ ├── AMPAttachment.h │ │ ├── AMPCallBack.h │ │ ├── AMPComposerInfo.h │ │ ├── AMPFolder.h │ │ ├── AMPGroup.h │ │ ├── AMPMCOAbstractMessage.h │ │ ├── AMPMCOAbstractMessagePart.h │ │ ├── AMPMCOAbstractMultipart.h │ │ ├── AMPMCOAbstractPart.h │ │ ├── AMPMCOAddress.h │ │ ├── AMPMCOAttachment.h │ │ ├── AMPMCOMessageBuilder.h │ │ ├── AMPMCOMessageHeader.h │ │ ├── AMPMCOMessageParser.h │ │ ├── AMPMCOMessagePart.h │ │ ├── AMPMCOMultiPart.h │ │ ├── AMPMenuAction.h │ │ ├── AMPMessage.h │ │ ├── AMPObject.h │ │ ├── AMPProvider.h │ │ ├── AMPSendResult.h │ │ ├── AMPSignature.h │ │ ├── AMPSignatureVerify.h │ │ ├── AMPUidFlag.h │ │ ├── AMPView.h │ │ ├── AMPlugin.h │ │ ├── AMPluginFramework.h │ │ ├── NSData+AMPBase64.h │ │ └── NSScanner+Utility.h │ └── Resources/ │ ├── Info.plist │ └── en.lproj/ │ └── InfoPlist.strings ├── LICENSE └── README.md
SYMBOL INDEX (52 symbols across 39 files)
FILE: AMPCrypto/AMPCrypto/AMPCrypto.h
function interface (line 11) | interface AMPCrypto : AMPlugin
FILE: AMPCrypto/AMPCrypto/AMPCryptoView.h
function interface (line 11) | interface AMPCryptoView : AMPView
FILE: AMPCrypto/AMPCrypto/SSKeychain.h
type SSKeychainErrorCode (line 13) | typedef enum {
FILE: AMPCustomTemplates/CssComposer/AMPCssComposerView.h
function interface (line 11) | interface AMPCssComposerView : AMPView
FILE: AMPCustomTemplates/CssComposer/AMPCustomTemplate.h
function interface (line 12) | interface AMPCustomTemplate : AMPlugin
FILE: AMPGpg/AMPGpg/AMPGpg.h
function interface (line 13) | interface AMPGpg : AMPlugin
FILE: AMPGpg/AMPGpg/AMPGpgButton.h
function interface (line 11) | interface AMPGpgButton : NSButton
FILE: AMPGpg/AMPGpg/AMPGpgView.h
function interface (line 11) | interface AMPGpgView : AMPView
FILE: AMPMessageStyle/AirmailCss/AMPMessageStyle.h
function interface (line 11) | interface AMPMessageStyle : AMPlugin
FILE: AMPMessageStyle/AirmailCss/AMPMessageStyleView.h
function interface (line 11) | interface AMPMessageStyleView : AMPView
FILE: AMPMessageStyle/AirmailCss/AirmailCss.h
function interface (line 11) | interface AirmailCss : AMPlugin
FILE: AMPNotify/Notify/AMPNotifyWindow.h
function interface (line 11) | interface AMPNotifyWindow : NSWindow
FILE: AMPNotify/Notify/AMPNotifyWindowController.h
function interface (line 12) | interface AMPNotifyWindowController : NSWindowController
FILE: AMPNotify/Notify/AMPNotifyWindowView.h
function interface (line 11) | interface AMPNotifyWindowView : NSView
FILE: AMPNotify/Notify/AMPSimpleNotifier.h
function interface (line 12) | interface AMPSimpleNotifier : AMPlugin <NSWindowDelegate>
FILE: AMPNotify/Notify/AMPSimpleNotifierView.h
function interface (line 11) | interface AMPSimpleNotifierView : AMPView
FILE: AMPTranslate/AMPTranslate.h
function interface (line 11) | interface AMPTranslate : AMPlugin
FILE: AMPTranslate/AMPTranslateView.h
function interface (line 11) | interface AMPTranslateView : AMPView
FILE: AMPTranslate/GTMDefines.h
type NSInteger (line 236) | typedef long NSInteger;
type NSUInteger (line 237) | typedef unsigned long NSUInteger;
type NSInteger (line 239) | typedef int NSInteger;
type NSUInteger (line 240) | typedef unsigned int NSUInteger;
type CGFloat (line 251) | typedef double CGFloat;
type CGFloat (line 256) | typedef float CGFloat;
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPAccount.h
function interface (line 13) | interface AMPAccount : AMPObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPAddress.h
function interface (line 11) | interface AMPAddress : AMPObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPAlias.h
function interface (line 13) | interface AMPAlias : AMPObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPAttachment.h
function interface (line 11) | interface AMPAttachment : AMPObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPCallBack.h
function interface (line 14) | interface AMPCallBack : NSObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPComposerInfo.h
function interface (line 14) | interface AMPComposerInfo : NSObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPFolder.h
function interface (line 12) | interface AMPFolder : AMPObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPGroup.h
function interface (line 11) | interface AMPGroup : AMPObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPMCOAbstractPart.h
type AMPMCOPartType (line 12) | typedef enum {
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPMenuAction.h
function interface (line 11) | interface AMPMenuAction : NSObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPMessage.h
function interface (line 14) | interface AMPMessage : AMPObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPObject.h
function interface (line 11) | interface AMPObject : NSObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPProvider.h
function interface (line 11) | interface AMPProvider : AMPObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPSendResult.h
function interface (line 11) | interface AMPSendResult : NSObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPSignature.h
function interface (line 12) | interface AMPSignature : AMPObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPSignatureVerify.h
function interface (line 11) | interface AMPSignatureVerify : NSObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPUidFlag.h
function interface (line 11) | interface AMPUidFlag : NSObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPView.h
function interface (line 11) | interface AMPView : NSView
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPlugin.h
function interface (line 20) | interface AMPlugin : NSObject
FILE: AMPluginFramework.framework/Versions/A/Headers/AMPluginFramework.h
type amp_message_localflags (line 50) | enum amp_message_localflags {
type amp_provderType (line 61) | enum amp_provderType {
type amp_encryption_type (line 82) | enum amp_encryption_type {
type amp_send_result (line 88) | enum amp_send_result {
type amp_verify_signature (line 94) | enum amp_verify_signature {
type amp_composertype (line 100) | enum amp_composertype {
type amp_mailcomposertype (line 106) | enum amp_mailcomposertype {
type amp_foldertype (line 121) | enum amp_foldertype {
type amp_flags (line 152) | enum amp_flags {
Condensed preview — 145 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (387K chars).
[
{
"path": ".gitignore",
"chars": 237,
"preview": "# Xcode\n.DS_Store\n*/build/*\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspecti"
},
{
"path": ".gitmodules",
"chars": 320,
"preview": "[submodule \"AMPGpg/Dependencies/Libmacgpg\"]\n\tpath = AMPGpg/Dependencies/Libmacgpg\n\turl = https://github.com/GPGTools/Lib"
},
{
"path": "AMPCrypto/AMPCrypto/AMPCrypto-Info.plist",
"chars": 972,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "AMPCrypto/AMPCrypto/AMPCrypto-Prefix.pch",
"chars": 172,
"preview": "//\n// Prefix header\n//\n// The contents of this file are implicitly included at the beginning of every source file.\n//\n"
},
{
"path": "AMPCrypto/AMPCrypto/AMPCrypto.h",
"chars": 349,
"preview": "//\n// AMPCrypto.h\n// AMPCrypto\n//\n// Created by Gio on 11/04/14.\n// Copyright (c) 2014 bloop. All rights reserved.\n/"
},
{
"path": "AMPCrypto/AMPCrypto/AMPCrypto.m",
"chars": 9225,
"preview": "//\n// AMPCrypto.m\n// AMPCrypto\n//\n// Created by Gio on 11/04/14.\n// Copyright (c) 2014 bloop. All rights reserved.\n/"
},
{
"path": "AMPCrypto/AMPCrypto/AMPCryptoView.h",
"chars": 284,
"preview": "//\n// AMPCryptoView.h\n// AMPCrypto\n//\n// Created by Gio on 11/04/14.\n// Copyright (c) 2014 bloop. All rights reserve"
},
{
"path": "AMPCrypto/AMPCrypto/AMPCryptoView.m",
"chars": 4093,
"preview": "//\n// AMPCryptoView.m\n// AMPCrypto\n//\n// Created by Gio on 11/04/14.\n// Copyright (c) 2014 bloop. All rights reserve"
},
{
"path": "AMPCrypto/AMPCrypto/NSData+AESCrypt.h",
"chars": 918,
"preview": "//\n// NSData+AESCrypt.h\n//\n// AES Encrypt/Decrypt\n// Created by Jim Dovey and 'Jean'\n// See http://iphonedevelopment"
},
{
"path": "AMPCrypto/AMPCrypto/NSData+AESCrypt.m",
"chars": 8353,
"preview": "//\n// NSData+AESCrypt.m\n//\n// AES Encrypt/Decrypt\n// Created by Jim Dovey and 'Jean'\n// See http://iphonedevelopment"
},
{
"path": "AMPCrypto/AMPCrypto/NSData+Base64.h",
"chars": 1378,
"preview": "//\n// NSData+Base64.h\n// base64\n//\n// Created by Matt Gallagher on 2009/06/03.\n// Copyright 2009 Matt Gallagher. All"
},
{
"path": "AMPCrypto/AMPCrypto/NSData+Base64.m",
"chars": 8767,
"preview": "//\n// NSData+Base64.m\n// base64\n//\n// Created by Matt Gallagher on 2009/06/03.\n// Copyright 2009 Matt Gallagher. All"
},
{
"path": "AMPCrypto/AMPCrypto/NSString+AESCrypt.h",
"chars": 299,
"preview": "//\n// NSString+AESCrypt.h\n//\n// Created by Michael Sedlaczek, Gone Coding on 2011-02-22\n//\n\n#import <Foundation/Founda"
},
{
"path": "AMPCrypto/AMPCrypto/NSString+AESCrypt.m",
"chars": 775,
"preview": "//\n// NSString+AESCrypt.m\n//\n// Created by Michael Sedlaczek, Gone Coding on 2011-02-22\n//\n\n#import \"NSString+AESCrypt"
},
{
"path": "AMPCrypto/AMPCrypto/SSKeychain.h",
"chars": 11928,
"preview": "//\n// SSKeychain.h\n// SSToolkit\n//\n// Created by Sam Soffes on 5/19/10.\n// Copyright (c) 2009-2011 Sam Soffes. All r"
},
{
"path": "AMPCrypto/AMPCrypto/SSKeychain.m",
"chars": 8028,
"preview": "//\n// SSKeychain.m\n// SSToolkit\n//\n// Created by Sam Soffes on 5/19/10.\n// Copyright (c) 2009-2011 Sam Soffes. All r"
},
{
"path": "AMPCrypto/AMPCrypto/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "AMPCrypto/AMPCrypto.xcodeproj/project.pbxproj",
"chars": 16878,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "AMPCrypto/AMPCrypto.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 154,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:AMPCrypto.xcode"
},
{
"path": "AMPCustomTemplates/AMPCustomTemplate.xcodeproj/project.pbxproj",
"chars": 14388,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "AMPCustomTemplates/AMPCustomTemplate.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 162,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:AMPCustomTempla"
},
{
"path": "AMPCustomTemplates/CssComposer/AMPCssComposerView.h",
"chars": 272,
"preview": "//\n// AMPCssComposerView.h\n// AirmailCssComposer\n//\n// Created by Joe on 16/11/13.\n// Copyright (c) 2013 Joe. All ri"
},
{
"path": "AMPCustomTemplates/CssComposer/AMPCssComposerView.m",
"chars": 2234,
"preview": "//\n// AMPCssComposerView.m\n// AirmailCssComposer\n//\n// Created by Joe on 16/11/13.\n// Copyright (c) 2013 Joe. All ri"
},
{
"path": "AMPCustomTemplates/CssComposer/AMPCustomTemplate-Info.plist",
"chars": 975,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "AMPCustomTemplates/CssComposer/AMPCustomTemplate-Prefix.pch",
"chars": 172,
"preview": "//\n// Prefix header\n//\n// The contents of this file are implicitly included at the beginning of every source file.\n//\n"
},
{
"path": "AMPCustomTemplates/CssComposer/AMPCustomTemplate.h",
"chars": 491,
"preview": "//\n// AMPCssComposer.h\n// CssComposer\n//\n// Created by Joe on 16/11/13.\n// Copyright (c) 2013 Joe. All rights reserv"
},
{
"path": "AMPCustomTemplates/CssComposer/AMPCustomTemplate.m",
"chars": 6628,
"preview": "//\n// AMPCssComposer.m\n// CssComposer\n//\n// Created by Joe on 16/11/13.\n// Copyright (c) 2013 Joe. All rights reserv"
},
{
"path": "AMPCustomTemplates/CssComposer/Taxi.css",
"chars": 366,
"preview": "*,tr,td,table,html,th,hr,body,tbody,div {\n\n font-size: 18px !important;\n font-family:\"avenir next\" !important;\n "
},
{
"path": "AMPCustomTemplates/CssComposer/Yellow.css",
"chars": 1287,
"preview": "/* http://meyerweb.com/eric/tools/css/reset/ \n v2.0 | 20110126\n License: none (public domain)\n*/\n\nhtml, body, div, s"
},
{
"path": "AMPCustomTemplates/CssComposer/base1.css",
"chars": 57,
"preview": "* {\n font-size: 25px;\n font-family:\"helvetica\";\n}\n\n"
},
{
"path": "AMPCustomTemplates/CssComposer/base2.css",
"chars": 57,
"preview": "* {\n font-size: 11px;\n font-family:\"helvetica\";\n}\n\n"
},
{
"path": "AMPCustomTemplates/CssComposer/base3.css",
"chars": 57,
"preview": "* {\n font-size: 35px;\n font-family:\"helvetica\";\n}\n\n"
},
{
"path": "AMPCustomTemplates/CssComposer/base4.css",
"chars": 57,
"preview": "* {\n font-size: 49px;\n font-family:\"helvetica\";\n}\n\n"
},
{
"path": "AMPCustomTemplates/CssComposer/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "AMPCustomTemplates/CssComposer/helvetica.css",
"chars": 68,
"preview": "* {\n font-size: 35px;\n font-family:\"helvetica\" !important;\n}\n\n"
},
{
"path": "AMPFramework.xcworkspace/contents.xcworkspacedata",
"chars": 528,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"container:AMPCrypto/"
},
{
"path": "AMPGpg/AMPGpg/AMPGpg-Info.plist",
"chars": 939,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "AMPGpg/AMPGpg/AMPGpg-Prefix.pch",
"chars": 172,
"preview": "//\n// Prefix header\n//\n// The contents of this file are implicitly included at the beginning of every source file.\n//\n"
},
{
"path": "AMPGpg/AMPGpg/AMPGpg.h",
"chars": 273,
"preview": "//\n// AMPGpg.h\n// AMPGpg\n//\n// Created by Gio on 16/04/14.\n// Copyright (c) 2014 bloop. All rights reserved.\n//\n\n#im"
},
{
"path": "AMPGpg/AMPGpg/AMPGpg.m",
"chars": 10257,
"preview": "//\n// AMPGpg.m\n// AMPGpg\n//\n// Created by Gio on 16/04/14.\n// Copyright (c) 2014 bloop. All rights reserved.\n//\n\n#im"
},
{
"path": "AMPGpg/AMPGpg/AMPGpgBodyView.h",
"chars": 206,
"preview": "//\n// AMPGpgBodyView.h\n// AMPGpg\n//\n// Created by Giovanni Simonicca on 17/04/14.\n// Copyright (c) 2014 bloop. All r"
},
{
"path": "AMPGpg/AMPGpg/AMPGpgBodyView.m",
"chars": 520,
"preview": "//\n// AMPGpgBodyView.m\n// AMPGpg\n//\n// Created by Giovanni Simonicca on 17/04/14.\n// Copyright (c) 2014 bloop. All r"
},
{
"path": "AMPGpg/AMPGpg/AMPGpgButton.h",
"chars": 450,
"preview": "//\n// AMPSwitchButton.h\n// AMPSmime\n//\n// Created by Gio on 15/04/14.\n// Copyright (c) 2014 Bloop. All rights reserv"
},
{
"path": "AMPGpg/AMPGpg/AMPGpgButton.m",
"chars": 1750,
"preview": "//\n// AMPSwitchButton.m\n// AMPSmime\n//\n// Created by Gio on 15/04/14.\n// Copyright (c) 2014 Bloop. All rights reserv"
},
{
"path": "AMPGpg/AMPGpg/AMPGpgEncryption.h",
"chars": 814,
"preview": "//\n// AMPGpgEncryption.h\n// AMPGpg\n//\n// Created by Giovanni Simonicca on 16/04/14.\n// Copyright (c) 2014 bloop. All"
},
{
"path": "AMPGpg/AMPGpg/AMPGpgEncryption.m",
"chars": 22487,
"preview": "//\n// AMPGpgEncryption.m\n// AMPGpg\n//\n// Created by Giovanni Simonicca on 16/04/14.\n// Copyright (c) 2014 bloop. All"
},
{
"path": "AMPGpg/AMPGpg/AMPGpgView.h",
"chars": 203,
"preview": "//\n// AMPGpgView.h\n// AMPGpg\n//\n// Created by Giovanni Simonicca on 16/04/14.\n// Copyright (c) 2014 bloop. All right"
},
{
"path": "AMPGpg/AMPGpg/AMPGpgView.m",
"chars": 3118,
"preview": "//\n// AMPGpgView.m\n// AMPGpg\n//\n// Created by Giovanni Simonicca on 16/04/14.\n// Copyright (c) 2014 bloop. All right"
},
{
"path": "AMPGpg/AMPGpg/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "AMPGpg/AMPGpg.xcodeproj/project.pbxproj",
"chars": 22889,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "AMPMessageStyle/AMPMessageStyle.xcodeproj/project.pbxproj",
"chars": 15871,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "AMPMessageStyle/AMPMessageStyle.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 155,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:AirmailCss.xcod"
},
{
"path": "AMPMessageStyle/AirmailCss/AMPMessageStyle-Info.plist",
"chars": 955,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "AMPMessageStyle/AirmailCss/AMPMessageStyle-Prefix.pch",
"chars": 172,
"preview": "//\n// Prefix header\n//\n// The contents of this file are implicitly included at the beginning of every source file.\n//\n"
},
{
"path": "AMPMessageStyle/AirmailCss/AMPMessageStyle.h",
"chars": 409,
"preview": "//\n// AirmailCss.h\n// AirmailCss\n//\n// Created by Joe on 12/11/13.\n// Copyright (c) 2013 Bloop. All rights reserved"
},
{
"path": "AMPMessageStyle/AirmailCss/AMPMessageStyle.m",
"chars": 3242,
"preview": "//\n// AirmailCss.m\n// AirmailCss\n//\n// Created by Joe on 12/11/13.\n// Copyright (c) 2013 Bloop. All rights reserved"
},
{
"path": "AMPMessageStyle/AirmailCss/AMPMessageStyleView.h",
"chars": 281,
"preview": "//\n// CssView.h\n// AirmailCss\n//\n// Created by Joe on 12/11/13.\n// Copyright (c) 2013 Bloop. All rights reserved.\n/"
},
{
"path": "AMPMessageStyle/AirmailCss/AMPMessageStyleView.m",
"chars": 3289,
"preview": "//\n// CssView.m\n// AirmailCss\n//\n// Created by Joe on 12/11/13.\n// Copyright (c) 2013 Bloop. All rights reserved.\n/"
},
{
"path": "AMPMessageStyle/AirmailCss/AirmailCss.h",
"chars": 299,
"preview": "//\n// AirmailCss.h\n// AirmailCss\n//\n// Created by Joe on 12/11/13.\n// Copyright (c) 2013 Bloop. All rights reserved"
},
{
"path": "AMPMessageStyle/AirmailCss/AirmailCss.m",
"chars": 1510,
"preview": "//\n// AirmailCss.m\n// AirmailCss\n//\n// Created by Joe on 12/11/13.\n// Copyright (c) 2013 Bloop. All rights reserved"
},
{
"path": "AMPMessageStyle/AirmailCss/Taxi.css",
"chars": 363,
"preview": "*,tr,td,table,html,th,hr,body,tbody,div {\n\n font-size: 18px !important;\n font-family:\"avenir next\" !important;\n "
},
{
"path": "AMPMessageStyle/AirmailCss/Yellow.css",
"chars": 1287,
"preview": "/* http://meyerweb.com/eric/tools/css/reset/ \n v2.0 | 20110126\n License: none (public domain)\n*/\n\nhtml, body, div, s"
},
{
"path": "AMPMessageStyle/AirmailCss/base1.css",
"chars": 57,
"preview": "* {\n font-size: 25px;\n font-family:\"helvetica\";\n}\n\n"
},
{
"path": "AMPMessageStyle/AirmailCss/base2.css",
"chars": 57,
"preview": "* {\n font-size: 11px;\n font-family:\"helvetica\";\n}\n\n"
},
{
"path": "AMPMessageStyle/AirmailCss/base3.css",
"chars": 57,
"preview": "* {\n font-size: 35px;\n font-family:\"helvetica\";\n}\n\n"
},
{
"path": "AMPMessageStyle/AirmailCss/base4.css",
"chars": 57,
"preview": "* {\n font-size: 49px;\n font-family:\"helvetica\";\n}\n\n"
},
{
"path": "AMPMessageStyle/AirmailCss/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "AMPMessageStyle/AirmailCss/es-419.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "AMPNotify/AMPSimpleNotifier.xcodeproj/project.pbxproj",
"chars": 16938,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "AMPNotify/AMPSimpleNotifier.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 162,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:AMPSimpleNotifi"
},
{
"path": "AMPNotify/Notify/AMPNotifyWindow.h",
"chars": 268,
"preview": "//\n// AMPNotifyWindow.h\n// Notify\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Boop. All rights reserved"
},
{
"path": "AMPNotify/Notify/AMPNotifyWindow.m",
"chars": 1285,
"preview": "//\n// AMPNotifyWindow.m\n// Notify\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Boop. All rights reserved"
},
{
"path": "AMPNotify/Notify/AMPNotifyWindowController.h",
"chars": 399,
"preview": "//\n// AMPNotifyWindowController.h\n// Notify\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Boop. All right"
},
{
"path": "AMPNotify/Notify/AMPNotifyWindowController.m",
"chars": 1228,
"preview": "//\n// AMPNotifyWindowController.m\n// Notify\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Boop. All right"
},
{
"path": "AMPNotify/Notify/AMPNotifyWindowView.h",
"chars": 418,
"preview": "//\n// AMPNotifyWindowView.h\n// Notify\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Boop. All rights rese"
},
{
"path": "AMPNotify/Notify/AMPNotifyWindowView.m",
"chars": 6786,
"preview": "//\n// AMPNotifyWindowView.m\n// Notify\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Boop. All rights rese"
},
{
"path": "AMPNotify/Notify/AMPSimpleNotifier-Info.plist",
"chars": 979,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "AMPNotify/Notify/AMPSimpleNotifier-Prefix.pch",
"chars": 172,
"preview": "//\n// Prefix header\n//\n// The contents of this file are implicitly included at the beginning of every source file.\n//\n"
},
{
"path": "AMPNotify/Notify/AMPSimpleNotifier.h",
"chars": 452,
"preview": "//\n// AMPNotify.h\n// Notify\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Boop. All rights reserved.\n//\n\n"
},
{
"path": "AMPNotify/Notify/AMPSimpleNotifier.m",
"chars": 5106,
"preview": "//\n// AMPNotify.m\n// Notify\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Boop. All rights reserved.\n//\n\n"
},
{
"path": "AMPNotify/Notify/AMPSimpleNotifierView.h",
"chars": 254,
"preview": "//\n// AMPNotifyView.h\n// Notify\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Boop. All rights reserved.\n"
},
{
"path": "AMPNotify/Notify/AMPSimpleNotifierView.m",
"chars": 2159,
"preview": "//\n// AMPNotifyView.m\n// Notify\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Boop. All rights reserved.\n"
},
{
"path": "AMPNotify/Notify/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "AMPNotify/Notify/es-419.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "AMPTranslate/AMPTranslate-Info.plist",
"chars": 975,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "AMPTranslate/AMPTranslate-Prefix.pch",
"chars": 172,
"preview": "//\n// Prefix header\n//\n// The contents of this file are implicitly included at the beginning of every source file.\n//\n"
},
{
"path": "AMPTranslate/AMPTranslate.h",
"chars": 309,
"preview": "//\n// AMPTranslate.h\n// AMPTranslate\n//\n// Created by Joe on 19/11/13.\n// Copyright (c) 2013 Bloop. All rights reser"
},
{
"path": "AMPTranslate/AMPTranslate.m",
"chars": 7106,
"preview": "//\n// AMPTranslate.m\n// AMPTranslate\n//\n// Created by Joe on 19/11/13.\n// Copyright (c) 2013 Bloop. All rights reser"
},
{
"path": "AMPTranslate/AMPTranslateView.h",
"chars": 264,
"preview": "//\n// AMPTranslateView.h\n// AMPTranslate\n//\n// Created by Joe on 19/11/13.\n// Copyright (c) 2013 Bloop. All rights r"
},
{
"path": "AMPTranslate/AMPTranslateView.m",
"chars": 2180,
"preview": "//\n// AMPTranslateView.m\n// AMPTranslate\n//\n// Created by Joe on 19/11/13.\n// Copyright (c) 2013 Bloop. All rights r"
},
{
"path": "AMPTranslate/GTMDefines.h",
"chars": 14243,
"preview": "//\n// GTMDefines.h\n//\n// Copyright 2008 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License"
},
{
"path": "AMPTranslate/GTMNSString+HTML.h",
"chars": 2289,
"preview": "//\n// GTMNSString+HTML.h\n// Dealing with NSStrings that contain HTML\n//\n// Copyright 2006-2008 Google Inc.\n//\n// Lic"
},
{
"path": "AMPTranslate/GTMNSString+HTML.m",
"chars": 14917,
"preview": "//\n// GTMNSString+HTML.m\n// Dealing with NSStrings that contain HTML\n//\n// Copyright 2006-2008 Google Inc.\n//\n// Lic"
},
{
"path": "AMPTranslate/NSString+HTML.h",
"chars": 2912,
"preview": "//\n// NSString+HTML.h\n// MWFeedParser\n//\n// Copyright (c) 2010 Michael Waterfall\n// \n// Permission is hereby grante"
},
{
"path": "AMPTranslate/NSString+HTML.m",
"chars": 11086,
"preview": "//\n// NSString+HTML.m\n// MWFeedParser\n//\n// Copyright (c) 2010 Michael Waterfall\n// \n// Permission is hereby grante"
},
{
"path": "AMPTranslate/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPAccount.h",
"chars": 3140,
"preview": "//\n// AMPAccount.h\n// AirMail\n//\n// Created by Joe on 11/11/13.\n// Copyright (c) 2013 Joe. All rights reserved.\n//\n"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPAddress.h",
"chars": 405,
"preview": "//\n// AMPAddress.h\n// AirMail\n//\n// Created by Joe on 11/11/13.\n// Copyright (c) 2013 Joe. All rights reserved.\n//\n"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPAlias.h",
"chars": 1223,
"preview": "//\n// AMPAlias.h\n// AMPluginFramework\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Bloop. All rights rese"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPAttachment.h",
"chars": 333,
"preview": "//\n// AMPAttachment.h\n// AirMail\n//\n// Created by Joe on 11/11/13.\n// Copyright (c) 2013 Joe. All rights reserved.\n"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPCallBack.h",
"chars": 2672,
"preview": "//\n// AMPCallBack.h\n// AMPluginFramework\n//\n// Created by Joe on 18/11/13.\n// Copyright (c) 2013 Bloop. All rights "
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPComposerInfo.h",
"chars": 1078,
"preview": "//\n// AMPComposerInfo.h\n// AMPluginFramework\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Bloop. All rig"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPFolder.h",
"chars": 2970,
"preview": "//\n// AMPFolder.h\n// AMPluginFramework\n//\n// Created by Joe on 18/11/13.\n// Copyright (c) 2013 Bloop. All rights re"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPGroup.h",
"chars": 424,
"preview": "//\n// AMPGroup.h\n// AirMail\n//\n// Created by Joe on 11/11/13.\n// Copyright (c) 2013 Joe. All rights reserved.\n//\n\n#"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMCOAbstractMessage.h",
"chars": 1226,
"preview": "//\n// AMPAbstractMessage.h\n// AMPluginFramework\n//\n// Created by Giovanni Simonicca on 12/04/14.\n// Copyright (c) 20"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMCOAbstractMessagePart.h",
"chars": 518,
"preview": "//\n// AMPMCOAbstractMessagePart.h\n// AMPluginFramework\n//\n// Created by Gio on 13/04/14.\n// Copyright (c) 2014 Bloop"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMCOAbstractMultipart.h",
"chars": 328,
"preview": "//\n// AMPMCOAbstractMultipart.h\n// AMPluginFramework\n//\n// Created by Gio on 13/04/14.\n// Copyright (c) 2014 Bloop. "
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMCOAbstractPart.h",
"chars": 2903,
"preview": "//\n// AMPAbstractPart.h\n// AMPluginFramework\n//\n// Created by Giovanni Simonicca on 12/04/14.\n// Copyright (c) 2014 "
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMCOAddress.h",
"chars": 2052,
"preview": "//\n// AMPMCOAddress.h\n// AMPluginFramework\n//\n// Created by Giovanni Simonicca on 12/04/14.\n// Copyright (c) 2014 Bl"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMCOAttachment.h",
"chars": 1292,
"preview": "//\n// AMPMCOAttachment.h\n// AMPluginFramework\n//\n// Created by Giovanni Simonicca on 12/04/14.\n// Copyright (c) 2014"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMCOMessageBuilder.h",
"chars": 1345,
"preview": "//\n// AMPMCOMessageBuilder.h\n// AMPluginFramework\n//\n// Created by Giovanni Simonicca on 12/04/14.\n// Copyright (c) "
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMCOMessageHeader.h",
"chars": 2450,
"preview": "//\n// AMPMessageHeader.h\n// AMPluginFramework\n//\n// Created by Giovanni Simonicca on 12/04/14.\n// Copyright (c) 2014"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMCOMessageParser.h",
"chars": 1113,
"preview": "//\n// AMPMessageParser.h\n// AMPluginFramework\n//\n// Created by Giovanni Simonicca on 12/04/14.\n// Copyright (c) 2014"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMCOMessagePart.h",
"chars": 241,
"preview": "//\n// AMPMCOMessagePart.h\n// AMPluginFramework\n//\n// Created by Gio on 13/04/14.\n// Copyright (c) 2014 Bloop. All ri"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMCOMultiPart.h",
"chars": 256,
"preview": "//\n// AMPMCOMultiPart.h\n// AMPluginFramework\n//\n// Created by Gio on 13/04/14.\n// Copyright (c) 2014 Bloop. All righ"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMenuAction.h",
"chars": 449,
"preview": "//\n// AMPMenuAction.h\n// AMPluginFramework\n//\n// Created by Joe on 18/11/13.\n// Copyright (c) 2013 Bloop. All right"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPMessage.h",
"chars": 3171,
"preview": "//\n// AMPMessage.h\n// AirMail\n//\n// Created by Joe on 11/11/13.\n// Copyright (c) 2013 Joe. All rights reserved.\n//\n"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPObject.h",
"chars": 711,
"preview": "//\n// AMPObject.h\n// AMPluginFramework\n//\n// Created by Joe on 19/11/13.\n// Copyright (c) 2013 Bloop. All rights res"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPProvider.h",
"chars": 2392,
"preview": "//\n// AMPProvider.h\n// AMPluginFramework\n//\n// Created by Joe on 16/11/13.\n// Copyright (c) 2013 Bloop. All rights r"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPSendResult.h",
"chars": 512,
"preview": "//\n// AMPSendResult.h\n// AMPluginFramework\n//\n// Created by Giovanni Simonicca on 18/04/14.\n// Copyright (c) 2014 Bl"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPSignature.h",
"chars": 972,
"preview": "//\n// AMPSignature.h\n// AMPluginFramework\n//\n// Created by Joe on 17/11/13.\n// Copyright (c) 2013 Bloop. All rights "
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPSignatureVerify.h",
"chars": 451,
"preview": "//\n// AMPSignatureVerify.h\n// AMPluginFramework\n//\n// Created by Giovanni Simonicca on 17/04/14.\n// Copyright (c) 20"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPUidFlag.h",
"chars": 378,
"preview": "//\n// AMPUidFlag.h\n// AMPluginFramework\n//\n// Created by Joe on 19/11/13.\n// Copyright (c) 2013 Bloop. All rights re"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPView.h",
"chars": 480,
"preview": "//\n// PluginView.h\n// AirmailCss\n//\n// Created by Joe on 12/11/13.\n// Copyright (c) 2013 Bloop. All rights reserved"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPlugin.h",
"chars": 7385,
"preview": "//\n// AMPlugin.h\n// AirMail\n//\n// Created by Joe on 11/11/13.\n// Copyright (c) 2013 Joe. All rights reserved.\n//\n\n#"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/AMPluginFramework.h",
"chars": 3878,
"preview": "//\n// AMPluginFramework.h\n// AMPluginFramework\n//\n// Created by Joe on 12/11/13.\n// Copyright (c) 2013 Bloop. All r"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/NSData+AMPBase64.h",
"chars": 689,
"preview": "//\n// NSData+AMPBase64.h\n// AMPluginFramework\n//\n// Created by Giovanni Simonicca on 17/04/14.\n// Copyright (c) 2014"
},
{
"path": "AMPluginFramework.framework/Versions/A/Headers/NSScanner+Utility.h",
"chars": 607,
"preview": "//\n// NSScanner+SmimeUtility.h\n// AMPSmime\n//\n// Created by Gio on 15/04/14.\n// Copyright (c) 2014 Bloop. All rights"
},
{
"path": "AMPluginFramework.framework/Versions/A/Resources/Info.plist",
"chars": 1346,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "LICENSE",
"chars": 18025,
"preview": "GNU GENERAL PUBLIC LICENSE\n Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundati"
},
{
"path": "README.md",
"chars": 2113,
"preview": "\nAirmail Plugin Framework (AMPF) 1.0\n============================\nThe AMPF provides the API nece"
}
]
// ... and 14 more files (download for full content)
About this extraction
This page contains the full source code of the Airmail/AirmailPlugIn-Framework GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 145 files (347.7 KB), approximately 103.7k tokens, and a symbol index with 52 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.