Kill debug code.
This commit is contained in:
parent
f1fc07cf9e
commit
9b8ff7ad0c
@ -172,21 +172,13 @@ PearlAssociatedObjectProperty( NSMutableArray*, ProductObservers, productObserve
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)requestDidFinish:(SKRequest *)request {
|
|
||||||
|
|
||||||
dbg( @"StoreKit request (%@) finished.", request );
|
|
||||||
}
|
|
||||||
|
|
||||||
#pragma mark - SKPaymentTransactionObserver
|
#pragma mark - SKPaymentTransactionObserver
|
||||||
|
|
||||||
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions {
|
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions {
|
||||||
|
|
||||||
for (SKPaymentTransaction *transaction in transactions) {
|
for (SKPaymentTransaction *transaction in transactions) {
|
||||||
dbg( @"transaction updated: %@ -> %d", transaction.payment.productIdentifier, (int)(transaction.transactionState) );
|
|
||||||
|
|
||||||
switch (transaction.transactionState) {
|
switch (transaction.transactionState) {
|
||||||
case SKPaymentTransactionStatePurchased: {
|
case SKPaymentTransactionStatePurchased: {
|
||||||
inf( @"Purchased: %@", transaction.payment.productIdentifier );
|
|
||||||
NSMutableDictionary *attributes = [NSMutableDictionary new];
|
NSMutableDictionary *attributes = [NSMutableDictionary new];
|
||||||
|
|
||||||
if ([transaction.payment.productIdentifier isEqualToString:MPProductFuel]) {
|
if ([transaction.payment.productIdentifier isEqualToString:MPProductFuel]) {
|
||||||
@ -220,7 +212,6 @@ PearlAssociatedObjectProperty( NSMutableArray*, ProductObservers, productObserve
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SKPaymentTransactionStateRestored: {
|
case SKPaymentTransactionStateRestored: {
|
||||||
inf( @"Restored: %@", transaction.payment.productIdentifier );
|
|
||||||
[[NSUserDefaults standardUserDefaults] setObject:transaction.transactionIdentifier
|
[[NSUserDefaults standardUserDefaults] setObject:transaction.transactionIdentifier
|
||||||
forKey:transaction.payment.productIdentifier];
|
forKey:transaction.payment.productIdentifier];
|
||||||
[queue finishTransaction:transaction];
|
[queue finishTransaction:transaction];
|
||||||
|
@ -643,7 +643,6 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
|||||||
user.avatar = importUser->avatar;
|
user.avatar = importUser->avatar;
|
||||||
user.defaultType = importUser->defaultType;
|
user.defaultType = importUser->defaultType;
|
||||||
user.lastUsed = [NSDate dateWithTimeIntervalSince1970:MAX( user.lastUsed.timeIntervalSince1970, importUser->lastUsed )];
|
user.lastUsed = [NSDate dateWithTimeIntervalSince1970:MAX( user.lastUsed.timeIntervalSince1970, importUser->lastUsed )];
|
||||||
dbg( @"Importing user: %@", [user debugDescription] );
|
|
||||||
|
|
||||||
// Update or create sites.
|
// Update or create sites.
|
||||||
for (size_t s = 0; s < importUser->sites_count; ++s) {
|
for (size_t s = 0; s < importUser->sites_count; ++s) {
|
||||||
@ -657,10 +656,8 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
|||||||
return MPError( error, @"Lookup of existing sites failed for site: %@, user: %@", @(importSite->siteName), user.userID );
|
return MPError( error, @"Lookup of existing sites failed for site: %@, user: %@", @(importSite->siteName), user.userID );
|
||||||
if ([existingSites count])
|
if ([existingSites count])
|
||||||
// Update existing site.
|
// Update existing site.
|
||||||
for (MPSiteEntity *site in existingSites) {
|
for (MPSiteEntity *site in existingSites)
|
||||||
[self importSite:importSite protectedByKey:importKey intoSite:site usingKey:userKey];
|
[self importSite:importSite protectedByKey:importKey intoSite:site usingKey:userKey];
|
||||||
dbg( @"Updated site: %@", [site debugDescription] );
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
// Create new site.
|
// Create new site.
|
||||||
id<MPAlgorithm> algorithm = MPAlgorithmForVersion( importSite->algorithm );
|
id<MPAlgorithm> algorithm = MPAlgorithmForVersion( importSite->algorithm );
|
||||||
@ -673,7 +670,6 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
|||||||
site.user = user;
|
site.user = user;
|
||||||
|
|
||||||
[self importSite:importSite protectedByKey:importKey intoSite:site usingKey:userKey];
|
[self importSite:importSite protectedByKey:importKey intoSite:site usingKey:userKey];
|
||||||
dbg( @"Created site: %@", [site debugDescription] );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,6 +82,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
|||||||
@"environment" : @"Private",
|
@"environment" : @"Private",
|
||||||
#endif
|
#endif
|
||||||
@"enabled" : [MPMacConfig get].sendInfo,
|
@"enabled" : [MPMacConfig get].sendInfo,
|
||||||
|
@"enableAutoSessionTracking": @(YES),
|
||||||
}];
|
}];
|
||||||
[[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) {
|
[[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) {
|
||||||
PearlLogLevel level = PearlLogLevelWarn;
|
PearlLogLevel level = PearlLogLevelWarn;
|
||||||
|
@ -102,8 +102,6 @@
|
|||||||
#pragma mark - Actions
|
#pragma mark - Actions
|
||||||
|
|
||||||
- (IBAction)unwindToCombined:(UIStoryboardSegue *)sender {
|
- (IBAction)unwindToCombined:(UIStoryboardSegue *)sender {
|
||||||
|
|
||||||
dbg( @"unwindToCombined:%@", sender );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - State
|
#pragma mark - State
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
|
|
||||||
@property(nonatomic, strong) UIDocumentInteractionController *interactionController;
|
@property(nonatomic, strong) UIDocumentInteractionController *interactionController;
|
||||||
@property(nonatomic, strong) PearlHangDetector *hangDetector;
|
@property(nonatomic, strong) PearlHangDetector *hangDetector;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation MPiOSAppDelegate
|
@implementation MPiOSAppDelegate
|
||||||
@ -57,6 +56,7 @@
|
|||||||
@"environment" : @"Private",
|
@"environment" : @"Private",
|
||||||
#endif
|
#endif
|
||||||
@"enabled" : [MPiOSConfig get].sendInfo,
|
@"enabled" : [MPiOSConfig get].sendInfo,
|
||||||
|
@"enableAutoSessionTracking": @(YES),
|
||||||
}];
|
}];
|
||||||
[[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) {
|
[[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) {
|
||||||
PearlLogLevel level = PearlLogLevelWarn;
|
PearlLogLevel level = PearlLogLevelWarn;
|
||||||
@ -387,44 +387,6 @@
|
|||||||
|
|
||||||
[self.hangDetector stop];
|
[self.hangDetector stop];
|
||||||
|
|
||||||
// self.task = [application beginBackgroundTaskWithExpirationHandler:^{
|
|
||||||
// [application endBackgroundTask:self.task];
|
|
||||||
// dbg( @"background expiring" );
|
|
||||||
// }];
|
|
||||||
// PearlNotMainQueueOperation( ^{
|
|
||||||
// NSString *pbstring = [UIPasteboard generalPasteboard].string;
|
|
||||||
// while (YES) {
|
|
||||||
// NSString *newString = [UIPasteboard generalPasteboard].string;
|
|
||||||
// if (![newString isEqualToString:pbstring]) {
|
|
||||||
// dbg( @"pasteboard changed to: %@", newString );
|
|
||||||
// pbstring = newString;
|
|
||||||
// NSURL *url = [NSURL URLWithString:pbstring];
|
|
||||||
// if (url) {
|
|
||||||
// NSString *siteName = [url host];
|
|
||||||
// }
|
|
||||||
// MPKey *key = [MPiOSAppDelegate get].key;
|
|
||||||
// if (key)
|
|
||||||
// [MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
|
||||||
// NSFetchRequest<MPSiteEntity *>
|
|
||||||
// *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:NSStringFromClass( [MPSiteEntity class] )];
|
|
||||||
// fetchRequest.sortDescriptors = @[
|
|
||||||
// [[NSSortDescriptor alloc] initWithKey:NSStringFromSelector( @selector( lastUsed ) ) ascending:NO]
|
|
||||||
// ];
|
|
||||||
// fetchRequest.fetchBatchSize = 2;
|
|
||||||
// fetchRequest.predicate = [NSPredicate predicateWithFormat:@"(name LIKE[cd] %@) AND user == %@", siteName,
|
|
||||||
// [[MPiOSAppDelegate get] activeUserOID]];
|
|
||||||
// NSError *error = nil;
|
|
||||||
// NSArray<MPSiteEntity *> *results = [fetchRequest execute:&error];
|
|
||||||
// dbg( @"site search, error: %@, results:\n%@", error, results );
|
|
||||||
// if ([results count]) {
|
|
||||||
// [UIPasteboard generalPasteboard].string = [[results firstObject] resolvePasswordUsingKey:key];
|
|
||||||
// }
|
|
||||||
// }];
|
|
||||||
// }
|
|
||||||
// [NSThread sleepForTimeInterval:5];
|
|
||||||
// }
|
|
||||||
// } );
|
|
||||||
|
|
||||||
[super applicationDidEnterBackground:application];
|
[super applicationDidEnterBackground:application];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user