Explorar o código

Merge branch 'fix-build-as-framework-issue' into fix-nsurlsessiontask-callback-bug

* fix-build-as-framework-issue:
  Make all headers except FLEXManager.h private
  Mute deprecated warning with less pre-processor noise
  Revert changes from fix-build-as-framework-issue branch
Max Odnovolyk %!s(int64=11) %!d(string=hai) anos
pai
achega
4e81d4b476

+ 4 - 13
Classes/GlobalStateExplorers/FLEXFileBrowserTableViewController.m

@@ -316,10 +316,7 @@
         NSString *subpath = [self.childPaths objectAtIndex:indexPath.row];
         fullPath = [self.path stringByAppendingPathComponent:subpath];
     } else {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-        indexPath = [self.searchDisplayController.searchResultsTableView indexPathForCell:sender];
-#pragma clang diagnostic pop
+        indexPath = [self.searchController.searchResultsTableView indexPathForCell:sender];
         fullPath = [self.searchPaths objectAtIndex:indexPath.row];
     }
 
@@ -337,10 +334,7 @@
         NSString *subpath = [self.childPaths objectAtIndex:indexPath.row];
         fullPath = [self.path stringByAppendingPathComponent:subpath];
     } else {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-        indexPath = [self.searchDisplayController.searchResultsTableView indexPathForCell:sender];
-#pragma clang diagnostic pop
+        indexPath = [self.searchController.searchResultsTableView indexPathForCell:sender];
         fullPath = [self.searchPaths objectAtIndex:indexPath.row];
     }
 
@@ -351,16 +345,13 @@
 
 - (void)reloadDisplayedPaths
 {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    if (self.searchDisplayController.isActive) {
+    if (self.searchController.isActive) {
         [self reloadSearchPaths];
-        [self.searchDisplayController.searchResultsTableView reloadData];
+        [self.searchController.searchResultsTableView reloadData];
     } else {
         [self reloadChildPaths];
         [self.tableView reloadData];
     }
-#pragma clang diagnostic pop
 }
 
 - (void)reloadChildPaths

+ 0 - 17
Classes/GlobalStateExplorers/SystemLog/FLEXSystemLogMessage+Private.h

@@ -1,17 +0,0 @@
-//
-//  FLEXSystemLogMessage+LogMessageFromASLMessage.h
-//  UICatalog
-//
-//  Created by Max Odnovolyk on 5/16/15.
-//  Copyright (c) 2015 f. All rights reserved.
-//
-
-#import "FLEXSystemLogMessage.h"
-#import <asl.h>
-
-/// Hiding public asl.h import to prevent 'Include of non-modular header inside framework module' error when building FLEX as framework.
-@interface FLEXSystemLogMessage ()
-
-+(instancetype)logMessageFromASLMessage:(aslmsg)aslMessage;
-
-@end

+ 3 - 0
Classes/GlobalStateExplorers/SystemLog/FLEXSystemLogMessage.h

@@ -7,9 +7,12 @@
 //
 
 #import <Foundation/Foundation.h>
+#import <asl.h>
 
 @interface FLEXSystemLogMessage : NSObject
 
++ (instancetype)logMessageFromASLMessage:(aslmsg)aslMessage;
+
 @property (nonatomic, strong) NSDate *date;
 @property (nonatomic, copy) NSString *sender;
 @property (nonatomic, copy) NSString *messageText;

+ 5 - 6
Classes/GlobalStateExplorers/SystemLog/FLEXSystemLogMessage.m

@@ -7,14 +7,13 @@
 //
 
 #import "FLEXSystemLogMessage.h"
-#import <asl.h>
 
 @implementation FLEXSystemLogMessage
 
 +(instancetype)logMessageFromASLMessage:(aslmsg)aslMessage
 {
     FLEXSystemLogMessage *logMessage = [[FLEXSystemLogMessage alloc] init];
-    
+
     const char *timestamp = asl_get(aslMessage, ASL_KEY_TIME);
     if (timestamp) {
         NSTimeInterval timeInterval = [@(timestamp) integerValue];
@@ -24,22 +23,22 @@
         }
         logMessage.date = [NSDate dateWithTimeIntervalSince1970:timeInterval];
     }
-    
+
     const char *sender = asl_get(aslMessage, ASL_KEY_SENDER);
     if (sender) {
         logMessage.sender = @(sender);
     }
-    
+
     const char *messageText = asl_get(aslMessage, ASL_KEY_MSG);
     if (messageText) {
         logMessage.messageText = @(messageText);
     }
-    
+
     const char *messageID = asl_get(aslMessage, ASL_KEY_MSG_ID);
     if (messageID) {
         logMessage.messageID = [@(messageID) longLongValue];
     }
-    
+
     return logMessage;
 }
 

+ 0 - 1
Classes/GlobalStateExplorers/SystemLog/FLEXSystemLogTableViewController.m

@@ -9,7 +9,6 @@
 #import "FLEXSystemLogTableViewController.h"
 #import "FLEXUtility.h"
 #import "FLEXSystemLogMessage.h"
-#import "FLEXSystemLogMessage+Private.h"
 #import "FLEXSystemLogTableViewCell.h"
 #import <asl.h>
 

+ 2 - 5
Classes/Network/FLEXNetworkHistoryTableViewController.m

@@ -361,13 +361,10 @@
             return [[transaction.request.URL absoluteString] rangeOfString:searchString options:NSCaseInsensitiveSearch].length > 0;
         }]];
         dispatch_async(dispatch_get_main_queue(), ^{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-            if ([self.searchDisplayController.searchBar.text isEqual:searchString]) {
+            if ([self.searchController.searchBar.text isEqual:searchString]) {
                 self.filteredNetworkTransactions = filteredNetworkTransactions;
-                [self.searchDisplayController.searchResultsTableView reloadData];
+                [self.searchController.searchResultsTableView reloadData];
             }
-#pragma clang diagnostic pop
         });
     });
 }

+ 8 - 10
Example/UICatalog.xcodeproj/project.pbxproj

@@ -114,7 +114,6 @@
 		0149BFE1198FAFC700B90A1B /* FLEXFileBrowserSearchOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLEXFileBrowserSearchOperation.m; sourceTree = "<group>"; };
 		01985ABA1984DE9500A65332 /* FLEXArgumentInputFontsPickerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLEXArgumentInputFontsPickerView.h; sourceTree = "<group>"; };
 		01985ABB1984DE9500A65332 /* FLEXArgumentInputFontsPickerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLEXArgumentInputFontsPickerView.m; sourceTree = "<group>"; };
-		0F4F549E1B069E4E009ADF9C /* FLEXSystemLogMessage+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "FLEXSystemLogMessage+Private.h"; sourceTree = "<group>"; };
 		3EC6487218FF8A5000024205 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = SOURCE_ROOT; };
 		5356823A18F3656900BAAD62 /* UICatalog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UICatalog.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		5356823D18F3656900BAAD62 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -288,12 +287,12 @@
 		944F7486197B458C009AB039 /* FLEXHierarchyTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLEXHierarchyTableViewController.m; sourceTree = "<group>"; };
 		944F7487197B458C009AB039 /* FLEXImagePreviewViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLEXImagePreviewViewController.h; sourceTree = "<group>"; };
 		944F7488197B458C009AB039 /* FLEXImagePreviewViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLEXImagePreviewViewController.m; sourceTree = "<group>"; };
-		946C6EC71A7598D3006545C2 /* FLEXSystemLogTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLEXSystemLogTableViewCell.h; sourceTree = "<group>"; };
-		946C6EC81A7598D3006545C2 /* FLEXSystemLogTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLEXSystemLogTableViewCell.m; sourceTree = "<group>"; };
-		946C6ECA1A759928006545C2 /* FLEXSystemLogTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLEXSystemLogTableViewController.m; sourceTree = "<group>"; };
-		946C6ECB1A759928006545C2 /* FLEXSystemLogTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLEXSystemLogTableViewController.h; sourceTree = "<group>"; };
-		946C6ECD1A7599C4006545C2 /* FLEXSystemLogMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLEXSystemLogMessage.h; sourceTree = "<group>"; };
-		946C6ECE1A7599C4006545C2 /* FLEXSystemLogMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLEXSystemLogMessage.m; sourceTree = "<group>"; };
+		946C6EC71A7598D3006545C2 /* FLEXSystemLogTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FLEXSystemLogTableViewCell.h; path = "FLEXSystemLogTableViewCell.h"; sourceTree = "<group>"; };
+		946C6EC81A7598D3006545C2 /* FLEXSystemLogTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FLEXSystemLogTableViewCell.m; path = "FLEXSystemLogTableViewCell.m"; sourceTree = "<group>"; };
+		946C6ECA1A759928006545C2 /* FLEXSystemLogTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FLEXSystemLogTableViewController.m; path = "FLEXSystemLogTableViewController.m"; sourceTree = "<group>"; };
+		946C6ECB1A759928006545C2 /* FLEXSystemLogTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FLEXSystemLogTableViewController.h; path = "FLEXSystemLogTableViewController.h"; sourceTree = "<group>"; };
+		946C6ECD1A7599C4006545C2 /* FLEXSystemLogMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FLEXSystemLogMessage.h; path = "FLEXSystemLogMessage.h"; sourceTree = "<group>"; };
+		946C6ECE1A7599C4006545C2 /* FLEXSystemLogMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FLEXSystemLogMessage.m; path = "FLEXSystemLogMessage.m"; sourceTree = "<group>"; };
 		94C681F11A3E941800E1936D /* FLEXLayerExplorerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLEXLayerExplorerViewController.h; sourceTree = "<group>"; };
 		94C681F21A3E941800E1936D /* FLEXLayerExplorerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLEXLayerExplorerViewController.m; sourceTree = "<group>"; };
 		94CB48371A8EC6000054A905 /* FLEXMultilineTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FLEXMultilineTableViewCell.h; sourceTree = "<group>"; };
@@ -627,7 +626,7 @@
 		944F7473197B458C009AB039 /* Global State Explorers */ = {
 			isa = PBXGroup;
 			children = (
-				946C6EC61A75986C006545C2 /* System Log */,
+				946C6EC61A75986C006545C2 /* SystemLog */,
 				944F7474197B458C009AB039 /* FLEXClassesTableViewController.h */,
 				944F7475197B458C009AB039 /* FLEXClassesTableViewController.m */,
 				944F7476197B458C009AB039 /* FLEXFileBrowserTableViewController.h */,
@@ -674,14 +673,13 @@
 			name = "FLEX Integration";
 			sourceTree = "<group>";
 		};
-		946C6EC61A75986C006545C2 /* System Log */ = {
+		946C6EC61A75986C006545C2 /* SystemLog */ = {
 			isa = PBXGroup;
 			children = (
 				946C6ECB1A759928006545C2 /* FLEXSystemLogTableViewController.h */,
 				946C6ECA1A759928006545C2 /* FLEXSystemLogTableViewController.m */,
 				946C6ECD1A7599C4006545C2 /* FLEXSystemLogMessage.h */,
 				946C6ECE1A7599C4006545C2 /* FLEXSystemLogMessage.m */,
-				0F4F549E1B069E4E009ADF9C /* FLEXSystemLogMessage+Private.h */,
 				946C6EC71A7598D3006545C2 /* FLEXSystemLogTableViewCell.h */,
 				946C6EC81A7598D3006545C2 /* FLEXSystemLogTableViewCell.m */,
 			);

+ 1 - 1
FLEX.podspec

@@ -35,5 +35,5 @@ Pod::Spec.new do |spec|
   spec.frameworks       = "CoreGraphics"
   spec.libraries        = "z"
   spec.requires_arc     = true
-  spec.private_header_files  = "Classes/**/*Private.h"
+  spec.public_header_files = "Classes/**/FLEXManager.h"
 end