Antoine Cœur преди 7 години
родител
ревизия
17e194b69d
променени са 33 файла, в които са добавени 96 реда и са изтрити 94 реда
  1. 2 2
      Classes/Editing/ArgumentInputViews/FLEXArgumentInputColorView.m
  2. 1 1
      Classes/Editing/ArgumentInputViews/FLEXArgumentInputStringView.m
  3. 10 9
      Classes/ExplorerInterface/FLEXExplorerViewController.m
  4. 1 1
      Classes/ExplorerInterface/FLEXWindow.m
  5. 1 1
      Classes/FLEXManager.h
  6. 1 1
      Classes/GlobalStateExplorers/DatabaseBrowser/FLEXMultiColumnTableView.m
  7. 16 16
      Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableContentViewController.m
  8. 2 2
      Classes/GlobalStateExplorers/FLEXClassesTableViewController.m
  9. 2 2
      Classes/GlobalStateExplorers/FLEXLibrariesTableViewController.m
  10. 2 2
      Classes/GlobalStateExplorers/FLEXLiveObjectsTableViewController.m
  11. 6 6
      Classes/GlobalStateExplorers/FLEXWebViewController.m
  12. 2 2
      Classes/GlobalStateExplorers/SystemLog/FLEXASLLogController.m
  13. 1 1
      Classes/GlobalStateExplorers/SystemLog/FLEXOSLogController.m
  14. 2 2
      Classes/Network/FLEXNetworkHistoryTableViewController.m
  15. 1 1
      Classes/Network/FLEXNetworkRecorder.h
  16. 2 2
      Classes/Network/PonyDebugger/FLEXNetworkObserver.m
  17. 4 4
      Classes/ObjectExplorers/Controllers/FLEXObjectExplorerViewController.h
  18. 1 1
      Classes/ObjectExplorers/Views/FLEXTableViewCell.m
  19. 2 2
      Classes/Utility/APPLE_LICENSE
  20. 2 2
      Classes/Utility/FLEXHeapEnumerator.m
  21. 1 1
      Classes/Utility/FLEXObjcInternal.h
  22. 1 1
      Classes/Utility/FLEXObjcInternal.mm
  23. 1 1
      Classes/Utility/FLEXRuntimeUtility.h
  24. 7 7
      Classes/Utility/FLEXRuntimeUtility.m
  25. 2 1
      Classes/Utility/FLEXUtility.m
  26. 1 1
      Example/ReadMe.txt
  27. 1 1
      Example/UICatalog/AAPLCatalogTableTableViewController.m
  28. 3 3
      Example/UICatalog/AAPLSegmentedControlViewController.m
  29. 1 1
      Example/UICatalog/AAPLSplitViewControllerDelegate.m
  30. 1 1
      Example/UICatalog/AAPLTextViewController.m
  31. 1 1
      Example/UICatalog/AAPLWebViewController.m
  32. 1 1
      Example/UICatalog/en.lproj/Localizable.strings
  33. 14 14
      README.md

+ 2 - 2
Classes/Editing/ArgumentInputViews/FLEXArgumentInputColorView.m

@@ -221,8 +221,8 @@
     
     [self.hexLabel sizeToFit];
     const CGFloat kLabelVerticalOutsetAmount = 0.0;
-    const CGFloat kLabelHorizonalOutsetAmount = 2.0;
-    UIEdgeInsets labelOutset = UIEdgeInsetsMake(-kLabelVerticalOutsetAmount, -kLabelHorizonalOutsetAmount, -kLabelVerticalOutsetAmount, -kLabelHorizonalOutsetAmount);
+    const CGFloat kLabelHorizontalOutsetAmount = 2.0;
+    UIEdgeInsets labelOutset = UIEdgeInsetsMake(-kLabelVerticalOutsetAmount, -kLabelHorizontalOutsetAmount, -kLabelVerticalOutsetAmount, -kLabelHorizontalOutsetAmount);
     self.hexLabel.frame = UIEdgeInsetsInsetRect(self.hexLabel.frame, labelOutset);
     CGFloat hexLabelOriginX = self.colorPreviewBox.layer.borderWidth;
     CGFloat hexLabelOriginY = CGRectGetMaxY(self.colorPreviewBox.frame) - self.colorPreviewBox.layer.borderWidth - self.hexLabel.frame.size.height;

+ 1 - 1
Classes/Editing/ArgumentInputViews/FLEXArgumentInputStringView.m

@@ -27,7 +27,7 @@
 
 - (id)inputValue
 {
-    // Interpret empty string as nil. We loose the ablitiy to set empty string as a string value,
+    // Interpret empty string as nil. We loose the ability to set empty string as a string value,
     // but we accept that tradeoff in exchange for not having to type quotes for every string.
     return [self.inputTextView.text length] > 0 ? [self.inputTextView.text copy] : nil;
 }

+ 10 - 9
Classes/ExplorerInterface/FLEXExplorerViewController.m

@@ -44,7 +44,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
 @property (nonatomic, assign) CGRect toolbarFrameBeforeDragging;
 
 /// Borders of all the visible views in the hierarchy at the selection point.
-/// The keys are NSValues with the correponding view (nonretained).
+/// The keys are NSValues with the corresponding view (nonretained).
 @property (nonatomic, strong) NSDictionary<NSValue *, UIView *> *outlineViewsForVisibleViews;
 
 /// The actual views at the selection point with the deepest view last.
@@ -57,14 +57,14 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
 @property (nonatomic, strong) UIView *selectedViewOverlay;
 
 /// Tracked so we can restore the key window after dismissing a modal.
-/// We need to become key after modal presentation so we can correctly capture intput.
+/// We need to become key after modal presentation so we can correctly capture input.
 /// If we're just showing the toolbar, we want the main app's window to remain key so that we don't interfere with input, status bar, etc.
 @property (nonatomic, strong) UIWindow *previousKeyWindow;
 
 /// Similar to the previousKeyWindow property above, we need to track status bar styling if
 /// the app doesn't use view controller based status bar management. When we present a modal,
-/// we want to change the status bar style to UIStausBarStyleDefault. Before changing, we stash
-/// the current style. On dismissal, we return the staus bar to the style that the app was using previously.
+/// we want to change the status bar style to UIStatusBarStyleDefault. Before changing, we stash
+/// the current style. On dismissal, we return the status bar to the style that the app was using previously.
 @property (nonatomic, assign) UIStatusBarStyle previousStatusBarStyle;
 
 /// All views that we're KVOing. Used to help us clean up properly.
@@ -133,6 +133,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
 {
     UIWindow *window = self.previousKeyWindow ?: [[UIApplication sharedApplication] keyWindow];
     UIViewController *viewController = window.rootViewController;
+    // Obfuscating selector _viewControllerForSupportedInterfaceOrientations
     NSString *viewControllerSelectorString = [@[@"_vie", @"wContro", @"llerFor", @"Supported", @"Interface", @"Orientations"] componentsJoinedByString:@""];
     SEL viewControllerSelector = NSSelectorFromString(viewControllerSelectorString);
     if ([viewController respondsToSelector:viewControllerSelector]) {
@@ -447,12 +448,12 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
     switch (panGR.state) {
         case UIGestureRecognizerStateBegan:
             self.toolbarFrameBeforeDragging = self.explorerToolbar.frame;
-            [self updateToolbarPostionWithDragGesture:panGR];
+            [self updateToolbarPositionWithDragGesture:panGR];
             break;
             
         case UIGestureRecognizerStateChanged:
         case UIGestureRecognizerStateEnded:
-            [self updateToolbarPostionWithDragGesture:panGR];
+            [self updateToolbarPositionWithDragGesture:panGR];
             break;
             
         default:
@@ -460,7 +461,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
     }
 }
 
-- (void)updateToolbarPostionWithDragGesture:(UIPanGestureRecognizer *)panGR
+- (void)updateToolbarPositionWithDragGesture:(UIPanGestureRecognizer *)panGR
 {
     CGPoint translation = [panGR translationInView:self.view];
     CGRect newToolbarFrame = self.toolbarFrameBeforeDragging;
@@ -802,7 +803,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
     [[self statusWindow] setWindowLevel:self.view.window.windowLevel + 1.0];
     
     // If this app doesn't use view controller based status bar management and we're on iOS 7+,
-    // make sure the status bar style is UIStatusBarStyleDefault. We don't actully have to check
+    // make sure the status bar style is UIStatusBarStyleDefault. We don't actually have to check
     // for view controller based management because the global methods no-op if that is turned on.
     self.previousStatusBarStyle = [[UIApplication sharedApplication] statusBarStyle];
     [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
@@ -822,7 +823,7 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
     // We want it above FLEX while a modal is presented for scroll to top, but below FLEX otherwise for exploration.
     [[self statusWindow] setWindowLevel:UIWindowLevelStatusBar];
     
-    // Restore the stauts bar style if the app is using global status bar management.
+    // Restore the status bar style if the app is using global status bar management.
     [[UIApplication sharedApplication] setStatusBarStyle:self.previousStatusBarStyle];
     
     [self dismissViewControllerAnimated:animated completion:completion];

+ 1 - 1
Classes/ExplorerInterface/FLEXWindow.m

@@ -49,7 +49,7 @@
     // This adds a method (superclass override) at runtime which gives us the status bar behavior we want.
     // The FLEX window is intended to be an overlay that generally doesn't affect the app underneath.
     // Most of the time, we want the app's main window(s) to be in control of status bar behavior.
-    // Done at runtime with an obfuscated selector because it is private API. But you shoudn't ship this to the App Store anyways...
+    // Done at runtime with an obfuscated selector because it is private API. But you shouldn't ship this to the App Store anyways...
     NSString *canAffectSelectorString = [@[@"_can", @"Affect", @"Status", @"Bar", @"Appearance"] componentsJoinedByString:@""];
     SEL canAffectSelector = NSSelectorFromString(canAffectSelectorString);
     Method shouldAffectMethod = class_getInstanceMethod(self, @selector(shouldAffectStatusBarAppearance));

+ 1 - 1
Classes/FLEXManager.h

@@ -28,7 +28,7 @@ typedef UIViewController *(^FLEXCustomContentViewerFuture)(NSData *data);
 /// Full responses are kept temporarily in a size-limited cache and may be pruned under memory pressure.
 @property (nonatomic, assign, getter=isNetworkDebuggingEnabled) BOOL networkDebuggingEnabled;
 
-/// Defaults to 25 MB if never set. Values set here are presisted across launches of the app.
+/// Defaults to 25 MB if never set. Values set here are persisted across launches of the app.
 /// The response cache uses an NSCache, so it may purge prior to hitting the limit when the app is under memory pressure.
 @property (nonatomic, assign) NSUInteger networkResponseCacheByteLimit;
 

+ 1 - 1
Classes/GlobalStateExplorers/DatabaseBrowser/FLEXMultiColumnTableView.m

@@ -289,7 +289,7 @@ static const CGFloat kColumnMargin = 1;
 #pragma mark -
 #pragma mark DataSource Accessor
 
-- (NSInteger)numberOfrows
+- (NSInteger)numberOfRows
 {
     return [self.dataSource numberOfRowsInTableView:self];
 }

+ 16 - 16
Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableContentViewController.m

@@ -13,7 +13,7 @@
 
 @interface FLEXTableContentViewController ()<FLEXMultiColumnTableViewDataSource, FLEXMultiColumnTableViewDelegate>
 
-@property (nonatomic, strong) FLEXMultiColumnTableView *multiColumView;
+@property (nonatomic, strong) FLEXMultiColumnTableView *multiColumnView;
 
 @end
 
@@ -22,29 +22,29 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     self.edgesForExtendedLayout = UIRectEdgeNone;
-    [self.view addSubview:self.multiColumView];
+    [self.view addSubview:self.multiColumnView];
 }
 
 - (void)viewWillAppear:(BOOL)animated
 {
     [super viewWillAppear:animated];
-    [self.multiColumView reloadData];
+    [self.multiColumnView reloadData];
 }
 
 #pragma mark -
 
 #pragma mark init SubView
-- (FLEXMultiColumnTableView *)multiColumView {
-    if (!_multiColumView) {
-        _multiColumView = [[FLEXMultiColumnTableView alloc] initWithFrame:
+- (FLEXMultiColumnTableView *)multiColumnView {
+    if (!_multiColumnView) {
+        _multiColumnView = [[FLEXMultiColumnTableView alloc] initWithFrame:
                            CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
         
-        _multiColumView.autoresizingMask          = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin;
-        _multiColumView.backgroundColor           = [UIColor whiteColor];
-        _multiColumView.dataSource                = self;
-        _multiColumView.delegate                  = self;
+        _multiColumnView.autoresizingMask          = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin;
+        _multiColumnView.backgroundColor           = [UIColor whiteColor];
+        _multiColumnView.dataSource                = self;
+        _multiColumnView.delegate                  = self;
     }
-    return _multiColumView;
+    return _multiColumnView;
 }
 #pragma mark MultiColumnTableView DataSource
 
@@ -151,12 +151,12 @@
         return result;
     }];
     if (sortType == FLEXTableColumnHeaderSortTypeDesc) {
-        NSEnumerator *contentReverseEvumerator = [sortContentData reverseObjectEnumerator];
-        sortContentData = [NSArray arrayWithArray:[contentReverseEvumerator allObjects]];
+        NSEnumerator *contentReverseEnumerator = [sortContentData reverseObjectEnumerator];
+        sortContentData = [NSArray arrayWithArray:[contentReverseEnumerator allObjects]];
     }
     
     self.contentsArray = sortContentData;
-    [self.multiColumView reloadData];
+    [self.multiColumnView reloadData];
 }
 
 #pragma mark -
@@ -170,10 +170,10 @@
     [coordinator animateAlongsideTransition:^(id <UIViewControllerTransitionCoordinatorContext> context) {
         if (newCollection.verticalSizeClass == UIUserInterfaceSizeClassCompact) {
             
-            self->_multiColumView.frame = CGRectMake(0, 32, self.view.frame.size.width, self.view.frame.size.height - 32);
+            self->_multiColumnView.frame = CGRectMake(0, 32, self.view.frame.size.width, self.view.frame.size.height - 32);
         }
         else {
-            self->_multiColumView.frame = CGRectMake(0, 64, self.view.frame.size.width, self.view.frame.size.height - 64);
+            self->_multiColumnView.frame = CGRectMake(0, 64, self.view.frame.size.width, self.view.frame.size.height - 64);
         }
         [self.view setNeedsLayout];
     } completion:nil];

+ 2 - 2
Classes/GlobalStateExplorers/FLEXClassesTableViewController.m

@@ -78,8 +78,8 @@
 - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
 {
     if ([searchText length] > 0) {
-        NSPredicate *searchPreidcate = [NSPredicate predicateWithFormat:@"SELF CONTAINS[cd] %@", searchText];
-        self.filteredClassNames = [self.classNames filteredArrayUsingPredicate:searchPreidcate];
+        NSPredicate *searchPredicate = [NSPredicate predicateWithFormat:@"SELF CONTAINS[cd] %@", searchText];
+        self.filteredClassNames = [self.classNames filteredArrayUsingPredicate:searchPredicate];
     } else {
         self.filteredClassNames = self.classNames;
     }

+ 2 - 2
Classes/GlobalStateExplorers/FLEXLibrariesTableViewController.m

@@ -97,7 +97,7 @@
 - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
 {
     if ([searchText length] > 0) {
-        NSPredicate *searchPreidcate = [NSPredicate predicateWithBlock:^BOOL(NSString *evaluatedObject, NSDictionary<NSString *, id> *bindings) {
+        NSPredicate *searchPredicate = [NSPredicate predicateWithBlock:^BOOL(NSString *evaluatedObject, NSDictionary<NSString *, id> *bindings) {
             BOOL matches = NO;
             NSString *shortName = [self shortNameForImageName:evaluatedObject];
             if ([shortName rangeOfString:searchText options:NSCaseInsensitiveSearch].length > 0) {
@@ -105,7 +105,7 @@
             }
             return matches;
         }];
-        self.filteredImageNames = [self.imageNames filteredArrayUsingPredicate:searchPreidcate];
+        self.filteredImageNames = [self.imageNames filteredArrayUsingPredicate:searchPredicate];
     } else {
         self.filteredImageNames = self.imageNames;
     }

+ 2 - 2
Classes/GlobalStateExplorers/FLEXLiveObjectsTableViewController.m

@@ -157,8 +157,8 @@ static const NSInteger kFLEXLiveObjectsSortBySizeIndex = 2;
 - (void)updateTableDataForSearchFilter
 {
     if ([self.searchBar.text length] > 0) {
-        NSPredicate *searchPreidcate = [NSPredicate predicateWithFormat:@"SELF CONTAINS[cd] %@", self.searchBar.text];
-        self.filteredClassNames = [self.allClassNames filteredArrayUsingPredicate:searchPreidcate];
+        NSPredicate *searchPredicate = [NSPredicate predicateWithFormat:@"SELF CONTAINS[cd] %@", self.searchBar.text];
+        self.filteredClassNames = [self.allClassNames filteredArrayUsingPredicate:searchPredicate];
     } else {
         self.filteredClassNames = self.allClassNames;
     }

+ 6 - 6
Classes/GlobalStateExplorers/FLEXWebViewController.m

@@ -111,17 +111,17 @@
 
 + (NSSet<NSString *> *)webViewSupportedPathExtensions
 {
-    static NSSet<NSString *> *pathExtenstions = nil;
+    static NSSet<NSString *> *pathExtensions = nil;
     static dispatch_once_t onceToken;
     dispatch_once(&onceToken, ^{
         // Note that this is not exhaustive, but all these extensions should work well in the web view.
-        // See https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/CreatingContentforSafarioniPhone/CreatingContentforSafarioniPhone.html#//apple_ref/doc/uid/TP40006482-SW7
-        pathExtenstions = [NSSet<NSString *> setWithArray:@[@"jpg", @"jpeg", @"png", @"gif", @"pdf", @"svg", @"tiff", @"3gp", @"3gpp", @"3g2",
-                                                            @"3gp2", @"aiff", @"aif", @"aifc", @"cdda", @"amr", @"mp3", @"swa", @"mp4", @"mpeg",
-                                                            @"mpg", @"mp3", @"wav", @"bwf", @"m4a", @"m4b", @"m4p", @"mov", @"qt", @"mqv", @"m4v"]];
+        // See https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/CreatingContentforSafarioniPhone/CreatingContentforSafarioniPhone.html#//apple_ref/doc/uid/TP40006482-SW7
+        pathExtensions = [NSSet<NSString *> setWithArray:@[@"jpg", @"jpeg", @"png", @"gif", @"pdf", @"svg", @"tiff", @"3gp", @"3gpp", @"3g2",
+                                                           @"3gp2", @"aiff", @"aif", @"aifc", @"cdda", @"amr", @"mp3", @"swa", @"mp4", @"mpeg",
+                                                           @"mpg", @"mp3", @"wav", @"bwf", @"m4a", @"m4b", @"m4p", @"mov", @"qt", @"mqv", @"m4v"]];
         
     });
-    return pathExtenstions;
+    return pathExtensions;
 }
 
 @end

+ 2 - 2
Classes/GlobalStateExplorers/SystemLog/FLEXASLLogController.m

@@ -9,7 +9,7 @@
 #import "FLEXASLLogController.h"
 #import <asl.h>
 
-// Querrying the ASL is much slower in the simulator. We need a longer polling interval to keep things repsonsive.
+// Querying the ASL is much slower in the simulator. We need a longer polling interval to keep things responsive.
 #if TARGET_IPHONE_SIMULATOR
     #define updateInterval 5.0
 #else
@@ -129,7 +129,7 @@
     // Filter for messages from the current process.
     // Note that this appears to happen by default on device, but is required in the simulator.
     asl_set_query(query, ASL_KEY_PID, pidString.UTF8String, ASL_QUERY_OP_EQUAL);
-    // Filter for messages after the last retreived message.
+    // Filter for messages after the last retrieved message.
     if (self.lastTimestamp) {
         asl_set_query(query, ASL_KEY_TIME, self.lastTimestamp.UTF8String, ASL_QUERY_OP_GREATER);
     }

+ 1 - 1
Classes/GlobalStateExplorers/SystemLog/FLEXOSLogController.m

@@ -40,7 +40,7 @@ static uint8_t (*OSLogGetType)(void *);
 
 + (void)load
 {
-    // Persist logs when the app launches on iOS 10 if we have persitent logs turned on
+    // Persist logs when the app launches on iOS 10 if we have persistent logs turned on
     if (FLEXOSLogAvailable()) {
         BOOL persistent = [[NSUserDefaults standardUserDefaults] boolForKey:kFLEXiOSPersistentOSLogKey];
         if (persistent) {

+ 2 - 2
Classes/Network/FLEXNetworkHistoryTableViewController.m

@@ -43,7 +43,7 @@
         self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Settings" style:UIBarButtonItemStylePlain target:self action:@selector(settingsButtonTapped:)];
 
         // Needed to avoid search bar showing over detail pages pushed on the nav stack
-        // see http://asciiwwdc.com/2014/sessions/228
+        // see https://asciiwwdc.com/2014/sessions/228
         self.definesPresentationContext = YES;
     }
     return self;
@@ -224,7 +224,7 @@
     for (FLEXNetworkTransactionTableViewCell *cell in [self.tableView visibleCells]) {
         if ([cell.transaction isEqual:transaction]) {
             // Using -[UITableView reloadRowsAtIndexPaths:withRowAnimation:] is overkill here and kicks off a lot of
-            // work that can make the table view somewhat unresponseive when lots of updates are streaming in.
+            // work that can make the table view somewhat unresponsive when lots of updates are streaming in.
             // We just need to tell the cell that it needs to re-layout.
             [cell setNeedsLayout];
             break;

+ 1 - 1
Classes/Network/FLEXNetworkRecorder.h

@@ -21,7 +21,7 @@ extern NSString *const kFLEXNetworkRecorderTransactionsClearedNotification;
 /// In general, it only makes sense to have one recorder for the entire application.
 + (instancetype)defaultRecorder;
 
-/// Defaults to 25 MB if never set. Values set here are presisted across launches of the app.
+/// Defaults to 25 MB if never set. Values set here are persisted across launches of the app.
 @property (nonatomic, assign) NSUInteger responseCacheByteLimit;
 
 /// If NO, the recorder not cache will not cache response for content types with an "image", "video", or "audio" prefix.

+ 2 - 2
Classes/Network/PonyDebugger/FLEXNetworkObserver.m

@@ -130,10 +130,10 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask delegate:(id <NSU
 
 /// All swizzled delegate methods should make use of this guard.
 /// This will prevent duplicated sniffing when the original implementation calls up to a superclass implementation which we've also swizzled.
-/// The superclass implementation (and implementations in classes above that) will be executed without inteference if called from the original implementation.
+/// The superclass implementation (and implementations in classes above that) will be executed without interference if called from the original implementation.
 + (void)sniffWithoutDuplicationForObject:(NSObject *)object selector:(SEL)selector sniffingBlock:(void (^)(void))sniffingBlock originalImplementationBlock:(void (^)(void))originalImplementationBlock
 {
-    // If we don't have an object to detect nested calls on, just run the original implmentation and bail.
+    // If we don't have an object to detect nested calls on, just run the original implementation and bail.
     // This case can happen if someone besides the URL loading system calls the delegate methods directly.
     // See https://github.com/Flipboard/FLEX/issues/61 for an example.
     if (!object) {

+ 4 - 4
Classes/ObjectExplorers/Controllers/FLEXObjectExplorerViewController.h

@@ -23,9 +23,9 @@ typedef NS_ENUM(NSUInteger, FLEXObjectExplorerSection) {
 
 @property (nonatomic, strong) id object;
 
-// Sublasses can override the methods below to provide data in a custom section.
-// The subclass should provide an array of "row cookies" to allow retreival of individual row data later on.
-// The objects in the rowCookies array will be used to call the row title, subtitle, etc methods to consturct the rows.
+// Subclasses can override the methods below to provide data in a custom section.
+// The subclass should provide an array of "row cookies" to allow retrieval of individual row data later on.
+// The objects in the rowCookies array will be used to call the row title, subtitle, etc methods to construct the rows.
 // The cookies approach is used here because we may filter the visible rows based on the search text entered by the user.
 - (NSString *)customSectionTitle;
 - (NSArray *)customSectionRowCookies;
@@ -37,7 +37,7 @@ typedef NS_ENUM(NSUInteger, FLEXObjectExplorerSection) {
 
 // More subclass configuration hooks.
 
-/// Whether to allow showing/drilling in to current values for ivars and properties. Defalut is YES.
+/// Whether to allow showing/drilling in to current values for ivars and properties. Default is YES.
 - (BOOL)canHaveInstanceState;
 
 /// Whether to allow drilling in to method calling interfaces for instance methods. Default is YES.

+ 1 - 1
Classes/ObjectExplorers/Views/FLEXTableViewCell.m

@@ -43,7 +43,7 @@
 
 /// We use this to allow our table view to allow its delegate
 /// to handle any action it chooses to support, without
-/// explicitly implementing the method ourselelves.
+/// explicitly implementing the method ourselves.
 ///
 /// Alternative considered: override respondsToSelector
 /// to return NO. I decided against this for simplicity's

+ 2 - 2
Classes/Utility/APPLE_LICENSE

@@ -343,8 +343,8 @@ California law concerning conflicts of law.
 Where You are located in the province of Quebec, Canada, the following
 clause applies: The parties hereby confirm that they have requested
 that this License and all related documents be drafted in English. Les
-parties ont exige que le present contrat et tous les documents
-connexes soient rediges en anglais.
+parties ont exigé que le présent contrat et tous les documents
+connexes soient rédigés en anglais.
 
 EXHIBIT A.
 

+ 2 - 2
Classes/Utility/FLEXHeapEnumerator.m

@@ -13,7 +13,7 @@
 
 static CFMutableSetRef registeredClasses;
 
-// Mimics the objective-c object stucture for checking if a range of memory is an object.
+// Mimics the objective-c object structure for checking if a range of memory is an object.
 typedef struct {
     Class isa;
 } flex_maybe_object_t;
@@ -60,7 +60,7 @@ static kern_return_t reader(__unused task_t remote_task, vm_address_t remote_add
     [self updateRegisteredClasses];
     
     // Inspired by:
-    // http://llvm.org/svn/llvm-project/lldb/tags/RELEASE_34/final/examples/darwin/heap_find/heap/heap_find.cpp
+    // https://llvm.org/svn/llvm-project/lldb/tags/RELEASE_34/final/examples/darwin/heap_find/heap/heap_find.cpp
     // https://gist.github.com/samdmarshall/17f4e66b5e2e579fd396
     
     vm_address_t *zones = NULL;

+ 1 - 1
Classes/Utility/FLEXObjcInternal.h

@@ -14,7 +14,7 @@ extern "C" {
 /// @brief Assumes memory is valid and readable.
 /// @discussion objc-internal.h, objc-private.h, and objc-config.h
 /// https://blog.timac.org/2016/1124-testing-if-an-arbitrary-pointer-is-a-valid-objective-c-object/
-/// http://llvm.org/svn/llvm-project/lldb/trunk/examples/summaries/cocoa/objc_runtime.py
+/// https://llvm.org/svn/llvm-project/lldb/trunk/examples/summaries/cocoa/objc_runtime.py
 /// https://blog.timac.org/2016/1124-testing-if-an-arbitrary-pointer-is-a-valid-objective-c-object/
 BOOL FLEXPointerIsValidObjcObject(const void * ptr);
 

+ 1 - 1
Classes/Utility/FLEXObjcInternal.mm

@@ -166,7 +166,7 @@ BOOL FLEXPointerIsValidObjcObject(const void *ptr)
     // From LLDB:
     // Pointers in a class_t will only have bits 0 through 46 set,
     // so if any pointer has bits 47 through 63 high, we know that this is not a valid isa
-    // http://llvm.org/svn/llvm-project/lldb/trunk/examples/summaries/cocoa/objc_runtime.py
+    // https://llvm.org/svn/llvm-project/lldb/trunk/examples/summaries/cocoa/objc_runtime.py
     if ((pointer & 0xFFFF800000000000) != 0) {
         return NO;
     }

+ 1 - 1
Classes/Utility/FLEXRuntimeUtility.h

@@ -11,7 +11,7 @@
 
 extern const unsigned int kFLEXNumberOfImplicitArgs;
 
-// See https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html#//apple_ref/doc/uid/TP40008048-CH101-SW6
+// See https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html#//apple_ref/doc/uid/TP40008048-CH101-SW6
 extern NSString *const kFLEXUtilityAttributeTypeEncoding;
 extern NSString *const kFLEXUtilityAttributeBackingIvar;
 extern NSString *const kFLEXUtilityAttributeReadOnly;

+ 7 - 7
Classes/Utility/FLEXRuntimeUtility.m

@@ -10,7 +10,7 @@
 #import "FLEXRuntimeUtility.h"
 #import "FLEXObjcInternal.h"
 
-// See https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html#//apple_ref/doc/uid/TP40008048-CH101-SW6
+// See https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html#//apple_ref/doc/uid/TP40008048-CH101-SW6
 NSString *const kFLEXUtilityAttributeTypeEncoding = @"T";
 NSString *const kFLEXUtilityAttributeBackingIvar = @"V";
 NSString *const kFLEXUtilityAttributeReadOnly = @"R";
@@ -404,7 +404,7 @@ const unsigned int kFLEXNumberOfImplicitArgs = 2;
                 // Ensure that the type encoding on the NSValue matches the type encoding of the argument in the method signature
                 if (strcmp([argumentValue objCType], typeEncodingCString) != 0) {
                     if (error) {
-                        NSDictionary<NSString *, id> *userInfo = @{ NSLocalizedDescriptionKey : [NSString stringWithFormat:@"Type encoding mismatch for agrument at index %lu. Value type: %s; Method argument type: %s.", (unsigned long)argumentsArrayIndex, [argumentValue objCType], typeEncodingCString]};
+                        NSDictionary<NSString *, id> *userInfo = @{ NSLocalizedDescriptionKey : [NSString stringWithFormat:@"Type encoding mismatch for argument at index %lu. Value type: %s; Method argument type: %s.", (unsigned long)argumentsArrayIndex, [argumentValue objCType], typeEncodingCString]};
                         *error = [NSError errorWithDomain:FLEXRuntimeUtilityErrorDomain code:FLEXRuntimeUtilityErrorCodeArgumentTypeMismatch userInfo:userInfo];
                     }
                     return nil;
@@ -434,7 +434,7 @@ const unsigned int kFLEXNumberOfImplicitArgs = 2;
         // Looking at you -[UIResponder(UITextInputAdditions) _caretRect]
         [invocation invoke];
         
-        // Retreive the return value and box if necessary.
+        // Retrieve the return value and box if necessary.
         const char *returnType = [methodSignature methodReturnType];
         
         if (returnType[0] == @encode(id)[0] || returnType[0] == @encode(Class)[0]) {
@@ -476,7 +476,7 @@ const unsigned int kFLEXNumberOfImplicitArgs = 2;
 
 + (BOOL)isTollFreeBridgedValue:(id)value forCFType:(const char *)typeEncoding
 {
-    // See https://developer.apple.com/library/ios/documentation/general/conceptual/CocoaEncyclopedia/Toll-FreeBridgin/Toll-FreeBridgin.html
+    // See https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/Toll-FreeBridgin/Toll-FreeBridgin.html
 #define CASE(cftype, foundationClass) \
     if(strcmp(typeEncoding, @encode(cftype)) == 0) { \
         return [value isKindOfClass:[foundationClass class]]; \
@@ -546,7 +546,7 @@ const unsigned int kFLEXNumberOfImplicitArgs = 2;
     [formatter setNumberStyle:NSNumberFormatterDecimalStyle];
     NSNumber *number = [formatter numberFromString:inputString];
     
-    // Make sure we box the number with the correct type encoding so it can be propperly unboxed later via getValue:
+    // Make sure we box the number with the correct type encoding so it can be properly unboxed later via getValue:
     NSValue *value = nil;
     if (strcmp(typeEncoding, @encode(char)) == 0) {
         char primitiveValue = [number charValue];
@@ -615,7 +615,7 @@ const unsigned int kFLEXNumberOfImplicitArgs = 2;
                     NSString *typeEncoding = [@(structEncoding) substringWithRange:NSMakeRange(typeStart - structEncoding, nextTypeStart - typeStart)];
                     typeBlock(structName, [typeEncoding UTF8String], [self readableTypeForEncoding:typeEncoding], runningFieldIndex, runningFieldOffset);
                     runningFieldOffset += fieldSize;
-                    // Padding to keep propper alignment. __attribute((packed)) structs will break here.
+                    // Padding to keep proper alignment. __attribute((packed)) structs will break here.
                     // The type encoding is no different for packed structs, so it's not clear there's anything we can do for those.
                     if (runningFieldOffset % fieldAlignment != 0) {
                         runningFieldOffset += fieldAlignment - runningFieldOffset % fieldAlignment;
@@ -660,7 +660,7 @@ const unsigned int kFLEXNumberOfImplicitArgs = 2;
         return nil;
     }
     
-    // See https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html
+    // See https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html
     // class-dump has a much nicer and much more complete implementation for this task, but it is distributed under GPLv2 :/
     // See https://github.com/nygard/class-dump/blob/master/Source/CDType.m
     // Warning: this method uses multiple middle returns and macros to cut down on boilerplate.

+ 2 - 1
Classes/Utility/FLEXUtility.m

@@ -313,7 +313,7 @@
 }
 
 // Thanks to the following links for help with this method
-// http://www.cocoanetics.com/2012/02/decompressing-files-into-memory/
+// https://www.cocoanetics.com/2012/02/decompressing-files-into-memory/
 // https://github.com/nicklockwood/GZIP
 + (NSData *)inflatedDataFromCompressedData:(NSData *)compressedData
 {
@@ -355,6 +355,7 @@
     BOOL includeInternalWindows = YES;
     BOOL onlyVisibleWindows = NO;
 
+    // Obfuscating selector allWindowsIncludingInternalWindows:onlyVisibleWindows:
     NSArray<NSString *> *allWindowsComponents = @[@"al", @"lWindo", @"wsIncl", @"udingInt", @"ernalWin", @"dows:o", @"nlyVisi", @"bleWin", @"dows:"];
     SEL allWindowsSelector = NSSelectorFromString([allWindowsComponents componentsJoinedByString:@""]);
 

+ 1 - 1
Example/ReadMe.txt

@@ -5,7 +5,7 @@ This sample is a catalog exhibiting many views and controls in the UIKit framewo
 
 Note that this sample also shows you how to make your non-standard views (images or custom views) accessible. Using the iOS Accessibility API enhances the user experience of VoiceOver users.
 
-You will also notice this sample shows how to localize string content by using the NSLocalizedString macro. Each language has a "Localizeable.strings" file and this macro refers to this file when loading the strings from the default bundle.
+You will also notice this sample shows how to localize string content by using the NSLocalizedString macro. Each language has a "Localizable.strings" file and this macro refers to this file when loading the strings from the default bundle.
 
 ===========================================================================
 Using the Sample

+ 1 - 1
Example/UICatalog/AAPLCatalogTableTableViewController.m

@@ -39,7 +39,7 @@
     // fill it with some stuff
     UILabel *infoLabel = [[UILabel alloc] init];
     infoLabel.translatesAutoresizingMaskIntoConstraints = NO;
-    infoLabel.text = @"Add switches, notes or whatewer you wish to provide your testers with superpowers!";
+    infoLabel.text = @"Add switches, notes or whatever you wish to provide your testers with superpowers!";
     infoLabel.numberOfLines = 0;
     infoLabel.textAlignment = NSTextAlignmentCenter;
 

+ 3 - 3
Example/UICatalog/AAPLSegmentedControlViewController.m

@@ -90,19 +90,19 @@
 }
 
 - (void)configureCustomSegmentsSegmentedControl {
-    NSDictionary *imageToAccesssibilityLabelMappings = @{
+    NSDictionary *imageToAccessibilityLabelMappings = @{
         @"checkmark_icon": NSLocalizedString(@"Done", nil),
         @"search_icon": NSLocalizedString(@"Search", nil),
         @"tools_icon": NSLocalizedString(@"Settings", nil)
     };
     
     // Guarantee that the segments show up in the same order.
-    NSArray *sortedSegmentImageNames = [[imageToAccesssibilityLabelMappings allKeys] sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
+    NSArray *sortedSegmentImageNames = [[imageToAccessibilityLabelMappings allKeys] sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
 
     [sortedSegmentImageNames enumerateObjectsUsingBlock:^(NSString *segmentImageName, NSUInteger idx, BOOL *stop) {
         UIImage *image = [UIImage imageNamed:segmentImageName];
         
-        image.accessibilityLabel = imageToAccesssibilityLabelMappings[segmentImageName];
+        image.accessibilityLabel = imageToAccessibilityLabelMappings[segmentImageName];
         
         [self.customSegmentsSegmentedControl setImage:image forSegmentAtIndex:idx];
     }];

+ 1 - 1
Example/UICatalog/AAPLSplitViewControllerDelegate.m

@@ -60,7 +60,7 @@
 
     UINavigationController *detailViewController = [splitViewController.viewControllers lastObject];
 
-    // It's possible that the detail view controller has more than one view controller currently in its heirarchy. If this is the case, we
+    // It's possible that the detail view controller has more than one view controller currently in its hierarchy. If this is the case, we
     // want to be sure that the root view controller of the navigation controller has its left bar button item set on its navigation item.
     // We don't want to override the navigation controller's top view controller's "Back" bar button item with the "More" bar button item.
     UIViewController *detailRootViewController = [detailViewController.viewControllers firstObject];

+ 1 - 1
Example/UICatalog/AAPLTextViewController.m

@@ -182,7 +182,7 @@
 
 - (void)adjustTextViewSelection:(UITextView *)textView {
     // Ensure that the text view is visible by making the text view frame smaller as text can be slightly cropped at the bottom.
-    // Note that this is a workwaround to a bug in iOS.
+    // Note that this is a workaround to a bug in iOS.
     [textView layoutIfNeeded];
 
     CGRect caretRect = [textView caretRectForPosition:textView.selectedTextRange.end];

+ 1 - 1
Example/UICatalog/AAPLWebViewController.m

@@ -102,7 +102,7 @@
 
 - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
     // Report the error inside the web view.
-    NSString *localizedErrorMessage = NSLocalizedString(@"An error occured:", nil);
+    NSString *localizedErrorMessage = NSLocalizedString(@"An error occurred:", nil);
     NSString *errorFormatString = @"<!doctype html><html><body><div style=\"width: 100%%; text-align: center; font-size: 36pt;\">%@%@</div></body></html>";
 
     NSString *errorHTML = [NSString stringWithFormat:errorFormatString, localizedErrorMessage, error.localizedDescription];

+ 1 - 1
Example/UICatalog/en.lproj/Localizable.strings

@@ -29,4 +29,4 @@
 "Search" = "Search";
 "Settings" = "Settings";
 "UICatalog" = "UICatalog";
-"An error occured:" = "An error occured:";
+"An error occurred:" = "An error occurred:";

+ 14 - 14
README.md

@@ -1,5 +1,5 @@
 # FLEX
-[![CocoaPods](https://img.shields.io/cocoapods/v/FLEX.svg)](http://cocoapods.org/?q=FLEX)
+[![CocoaPods](https://img.shields.io/cocoapods/v/FLEX.svg)](https://cocoapods.org/?q=FLEX)
  [![CocoaPods](https://img.shields.io/cocoapods/l/FLEX.svg)](https://github.com/Flipboard/FLEX/blob/master/LICENSE)
  [![CocoaPods](https://img.shields.io/cocoapods/p/FLEX.svg)]()
  [![Twitter: @ryanolsonk](https://img.shields.io/badge/contact-@ryanolsonk-blue.svg?style=flat)](https://twitter.com/ryanolsonk)
@@ -8,7 +8,7 @@
 
 FLEX (Flipboard Explorer) is a set of in-app debugging and exploration tools for iOS development. When presented, FLEX shows a toolbar that lives in a window above your application. From this toolbar, you can view and modify nearly every piece of state in your running application.
 
-![View Hierarchy Exploration](http://engineering.flipboard.com/assets/flex/basic-view-exploration.gif)
+![View Hierarchy Exploration](https://engineering.flipboard.com/assets/flex/basic-view-exploration.gif)
 
 
 ## Give Yourself Debugging Superpowers
@@ -32,7 +32,7 @@ Unlike many other debugging tools, FLEX runs entirely inside your app, so you do
 
 ## Usage
 
-In the iOS simulator, you can use keyboard shortcuts to activate FLEX. `f` will toggle the FLEX toolbar. Hit the `?` key for a full list of shortcuts. You can also show FLEX programatically:
+In the iOS simulator, you can use keyboard shortcuts to activate FLEX. `f` will toggle the FLEX toolbar. Hit the `?` key for a full list of shortcuts. You can also show FLEX programmatically:
 
 Short version:
 
@@ -71,30 +71,30 @@ More complete version:
 ### Modify Views
 Once a view is selected, you can tap on the info bar below the toolbar to present more details about the view. From there, you can modify properties and call methods.
 
-![View Modification](http://engineering.flipboard.com/assets/flex/advanced-view-editing.gif)
+![View Modification](https://engineering.flipboard.com/assets/flex/advanced-view-editing.gif)
 
 ### Network History
 When enabled, network debugging allows you to view all requests made using NSURLConnection or NSURLSession. Settings allow you to adjust what kind of response bodies get cached and the maximum size limit of the response cache. You can choose to have network debugging enabled automatically on app launch. This setting is persisted across launches.
 
-![Network History](http://engineering.flipboard.com/assets/flex/network-history.gif)
+![Network History](https://engineering.flipboard.com/assets/flex/network-history.gif)
 
 ### All Objects on the Heap
 FLEX queries malloc for all the live allocated memory blocks and searches for ones that look like objects. You can see everything from here.
 
-![Heap Exploration](http://engineering.flipboard.com/assets/flex/heap-browser.gif)
+![Heap Exploration](https://engineering.flipboard.com/assets/flex/heap-browser.gif)
 
 ### Simulator Keyboard Shortcuts
-Default keyboard shortcuts allow you to activate the FLEX tools, scroll with the arrow keys, and close modals using the escape key. You can also add custom keyboard shortcuts via `-[FLEXMananger registerSimulatorShortcutWithKey:modifiers:action:description]`
+Default keyboard shortcuts allow you to activate the FLEX tools, scroll with the arrow keys, and close modals using the escape key. You can also add custom keyboard shortcuts via `-[FLEXManager registerSimulatorShortcutWithKey:modifiers:action:description]`
 
 ![Simulator Shortcuts](https://cloud.githubusercontent.com/assets/1422245/10002927/1106fd32-6067-11e5-8e21-57a357c259b6.png)
 
 ### File Browser
 View the file system within your app's sandbox. FLEX shows file sizes, image previews, and pretty prints `.json` and `.plist` files. You can copy text and image files to the pasteboard if you want to inspect them outside of your app.
 
-![File Browser](http://engineering.flipboard.com/assets/flex/file-browser.gif)
+![File Browser](https://engineering.flipboard.com/assets/flex/file-browser.gif)
 
 ### SQLite Browser
-SQLite database files (with either `.db` or `.sqlite` extensions), or [Realm](http://realm.io) database files can be explored using FLEX. The database browser lets you view all tables, and individual tables can be sorted by tapping column headers.
+SQLite database files (with either `.db` or `.sqlite` extensions), or [Realm](https://realm.io) database files can be explored using FLEX. The database browser lets you view all tables, and individual tables can be sorted by tapping column headers.
 
 ![Database Browser](https://cloud.githubusercontent.com/assets/1422245/11786700/d0ab95dc-a23c-11e5-80ce-0e1b4dba2b6b.png)
 
@@ -106,17 +106,17 @@ Using a combination of the command, control, and shift keys, you can simulate di
 ### System Library Exploration
 Go digging for all things public and private. To learn more about a class, you can create an instance of it and explore its default state.
 
-![System Libraries Browser](http://engineering.flipboard.com/assets/flex/system-libraries-browser.gif)
+![System Libraries Browser](https://engineering.flipboard.com/assets/flex/system-libraries-browser.gif)
 
 ### NSUserDefaults Editing
 FLEX allows you to edit defaults that are any combination of strings, numbers, arrays, and dictionaries. The input is parsed as `JSON`. If other kinds of objects are set for a defaults key (i.e. `NSDate`), you can view them but not edit them.
 
-![NSUserDefaults Editor](http://engineering.flipboard.com/assets/flex/nsuserdefaults-editor.gif)
+![NSUserDefaults Editor](https://engineering.flipboard.com/assets/flex/nsuserdefaults-editor.gif)
 
 ### Learning from Other Apps
 The code injection is left as an exercise for the reader. :innocent:
 
-![Springboard Lock Screen](http://engineering.flipboard.com/assets/flex/flex-readme-reverse-1.png) ![Springboard Home Screen](http://engineering.flipboard.com/assets/flex/flex-readme-reverse-2.png)
+![Springboard Lock Screen](https://engineering.flipboard.com/assets/flex/flex-readme-reverse-1.png) ![Springboard Home Screen](https://engineering.flipboard.com/assets/flex/flex-readme-reverse-2.png)
 
 
 ## Installation
@@ -176,11 +176,11 @@ If you are using Carthage, only including the `FLEX.framework` in debug builds i
 
 In Xcode, navigate to the "Build Settings" tab of your project. Click the plus and select `Add User-Defined Setting`.
 
-![Add User-Defined Setting](http://engineering.flipboard.com/assets/flex/flex-readme-exclude-1.png)
+![Add User-Defined Setting](https://engineering.flipboard.com/assets/flex/flex-readme-exclude-1.png)
 
 Name the setting `EXCLUDED_SOURCE_FILE_NAMES`. For your `Release` configuration, set the value to `FLEX*`. This will exclude all files with the prefix FLEX from compilation. Leave the value blank for your `Debug` configuration.
 
-![EXCLUDED_SOURCE_FILE_NAMES](http://engineering.flipboard.com/assets/flex/flex-readme-exclude-2.png)
+![EXCLUDED_SOURCE_FILE_NAMES](https://engineering.flipboard.com/assets/flex/flex-readme-exclude-2.png)
 
 ## Additional Notes