This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// tl;dr: FileManager.default.url(for:in:appropriateFor:create:) has unexpected behavior in Simulator and creates temporary folders outside the tmp/ directory. | |
let tmpDirClassic = NSTemporaryDirectory() | |
print("tmpDirClassic: \(tmpDirClassic)") | |
// This is the same code, just syntax sugar for NSTemporaryDirectory() | |
// https://github.com/apple/swift-corelibs-foundation/blob/master/Foundation/FileManager.swift#L1420-L1422 | |
let tmpDirClassicNewShim = FileManager.default.temporaryDirectory | |
print("tmpDirClassicNewShim: \(tmpDirClassicNewShim)") | |
// Simulator: /Users/steipete/Library/Developer/CoreSimulator/Devices/31C05637-B9C9-482C-A6CE-D063A7CECF64/data/Containers/Data/Application/A68D11A4-88BA-4FCF-A8B1-D102945D0740/tmp/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@class NSString, UHASToolbarItem; | |
__attribute__((weak_import)) @interface _UIWindowToolbarItem : NSObject | |
@property(readonly, copy, nonatomic) NSString *label; | |
@property(readonly, copy, nonatomic) NSString *identifier; | |
- (id)initWithIdentifier:(id)arg1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void PSPDFFixiOS12AccessibilityTestCrash(void) { | |
let accessibilityLoaderClass = NSClassFromString(@"UIAccessibilityInformationLoader"); | |
let accessibilitySEL = NSSelectorFromString(@"_loadAccessibilityInformationOnMainThread:"); | |
__block IMP originalIMP = pspdf_swizzleSelectorWithBlock(accessibilityLoaderClass, accessibilitySEL, ^(id _self, BOOL onMainThread) { | |
@try { | |
((void (*)(id, SEL, BOOL))originalIMP)(_self, accessibilitySEL, onMainThread); | |
} @catch (NSException *exception) { | |
NSLog(@"Exception received: %@", exception); | |
if ([exception.name isEqualToString:NSInvalidArgumentException] && [exception.reason containsString:@"_accessibilityLoadAccessibilityInformation"]) { | |
NSLog(@"Ignoring IOS 12b5 weirdness..."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Works | |
__auto_type queue = dispatch_queue_create("com.pspdfkit.test", DISPATCH_QUEUE_SERIAL); | |
dispatch_set_target_queue(queue, dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)); | |
// Crashes with EXC_BAD_INSTRUCTION | |
// I guess this fails because the global queues already have an autorelease pool? | |
__auto_type queue2 = dispatch_queue_create("com.pspdfkit.test", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); | |
dispatch_set_target_queue(queue2, dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Process: Tweetbot [58303] | |
Path: /Applications/Tweetbot.app/Contents/MacOS/Tweetbot | |
Identifier: com.tapbots.TweetbotMac | |
Version: 2.5.4 (25400) | |
App Item ID: 557168941 | |
App External ID: 824334033 | |
Code Type: X86-64 (Native) | |
Parent Process: ??? [1] | |
Responsible: Tweetbot [58303] | |
User ID: 501 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)testDispatchConcurrentExecutionWithNamedQueuesRaw { | |
let expectation = [self expectationWithDescription:@"Concurrent execution must happen"]; | |
let semaphore = dispatch_semaphore_create(0); | |
// global queue, concurrent | |
let attributes = dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_CONCURRENT, QOS_CLASS_DEFAULT, 0); | |
let defaultQueue = dispatch_queue_create("com.pspdfkit.default-concurrent", attributes); | |
// serial sub-queues that dispatch to concurrent queue | |
let queue1 = dispatch_queue_create("com.pspdfkit.queue1", DISPATCH_QUEUE_SERIAL); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class Methods: | |
+ (Class) safeCategoryBaseClass; (0x12c470134) | |
+ (BOOL) _old_unswizzled_automaticallyNotifiesObserversForKey:(id)arg1; (0x1150df5a0) | |
+ (id) _old_unswizzled_keyPathsForValuesAffectingValueForKey:(id)arg1; (0x1150df620) | |
+ (id) requiredStoreLibraryPersonalizationProperties; (0x118daaeff) | |
+ (void) mf_clearLocks; (0x11a41d09e) | |
+ (void) _accessibilityCalDetailStringForEvent:(id)arg1 inLine1:(id*)arg2 inLine2:(id*)arg3 inLine3:(id*)arg4 inLine4:(id*)arg5; (0x127db7c6e) | |
+ (void) _accessibilityCalGetHourDesignatorsForAM:(id*)arg1 andPM:(id*)arg2; (0x127d1e7bb) | |
+ (BOOL) _accessibilityCalSpaceBetweenDesignatorsAndHour; (0x127d1e7cb) | |
+ (BOOL) _accessibilityCalHourDesignatorsAreBeforeHour; (0x127d1e7ec) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Process: PSPDFFoundation-TestHost-iOS [95495] | |
Path: /Users/USER/Library/Developer/CoreSimulator/Devices/1694A397-7C29-4470-A3A0-9A3E350DB19E/data/Containers/Bundle/Application/3A6309AC-3045-4D7C-9E83-006339C933C6/PSPDFFoundation-TestHost-iOS.app/PSPDFFoundation-TestHost-iOS | |
Identifier: PSPDFFoundation-TestHost-iOS | |
Version: 1.0 (1) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd_sim [93146] | |
Responsible: PSPDFFoundation-TestHost-iOS [95495] | |
User ID: 502 | |
Date/Time: 2017-10-30 15:37:04.800 -0400 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Process: PSPDFFoundation-TestHost-iOS [15960] | |
Path: /Users/USER/Library/Developer/CoreSimulator/Devices/0AE503AA-1EFF-4FC4-A1B3-D64B83DD1059/data/Containers/Bundle/Application/774DC2FD-74EF-4F79-B700-EEB70410267F/PSPDFFoundation-TestHost-iOS.app/PSPDFFoundation-TestHost-iOS | |
Identifier: PSPDFFoundation-TestHost-iOS | |
Version: 1.0 (1) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd_sim [10769] | |
Responsible: PSPDFFoundation-TestHost-iOS [15960] | |
User ID: 502 | |
Date/Time: 2017-10-20 00:02:36.697 -0700 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Process: Xcode [4032] | |
Path: /Applications/Xcode-beta.app/Contents/MacOS/Xcode | |
Identifier: Xcode | |
Version: 9.0 (13238.4) | |
Code Type: X86-64 (Native) | |
Parent Process: ??? [1] | |
Responsible: Xcode [4032] | |
User ID: 501 | |
Date/Time: 2017-08-28 10:28:44.078 +0200 |