Bladeren bron

Hide public asl.h import to prevent 'Include of non-modular header inside framework module' error when building FLEX as framework.

Max Odnovolyk 11 jaren geleden
bovenliggende
commit
9cc8435cae

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

@@ -0,0 +1,17 @@
+//
+//  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

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

@@ -7,12 +7,9 @@
 //
 
 #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;

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

@@ -7,13 +7,14 @@
 //
 
 #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];
@@ -23,22 +24,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;
 }
 

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

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

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

@@ -114,6 +114,7 @@
 		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; };
@@ -287,12 +288,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; 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>"; };
+		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>"; };
 		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>"; };
@@ -626,7 +627,7 @@
 		944F7473197B458C009AB039 /* Global State Explorers */ = {
 			isa = PBXGroup;
 			children = (
-				946C6EC61A75986C006545C2 /* SystemLog */,
+				946C6EC61A75986C006545C2 /* System Log */,
 				944F7474197B458C009AB039 /* FLEXClassesTableViewController.h */,
 				944F7475197B458C009AB039 /* FLEXClassesTableViewController.m */,
 				944F7476197B458C009AB039 /* FLEXFileBrowserTableViewController.h */,
@@ -673,13 +674,14 @@
 			name = "FLEX Integration";
 			sourceTree = "<group>";
 		};
-		946C6EC61A75986C006545C2 /* SystemLog */ = {
+		946C6EC61A75986C006545C2 /* System Log */ = {
 			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 */,
 			);