Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift适配 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions WeexAnalyzer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
D97BC529216EF346002BB540 /* wxt_icon_basepfm.png in Resources */ = {isa = PBXBuildFile; fileRef = D97BC525216EF346002BB540 /* wxt_icon_basepfm.png */; };
D99435752050CA8D00CEEFE6 /* WXAMenuCell.h in Headers */ = {isa = PBXBuildFile; fileRef = D99435732050CA8D00CEEFE6 /* WXAMenuCell.h */; };
D99435762050CA8D00CEEFE6 /* WXAMenuCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D99435742050CA8D00CEEFE6 /* WXAMenuCell.m */; };
F704B5092316A11A00F079A6 /* WeexAnalyzerHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = F704B5082316A11900F079A6 /* WeexAnalyzerHeader.h */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -327,6 +328,8 @@
D97BC525216EF346002BB540 /* wxt_icon_basepfm.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wxt_icon_basepfm.png; sourceTree = "<group>"; };
D99435732050CA8D00CEEFE6 /* WXAMenuCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WXAMenuCell.h; sourceTree = "<group>"; };
D99435742050CA8D00CEEFE6 /* WXAMenuCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WXAMenuCell.m; sourceTree = "<group>"; };
F704B5072316A08600F079A6 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
F704B5082316A11900F079A6 /* WeexAnalyzerHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WeexAnalyzerHeader.h; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -459,6 +462,8 @@
417AB67A1DC4C934002BA6E4 /* Source */,
D92A6018207F82F200E3330C /* Resources */,
417AB6561DC4768D002BA6E4 /* Info.plist */,
F704B5072316A08600F079A6 /* module.modulemap */,
F704B5082316A11900F079A6 /* WeexAnalyzerHeader.h */,
);
path = WeexAnalyzer;
sourceTree = "<group>";
Expand Down Expand Up @@ -673,6 +678,7 @@
files = (
B86C263221636F73005F6971 /* WXAPageTabbar.h in Headers */,
410A61451DD221E500EB22A7 /* WXAOptionBaseView.h in Headers */,
F704B5092316A11A00F079A6 /* WeexAnalyzerHeader.h in Headers */,
41BBFBB01DE58A7700F34DE1 /* WXAWXExternalLogger.h in Headers */,
417AB6B51DC4C934002BA6E4 /* WXALogModel.h in Headers */,
41BBFBB41DE5AF6500F34DE1 /* WXALogMenuItem.h in Headers */,
Expand Down Expand Up @@ -799,6 +805,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 417AB6481DC4768D002BA6E4;
Expand Down Expand Up @@ -1091,6 +1098,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "$(SRCROOT)/WeexAnalyzer/module.modulemap";
PRODUCT_BUNDLE_IDENTIFIER = com.taobao.WeexAnalyzer;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -1117,6 +1125,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MACH_O_TYPE = staticlib;
MODULEMAP_FILE = "$(SRCROOT)/WeexAnalyzer/module.modulemap";
PRODUCT_BUNDLE_IDENTIFIER = com.taobao.WeexAnalyzer;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down
6 changes: 5 additions & 1 deletion WeexAnalyzer/Source/Base/WXABaseTableViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
// Created by 对象 on 2018/4/11.
//

#import "WXABaseViewController.h"
#import <WeexAnalyzer/WXABaseViewController.h>

NS_ASSUME_NONNULL_BEGIN

@interface WXABaseTableViewController : WXABaseViewController

@property (strong,nonatomic) UITableView *tableView;

@end

NS_ASSUME_NONNULL_END
4 changes: 4 additions & 0 deletions WeexAnalyzer/Source/Base/WXABaseViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface WXABaseViewController : UIViewController <UINavigationControllerDelegate>

@property(nonatomic, strong) UILabel *titleLabel;
Expand All @@ -25,3 +27,5 @@
- (void)addBarItemWith:(NSString *)title action:(SEL)action to:(id)target;

@end

NS_ASSUME_NONNULL_END
4 changes: 4 additions & 0 deletions WeexAnalyzer/Source/Log/Model/WXALogFilterModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#import <Foundation/Foundation.h>
#import <WeexSDK/WeexSDK.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, WXLogType){
/**
* native log
Expand Down Expand Up @@ -36,3 +38,5 @@ typedef NS_ENUM(NSUInteger, WXLogType){
- (instancetype)initWithDictionary:(NSDictionary *)dic;

@end

NS_ASSUME_NONNULL_END
4 changes: 4 additions & 0 deletions WeexAnalyzer/Source/Log/Model/WXALogModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
#import <Foundation/Foundation.h>
#import <WeexSDK/WXLog.h>

NS_ASSUME_NONNULL_BEGIN

@interface WXALogModel : NSObject

@property (nonatomic, assign) NSInteger flag;
@property (nonatomic, copy) NSString *message;

@end

NS_ASSUME_NONNULL_END
6 changes: 5 additions & 1 deletion WeexAnalyzer/Source/Log/WXALogMenuItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
//

#import <WeexAnalyzer/WeexAnalyzer.h>
#import "WXALogProtocol.h"
#import <WeexAnalyzer/WXALogProtocol.h>

NS_ASSUME_NONNULL_BEGIN

@interface WXALogMenuItem : WXAMenuItem

Expand All @@ -16,3 +18,5 @@
logger:(id<WXALogProtocol>)logger;

@end

NS_ASSUME_NONNULL_END
6 changes: 5 additions & 1 deletion WeexAnalyzer/Source/Log/WXALogProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
//

#import <Foundation/Foundation.h>
#import "WXALogModel.h"
#import <WeexAnalyzer/WXALogModel.h>

NS_ASSUME_NONNULL_BEGIN

@protocol WXALoggerDelegate <NSObject>

Expand All @@ -28,3 +30,5 @@
logType:(NSInteger)type;

@end

NS_ASSUME_NONNULL_END
4 changes: 4 additions & 0 deletions WeexAnalyzer/Source/Menu/WXAMenuItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#import <Foundation/Foundation.h>
#import <WeexSDK/WeexSDK.h>

NS_ASSUME_NONNULL_BEGIN

@interface WXAMenuItem : NSObject

@property (nonatomic, copy) NSString *title;
Expand All @@ -24,3 +26,5 @@
- (void)open:(BOOL)selected;

@end

NS_ASSUME_NONNULL_END
4 changes: 4 additions & 0 deletions WeexAnalyzer/Source/Protocol/WXAMenuProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#import <Foundation/Foundation.h>
#import <WeexSDK/WeexSDK.h>

NS_ASSUME_NONNULL_BEGIN

@protocol WXAMenuProtocol<NSObject>

@property(nonatomic,strong,readonly) UIView *headerView;
Expand All @@ -19,3 +21,5 @@
- (void)setWxInstance:(WXSDKInstance *)wxInstance;

@end

NS_ASSUME_NONNULL_END
18 changes: 9 additions & 9 deletions WeexAnalyzer/Source/WeexAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@

#import <Foundation/Foundation.h>
#import <WeexSDK/WeexSDK.h>
#import "WXAMenuItem.h"
#import "WXAMenuProtocol.h"
#import "WXALogModel.h"
#import "WXALogProtocol.h"
#import "WXALogMenuItem.h"
#import "WXALogFilterModel.h"
#import "WXABaseViewController.h"
#import "WXABaseTableViewController.h"
#import "WXAPageTabbar.h"
#import <WeexAnalyzer/WXAMenuItem.h>
#import <WeexAnalyzer/WXAMenuProtocol.h>
#import <WeexAnalyzer/WXALogModel.h>
#import <WeexAnalyzer/WXALogProtocol.h>
#import <WeexAnalyzer/WXALogMenuItem.h>
#import <WeexAnalyzer/WXALogFilterModel.h>
#import <WeexAnalyzer/WXABaseViewController.h>
#import <WeexAnalyzer/WXABaseTableViewController.h>
#import <WeexAnalyzer/WXAPageTabbar.h>

@interface WeexAnalyzer : NSObject

Expand Down
22 changes: 22 additions & 0 deletions WeexAnalyzer/WeexAnalyzerHeader.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// WeexAnalyzerHeader.h
// WeexAnalyzer
//
// Created by txink on 2019/8/28.
// Copyright © 2019 Taobao. All rights reserved.
//

#ifdef __OBJC__

#import <WeexSDK/WeexSDK.h>
#import <WeexAnalyzer/WXAMenuItem.h>
#import <WeexAnalyzer/WXAMenuProtocol.h>
#import <WeexAnalyzer/WXALogModel.h>
#import <WeexAnalyzer/WXALogProtocol.h>
#import <WeexAnalyzer/WXALogMenuItem.h>
#import <WeexAnalyzer/WXALogFilterModel.h>
#import <WeexAnalyzer/WXABaseViewController.h>
#import <WeexAnalyzer/WXABaseTableViewController.h>
#import <WeexAnalyzer/WXAPageTabbar.h>

#endif /* __OBJC__ */
6 changes: 6 additions & 0 deletions WeexAnalyzer/module.modulemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
framework module WeexAnalyzer {
umbrella header "WeexAnalyzerHeader.h"

export *
module * { export * }
}