├── WGPushControllerKit ├── demo.gif ├── Assets.xcassets │ ├── Contents.json │ ├── Image3.imageset │ │ ├── 1.png │ │ ├── 1@2x.png │ │ ├── 1@3x.png │ │ └── Contents.json │ ├── Image1.imageset │ │ ├── exam.png │ │ ├── exam@2x.png │ │ ├── exam@3x.png │ │ └── Contents.json │ ├── Image5.imageset │ │ ├── rule.png │ │ ├── rule@2x.png │ │ ├── rule@3x.png │ │ └── Contents.json │ ├── Image4.imageset │ │ ├── Course.png │ │ ├── Course@2x.png │ │ ├── Course@3x.png │ │ └── Contents.json │ ├── Image6.imageset │ │ ├── study.png │ │ ├── study@2x.png │ │ ├── study@3x.png │ │ └── Contents.json │ ├── Image2.imageset │ │ ├── exercises.png │ │ ├── exercises@2x.png │ │ ├── exercises@3x.png │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── demo01 │ ├── WGPushControllerKit-Bridging-Header.h │ ├── WGNoParamViewController.h │ ├── WGInitWithViewController.h │ ├── WGXibViewController.h │ ├── WGSwiftViewController.swift │ ├── WGOtherViewController.h │ ├── WGNoParamViewController.m │ ├── WGProrertyViewController.h │ ├── WGProrertyViewController.m │ ├── WGInitWithViewController.m │ ├── WGOtherViewController.m │ ├── WGXibViewController.m │ └── WGXibViewController.xib ├── WGModel.m ├── ViewController.h ├── AppDelegate.h ├── WGModel.h ├── demo02 │ ├── WGCustomViewController.h │ ├── subController │ │ ├── WGOneViewController.h │ │ ├── WGSixViewController.h │ │ ├── WGTwoViewController.h │ │ ├── WGFiveViewController.h │ │ ├── WGFourViewController.h │ │ ├── WGThreeViewController.h │ │ ├── WGOneViewController.m │ │ ├── WGSixViewController.m │ │ ├── WGFiveViewController.m │ │ ├── WGFourViewController.m │ │ ├── WGTwoViewController.m │ │ └── WGThreeViewController.m │ └── WGCustomViewController.m ├── main.m ├── Info.plist ├── Base.lproj │ ├── Main.storyboard │ └── LaunchScreen.storyboard ├── PushTools │ ├── WGControllerPush.h │ └── WGControllerPush.m ├── AppDelegate.m └── ViewController.m ├── WGPushControllerKit.xcodeproj ├── xcuserdata │ └── wanggang.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── wanggang.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── project.pbxproj ├── WGPushControllerKit.podspec ├── WGPushControllerKitTests ├── Info.plist └── WGPushControllerKitTests.m ├── WGPushControllerKitUITests ├── Info.plist └── WGPushControllerKitUITests.m └── README.md /WGPushControllerKit/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/demo.gif -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image3.imageset/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image3.imageset/1.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image1.imageset/exam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image1.imageset/exam.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image3.imageset/1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image3.imageset/1@2x.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image3.imageset/1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image3.imageset/1@3x.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image5.imageset/rule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image5.imageset/rule.png -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGPushControllerKit-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image4.imageset/Course.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image4.imageset/Course.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image6.imageset/study.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image6.imageset/study.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image1.imageset/exam@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image1.imageset/exam@2x.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image1.imageset/exam@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image1.imageset/exam@3x.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image2.imageset/exercises.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image2.imageset/exercises.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image4.imageset/Course@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image4.imageset/Course@2x.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image4.imageset/Course@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image4.imageset/Course@3x.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image5.imageset/rule@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image5.imageset/rule@2x.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image5.imageset/rule@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image5.imageset/rule@3x.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image6.imageset/study@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image6.imageset/study@2x.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image6.imageset/study@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image6.imageset/study@3x.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image2.imageset/exercises@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image2.imageset/exercises@2x.png -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image2.imageset/exercises@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit/Assets.xcassets/Image2.imageset/exercises@3x.png -------------------------------------------------------------------------------- /WGPushControllerKit.xcodeproj/xcuserdata/wanggang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /WGPushControllerKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WGPushControllerKit/WGModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGModel.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/6. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGModel.h" 10 | 11 | @implementation WGModel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /WGPushControllerKit.xcodeproj/project.xcworkspace/xcuserdata/wanggang.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wanggang1128/WGPushControllerKit/HEAD/WGPushControllerKit.xcodeproj/project.xcworkspace/xcuserdata/wanggang.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /WGPushControllerKit/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/5. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /WGPushControllerKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGNoParamViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGNoParamViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/6. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WGNoParamViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /WGPushControllerKit/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/5. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /WGPushControllerKit/WGModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGModel.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/6. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WGModel : NSObject 12 | 13 | @property (nonatomic, copy) NSString *name; 14 | @property (nonatomic, assign) NSInteger age; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/WGCustomViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGCustomViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface WGCustomViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/subController/WGOneViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGOneViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface WGOneViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/subController/WGSixViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGSixViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface WGSixViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/subController/WGTwoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGTwoViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface WGTwoViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/subController/WGFiveViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGFiveViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface WGFiveViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/subController/WGFourViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGFourViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface WGFourViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/subController/WGThreeViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGThreeViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface WGThreeViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /WGPushControllerKit/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/5. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGInitWithViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGInitWithViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/6. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "WGModel.h" 11 | 12 | @interface WGInitWithViewController : UIViewController 13 | 14 | - (instancetype)initWithDic:(NSDictionary *)dic model:(WGModel *)model array:(NSString *)array; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /WGPushControllerKit.xcodeproj/xcuserdata/wanggang.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | WGPushControllerKit.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGXibViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGXibViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2019/2/13. 6 | // Copyright © 2019 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface WGXibViewController : UIViewController 14 | 15 | @property (nonatomic, assign) NSInteger age; 16 | 17 | - (instancetype)initWithName:(NSString *)name; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "1@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "1@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGSwiftViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WGSwiftViewController.swift 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2019/3/19. 6 | // Copyright © 2019 wanggang. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class WGSwiftViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | self.view.backgroundColor = UIColor.red 17 | self.title = "WGSwiftViewController" 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "exam.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "exam@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "exam@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "rule.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "rule@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "rule@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "study.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "study@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "study@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Course.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Course@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Course@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/Image2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "exercises.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "exercises@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "exercises@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGOtherViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGOtherViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/6. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WGOtherViewController : UIViewController 12 | 13 | @property (nonatomic, copy) NSString *school; 14 | @property (nonatomic, assign) NSInteger age; 15 | @property (nonatomic, assign) BOOL isMale; 16 | 17 | - (instancetype)initWithDic:(NSDictionary *)dic; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/subController/WGOneViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGOneViewController.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGOneViewController.h" 10 | 11 | @interface WGOneViewController () 12 | 13 | @end 14 | 15 | @implementation WGOneViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | self.title = @"WGOneViewController"; 21 | self.view.backgroundColor = [UIColor yellowColor]; 22 | 23 | } 24 | 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /WGPushControllerKit.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.name = "WGPushControllerKit" 4 | s.version = "1.1.1" 5 | s.summary = "底层实现页面跳转不需要导入头文件,支持swift类页面跳转" 6 | 7 | s.homepage = "https://github.com/wanggang1128/WGPushControllerKit" 8 | s.license = "MIT" 9 | s.author = { "王刚" => "wxwangg@163.com" } 10 | 11 | s.platform = :ios 12 | s.ios.deployment_target = "5.0" 13 | s.source = { :git => "https://github.com/wanggang1128/WGPushControllerKit.git", :tag => "#{s.version}" } 14 | 15 | s.source_files = "WGPushControllerKit/PushTools/*.{h,m}" 16 | 17 | s.requires_arc = true 18 | s.frameworks = "UIKit" 19 | 20 | end 21 | -------------------------------------------------------------------------------- /WGPushControllerKitTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /WGPushControllerKitUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGNoParamViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGNoParamViewController.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/6. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGNoParamViewController.h" 10 | 11 | @interface WGNoParamViewController () 12 | 13 | @end 14 | 15 | @implementation WGNoParamViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | self.title = @"没有传值"; 21 | self.view.backgroundColor = [UIColor whiteColor]; 22 | 23 | NSString *remindStr = @"没有传值"; 24 | 25 | //我只是为了显示传过来的内容.所以就用UIAlertView了 26 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"没有传值" message:remindStr delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:nil, nil]; 27 | [alert show]; 28 | } 29 | 30 | 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGProrertyViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGProrertyViewController.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/6. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WGProrertyViewController : UIViewController 12 | 13 | @property (nonatomic, copy) NSString *name; 14 | @property (nonatomic, strong) NSArray *array; 15 | @property (nonatomic, strong) NSDictionary *dictionary; 16 | //数字在字典中类型为nsnumber,s属性类型设为常用的一下几种类型 17 | @property (nonatomic, assign) int ageInt; 18 | @property (nonatomic, assign) NSInteger ageNSIntager; 19 | @property (nonatomic, assign) CGFloat ageCGFloat; 20 | @property (nonatomic, strong) NSNumber *ageNSNumber; 21 | @property (nonatomic, copy) NSString *ageNSString; 22 | @property (nonatomic, assign) BOOL ageBOOL; 23 | 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/subController/WGSixViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGSixViewController.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGSixViewController.h" 10 | 11 | @interface WGSixViewController () 12 | 13 | @end 14 | 15 | @implementation WGSixViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | self.title = @"WGSixViewController"; 21 | self.view.backgroundColor = [UIColor brownColor]; 22 | } 23 | 24 | /* 25 | #pragma mark - Navigation 26 | 27 | // In a storyboard-based application, you will often want to do a little preparation before navigation 28 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 29 | // Get the new view controller using [segue destinationViewController]. 30 | // Pass the selected object to the new view controller. 31 | } 32 | */ 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/subController/WGFiveViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGFiveViewController.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGFiveViewController.h" 10 | 11 | @interface WGFiveViewController () 12 | 13 | @end 14 | 15 | @implementation WGFiveViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | self.title = @"WGFiveViewController"; 21 | self.view.backgroundColor = [UIColor cyanColor]; 22 | } 23 | 24 | /* 25 | #pragma mark - Navigation 26 | 27 | // In a storyboard-based application, you will often want to do a little preparation before navigation 28 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 29 | // Get the new view controller using [segue destinationViewController]. 30 | // Pass the selected object to the new view controller. 31 | } 32 | */ 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/subController/WGFourViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGFourViewController.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGFourViewController.h" 10 | 11 | @interface WGFourViewController () 12 | 13 | @end 14 | 15 | @implementation WGFourViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | self.title = @"WGFourViewController"; 21 | self.view.backgroundColor = [UIColor grayColor]; 22 | } 23 | 24 | /* 25 | #pragma mark - Navigation 26 | 27 | // In a storyboard-based application, you will often want to do a little preparation before navigation 28 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 29 | // Get the new view controller using [segue destinationViewController]. 30 | // Pass the selected object to the new view controller. 31 | } 32 | */ 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/subController/WGTwoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGTwoViewController.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGTwoViewController.h" 10 | 11 | @interface WGTwoViewController () 12 | 13 | @end 14 | 15 | @implementation WGTwoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | self.title = @"WGTwoViewController"; 21 | self.view.backgroundColor = [UIColor blueColor]; 22 | 23 | } 24 | 25 | /* 26 | #pragma mark - Navigation 27 | 28 | // In a storyboard-based application, you will often want to do a little preparation before navigation 29 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 30 | // Get the new view controller using [segue destinationViewController]. 31 | // Pass the selected object to the new view controller. 32 | } 33 | */ 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/subController/WGThreeViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGThreeViewController.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGThreeViewController.h" 10 | 11 | @interface WGThreeViewController () 12 | 13 | @end 14 | 15 | @implementation WGThreeViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | self.title = @"WGThreeViewController"; 21 | self.view.backgroundColor = [UIColor greenColor]; 22 | 23 | } 24 | 25 | /* 26 | #pragma mark - Navigation 27 | 28 | // In a storyboard-based application, you will often want to do a little preparation before navigation 29 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 30 | // Get the new view controller using [segue destinationViewController]. 31 | // Pass the selected object to the new view controller. 32 | } 33 | */ 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /WGPushControllerKitTests/WGPushControllerKitTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGPushControllerKitTests.m 3 | // WGPushControllerKitTests 4 | // 5 | // Created by wanggang on 2018/9/5. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WGPushControllerKitTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation WGPushControllerKitTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGProrertyViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGProrertyViewController.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/6. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGProrertyViewController.h" 10 | 11 | @interface WGProrertyViewController () 12 | 13 | @end 14 | 15 | @implementation WGProrertyViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | self.title = @"只有属性传值"; 21 | self.view.backgroundColor = [UIColor whiteColor]; 22 | 23 | NSString *remindStr = [NSString stringWithFormat:@"name=:%@\n,array=:%@\n,dictionary=:%@\n,ageInt=:%d\n,ageNSIntager=:%d\n,ageCGFloat=:%f\n,ageNSNumber=:%@\n,ageNSString=:%@\n,ageBOOL=:%@\n", self.name, self.array, self.dictionary, self.ageInt, self.ageNSIntager, self.ageCGFloat, self.ageNSNumber, self.ageNSString, self.ageBOOL?@"ageBOOL是YES":@"ageBOOL是NO"]; 24 | 25 | //我只是为了显示传过来的内容.所以就用UIAlertView了 26 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"接收过来的值" message:remindStr delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:nil, nil]; 27 | [alert show]; 28 | } 29 | 30 | 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGInitWithViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGInitWithViewController.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/6. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGInitWithViewController.h" 10 | 11 | @interface WGInitWithViewController () 12 | 13 | @property (nonatomic, copy) NSString *remindStr; 14 | 15 | @end 16 | 17 | @implementation WGInitWithViewController 18 | 19 | - (instancetype)initWithDic:(NSDictionary *)dic model:(WGModel *)model array:(NSString *)array{ 20 | self = [super init]; 21 | if (self) { 22 | self.remindStr = [NSString stringWithFormat:@"dic:%@\n-->model.name:%@\n-->model.age:%ld\n-->array:%@", dic, model.name, (long)model.age, array]; 23 | } 24 | return self; 25 | } 26 | 27 | - (void)viewDidLoad { 28 | [super viewDidLoad]; 29 | 30 | self.title = @"只有initWith方式传值"; 31 | self.view.backgroundColor = [UIColor whiteColor]; 32 | 33 | //我只是为了显示传过来的内容.所以就用UIAlertView了 34 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"接收过来的值" message:self.remindStr delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:nil, nil]; 35 | [alert show]; 36 | } 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGOtherViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGOtherViewController.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/6. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGOtherViewController.h" 10 | 11 | @interface WGOtherViewController () 12 | 13 | @property (nonatomic, copy) NSString *str; 14 | @property (nonatomic, copy) NSString *remindStr; 15 | 16 | @end 17 | 18 | @implementation WGOtherViewController 19 | 20 | - (instancetype)initWithDic:(NSDictionary *)dic{ 21 | self = [super init]; 22 | if (self) { 23 | self.str = [NSString stringWithFormat:@"dic:%@\n", dic]; 24 | 25 | } 26 | return self; 27 | } 28 | 29 | - (void)viewDidLoad { 30 | [super viewDidLoad]; 31 | 32 | self.title = @"既有property又有initWith方式传值"; 33 | self.view.backgroundColor = [UIColor whiteColor]; 34 | 35 | NSString *remindStr = [NSString stringWithFormat:@"%@-->age:%ld\n-->school:%@\n-->isMale:%@",self.str, self.age, self.school, self.isMale == YES?@"男性":@"女性"]; 36 | 37 | //我只是为了显示传过来的内容.所以就用UIAlertView了 38 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"接收过来的值" message:remindStr delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:nil, nil]; 39 | [alert show]; 40 | } 41 | 42 | 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /WGPushControllerKitUITests/WGPushControllerKitUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGPushControllerKitUITests.m 3 | // WGPushControllerKitUITests 4 | // 5 | // Created by wanggang on 2018/9/5. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WGPushControllerKitUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation WGPushControllerKitUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGXibViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGXibViewController.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2019/2/13. 6 | // Copyright © 2019 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGXibViewController.h" 10 | 11 | @interface WGXibViewController () 12 | 13 | @property (nonatomic, strong) NSString *name; 14 | 15 | @end 16 | 17 | @implementation WGXibViewController 18 | 19 | - (instancetype)initWithName:(NSString *)name{ 20 | 21 | self = [super init]; 22 | if (self) { 23 | self.name = name; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)viewDidLoad { 29 | [super viewDidLoad]; 30 | 31 | self.title = @"WGControllerPush支持xib"; 32 | NSLog(@"age:%ld---->name:%@", self.age, self.name); 33 | 34 | NSString *remindStr = [NSString stringWithFormat:@"age:%ld---->name:%@", self.age, self.name]; 35 | 36 | //我只是为了显示传过来的内容.所以就用UIAlertView了 37 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"接收过来的值" message:remindStr delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:nil, nil]; 38 | [alert show]; 39 | } 40 | 41 | /* 42 | #pragma mark - Navigation 43 | 44 | // In a storyboard-based application, you will often want to do a little preparation before navigation 45 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 46 | // Get the new view controller using [segue destinationViewController]. 47 | // Pass the selected object to the new view controller. 48 | } 49 | */ 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /WGPushControllerKit/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /WGPushControllerKit/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /WGPushControllerKit/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /WGPushControllerKit/PushTools/WGControllerPush.h: -------------------------------------------------------------------------------- 1 | // 2 | // WGControllerPush.h 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/5. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | //属性传值关键字 10 | #define WGProperty @"property" 11 | //修改初始化方法关键字 12 | #define WGInitWith @"initWith" 13 | 14 | 15 | #import 16 | #import 17 | 18 | #pragma mark -传值类型 19 | typedef NS_ENUM(NSInteger , WGPushControllerType) { 20 | WGPushNoParam = 0, //不需要传值 21 | WGPushProperty = 1, //只有属性传值 22 | WGPushInit = 2, //重写了init方法传值 23 | WGPushOther = 3, //其他,混合方式传值(既有属性又有initWith)等 24 | }; 25 | 26 | @interface WGControllerPush : NSObject 27 | 28 | + (WGControllerPush *)WGControllerPushShare; 29 | 30 | #pragma mark -不需要传值的话直接调这个接口 31 | /** 32 | 不需要传值 33 | 34 | @param fromCon 当前页面 35 | @param toCon push到的页面 36 | @param projName 工程名字(toCon为OC类时projName传nil) 37 | */ 38 | - (void)pushFromController:(UIViewController *)fromCon toCon:(NSString *)toCon projName:(NSString *)projName; 39 | 40 | #pragma mark -需要传值的话直接调这个接口 41 | 42 | /** 43 | 通用页面跳转-需要传值时 44 | 45 | @param fromCon 当前页面 46 | @param toCon push到的页面 47 | @param type push页面传值类型 48 | @param paramDic 传值字典 49 | @param projName 工程名字(toCon为OC类时projName传nil) 50 | */ 51 | - (void)pushFromController:(UIViewController *)fromCon toCon:(NSString *)toCon paramType:(WGPushControllerType)type param:(NSDictionary *)paramDic projName:(NSString *)projName; 52 | 53 | /** 54 | 根据类名字获取其对应的UIViewController 55 | @param conName 指定的类名字 56 | @param type 页面传值类型 57 | @param paramDic 传值字典 58 | @param projName 工程名字(conName为OC类时projName传nil) 59 | @return 类对象 60 | */ 61 | - (UIViewController *)getViewControllerWithConName:(NSString *)conName paramType:(WGPushControllerType)type param:(NSDictionary *)paramDic projName:(NSString *)projName; 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /WGPushControllerKit/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /WGPushControllerKit/demo01/WGXibViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /WGPushControllerKit/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/5. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | 21 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 22 | self.window.backgroundColor = [UIColor whiteColor]; 23 | 24 | ViewController *vc = [[ViewController alloc] init]; 25 | UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vc]; 26 | 27 | self.window.rootViewController = nav; 28 | [self.window makeKeyAndVisible]; 29 | 30 | return YES; 31 | } 32 | 33 | 34 | - (void)applicationWillResignActive:(UIApplication *)application { 35 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 36 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 37 | } 38 | 39 | 40 | - (void)applicationDidEnterBackground:(UIApplication *)application { 41 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 42 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 43 | } 44 | 45 | 46 | - (void)applicationWillEnterForeground:(UIApplication *)application { 47 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 48 | } 49 | 50 | 51 | - (void)applicationDidBecomeActive:(UIApplication *)application { 52 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 53 | } 54 | 55 | 56 | - (void)applicationWillTerminate:(UIApplication *)application { 57 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 58 | } 59 | 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WGPushControllerKit 2 | 这是一个底层实现页面跳转的工具,通过该工具可以不再import将要跳转页面的头文件,支持常用传值;可以降低文件之间的耦合;有助于组件化;支持个性化配置九宫格菜单 3 | 4 | ## 效果 5 | 6 | ![](https://github.com/wanggang1128/WGPushControllerKit/raw/master/WGPushControllerKit/demo.gif) 7 | 8 | 集成方法: 9 | ----- 10 | 11 | #### 1、可以直接把工具类PushTools拖入到工程中使用 12 | 13 | #### 2、通过cocoapod方式 14 | 15 | (1) 首先在Podfile文件中添加 pod 'WGPushControllerKit' 16 | 17 | (2) 在项目根目录执行pod install, 即可安装成功 18 | 19 | (3) 如果报找不到,请在执行pod install之前,先执行pod repo update 20 | 21 | 使用: 22 | ---- 23 | 24 | ###### 把#import "WGControllerPush.h"导入到工程pch文件中,或者在需要需要跳转的文件导入#import "WGControllerPush.h" 25 | 26 | ###### 传值分为四种:不需要传值;只通过属性传值;只通过重写init方法传值;既有属性传值也重写了init方法 27 | 28 | #### (1)不需要传值 29 | 30 | 例如一个类 31 | 32 | ``` 33 | @interface WGNoParamViewController : UIViewController 34 | 35 | @end 36 | ``` 37 | 38 | 在跳转的地方,只需要写如下代码(toCon的参数为需要跳转的页面类名称字符串) 39 | ``` 40 | [[WGControllerPush WGControllerPushShare] pushFromController:self toCon:@"WGNoParamViewController"]; 41 | ``` 42 | 43 | #### (2)只通过属性传值 44 | 45 | 例如一个类 46 | 47 | ``` 48 | #import 49 | @interface WGProrertyViewController : UIViewController 50 | @property (nonatomic, copy) NSString *name; 51 | @property (nonatomic, strong) NSArray *array; 52 | @end 53 | ``` 54 | 55 | 在跳转的地方,只需要写如下代码 56 | 57 | ``` 58 | //存储属性的字典,属性的名字作为key 59 | NSDictionary *propertyDic = @{ 60 | @"name":@"小明", 61 | @"array":@[@"arr1",@(18.123)] 62 | }; 63 | //外层用@"property"作为key包装,为了识别哪些值需要属性传值 64 | NSDictionary *paramDic = @{ 65 | WGProperty:propertyDic 66 | }; 67 | [[WGControllerPush WGControllerPushShare] pushFromController:self toCon:@"WGProrertyViewController" paramType:WGPushProperty param:paramDic]; 68 | ``` 69 | 70 | #### (3)只通过重写init方法传值 71 | 72 | ``` 73 | @interface WGInitWithViewController : UIViewController 74 | - (instancetype)initWithDic:(NSDictionary *)dic model:(WGModel *)model array:(NSString *)array; 75 | @end 76 | ``` 77 | 78 | 在跳转的地方,只需要写如下代码 79 | 80 | ``` 81 | WGModel *model = [[WGModel alloc] init]; 82 | model.name = @"小明"; 83 | model.age = 18; 84 | //key是重写init的函数名字,值按照顺序放在一个数组中 85 | NSArray *valueArr = @[ 86 | @{ 87 | @"height":@(179), 88 | @"address":@"人民路" 89 | }, 90 | model, 91 | @[@"数组元素",@"18.123"] 92 | ]; 93 | NSDictionary *initDic = @{ 94 | @"initWithDic:model:array:":valueArr 95 | }; 96 | //外层用@"initWith"作为key包装 97 | NSDictionary *paramDic = @{ 98 | WGInitWith:initDic 99 | }; 100 | [[WGControllerPush WGControllerPushShare] pushFromController:self toCon:@"WGInitWithViewController" paramType:WGPushInit param:paramDic]; 101 | ``` 102 | 103 | #### (4)既有属性传值也重写了init方法 104 | 105 | ``` 106 | @interface WGOtherViewController : UIViewController 107 | @property (nonatomic, copy) NSString *school; 108 | @property (nonatomic, assign) BOOL isMale; 109 | - (instancetype)initWithDic:(NSDictionary *)dic; 110 | @end 111 | ``` 112 | 113 | 在跳转的地方,只需要写如下代码 114 | 115 | ``` 116 | NSDictionary *paramDic = @{ 117 | WGInitWith:@{ 118 | @"initWithDic:":@[ 119 | @{ 120 | @"height":@(179.12), 121 | @"address":@"人民路", 122 | @"hasGirFirend":@(NO) 123 | } 124 | ] 125 | }, 126 | WGProperty:@{ 127 | @"school":@"太和一中", 128 | @"isMale":@(YES) 129 | } 130 | }; 131 | [[WGControllerPush WGControllerPushShare] pushFromController:self toCon:@"WGOtherViewController" paramType:WGPushOther param:paramDic]; 132 | ``` 133 | ### 链接:可参考https://www.jianshu.com/p/305cce2d513f 134 | 135 | 136 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /WGPushControllerKit/demo02/WGCustomViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGCustomViewController.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/12/26. 6 | // Copyright © 2018 wanggang. All rights reserved. 7 | // 8 | 9 | #define WGSCREEN [UIScreen mainScreen].bounds.size 10 | #define WGWIDTH [UIScreen mainScreen].bounds.size.width 11 | 12 | #import "WGCustomViewController.h" 13 | #import "WGControllerPush.h" 14 | 15 | @interface WGCustomViewController () 16 | 17 | @property (nonatomic, strong) UIButton *cusBtn; 18 | @property (nonatomic, strong) NSArray *dataArr; 19 | @property (nonatomic, strong) UIView *bgView; 20 | 21 | @end 22 | 23 | @implementation WGCustomViewController 24 | 25 | - (void)viewDidLoad { 26 | [super viewDidLoad]; 27 | 28 | self.title = @"后台配置九宫格"; 29 | self.view.backgroundColor = [UIColor whiteColor]; 30 | 31 | [self.view addSubview:self.cusBtn]; 32 | 33 | [self loadNetData]; 34 | 35 | } 36 | 37 | //布局九宫格视图 38 | - (void)reloadView{ 39 | 40 | CGFloat margin = 15; 41 | CGFloat width = (WGWIDTH - margin*4)/3; 42 | 43 | if (self.bgView) { 44 | [self.bgView removeFromSuperview]; 45 | } 46 | 47 | self.bgView = [[UIView alloc] initWithFrame:CGRectMake(0, 150, WGWIDTH, (width+margin)*(self.dataArr.count/4+1))]; 48 | _bgView.backgroundColor = [UIColor yellowColor]; 49 | [self.view addSubview:_bgView]; 50 | 51 | for (NSInteger i = 0; i 24 | 25 | @property (nonatomic, strong) UITableView *tableView; 26 | @property (nonatomic, strong) NSArray *dataArr; 27 | 28 | @end 29 | 30 | @implementation ViewController 31 | 32 | - (void)viewDidLoad { 33 | [super viewDidLoad]; 34 | 35 | [self setBaseView]; 36 | [self loadData]; 37 | } 38 | 39 | - (void)setBaseView{ 40 | self.title = @"ViewController"; 41 | self.view.backgroundColor = [UIColor whiteColor]; 42 | [self.view addSubview:self.tableView]; 43 | } 44 | 45 | - (void)loadData{ 46 | self.dataArr = @[@"不传值", @"只有属性传值", @"只有initWith传值", @"既有property又有initWith方式传值", @"xib页面", @"swift页面", @"后台九宫格"]; 47 | } 48 | 49 | #pragma mark - 50 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ 51 | return 1; 52 | } 53 | 54 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 55 | return self.dataArr.count; 56 | } 57 | 58 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 59 | 60 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([UITableViewCell class]) forIndexPath:indexPath]; 61 | 62 | cell.textLabel.text = [self.dataArr objectAtIndex:indexPath.row]; 63 | return cell; 64 | } 65 | 66 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 67 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 68 | 69 | switch (indexPath.row) { 70 | case 0:{ 71 | [[WGControllerPush WGControllerPushShare] pushFromController:self toCon:@"WGNoParamViewController" projName:nil]; 72 | break; 73 | }case 1:{ 74 | //存储属性的字典,属性的名字作为key 75 | NSDictionary *propertyDic = @{ 76 | @"name":@"小明", 77 | @"array":@[@"arr1",@(18.123)], 78 | @"dictionary":@{@"key1":@"value1", @"key2":@(18.123)}, 79 | @"ageInt":@(18), 80 | @"ageNSIntager":@(18), 81 | @"ageCGFloat":@(18.123), 82 | @"ageNSNumber":@(18.123), 83 | @"ageNSString":@(18.123), 84 | @"ageBOOL":@(YES) 85 | }; 86 | //外层用@"property"作为key包装,为了识别哪些值需要属性传值 87 | NSDictionary *paramDic = @{ 88 | WGProperty:propertyDic 89 | }; 90 | 91 | [[WGControllerPush WGControllerPushShare] pushFromController:self toCon:@"WGProrertyViewController" paramType:WGPushProperty param:paramDic projName:nil]; 92 | break; 93 | }case 2:{ 94 | //只有init方式传值 95 | WGModel *model = [[WGModel alloc] init]; 96 | model.name = @"小明"; 97 | model.age = 18; 98 | 99 | //key是重写init的函数名字,值按照顺序放在一个数组中 100 | NSArray *valueArr = @[ 101 | @{ 102 | @"height":@(179), 103 | @"address":@"人民路" 104 | }, 105 | model, 106 | @[@"数组元素",@"18.123"] 107 | ]; 108 | 109 | NSDictionary *initDic = @{ 110 | @"initWithDic:model:array:":valueArr 111 | }; 112 | 113 | NSDictionary *paramDic = @{ 114 | WGInitWith:initDic 115 | }; 116 | [[WGControllerPush WGControllerPushShare] pushFromController:self toCon:@"WGInitWithViewController" paramType:WGPushInit param:paramDic projName:nil]; 117 | break; 118 | }case 3:{ 119 | 120 | NSDictionary *paramDic = @{ 121 | WGInitWith:@{ 122 | @"initWithDic:":@[ 123 | @{ 124 | @"height":@(179.12), 125 | @"address":@"人民路", 126 | @"hasGirFirend":@(NO) 127 | } 128 | ] 129 | }, 130 | WGProperty:@{ 131 | @"school":@"太和一中", 132 | @"age":@(18), 133 | @"isMale":@(YES) 134 | } 135 | }; 136 | [[WGControllerPush WGControllerPushShare] pushFromController:self toCon:@"WGOtherViewController" paramType:WGPushOther param:paramDic projName:nil]; 137 | break; 138 | }case 4:{ 139 | 140 | NSDictionary *dic = @{ 141 | WGProperty:@{ 142 | @"age":@(18) 143 | }, 144 | WGInitWith:@{ 145 | @"initWithName:":@[@"寒江"] 146 | } 147 | }; 148 | [[WGControllerPush WGControllerPushShare] pushFromController:self toCon:@"WGXibViewController" paramType:WGPushOther param:dic projName:nil]; 149 | 150 | break; 151 | }case 5:{ 152 | NSString *projName = [NSBundle mainBundle].infoDictionary[@"CFBundleExecutable"]; 153 | [[WGControllerPush WGControllerPushShare] pushFromController:self toCon:@"WGSwiftViewController" projName:projName]; 154 | 155 | break; 156 | }case 6:{ 157 | [[WGControllerPush WGControllerPushShare] pushFromController:self toCon:@"WGCustomViewController" projName:nil]; 158 | 159 | break; 160 | } 161 | default: 162 | break; 163 | } 164 | } 165 | 166 | #pragma mark -懒加载 167 | -(UITableView *)tableView{ 168 | if (!_tableView) { 169 | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, WGWIDTH, WGHEIGHT) style:UITableViewStylePlain]; 170 | _tableView.backgroundColor = [UIColor whiteColor]; 171 | _tableView.delegate = self; 172 | _tableView.dataSource = self; 173 | [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:NSStringFromClass([UITableViewCell class])]; 174 | } 175 | return _tableView; 176 | } 177 | 178 | -(NSArray *)dataArr{ 179 | if (!_dataArr) { 180 | _dataArr = [[NSArray alloc] init]; 181 | } 182 | return _dataArr; 183 | } 184 | 185 | 186 | @end 187 | -------------------------------------------------------------------------------- /WGPushControllerKit/PushTools/WGControllerPush.m: -------------------------------------------------------------------------------- 1 | // 2 | // WGControllerPush.m 3 | // WGPushControllerKit 4 | // 5 | // Created by wanggang on 2018/9/5. 6 | // Copyright © 2018年 wanggang. All rights reserved. 7 | // 8 | 9 | #import "WGControllerPush.h" 10 | #import 11 | 12 | @implementation WGControllerPush 13 | 14 | static WGControllerPush *instance = nil; 15 | +(WGControllerPush *)WGControllerPushShare{ 16 | static dispatch_once_t onceToken; 17 | dispatch_once(&onceToken, ^{ 18 | instance = [[WGControllerPush alloc] init]; 19 | }); 20 | return instance; 21 | } 22 | 23 | - (void)pushFromController:(UIViewController *)fromCon toCon:(NSString *)toCon projName:(NSString *)projName{ 24 | 25 | [self pushFromController:fromCon toCon:toCon paramType:WGPushNoParam param:nil projName:projName]; 26 | } 27 | 28 | - (void)pushFromController:(UIViewController *)fromCon toCon:(NSString *)toCon paramType:(WGPushControllerType)type param:(NSDictionary *)paramDic projName:(NSString *)projName{ 29 | if (!toCon || toCon.length == 0) { 30 | return; 31 | } 32 | UIViewController *con = [self getViewControllerWithConName:toCon paramType:type param:paramDic projName:projName]; 33 | if (con) { 34 | [fromCon.navigationController pushViewController:con animated:YES]; 35 | } 36 | } 37 | 38 | - (UIViewController *)getViewControllerWithConName:(NSString *)conName paramType:(WGPushControllerType)type param:(NSDictionary *)paramDic projName:(NSString *)projName{ 39 | 40 | if (!conName || conName.length == 0) { 41 | return nil; 42 | } 43 | NSString *targetStr = nil; 44 | if (projName && projName.length>0) { 45 | targetStr = [NSString stringWithFormat:@"%@.%@",projName, conName]; 46 | }else{ 47 | targetStr = conName; 48 | } 49 | 50 | //根据类名转化为Class类型 51 | Class classCon = NSClassFromString(targetStr); 52 | //初始化并分配内存 53 | id con = [[classCon alloc] init]; 54 | //根据HuPushControllerType判断是否有值传到下一页 55 | switch (type) { 56 | case WGPushNoParam: { 57 | } break; 58 | case WGPushProperty: { 59 | [self getToConFromProperty:paramDic toCon:con]; 60 | } break; 61 | case WGPushInit: { 62 | con = [self getToConFromInit:paramDic classCon:classCon]; 63 | } break; 64 | case WGPushOther: { 65 | con = [self getToConFromInit:paramDic classCon:classCon]; 66 | [self getToConFromProperty:paramDic toCon:con]; 67 | } break; 68 | default: 69 | break; 70 | } 71 | if (con) { 72 | return con; 73 | }else{ 74 | return nil; 75 | } 76 | } 77 | 78 | //属性传值 79 | - (void)getToConFromProperty:(NSDictionary *)paramDic toCon:(id)toCon { 80 | //需要属性传值,则通过运行时来解决 81 | if (!toCon) { 82 | return; 83 | } 84 | NSDictionary *propertyDic = [paramDic valueForKey:WGProperty]; 85 | NSArray *keyArr = [propertyDic allKeys]; 86 | for (int i = 0; i < keyArr.count; i++) { 87 | NSString *key = [keyArr objectAtIndex:i]; 88 | id value = [propertyDic valueForKey:key]; 89 | //把key的首字母大写 90 | NSString *firstStr = [key substringWithRange:NSMakeRange(0, 1)].uppercaseString; 91 | NSString *restStr = [key substringFromIndex:1]; 92 | //生成对应属性的set方法 93 | NSString *selName = [NSString stringWithFormat:@"set%@%@:", firstStr, restStr]; 94 | SEL method = NSSelectorFromString(selName); 95 | if ([toCon respondsToSelector:method]) { 96 | //等价于controller.shuxing = value; 97 | //如果是数字则在字典中是NSNumber类型,需要把NSNumber类型转为NSInteger或者CGFloat等 98 | if ([value isKindOfClass:[NSNumber class]]) { 99 | 100 | NSString *keyType = [self getPropertyType:key inObject:toCon]; 101 | NSString *valueStr = [(NSNumber *) value stringValue]; 102 | 103 | if (keyType) { 104 | if ([keyType containsString:@"NSString"]) { 105 | void (*action)(id, SEL, id) = (void (*)(id, SEL, id)) objc_msgSend; 106 | action(toCon, method, valueStr); 107 | }else if ([keyType containsString:@"CGFloat"]){ 108 | CGFloat val = [valueStr doubleValue]; 109 | void (*action)(id, SEL, CGFloat) = (void (*)(id, SEL, CGFloat)) objc_msgSend; 110 | action(toCon, method, val); 111 | }else if ([keyType containsString:@"int"]){ 112 | int val = [(NSNumber *)value intValue]; 113 | void (*action)(id, SEL, int) = (void (*)(id, SEL, int)) objc_msgSend; 114 | action(toCon, method, val); 115 | }else if ([keyType containsString:@"float"]){ 116 | float val = [value floatValue]; 117 | void (*action)(id, SEL, float) = (void (*)(id, SEL, float)) objc_msgSend; 118 | action(toCon, method, val); 119 | }else if ([keyType containsString:@"NSNumber"]){ 120 | void (*action)(id, SEL, id) = (void (*)(id, SEL, id)) objc_msgSend; 121 | action(toCon, method, value); 122 | }else{ 123 | NSInteger val = [(NSNumber *)value integerValue]; 124 | void (*action)(id, SEL, NSInteger) = (void (*)(id, SEL, NSInteger)) objc_msgSend; 125 | action(toCon, method, val); 126 | } 127 | }else{ 128 | void (*action)(id, SEL, id) = (void (*)(id, SEL, id)) objc_msgSend; 129 | action(toCon, method, value); 130 | } 131 | } else { 132 | void (*action)(id, SEL, id) = (void (*)(id, SEL, id)) objc_msgSend; 133 | action(toCon, method, value); 134 | } 135 | } 136 | } 137 | } 138 | 139 | //init传值,类似于initWithDic 140 | - (id)getToConFromInit:(NSDictionary *)paramDic classCon:(Class)classCon { 141 | id toCon = nil; 142 | NSDictionary *initDic = [paramDic valueForKey:WGInitWith]; 143 | NSString *key = [initDic allKeys].firstObject; 144 | //把OC的字符串改成C语言的字符串 145 | const char *ky = [key UTF8String]; 146 | NSArray *value = [initDic valueForKey:key]; 147 | //这里判断value数组元素个数是否和 key按:分割成数组后的个数相等 148 | if ([key containsString:@":"] && value) { 149 | if ([key componentsSeparatedByString:@":"].count == (value.count + 1)) { 150 | switch (value.count) { 151 | case 1: { 152 | //先alloc 153 | id classAlloc = ((id (*) (id, SEL))objc_msgSend)(classCon, sel_registerName("alloc")); 154 | //sel_registerName(ky)等价于@selecter(ky) 155 | if ([classAlloc respondsToSelector:sel_registerName(ky)]) { 156 | id paramOne = [value objectAtIndex:0]; 157 | id (*action)(id, SEL, id) = (id(*)(id, SEL, id)) objc_msgSend; 158 | toCon = action(classAlloc, sel_registerName(ky), paramOne); 159 | } 160 | } break; 161 | case 2: { 162 | id classAlloc = ((id (*) (id, SEL))objc_msgSend)(classCon, sel_registerName("alloc")); 163 | if ([classAlloc respondsToSelector:sel_registerName(ky)]) { 164 | id paramOne = [value objectAtIndex:0]; 165 | id paramTwo = [value objectAtIndex:1]; 166 | id (*action)(id, SEL, id, id) = (id(*)(id, SEL, id, id)) objc_msgSend; 167 | toCon = action(classAlloc, sel_registerName(ky), paramOne, paramTwo); 168 | } 169 | } break; 170 | case 3: { 171 | id classAlloc = ((id (*) (id, SEL))objc_msgSend)(classCon, sel_registerName("alloc")); 172 | if ([classAlloc respondsToSelector:sel_registerName(ky)]) { 173 | id (*action)(id, SEL, id, id, id) = (id(*)(id, SEL, id, id, id)) objc_msgSend; 174 | toCon = action(classAlloc, sel_registerName(ky), [value objectAtIndex:0], [value objectAtIndex:1], [value objectAtIndex:2]); 175 | } 176 | } break; 177 | case 4: { 178 | id classAlloc = ((id (*) (id, SEL))objc_msgSend)(classCon, sel_registerName("alloc")); 179 | if ([classAlloc respondsToSelector:sel_registerName(ky)]) { 180 | id (*action)(id, SEL, id, id, id, id) = (id(*)(id, SEL, id, id, id, id)) objc_msgSend; 181 | toCon = action(classAlloc, sel_registerName(ky), [value objectAtIndex:0], [value objectAtIndex:1], [value objectAtIndex:2], [value objectAtIndex:3]); 182 | } 183 | } break; 184 | default: 185 | break; 186 | } 187 | } 188 | } 189 | return toCon; 190 | } 191 | 192 | //获取属性类型 193 | - (NSString *)getPropertyType:(NSString *)property inObject:(id)obj{ 194 | 195 | NSString *type = nil; 196 | 197 | if (!property || !obj || property.length == 0) { 198 | return type; 199 | } 200 | 201 | objc_property_t pro = class_getProperty([obj class], property.UTF8String); 202 | //属性 203 | const char *property_attr = property_getAttributes(pro); 204 | 205 | if (property_attr[1] == '@') { 206 | //如果是OC类的类型,则截取子字符串得到真实类型 207 | char * occurs1 = strchr(property_attr, '@'); 208 | char * occurs2 = strrchr(occurs1, '"'); 209 | char dest_str[40]= {0}; 210 | strncpy(dest_str, occurs1, occurs2 - occurs1); 211 | char * realType = (char *)malloc(sizeof(char) * 50); 212 | int i = 0, j = 0, len = (int)strlen(dest_str); 213 | for (; i < len; i++) { 214 | if ((dest_str[i] >= 'a' && dest_str[i] <= 'z') || (dest_str[i] >= 'A' && dest_str[i] <= 'Z')) { 215 | realType[j++] = dest_str[i]; 216 | } 217 | } 218 | type = [NSString stringWithUTF8String:realType]; 219 | free(realType); 220 | } else { 221 | //根据如下链接,获得对应的属性类型https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html#//apple_ref/doc/uid/TP40008048-CH100-SW1 222 | type = [self getPropertyRealType:property_attr]; 223 | } 224 | return type; 225 | } 226 | 227 | - (NSString *)getPropertyRealType:(const char *)property_attr { 228 | NSString *type; 229 | 230 | char t = property_attr[1]; 231 | 232 | if (t == 'c') { 233 | type = @"char"; 234 | } else if (t == 'i') { 235 | type = @"int"; 236 | } else if (t == 's') { 237 | type = @"short"; 238 | } else if (t == 'l') { 239 | type = @"long"; 240 | } else if (t == 'q') { 241 | //long long 242 | type = @"NSInteger"; 243 | } else if (t == 'C') { 244 | type = @"unsigned char"; 245 | } else if (t == 'I') { 246 | type = @"unsigned int"; 247 | } else if (t == 'S') { 248 | type = @"unsigned short"; 249 | } else if (t == 'L') { 250 | type = @"unsigned long"; 251 | } else if (t == 'Q') { 252 | //unsigned long long 253 | type = @"NSUInteger"; 254 | } else if (t == 'f') { 255 | type = @"float"; 256 | } else if (t == 'd') { 257 | type = @"CGFloat"; 258 | } else if (t == 'B') { 259 | type = @"BOOL"; 260 | } else if (t == 'v') { 261 | type = @"void"; 262 | } else if (t == '*') { 263 | type = @"char *"; 264 | } else if (t == '@') { 265 | type = @"id"; 266 | } else if (t == '#') { 267 | type = @"Class"; 268 | } else if (t == ':') { 269 | type = @"SEL"; 270 | } else { 271 | type = @""; 272 | } 273 | return type; 274 | } 275 | 276 | @end 277 | -------------------------------------------------------------------------------- /WGPushControllerKit.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 322DE8F12240E05B00CD4B10 /* WGSwiftViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 322DE8F02240E05B00CD4B10 /* WGSwiftViewController.swift */; }; 11 | 325AABCF2213B3B3009A92EE /* WGXibViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 325AABCD2213B3B3009A92EE /* WGXibViewController.m */; }; 12 | 325AABD02213B3B3009A92EE /* WGXibViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 325AABCE2213B3B3009A92EE /* WGXibViewController.xib */; }; 13 | 325E6E4F2141192D00489A79 /* WGNoParamViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 325E6E4E2141192D00489A79 /* WGNoParamViewController.m */; }; 14 | 325E6E522141194400489A79 /* WGProrertyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 325E6E512141194300489A79 /* WGProrertyViewController.m */; }; 15 | 325E6E552141195500489A79 /* WGInitWithViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 325E6E542141195500489A79 /* WGInitWithViewController.m */; }; 16 | 325E6E582141196700489A79 /* WGOtherViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 325E6E572141196700489A79 /* WGOtherViewController.m */; }; 17 | 325E6E5B21411D1700489A79 /* WGModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 325E6E5A21411D1700489A79 /* WGModel.m */; }; 18 | 326DA68A21D390FA004D00E8 /* WGCustomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 326DA68921D390FA004D00E8 /* WGCustomViewController.m */; }; 19 | 326DA68D21D3927F004D00E8 /* WGOneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 326DA68C21D3927F004D00E8 /* WGOneViewController.m */; }; 20 | 326DA69021D3929D004D00E8 /* WGTwoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 326DA68F21D3929D004D00E8 /* WGTwoViewController.m */; }; 21 | 326DA69321D392AC004D00E8 /* WGThreeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 326DA69221D392AC004D00E8 /* WGThreeViewController.m */; }; 22 | 326DA69621D392BC004D00E8 /* WGFourViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 326DA69521D392BC004D00E8 /* WGFourViewController.m */; }; 23 | 326DA69921D392CA004D00E8 /* WGFiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 326DA69821D392CA004D00E8 /* WGFiveViewController.m */; }; 24 | 326DA69D21D392F9004D00E8 /* WGSixViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 326DA69C21D392F9004D00E8 /* WGSixViewController.m */; }; 25 | 32C9CE4B213F843900B22E4C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C9CE4A213F843900B22E4C /* AppDelegate.m */; }; 26 | 32C9CE4E213F843900B22E4C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C9CE4D213F843900B22E4C /* ViewController.m */; }; 27 | 32C9CE51213F843900B22E4C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32C9CE4F213F843900B22E4C /* Main.storyboard */; }; 28 | 32C9CE53213F843C00B22E4C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 32C9CE52213F843C00B22E4C /* Assets.xcassets */; }; 29 | 32C9CE56213F843C00B22E4C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32C9CE54213F843C00B22E4C /* LaunchScreen.storyboard */; }; 30 | 32C9CE59213F843C00B22E4C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C9CE58213F843C00B22E4C /* main.m */; }; 31 | 32C9CE63213F843C00B22E4C /* WGPushControllerKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C9CE62213F843C00B22E4C /* WGPushControllerKitTests.m */; }; 32 | 32C9CE6E213F843C00B22E4C /* WGPushControllerKitUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C9CE6D213F843C00B22E4C /* WGPushControllerKitUITests.m */; }; 33 | 32C9CE81213F9C2F00B22E4C /* WGControllerPush.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C9CE80213F9C2F00B22E4C /* WGControllerPush.m */; }; 34 | /* End PBXBuildFile section */ 35 | 36 | /* Begin PBXContainerItemProxy section */ 37 | 32C9CE5F213F843C00B22E4C /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 32C9CE3E213F843900B22E4C /* Project object */; 40 | proxyType = 1; 41 | remoteGlobalIDString = 32C9CE45213F843900B22E4C; 42 | remoteInfo = WGPushControllerKit; 43 | }; 44 | 32C9CE6A213F843C00B22E4C /* PBXContainerItemProxy */ = { 45 | isa = PBXContainerItemProxy; 46 | containerPortal = 32C9CE3E213F843900B22E4C /* Project object */; 47 | proxyType = 1; 48 | remoteGlobalIDString = 32C9CE45213F843900B22E4C; 49 | remoteInfo = WGPushControllerKit; 50 | }; 51 | /* End PBXContainerItemProxy section */ 52 | 53 | /* Begin PBXFileReference section */ 54 | 322DE8EF2240E05A00CD4B10 /* WGPushControllerKit-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WGPushControllerKit-Bridging-Header.h"; sourceTree = ""; }; 55 | 322DE8F02240E05B00CD4B10 /* WGSwiftViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WGSwiftViewController.swift; sourceTree = ""; }; 56 | 325AABCC2213B3B3009A92EE /* WGXibViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGXibViewController.h; sourceTree = ""; }; 57 | 325AABCD2213B3B3009A92EE /* WGXibViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGXibViewController.m; sourceTree = ""; }; 58 | 325AABCE2213B3B3009A92EE /* WGXibViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WGXibViewController.xib; sourceTree = ""; }; 59 | 325E6E4D2141192D00489A79 /* WGNoParamViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGNoParamViewController.h; sourceTree = ""; }; 60 | 325E6E4E2141192D00489A79 /* WGNoParamViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGNoParamViewController.m; sourceTree = ""; }; 61 | 325E6E502141194300489A79 /* WGProrertyViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGProrertyViewController.h; sourceTree = ""; }; 62 | 325E6E512141194300489A79 /* WGProrertyViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGProrertyViewController.m; sourceTree = ""; }; 63 | 325E6E532141195500489A79 /* WGInitWithViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGInitWithViewController.h; sourceTree = ""; }; 64 | 325E6E542141195500489A79 /* WGInitWithViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGInitWithViewController.m; sourceTree = ""; }; 65 | 325E6E562141196700489A79 /* WGOtherViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGOtherViewController.h; sourceTree = ""; }; 66 | 325E6E572141196700489A79 /* WGOtherViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGOtherViewController.m; sourceTree = ""; }; 67 | 325E6E5921411D1700489A79 /* WGModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGModel.h; sourceTree = ""; }; 68 | 325E6E5A21411D1700489A79 /* WGModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGModel.m; sourceTree = ""; }; 69 | 326DA68821D390FA004D00E8 /* WGCustomViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGCustomViewController.h; sourceTree = ""; }; 70 | 326DA68921D390FA004D00E8 /* WGCustomViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGCustomViewController.m; sourceTree = ""; }; 71 | 326DA68B21D3927F004D00E8 /* WGOneViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGOneViewController.h; sourceTree = ""; }; 72 | 326DA68C21D3927F004D00E8 /* WGOneViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGOneViewController.m; sourceTree = ""; }; 73 | 326DA68E21D3929D004D00E8 /* WGTwoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGTwoViewController.h; sourceTree = ""; }; 74 | 326DA68F21D3929D004D00E8 /* WGTwoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGTwoViewController.m; sourceTree = ""; }; 75 | 326DA69121D392AC004D00E8 /* WGThreeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGThreeViewController.h; sourceTree = ""; }; 76 | 326DA69221D392AC004D00E8 /* WGThreeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGThreeViewController.m; sourceTree = ""; }; 77 | 326DA69421D392BC004D00E8 /* WGFourViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGFourViewController.h; sourceTree = ""; }; 78 | 326DA69521D392BC004D00E8 /* WGFourViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGFourViewController.m; sourceTree = ""; }; 79 | 326DA69721D392CA004D00E8 /* WGFiveViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGFiveViewController.h; sourceTree = ""; }; 80 | 326DA69821D392CA004D00E8 /* WGFiveViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGFiveViewController.m; sourceTree = ""; }; 81 | 326DA69B21D392F9004D00E8 /* WGSixViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGSixViewController.h; sourceTree = ""; }; 82 | 326DA69C21D392F9004D00E8 /* WGSixViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGSixViewController.m; sourceTree = ""; }; 83 | 32C9CE46213F843900B22E4C /* WGPushControllerKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WGPushControllerKit.app; sourceTree = BUILT_PRODUCTS_DIR; }; 84 | 32C9CE49213F843900B22E4C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 85 | 32C9CE4A213F843900B22E4C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 86 | 32C9CE4C213F843900B22E4C /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 87 | 32C9CE4D213F843900B22E4C /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 88 | 32C9CE50213F843900B22E4C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 89 | 32C9CE52213F843C00B22E4C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 90 | 32C9CE55213F843C00B22E4C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 91 | 32C9CE57213F843C00B22E4C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 92 | 32C9CE58213F843C00B22E4C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 93 | 32C9CE5E213F843C00B22E4C /* WGPushControllerKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WGPushControllerKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 94 | 32C9CE62213F843C00B22E4C /* WGPushControllerKitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGPushControllerKitTests.m; sourceTree = ""; }; 95 | 32C9CE64213F843C00B22E4C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 96 | 32C9CE69213F843C00B22E4C /* WGPushControllerKitUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WGPushControllerKitUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 97 | 32C9CE6D213F843C00B22E4C /* WGPushControllerKitUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGPushControllerKitUITests.m; sourceTree = ""; }; 98 | 32C9CE6F213F843C00B22E4C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 99 | 32C9CE7F213F9C2F00B22E4C /* WGControllerPush.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WGControllerPush.h; sourceTree = ""; }; 100 | 32C9CE80213F9C2F00B22E4C /* WGControllerPush.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WGControllerPush.m; sourceTree = ""; }; 101 | /* End PBXFileReference section */ 102 | 103 | /* Begin PBXFrameworksBuildPhase section */ 104 | 32C9CE43213F843900B22E4C /* Frameworks */ = { 105 | isa = PBXFrameworksBuildPhase; 106 | buildActionMask = 2147483647; 107 | files = ( 108 | ); 109 | runOnlyForDeploymentPostprocessing = 0; 110 | }; 111 | 32C9CE5B213F843C00B22E4C /* Frameworks */ = { 112 | isa = PBXFrameworksBuildPhase; 113 | buildActionMask = 2147483647; 114 | files = ( 115 | ); 116 | runOnlyForDeploymentPostprocessing = 0; 117 | }; 118 | 32C9CE66213F843C00B22E4C /* Frameworks */ = { 119 | isa = PBXFrameworksBuildPhase; 120 | buildActionMask = 2147483647; 121 | files = ( 122 | ); 123 | runOnlyForDeploymentPostprocessing = 0; 124 | }; 125 | /* End PBXFrameworksBuildPhase section */ 126 | 127 | /* Begin PBXGroup section */ 128 | 326DA68621D39077004D00E8 /* demo01 */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 325E6E4D2141192D00489A79 /* WGNoParamViewController.h */, 132 | 325E6E4E2141192D00489A79 /* WGNoParamViewController.m */, 133 | 325E6E502141194300489A79 /* WGProrertyViewController.h */, 134 | 325E6E512141194300489A79 /* WGProrertyViewController.m */, 135 | 325E6E532141195500489A79 /* WGInitWithViewController.h */, 136 | 325E6E542141195500489A79 /* WGInitWithViewController.m */, 137 | 325E6E562141196700489A79 /* WGOtherViewController.h */, 138 | 325E6E572141196700489A79 /* WGOtherViewController.m */, 139 | 325AABCC2213B3B3009A92EE /* WGXibViewController.h */, 140 | 325AABCD2213B3B3009A92EE /* WGXibViewController.m */, 141 | 325AABCE2213B3B3009A92EE /* WGXibViewController.xib */, 142 | 322DE8F02240E05B00CD4B10 /* WGSwiftViewController.swift */, 143 | 322DE8EF2240E05A00CD4B10 /* WGPushControllerKit-Bridging-Header.h */, 144 | ); 145 | path = demo01; 146 | sourceTree = ""; 147 | }; 148 | 326DA68721D390AB004D00E8 /* demo02 */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 326DA69E21D39300004D00E8 /* subController */, 152 | 326DA68821D390FA004D00E8 /* WGCustomViewController.h */, 153 | 326DA68921D390FA004D00E8 /* WGCustomViewController.m */, 154 | ); 155 | path = demo02; 156 | sourceTree = ""; 157 | }; 158 | 326DA69E21D39300004D00E8 /* subController */ = { 159 | isa = PBXGroup; 160 | children = ( 161 | 326DA68B21D3927F004D00E8 /* WGOneViewController.h */, 162 | 326DA68C21D3927F004D00E8 /* WGOneViewController.m */, 163 | 326DA68E21D3929D004D00E8 /* WGTwoViewController.h */, 164 | 326DA68F21D3929D004D00E8 /* WGTwoViewController.m */, 165 | 326DA69121D392AC004D00E8 /* WGThreeViewController.h */, 166 | 326DA69221D392AC004D00E8 /* WGThreeViewController.m */, 167 | 326DA69421D392BC004D00E8 /* WGFourViewController.h */, 168 | 326DA69521D392BC004D00E8 /* WGFourViewController.m */, 169 | 326DA69721D392CA004D00E8 /* WGFiveViewController.h */, 170 | 326DA69821D392CA004D00E8 /* WGFiveViewController.m */, 171 | 326DA69B21D392F9004D00E8 /* WGSixViewController.h */, 172 | 326DA69C21D392F9004D00E8 /* WGSixViewController.m */, 173 | ); 174 | path = subController; 175 | sourceTree = ""; 176 | }; 177 | 32C9CE3D213F843900B22E4C = { 178 | isa = PBXGroup; 179 | children = ( 180 | 32C9CE48213F843900B22E4C /* WGPushControllerKit */, 181 | 32C9CE61213F843C00B22E4C /* WGPushControllerKitTests */, 182 | 32C9CE6C213F843C00B22E4C /* WGPushControllerKitUITests */, 183 | 32C9CE47213F843900B22E4C /* Products */, 184 | ); 185 | sourceTree = ""; 186 | }; 187 | 32C9CE47213F843900B22E4C /* Products */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | 32C9CE46213F843900B22E4C /* WGPushControllerKit.app */, 191 | 32C9CE5E213F843C00B22E4C /* WGPushControllerKitTests.xctest */, 192 | 32C9CE69213F843C00B22E4C /* WGPushControllerKitUITests.xctest */, 193 | ); 194 | name = Products; 195 | sourceTree = ""; 196 | }; 197 | 32C9CE48213F843900B22E4C /* WGPushControllerKit */ = { 198 | isa = PBXGroup; 199 | children = ( 200 | 326DA68721D390AB004D00E8 /* demo02 */, 201 | 326DA68621D39077004D00E8 /* demo01 */, 202 | 32C9CE7E213F9BAA00B22E4C /* PushTools */, 203 | 32C9CE49213F843900B22E4C /* AppDelegate.h */, 204 | 32C9CE4A213F843900B22E4C /* AppDelegate.m */, 205 | 32C9CE4C213F843900B22E4C /* ViewController.h */, 206 | 32C9CE4D213F843900B22E4C /* ViewController.m */, 207 | 325E6E5921411D1700489A79 /* WGModel.h */, 208 | 325E6E5A21411D1700489A79 /* WGModel.m */, 209 | 32C9CE4F213F843900B22E4C /* Main.storyboard */, 210 | 32C9CE52213F843C00B22E4C /* Assets.xcassets */, 211 | 32C9CE54213F843C00B22E4C /* LaunchScreen.storyboard */, 212 | 32C9CE57213F843C00B22E4C /* Info.plist */, 213 | 32C9CE58213F843C00B22E4C /* main.m */, 214 | ); 215 | path = WGPushControllerKit; 216 | sourceTree = ""; 217 | }; 218 | 32C9CE61213F843C00B22E4C /* WGPushControllerKitTests */ = { 219 | isa = PBXGroup; 220 | children = ( 221 | 32C9CE62213F843C00B22E4C /* WGPushControllerKitTests.m */, 222 | 32C9CE64213F843C00B22E4C /* Info.plist */, 223 | ); 224 | path = WGPushControllerKitTests; 225 | sourceTree = ""; 226 | }; 227 | 32C9CE6C213F843C00B22E4C /* WGPushControllerKitUITests */ = { 228 | isa = PBXGroup; 229 | children = ( 230 | 32C9CE6D213F843C00B22E4C /* WGPushControllerKitUITests.m */, 231 | 32C9CE6F213F843C00B22E4C /* Info.plist */, 232 | ); 233 | path = WGPushControllerKitUITests; 234 | sourceTree = ""; 235 | }; 236 | 32C9CE7E213F9BAA00B22E4C /* PushTools */ = { 237 | isa = PBXGroup; 238 | children = ( 239 | 32C9CE7F213F9C2F00B22E4C /* WGControllerPush.h */, 240 | 32C9CE80213F9C2F00B22E4C /* WGControllerPush.m */, 241 | ); 242 | path = PushTools; 243 | sourceTree = ""; 244 | }; 245 | /* End PBXGroup section */ 246 | 247 | /* Begin PBXNativeTarget section */ 248 | 32C9CE45213F843900B22E4C /* WGPushControllerKit */ = { 249 | isa = PBXNativeTarget; 250 | buildConfigurationList = 32C9CE72213F843C00B22E4C /* Build configuration list for PBXNativeTarget "WGPushControllerKit" */; 251 | buildPhases = ( 252 | 32C9CE42213F843900B22E4C /* Sources */, 253 | 32C9CE43213F843900B22E4C /* Frameworks */, 254 | 32C9CE44213F843900B22E4C /* Resources */, 255 | ); 256 | buildRules = ( 257 | ); 258 | dependencies = ( 259 | ); 260 | name = WGPushControllerKit; 261 | productName = WGPushControllerKit; 262 | productReference = 32C9CE46213F843900B22E4C /* WGPushControllerKit.app */; 263 | productType = "com.apple.product-type.application"; 264 | }; 265 | 32C9CE5D213F843C00B22E4C /* WGPushControllerKitTests */ = { 266 | isa = PBXNativeTarget; 267 | buildConfigurationList = 32C9CE75213F843C00B22E4C /* Build configuration list for PBXNativeTarget "WGPushControllerKitTests" */; 268 | buildPhases = ( 269 | 32C9CE5A213F843C00B22E4C /* Sources */, 270 | 32C9CE5B213F843C00B22E4C /* Frameworks */, 271 | 32C9CE5C213F843C00B22E4C /* Resources */, 272 | ); 273 | buildRules = ( 274 | ); 275 | dependencies = ( 276 | 32C9CE60213F843C00B22E4C /* PBXTargetDependency */, 277 | ); 278 | name = WGPushControllerKitTests; 279 | productName = WGPushControllerKitTests; 280 | productReference = 32C9CE5E213F843C00B22E4C /* WGPushControllerKitTests.xctest */; 281 | productType = "com.apple.product-type.bundle.unit-test"; 282 | }; 283 | 32C9CE68213F843C00B22E4C /* WGPushControllerKitUITests */ = { 284 | isa = PBXNativeTarget; 285 | buildConfigurationList = 32C9CE78213F843C00B22E4C /* Build configuration list for PBXNativeTarget "WGPushControllerKitUITests" */; 286 | buildPhases = ( 287 | 32C9CE65213F843C00B22E4C /* Sources */, 288 | 32C9CE66213F843C00B22E4C /* Frameworks */, 289 | 32C9CE67213F843C00B22E4C /* Resources */, 290 | ); 291 | buildRules = ( 292 | ); 293 | dependencies = ( 294 | 32C9CE6B213F843C00B22E4C /* PBXTargetDependency */, 295 | ); 296 | name = WGPushControllerKitUITests; 297 | productName = WGPushControllerKitUITests; 298 | productReference = 32C9CE69213F843C00B22E4C /* WGPushControllerKitUITests.xctest */; 299 | productType = "com.apple.product-type.bundle.ui-testing"; 300 | }; 301 | /* End PBXNativeTarget section */ 302 | 303 | /* Begin PBXProject section */ 304 | 32C9CE3E213F843900B22E4C /* Project object */ = { 305 | isa = PBXProject; 306 | attributes = { 307 | LastUpgradeCheck = 0940; 308 | ORGANIZATIONNAME = wanggang; 309 | TargetAttributes = { 310 | 32C9CE45213F843900B22E4C = { 311 | CreatedOnToolsVersion = 9.4; 312 | LastSwiftMigration = 1000; 313 | }; 314 | 32C9CE5D213F843C00B22E4C = { 315 | CreatedOnToolsVersion = 9.4; 316 | TestTargetID = 32C9CE45213F843900B22E4C; 317 | }; 318 | 32C9CE68213F843C00B22E4C = { 319 | CreatedOnToolsVersion = 9.4; 320 | TestTargetID = 32C9CE45213F843900B22E4C; 321 | }; 322 | }; 323 | }; 324 | buildConfigurationList = 32C9CE41213F843900B22E4C /* Build configuration list for PBXProject "WGPushControllerKit" */; 325 | compatibilityVersion = "Xcode 9.3"; 326 | developmentRegion = en; 327 | hasScannedForEncodings = 0; 328 | knownRegions = ( 329 | en, 330 | Base, 331 | ); 332 | mainGroup = 32C9CE3D213F843900B22E4C; 333 | productRefGroup = 32C9CE47213F843900B22E4C /* Products */; 334 | projectDirPath = ""; 335 | projectRoot = ""; 336 | targets = ( 337 | 32C9CE45213F843900B22E4C /* WGPushControllerKit */, 338 | 32C9CE5D213F843C00B22E4C /* WGPushControllerKitTests */, 339 | 32C9CE68213F843C00B22E4C /* WGPushControllerKitUITests */, 340 | ); 341 | }; 342 | /* End PBXProject section */ 343 | 344 | /* Begin PBXResourcesBuildPhase section */ 345 | 32C9CE44213F843900B22E4C /* Resources */ = { 346 | isa = PBXResourcesBuildPhase; 347 | buildActionMask = 2147483647; 348 | files = ( 349 | 325AABD02213B3B3009A92EE /* WGXibViewController.xib in Resources */, 350 | 32C9CE56213F843C00B22E4C /* LaunchScreen.storyboard in Resources */, 351 | 32C9CE53213F843C00B22E4C /* Assets.xcassets in Resources */, 352 | 32C9CE51213F843900B22E4C /* Main.storyboard in Resources */, 353 | ); 354 | runOnlyForDeploymentPostprocessing = 0; 355 | }; 356 | 32C9CE5C213F843C00B22E4C /* Resources */ = { 357 | isa = PBXResourcesBuildPhase; 358 | buildActionMask = 2147483647; 359 | files = ( 360 | ); 361 | runOnlyForDeploymentPostprocessing = 0; 362 | }; 363 | 32C9CE67213F843C00B22E4C /* Resources */ = { 364 | isa = PBXResourcesBuildPhase; 365 | buildActionMask = 2147483647; 366 | files = ( 367 | ); 368 | runOnlyForDeploymentPostprocessing = 0; 369 | }; 370 | /* End PBXResourcesBuildPhase section */ 371 | 372 | /* Begin PBXSourcesBuildPhase section */ 373 | 32C9CE42213F843900B22E4C /* Sources */ = { 374 | isa = PBXSourcesBuildPhase; 375 | buildActionMask = 2147483647; 376 | files = ( 377 | 32C9CE4E213F843900B22E4C /* ViewController.m in Sources */, 378 | 326DA69D21D392F9004D00E8 /* WGSixViewController.m in Sources */, 379 | 326DA69321D392AC004D00E8 /* WGThreeViewController.m in Sources */, 380 | 326DA68A21D390FA004D00E8 /* WGCustomViewController.m in Sources */, 381 | 326DA68D21D3927F004D00E8 /* WGOneViewController.m in Sources */, 382 | 325AABCF2213B3B3009A92EE /* WGXibViewController.m in Sources */, 383 | 326DA69021D3929D004D00E8 /* WGTwoViewController.m in Sources */, 384 | 325E6E582141196700489A79 /* WGOtherViewController.m in Sources */, 385 | 325E6E4F2141192D00489A79 /* WGNoParamViewController.m in Sources */, 386 | 325E6E552141195500489A79 /* WGInitWithViewController.m in Sources */, 387 | 326DA69621D392BC004D00E8 /* WGFourViewController.m in Sources */, 388 | 32C9CE59213F843C00B22E4C /* main.m in Sources */, 389 | 32C9CE4B213F843900B22E4C /* AppDelegate.m in Sources */, 390 | 32C9CE81213F9C2F00B22E4C /* WGControllerPush.m in Sources */, 391 | 326DA69921D392CA004D00E8 /* WGFiveViewController.m in Sources */, 392 | 325E6E5B21411D1700489A79 /* WGModel.m in Sources */, 393 | 322DE8F12240E05B00CD4B10 /* WGSwiftViewController.swift in Sources */, 394 | 325E6E522141194400489A79 /* WGProrertyViewController.m in Sources */, 395 | ); 396 | runOnlyForDeploymentPostprocessing = 0; 397 | }; 398 | 32C9CE5A213F843C00B22E4C /* Sources */ = { 399 | isa = PBXSourcesBuildPhase; 400 | buildActionMask = 2147483647; 401 | files = ( 402 | 32C9CE63213F843C00B22E4C /* WGPushControllerKitTests.m in Sources */, 403 | ); 404 | runOnlyForDeploymentPostprocessing = 0; 405 | }; 406 | 32C9CE65213F843C00B22E4C /* Sources */ = { 407 | isa = PBXSourcesBuildPhase; 408 | buildActionMask = 2147483647; 409 | files = ( 410 | 32C9CE6E213F843C00B22E4C /* WGPushControllerKitUITests.m in Sources */, 411 | ); 412 | runOnlyForDeploymentPostprocessing = 0; 413 | }; 414 | /* End PBXSourcesBuildPhase section */ 415 | 416 | /* Begin PBXTargetDependency section */ 417 | 32C9CE60213F843C00B22E4C /* PBXTargetDependency */ = { 418 | isa = PBXTargetDependency; 419 | target = 32C9CE45213F843900B22E4C /* WGPushControllerKit */; 420 | targetProxy = 32C9CE5F213F843C00B22E4C /* PBXContainerItemProxy */; 421 | }; 422 | 32C9CE6B213F843C00B22E4C /* PBXTargetDependency */ = { 423 | isa = PBXTargetDependency; 424 | target = 32C9CE45213F843900B22E4C /* WGPushControllerKit */; 425 | targetProxy = 32C9CE6A213F843C00B22E4C /* PBXContainerItemProxy */; 426 | }; 427 | /* End PBXTargetDependency section */ 428 | 429 | /* Begin PBXVariantGroup section */ 430 | 32C9CE4F213F843900B22E4C /* Main.storyboard */ = { 431 | isa = PBXVariantGroup; 432 | children = ( 433 | 32C9CE50213F843900B22E4C /* Base */, 434 | ); 435 | name = Main.storyboard; 436 | sourceTree = ""; 437 | }; 438 | 32C9CE54213F843C00B22E4C /* LaunchScreen.storyboard */ = { 439 | isa = PBXVariantGroup; 440 | children = ( 441 | 32C9CE55213F843C00B22E4C /* Base */, 442 | ); 443 | name = LaunchScreen.storyboard; 444 | sourceTree = ""; 445 | }; 446 | /* End PBXVariantGroup section */ 447 | 448 | /* Begin XCBuildConfiguration section */ 449 | 32C9CE70213F843C00B22E4C /* Debug */ = { 450 | isa = XCBuildConfiguration; 451 | buildSettings = { 452 | ALWAYS_SEARCH_USER_PATHS = NO; 453 | CLANG_ANALYZER_NONNULL = YES; 454 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 455 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 456 | CLANG_CXX_LIBRARY = "libc++"; 457 | CLANG_ENABLE_MODULES = YES; 458 | CLANG_ENABLE_OBJC_ARC = YES; 459 | CLANG_ENABLE_OBJC_WEAK = YES; 460 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 461 | CLANG_WARN_BOOL_CONVERSION = YES; 462 | CLANG_WARN_COMMA = YES; 463 | CLANG_WARN_CONSTANT_CONVERSION = YES; 464 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 465 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 466 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 467 | CLANG_WARN_EMPTY_BODY = YES; 468 | CLANG_WARN_ENUM_CONVERSION = YES; 469 | CLANG_WARN_INFINITE_RECURSION = YES; 470 | CLANG_WARN_INT_CONVERSION = YES; 471 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 472 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 473 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 474 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 475 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 476 | CLANG_WARN_STRICT_PROTOTYPES = YES; 477 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 478 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 479 | CLANG_WARN_UNREACHABLE_CODE = YES; 480 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 481 | CODE_SIGN_IDENTITY = "iPhone Developer"; 482 | COPY_PHASE_STRIP = NO; 483 | DEBUG_INFORMATION_FORMAT = dwarf; 484 | ENABLE_STRICT_OBJC_MSGSEND = YES; 485 | ENABLE_TESTABILITY = YES; 486 | GCC_C_LANGUAGE_STANDARD = gnu11; 487 | GCC_DYNAMIC_NO_PIC = NO; 488 | GCC_NO_COMMON_BLOCKS = YES; 489 | GCC_OPTIMIZATION_LEVEL = 0; 490 | GCC_PREPROCESSOR_DEFINITIONS = ( 491 | "DEBUG=1", 492 | "$(inherited)", 493 | ); 494 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 495 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 496 | GCC_WARN_UNDECLARED_SELECTOR = YES; 497 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 498 | GCC_WARN_UNUSED_FUNCTION = YES; 499 | GCC_WARN_UNUSED_VARIABLE = YES; 500 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 501 | MTL_ENABLE_DEBUG_INFO = YES; 502 | ONLY_ACTIVE_ARCH = YES; 503 | SDKROOT = iphoneos; 504 | }; 505 | name = Debug; 506 | }; 507 | 32C9CE71213F843C00B22E4C /* Release */ = { 508 | isa = XCBuildConfiguration; 509 | buildSettings = { 510 | ALWAYS_SEARCH_USER_PATHS = NO; 511 | CLANG_ANALYZER_NONNULL = YES; 512 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 513 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 514 | CLANG_CXX_LIBRARY = "libc++"; 515 | CLANG_ENABLE_MODULES = YES; 516 | CLANG_ENABLE_OBJC_ARC = YES; 517 | CLANG_ENABLE_OBJC_WEAK = YES; 518 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 519 | CLANG_WARN_BOOL_CONVERSION = YES; 520 | CLANG_WARN_COMMA = YES; 521 | CLANG_WARN_CONSTANT_CONVERSION = YES; 522 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 523 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 524 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 525 | CLANG_WARN_EMPTY_BODY = YES; 526 | CLANG_WARN_ENUM_CONVERSION = YES; 527 | CLANG_WARN_INFINITE_RECURSION = YES; 528 | CLANG_WARN_INT_CONVERSION = YES; 529 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 530 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 531 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 532 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 533 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 534 | CLANG_WARN_STRICT_PROTOTYPES = YES; 535 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 536 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 537 | CLANG_WARN_UNREACHABLE_CODE = YES; 538 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 539 | CODE_SIGN_IDENTITY = "iPhone Developer"; 540 | COPY_PHASE_STRIP = NO; 541 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 542 | ENABLE_NS_ASSERTIONS = NO; 543 | ENABLE_STRICT_OBJC_MSGSEND = YES; 544 | GCC_C_LANGUAGE_STANDARD = gnu11; 545 | GCC_NO_COMMON_BLOCKS = YES; 546 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 547 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 548 | GCC_WARN_UNDECLARED_SELECTOR = YES; 549 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 550 | GCC_WARN_UNUSED_FUNCTION = YES; 551 | GCC_WARN_UNUSED_VARIABLE = YES; 552 | IPHONEOS_DEPLOYMENT_TARGET = 11.4; 553 | MTL_ENABLE_DEBUG_INFO = NO; 554 | SDKROOT = iphoneos; 555 | VALIDATE_PRODUCT = YES; 556 | }; 557 | name = Release; 558 | }; 559 | 32C9CE73213F843C00B22E4C /* Debug */ = { 560 | isa = XCBuildConfiguration; 561 | buildSettings = { 562 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 563 | CLANG_ENABLE_MODULES = YES; 564 | CODE_SIGN_STYLE = Automatic; 565 | DEVELOPMENT_TEAM = 49T87S5RLN; 566 | ENABLE_STRICT_OBJC_MSGSEND = NO; 567 | INFOPLIST_FILE = WGPushControllerKit/Info.plist; 568 | LD_RUNPATH_SEARCH_PATHS = ( 569 | "$(inherited)", 570 | "@executable_path/Frameworks", 571 | ); 572 | PRODUCT_BUNDLE_IDENTIFIER = com.wanggang.WGPushControllerKit; 573 | PRODUCT_NAME = "$(TARGET_NAME)"; 574 | SWIFT_OBJC_BRIDGING_HEADER = "WGPushControllerKit/demo01/WGPushControllerKit-Bridging-Header.h"; 575 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 576 | SWIFT_VERSION = 4.2; 577 | TARGETED_DEVICE_FAMILY = "1,2"; 578 | }; 579 | name = Debug; 580 | }; 581 | 32C9CE74213F843C00B22E4C /* Release */ = { 582 | isa = XCBuildConfiguration; 583 | buildSettings = { 584 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 585 | CLANG_ENABLE_MODULES = YES; 586 | CODE_SIGN_STYLE = Automatic; 587 | DEVELOPMENT_TEAM = 49T87S5RLN; 588 | ENABLE_STRICT_OBJC_MSGSEND = NO; 589 | INFOPLIST_FILE = WGPushControllerKit/Info.plist; 590 | LD_RUNPATH_SEARCH_PATHS = ( 591 | "$(inherited)", 592 | "@executable_path/Frameworks", 593 | ); 594 | PRODUCT_BUNDLE_IDENTIFIER = com.wanggang.WGPushControllerKit; 595 | PRODUCT_NAME = "$(TARGET_NAME)"; 596 | SWIFT_OBJC_BRIDGING_HEADER = "WGPushControllerKit/demo01/WGPushControllerKit-Bridging-Header.h"; 597 | SWIFT_VERSION = 4.2; 598 | TARGETED_DEVICE_FAMILY = "1,2"; 599 | }; 600 | name = Release; 601 | }; 602 | 32C9CE76213F843C00B22E4C /* Debug */ = { 603 | isa = XCBuildConfiguration; 604 | buildSettings = { 605 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 606 | BUNDLE_LOADER = "$(TEST_HOST)"; 607 | CODE_SIGN_STYLE = Automatic; 608 | DEVELOPMENT_TEAM = 49T87S5RLN; 609 | INFOPLIST_FILE = WGPushControllerKitTests/Info.plist; 610 | LD_RUNPATH_SEARCH_PATHS = ( 611 | "$(inherited)", 612 | "@executable_path/Frameworks", 613 | "@loader_path/Frameworks", 614 | ); 615 | PRODUCT_BUNDLE_IDENTIFIER = com.wanggang.WGPushControllerKitTests; 616 | PRODUCT_NAME = "$(TARGET_NAME)"; 617 | TARGETED_DEVICE_FAMILY = "1,2"; 618 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WGPushControllerKit.app/WGPushControllerKit"; 619 | }; 620 | name = Debug; 621 | }; 622 | 32C9CE77213F843C00B22E4C /* Release */ = { 623 | isa = XCBuildConfiguration; 624 | buildSettings = { 625 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 626 | BUNDLE_LOADER = "$(TEST_HOST)"; 627 | CODE_SIGN_STYLE = Automatic; 628 | DEVELOPMENT_TEAM = 49T87S5RLN; 629 | INFOPLIST_FILE = WGPushControllerKitTests/Info.plist; 630 | LD_RUNPATH_SEARCH_PATHS = ( 631 | "$(inherited)", 632 | "@executable_path/Frameworks", 633 | "@loader_path/Frameworks", 634 | ); 635 | PRODUCT_BUNDLE_IDENTIFIER = com.wanggang.WGPushControllerKitTests; 636 | PRODUCT_NAME = "$(TARGET_NAME)"; 637 | TARGETED_DEVICE_FAMILY = "1,2"; 638 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WGPushControllerKit.app/WGPushControllerKit"; 639 | }; 640 | name = Release; 641 | }; 642 | 32C9CE79213F843C00B22E4C /* Debug */ = { 643 | isa = XCBuildConfiguration; 644 | buildSettings = { 645 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 646 | CODE_SIGN_STYLE = Automatic; 647 | DEVELOPMENT_TEAM = 49T87S5RLN; 648 | INFOPLIST_FILE = WGPushControllerKitUITests/Info.plist; 649 | LD_RUNPATH_SEARCH_PATHS = ( 650 | "$(inherited)", 651 | "@executable_path/Frameworks", 652 | "@loader_path/Frameworks", 653 | ); 654 | PRODUCT_BUNDLE_IDENTIFIER = com.wanggang.WGPushControllerKitUITests; 655 | PRODUCT_NAME = "$(TARGET_NAME)"; 656 | TARGETED_DEVICE_FAMILY = "1,2"; 657 | TEST_TARGET_NAME = WGPushControllerKit; 658 | }; 659 | name = Debug; 660 | }; 661 | 32C9CE7A213F843C00B22E4C /* Release */ = { 662 | isa = XCBuildConfiguration; 663 | buildSettings = { 664 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 665 | CODE_SIGN_STYLE = Automatic; 666 | DEVELOPMENT_TEAM = 49T87S5RLN; 667 | INFOPLIST_FILE = WGPushControllerKitUITests/Info.plist; 668 | LD_RUNPATH_SEARCH_PATHS = ( 669 | "$(inherited)", 670 | "@executable_path/Frameworks", 671 | "@loader_path/Frameworks", 672 | ); 673 | PRODUCT_BUNDLE_IDENTIFIER = com.wanggang.WGPushControllerKitUITests; 674 | PRODUCT_NAME = "$(TARGET_NAME)"; 675 | TARGETED_DEVICE_FAMILY = "1,2"; 676 | TEST_TARGET_NAME = WGPushControllerKit; 677 | }; 678 | name = Release; 679 | }; 680 | /* End XCBuildConfiguration section */ 681 | 682 | /* Begin XCConfigurationList section */ 683 | 32C9CE41213F843900B22E4C /* Build configuration list for PBXProject "WGPushControllerKit" */ = { 684 | isa = XCConfigurationList; 685 | buildConfigurations = ( 686 | 32C9CE70213F843C00B22E4C /* Debug */, 687 | 32C9CE71213F843C00B22E4C /* Release */, 688 | ); 689 | defaultConfigurationIsVisible = 0; 690 | defaultConfigurationName = Release; 691 | }; 692 | 32C9CE72213F843C00B22E4C /* Build configuration list for PBXNativeTarget "WGPushControllerKit" */ = { 693 | isa = XCConfigurationList; 694 | buildConfigurations = ( 695 | 32C9CE73213F843C00B22E4C /* Debug */, 696 | 32C9CE74213F843C00B22E4C /* Release */, 697 | ); 698 | defaultConfigurationIsVisible = 0; 699 | defaultConfigurationName = Release; 700 | }; 701 | 32C9CE75213F843C00B22E4C /* Build configuration list for PBXNativeTarget "WGPushControllerKitTests" */ = { 702 | isa = XCConfigurationList; 703 | buildConfigurations = ( 704 | 32C9CE76213F843C00B22E4C /* Debug */, 705 | 32C9CE77213F843C00B22E4C /* Release */, 706 | ); 707 | defaultConfigurationIsVisible = 0; 708 | defaultConfigurationName = Release; 709 | }; 710 | 32C9CE78213F843C00B22E4C /* Build configuration list for PBXNativeTarget "WGPushControllerKitUITests" */ = { 711 | isa = XCConfigurationList; 712 | buildConfigurations = ( 713 | 32C9CE79213F843C00B22E4C /* Debug */, 714 | 32C9CE7A213F843C00B22E4C /* Release */, 715 | ); 716 | defaultConfigurationIsVisible = 0; 717 | defaultConfigurationName = Release; 718 | }; 719 | /* End XCConfigurationList section */ 720 | }; 721 | rootObject = 32C9CE3E213F843900B22E4C /* Project object */; 722 | } 723 | --------------------------------------------------------------------------------