Kill debug code.
This commit is contained in:
parent
f1fc07cf9e
commit
9b8ff7ad0c
@ -172,21 +172,13 @@ PearlAssociatedObjectProperty( NSMutableArray*, ProductObservers, productObserve
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)requestDidFinish:(SKRequest *)request {
|
||||
|
||||
dbg( @"StoreKit request (%@) finished.", request );
|
||||
}
|
||||
|
||||
#pragma mark - SKPaymentTransactionObserver
|
||||
|
||||
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions {
|
||||
|
||||
for (SKPaymentTransaction *transaction in transactions) {
|
||||
dbg( @"transaction updated: %@ -> %d", transaction.payment.productIdentifier, (int)(transaction.transactionState) );
|
||||
|
||||
switch (transaction.transactionState) {
|
||||
case SKPaymentTransactionStatePurchased: {
|
||||
inf( @"Purchased: %@", transaction.payment.productIdentifier );
|
||||
NSMutableDictionary *attributes = [NSMutableDictionary new];
|
||||
|
||||
if ([transaction.payment.productIdentifier isEqualToString:MPProductFuel]) {
|
||||
@ -220,7 +212,6 @@ PearlAssociatedObjectProperty( NSMutableArray*, ProductObservers, productObserve
|
||||
break;
|
||||
}
|
||||
case SKPaymentTransactionStateRestored: {
|
||||
inf( @"Restored: %@", transaction.payment.productIdentifier );
|
||||
[[NSUserDefaults standardUserDefaults] setObject:transaction.transactionIdentifier
|
||||
forKey:transaction.payment.productIdentifier];
|
||||
[queue finishTransaction:transaction];
|
||||
|
@ -643,7 +643,6 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
||||
user.avatar = importUser->avatar;
|
||||
user.defaultType = importUser->defaultType;
|
||||
user.lastUsed = [NSDate dateWithTimeIntervalSince1970:MAX( user.lastUsed.timeIntervalSince1970, importUser->lastUsed )];
|
||||
dbg( @"Importing user: %@", [user debugDescription] );
|
||||
|
||||
// Update or create sites.
|
||||
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 );
|
||||
if ([existingSites count])
|
||||
// Update existing site.
|
||||
for (MPSiteEntity *site in existingSites) {
|
||||
for (MPSiteEntity *site in existingSites)
|
||||
[self importSite:importSite protectedByKey:importKey intoSite:site usingKey:userKey];
|
||||
dbg( @"Updated site: %@", [site debugDescription] );
|
||||
}
|
||||
else {
|
||||
// Create new site.
|
||||
id<MPAlgorithm> algorithm = MPAlgorithmForVersion( importSite->algorithm );
|
||||
@ -673,7 +670,6 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
||||
site.user = user;
|
||||
|
||||
[self importSite:importSite protectedByKey:importKey intoSite:site usingKey:userKey];
|
||||
dbg( @"Created site: %@", [site debugDescription] );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,18 +70,19 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
||||
@try {
|
||||
// Sentry
|
||||
[SentrySDK initWithOptions:@{
|
||||
@"dsn" : NilToNSNull( decrypt( sentryDSN ) ),
|
||||
@"dsn" : NilToNSNull( decrypt( sentryDSN ) ),
|
||||
#ifdef DEBUG
|
||||
@"debug" : @(YES),
|
||||
@"environment": @"Development",
|
||||
@"debug" : @(YES),
|
||||
@"environment" : @"Development",
|
||||
#elif PUBLIC
|
||||
@"debug" : @(NO),
|
||||
@"environment": @"Public",
|
||||
@"debug" : @(NO),
|
||||
@"environment" : @"Public",
|
||||
#else
|
||||
@"debug" : @(NO),
|
||||
@"environment": @"Private",
|
||||
@"debug" : @(NO),
|
||||
@"environment" : @"Private",
|
||||
#endif
|
||||
@"enabled" : [MPMacConfig get].sendInfo,
|
||||
@"enabled" : [MPMacConfig get].sendInfo,
|
||||
@"enableAutoSessionTracking": @(YES),
|
||||
}];
|
||||
[[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) {
|
||||
PearlLogLevel level = PearlLogLevelWarn;
|
||||
|
@ -102,8 +102,6 @@
|
||||
#pragma mark - Actions
|
||||
|
||||
- (IBAction)unwindToCombined:(UIStoryboardSegue *)sender {
|
||||
|
||||
dbg( @"unwindToCombined:%@", sender );
|
||||
}
|
||||
|
||||
#pragma mark - State
|
||||
|
@ -30,7 +30,6 @@
|
||||
|
||||
@property(nonatomic, strong) UIDocumentInteractionController *interactionController;
|
||||
@property(nonatomic, strong) PearlHangDetector *hangDetector;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MPiOSAppDelegate
|
||||
@ -45,18 +44,19 @@
|
||||
@try {
|
||||
// Sentry
|
||||
[SentrySDK initWithOptions:@{
|
||||
@"dsn" : NilToNSNull( decrypt( sentryDSN ) ),
|
||||
@"dsn" : NilToNSNull( decrypt( sentryDSN ) ),
|
||||
#ifdef DEBUG
|
||||
@"debug" : @(YES),
|
||||
@"environment": @"Development",
|
||||
@"debug" : @(YES),
|
||||
@"environment" : @"Development",
|
||||
#elif PUBLIC
|
||||
@"debug" : @(NO),
|
||||
@"environment": @"Public",
|
||||
@"debug" : @(NO),
|
||||
@"environment" : @"Public",
|
||||
#else
|
||||
@"debug" : @(NO),
|
||||
@"environment": @"Private",
|
||||
@"debug" : @(NO),
|
||||
@"environment" : @"Private",
|
||||
#endif
|
||||
@"enabled" : [MPiOSConfig get].sendInfo,
|
||||
@"enabled" : [MPiOSConfig get].sendInfo,
|
||||
@"enableAutoSessionTracking": @(YES),
|
||||
}];
|
||||
[[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) {
|
||||
PearlLogLevel level = PearlLogLevelWarn;
|
||||
@ -387,44 +387,6 @@
|
||||
|
||||
[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];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user