Просмотр исходного кода

Merge pull request #67 from modnovolyk/fix-build-as-framework-issue

Fix build errors while building FLEX as framework for usage in Swift project
Ryan Olson лет назад: 11
Родитель
Сommit
5627219c56

+ 4 - 4
Classes/GlobalStateExplorers/FLEXFileBrowserTableViewController.m

@@ -316,7 +316,7 @@
         NSString *subpath = [self.childPaths objectAtIndex:indexPath.row];
         NSString *subpath = [self.childPaths objectAtIndex:indexPath.row];
         fullPath = [self.path stringByAppendingPathComponent:subpath];
         fullPath = [self.path stringByAppendingPathComponent:subpath];
     } else {
     } else {
-        indexPath = [self.searchDisplayController.searchResultsTableView indexPathForCell:sender];
+        indexPath = [self.searchController.searchResultsTableView indexPathForCell:sender];
         fullPath = [self.searchPaths objectAtIndex:indexPath.row];
         fullPath = [self.searchPaths objectAtIndex:indexPath.row];
     }
     }
 
 
@@ -334,7 +334,7 @@
         NSString *subpath = [self.childPaths objectAtIndex:indexPath.row];
         NSString *subpath = [self.childPaths objectAtIndex:indexPath.row];
         fullPath = [self.path stringByAppendingPathComponent:subpath];
         fullPath = [self.path stringByAppendingPathComponent:subpath];
     } else {
     } else {
-        indexPath = [self.searchDisplayController.searchResultsTableView indexPathForCell:sender];
+        indexPath = [self.searchController.searchResultsTableView indexPathForCell:sender];
         fullPath = [self.searchPaths objectAtIndex:indexPath.row];
         fullPath = [self.searchPaths objectAtIndex:indexPath.row];
     }
     }
 
 
@@ -345,9 +345,9 @@
 
 
 - (void)reloadDisplayedPaths
 - (void)reloadDisplayedPaths
 {
 {
-    if (self.searchDisplayController.isActive) {
+    if (self.searchController.isActive) {
         [self reloadSearchPaths];
         [self reloadSearchPaths];
-        [self.searchDisplayController.searchResultsTableView reloadData];
+        [self.searchController.searchResultsTableView reloadData];
     } else {
     } else {
         [self reloadChildPaths];
         [self reloadChildPaths];
         [self.tableView reloadData];
         [self.tableView reloadData];

+ 5 - 2
Classes/Network/FLEXNetworkHistoryTableViewController.m

@@ -62,7 +62,10 @@
 
 
     UISearchBar *searchBar = [[UISearchBar alloc] init];
     UISearchBar *searchBar = [[UISearchBar alloc] init];
     [searchBar sizeToFit];
     [searchBar sizeToFit];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     self.searchController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self];
     self.searchController = [[UISearchDisplayController alloc] initWithSearchBar:searchBar contentsController:self];
+#pragma clang diagnostic pop
     self.searchController.delegate = self;
     self.searchController.delegate = self;
     self.searchController.searchResultsDataSource = self;
     self.searchController.searchResultsDataSource = self;
     self.searchController.searchResultsDelegate = self;
     self.searchController.searchResultsDelegate = self;
@@ -358,9 +361,9 @@
             return [[transaction.request.URL absoluteString] rangeOfString:searchString options:NSCaseInsensitiveSearch].length > 0;
             return [[transaction.request.URL absoluteString] rangeOfString:searchString options:NSCaseInsensitiveSearch].length > 0;
         }]];
         }]];
         dispatch_async(dispatch_get_main_queue(), ^{
         dispatch_async(dispatch_get_main_queue(), ^{
-            if ([self.searchDisplayController.searchBar.text isEqual:searchString]) {
+            if ([self.searchController.searchBar.text isEqual:searchString]) {
                 self.filteredNetworkTransactions = filteredNetworkTransactions;
                 self.filteredNetworkTransactions = filteredNetworkTransactions;
-                [self.searchDisplayController.searchResultsTableView reloadData];
+                [self.searchController.searchResultsTableView reloadData];
             }
             }
         });
         });
     });
     });

+ 1 - 0
FLEX.podspec

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