├── .DS_Store
├── .gitattributes
├── RealmExamples
├── Assets.xcassets
│ ├── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Routers
│ ├── CustomRoutes
│ │ ├── CCRoute.m
│ │ └── CCRoute.h
│ ├── Category
│ │ ├── NSURL+Routes.h
│ │ ├── NSURL+Routes.m
│ │ ├── UIViewController+Router.h
│ │ ├── JLRoutes+Block.h
│ │ ├── JLRoutes+Block.m
│ │ └── UIViewController+Router.m
│ ├── CCRouterManager.h
│ ├── CCRouterGuard.h
│ ├── CCRouterGuard.m
│ ├── RoutesConfig.h
│ └── CCRouterManager.m
├── MVVM
│ └── ViewModels
│ │ └── BaseClass
│ │ ├── CCViewModel.m
│ │ └── CCViewModel.h
├── ViewController.h
├── RealmExamples.xcdatamodeld
│ ├── .xccurrentversion
│ └── RealmExamples.xcdatamodel
│ │ └── contents
├── UITextField+Swizzle.h
├── RACViewController1.h
├── ViewContollers
│ ├── RouteViewController2.h
│ ├── RouteViewController3.h
│ ├── RouteViewController1.h
│ ├── RouteViewController2.m
│ ├── RouteViewController1.m
│ └── RouteViewController3.m
├── main.m
├── AppDelegate.h
├── RealmExamples.pch
├── Person.h
├── Person.m
├── UITextField+Swizzle.m
├── Info.plist
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── RACViewController1.m
├── ViewController.m
└── AppDelegate.m
├── RealmExamples.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── project.pbxproj
├── Podfile
├── RealmExamples.xcworkspace
├── contents.xcworkspacedata
└── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── Podfile.lock
├── LICENSE
├── README.md
└── .gitignore
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aichiko0225/RealmExamples/HEAD/.DS_Store
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/RealmExamples/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/RealmExamples.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | source 'https://github.com/CocoaPods/Specs.git'
2 |
3 | target 'RealmExamples' do
4 | platform :ios, '8.0'
5 | use_frameworks!
6 |
7 | pod 'Realm'
8 |
9 | pod 'coobjc'
10 |
11 | pod 'JLRoutes'
12 |
13 | pod 'ReactiveObjC'
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/RealmExamples/Routers/CustomRoutes/CCRoute.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCRoute.m
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/5/15.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import "CCRoute.h"
11 |
12 | @implementation CCRoute
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/RealmExamples/MVVM/ViewModels/BaseClass/CCViewModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCViewModel.m
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/22.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 | #import "CCViewModel.h"
10 |
11 | @implementation CCViewModel
12 |
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/RealmExamples/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // RealmExamples
4 | //
5 | // Created by 赵光飞 on 2019/4/8.
6 | // Copyright © 2019 ash. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/RealmExamples.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/RealmExamples.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RealmExamples.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RealmExamples/RealmExamples.xcdatamodeld/.xccurrentversion:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | _XCCurrentVersionName
6 | RealmExamples.xcdatamodel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RealmExamples/UITextField+Swizzle.h:
--------------------------------------------------------------------------------
1 | //
2 | // UITextField+Swizzle.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/6/4.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface UITextField (Swizzle)
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/RealmExamples/RACViewController1.h:
--------------------------------------------------------------------------------
1 | //
2 | // RACViewController1.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/22.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface RACViewController1 : UIViewController
14 |
15 | @end
16 |
17 | NS_ASSUME_NONNULL_END
18 |
--------------------------------------------------------------------------------
/RealmExamples/RealmExamples.xcdatamodeld/RealmExamples.xcdatamodel/contents:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/RealmExamples/ViewContollers/RouteViewController2.h:
--------------------------------------------------------------------------------
1 | //
2 | // RouteViewController2.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface RouteViewController2 : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/RealmExamples/ViewContollers/RouteViewController3.h:
--------------------------------------------------------------------------------
1 | //
2 | // RouteViewController3.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface RouteViewController3 : UIViewController
15 |
16 | @end
17 |
18 | NS_ASSUME_NONNULL_END
19 |
--------------------------------------------------------------------------------
/RealmExamples/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // RealmExamples
4 | //
5 | // Created by 赵光飞 on 2019/4/8.
6 | // Copyright © 2019 ash. 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 |
--------------------------------------------------------------------------------
/RealmExamples/Routers/CustomRoutes/CCRoute.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCRoute.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/5/15.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /**
15 | 自定义的路由,根据业务需要将类变成route属性
16 | */
17 | @interface CCRoute : NSObject
18 |
19 |
20 | @end
21 |
22 | NS_ASSUME_NONNULL_END
23 |
--------------------------------------------------------------------------------
/RealmExamples/MVVM/ViewModels/BaseClass/CCViewModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCViewModel.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/22.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | /**
14 | 基类的viewModel
15 | */
16 | @interface CCViewModel : NSObject
17 |
18 |
19 |
20 |
21 | @end
22 |
23 | NS_ASSUME_NONNULL_END
24 |
--------------------------------------------------------------------------------
/RealmExamples/Routers/Category/NSURL+Routes.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSURL+Routes.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface NSURL (Routes)
15 |
16 | + (instancetype)URLWithRoutePath:(NSString *)routePath;
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/RealmExamples/ViewContollers/RouteViewController1.h:
--------------------------------------------------------------------------------
1 | //
2 | // RouteViewController1.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface RouteViewController1 : UIViewController
15 |
16 | @property (nonatomic, copy) NSString *keyword;
17 |
18 | @end
19 |
20 | NS_ASSUME_NONNULL_END
21 |
--------------------------------------------------------------------------------
/RealmExamples/Routers/CCRouterManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCRouterManager.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /**
15 | 路由管理类,添加各种类型的路由
16 | */
17 | @interface CCRouterManager : NSObject
18 |
19 | + (instancetype)shareManager;
20 |
21 | - (void)configDefaultRoutes;
22 |
23 | @end
24 |
25 | NS_ASSUME_NONNULL_END
26 |
--------------------------------------------------------------------------------
/RealmExamples/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // RealmExamples
4 | //
5 | // Created by 赵光飞 on 2019/4/8.
6 | // Copyright © 2019 ash. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (strong, nonatomic) UIWindow *window;
15 |
16 | @property (readonly, strong) NSPersistentContainer *persistentContainer;
17 |
18 | - (void)saveContext;
19 |
20 |
21 | @end
22 |
23 |
--------------------------------------------------------------------------------
/RealmExamples/Routers/Category/NSURL+Routes.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSURL+Routes.m
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import "NSURL+Routes.h"
11 |
12 | @implementation NSURL (Routes)
13 |
14 | + (instancetype)URLWithRoutePath:(NSString *)routePath {
15 | NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@://%@", route_scheme, route_host]];
16 | return [self URLWithString:routePath relativeToURL:url];
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/RealmExamples/Routers/CCRouterGuard.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCRouterGuard.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/11.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | /**
15 | * 路由守卫
16 | * 可以为router 全局设置守卫也可以单独设置守卫
17 | */
18 | @interface CCRouterGuard : NSObject
19 |
20 | + (instancetype)routerGuardWithCallback:(RouterGuardCallback)callback;
21 |
22 | - (BOOL)routerGuardResult;
23 |
24 | @end
25 |
26 | NS_ASSUME_NONNULL_END
27 |
--------------------------------------------------------------------------------
/RealmExamples/Routers/Category/UIViewController+Router.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+Extension.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 |
12 | NS_ASSUME_NONNULL_BEGIN
13 |
14 | @interface UIApplication (Current)
15 |
16 | + (UIViewController *)topViewController;
17 |
18 | @end
19 |
20 | @interface UIViewController (Routes)
21 |
22 | @property (nonatomic, copy) RoutesCallback routesCallback;
23 |
24 | @end
25 |
26 | NS_ASSUME_NONNULL_END
27 |
--------------------------------------------------------------------------------
/RealmExamples/RealmExamples.pch:
--------------------------------------------------------------------------------
1 | //
2 | // RealmExamples.pch
3 | // RealmExamples
4 | //
5 | // Created by 赵光飞 on 2019/4/8.
6 | // Copyright © 2019 ash. All rights reserved.
7 | //
8 |
9 | #ifndef RealmExamples_pch
10 | #define RealmExamples_pch
11 |
12 | // Include any system framework and library headers here that should be included in all compilation units.
13 | // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
14 |
15 | #import
16 | #import
17 |
18 | #import "RoutesConfig.h"
19 | #import "NSURL+Routes.h"
20 | #import "JLRoutes+Block.h"
21 | #import "UIViewController+Router.h"
22 |
23 | #endif /* RealmExamples_pch */
24 |
--------------------------------------------------------------------------------
/RealmExamples/Routers/CCRouterGuard.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCRouterGuard.m
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/11.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import "CCRouterGuard.h"
11 |
12 | @implementation CCRouterGuard
13 | {
14 | RouterGuardCallback _callback;
15 | }
16 |
17 | + (instancetype)routerGuardWithCallback:(RouterGuardCallback)callback
18 | {
19 | return [[self alloc] initWithCallback:callback];
20 | }
21 |
22 | - (instancetype)initWithCallback:(RouterGuardCallback)callback
23 | {
24 | self = [super init];
25 | if (self) {
26 | self->_callback = callback;
27 | }
28 | return self;
29 | }
30 |
31 | - (BOOL)routerGuardResult {
32 | return _callback();
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/RealmExamples/Person.h:
--------------------------------------------------------------------------------
1 | //
2 | // Person.h
3 | // RealmExamples
4 | //
5 | // Created by 赵光飞 on 2019/4/8.
6 | // Copyright © 2019 ash. All rights reserved.
7 | //
8 |
9 | #import "RLMObject.h"
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface TestObject : NSObject
14 |
15 | @property (nonatomic, copy) NSString *_ID;
16 |
17 | @property (nonatomic, strong) TestObject *object;
18 |
19 | @end
20 |
21 |
22 | @interface Dog : RLMObject
23 |
24 | @property NSInteger ID;
25 |
26 | @property NSString *name;
27 |
28 | @property NSData * _Nullable picture;
29 |
30 | @property NSInteger age;
31 |
32 | @end
33 |
34 | RLM_ARRAY_TYPE(Dog)
35 | @interface Person : RLMObject
36 |
37 | @property NSString *name;
38 |
39 | @property RLMArray *dogs;
40 |
41 | @end
42 |
43 | NS_ASSUME_NONNULL_END
44 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - cocore (1.1.0)
3 | - coobjc (1.1.0):
4 | - cocore (~> 1.1.0)
5 | - JLRoutes (2.1)
6 | - ReactiveObjC (3.1.0)
7 | - Realm (3.13.1):
8 | - Realm/Headers (= 3.13.1)
9 | - Realm/Headers (3.13.1)
10 |
11 | DEPENDENCIES:
12 | - coobjc
13 | - JLRoutes
14 | - ReactiveObjC
15 | - Realm
16 |
17 | SPEC REPOS:
18 | https://github.com/cocoapods/specs.git:
19 | - cocore
20 | - coobjc
21 | - JLRoutes
22 | - ReactiveObjC
23 | - Realm
24 |
25 | SPEC CHECKSUMS:
26 | cocore: dfaf5fb52b518fbbb5076061386294051a8f62d3
27 | coobjc: 5d43a8ac49c150e253cc6f936db3a9a465aebde9
28 | JLRoutes: d755245322b94227662ea3e43492fdca94e05c5b
29 | ReactiveObjC: 2a38ea15335de4119d8b17caf1db1484f61db902
30 | Realm: 50071da38fe079e0735e47c9f2eae738c68c5996
31 |
32 | PODFILE CHECKSUM: b97f4378e6e7d9bd39381e592c08a52f2db488ce
33 |
34 | COCOAPODS: 1.6.1
35 |
--------------------------------------------------------------------------------
/RealmExamples/Routers/Category/JLRoutes+Block.h:
--------------------------------------------------------------------------------
1 | //
2 | // JLRoutes+Block.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 | #import "CCRouterGuard.h"
12 |
13 | NS_ASSUME_NONNULL_BEGIN
14 |
15 | @interface JLRoutes (Block)
16 |
17 | + (BOOL)routeURL:(nullable NSURL *)URL routerGuard:(CCRouterGuard *)routerGuard;
18 |
19 | + (BOOL)routeURL:(nullable NSURL *)URL callback:(RoutesCallback)callback;
20 |
21 | + (BOOL)routeURL:(nullable NSURL *)URL routerGuard:(CCRouterGuard *)routerGuard callback:(RoutesCallback)callback;
22 |
23 | + (BOOL)routeURL:(nullable NSURL *)URL withParameters:(nullable NSDictionary *)parameters callback:(RoutesCallback)callback;
24 |
25 | + (BOOL)routeURL:(nullable NSURL *)URL withParameters:(nullable NSDictionary *)parameters routerGuard:(CCRouterGuard *)routerGuard callback:(RoutesCallback)callback;
26 |
27 | @end
28 |
29 | NS_ASSUME_NONNULL_END
30 |
--------------------------------------------------------------------------------
/RealmExamples/ViewContollers/RouteViewController2.m:
--------------------------------------------------------------------------------
1 | //
2 | // RouteViewController2.m
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import "RouteViewController2.h"
11 |
12 | @interface RouteViewController2 ()
13 |
14 | @end
15 |
16 | @implementation RouteViewController2
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view.
21 | self.view.backgroundColor = [UIColor whiteColor];
22 | if (self.title.length == 0) {
23 | self.navigationItem.title = [[self class] description];
24 | }
25 | }
26 |
27 | /*
28 | #pragma mark - Navigation
29 |
30 | // In a storyboard-based application, you will often want to do a little preparation before navigation
31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
32 | // Get the new view controller using [segue destinationViewController].
33 | // Pass the selected object to the new view controller.
34 | }
35 | */
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/RealmExamples/ViewContollers/RouteViewController1.m:
--------------------------------------------------------------------------------
1 | //
2 | // RouteViewController1.m
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import "RouteViewController1.h"
11 |
12 | @interface RouteViewController1 ()
13 |
14 | @end
15 |
16 | @implementation RouteViewController1
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view.
21 | self.view.backgroundColor = [UIColor whiteColor];
22 | if (self.title.length == 0) {
23 | self.navigationItem.title = [[self class] description];
24 | }
25 |
26 | NSLog(@"keyword == %@", _keyword);
27 | }
28 |
29 | /*
30 | #pragma mark - Navigation
31 |
32 | // In a storyboard-based application, you will often want to do a little preparation before navigation
33 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
34 | // Get the new view controller using [segue destinationViewController].
35 | // Pass the selected object to the new view controller.
36 | }
37 | */
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 ash
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/RealmExamples/Routers/RoutesConfig.h:
--------------------------------------------------------------------------------
1 | //
2 | // RoutesConfig.h
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 | #ifndef RoutesConfig_h
10 | #define RoutesConfig_h
11 |
12 | /** 路由回调函数 */
13 | typedef void(^RoutesCallback)(id data);
14 | /** 路由守卫函数 返回NO则中止路由行为 */
15 | typedef BOOL(^RouterGuardCallback)(void);
16 |
17 | static NSString *RoutesCallbackKey = @"RoutesCallback";
18 | static NSString *RouterGuardKey = @"RouterGuardKey";
19 |
20 | @protocol RoutesProtocol
21 |
22 | @required
23 | + (instancetype)routeWithParameters:(NSDictionary *)parameters;
24 | @optional
25 | - (void)responseCallback:(RoutesCallback)callBack;
26 |
27 | @end
28 |
29 | static NSString *routePath1 = @"/push/RouteViewController1";
30 |
31 | static NSString *routePath2 = @"/push/RouteViewController2";
32 |
33 | static NSString *routePath3 = @"/push/RouteViewController3";
34 |
35 | static NSString *routePath4 = @"/present/navi/RouteViewController1";
36 |
37 | static NSString *route_scheme = @"whty";
38 | static NSString *route_host = @"whty.com";
39 |
40 | #endif /* RoutesConfig_h */
41 |
--------------------------------------------------------------------------------
/RealmExamples/Person.m:
--------------------------------------------------------------------------------
1 | //
2 | // Person.m
3 | // RealmExamples
4 | //
5 | // Created by 赵光飞 on 2019/4/8.
6 | // Copyright © 2019 ash. All rights reserved.
7 | //
8 |
9 | #import "Person.h"
10 |
11 | @implementation TestObject
12 |
13 | - (id)copyWithZone:(nullable NSZone *)zone {
14 | TestObject *copyItem = [[self class] allocWithZone:zone];
15 | copyItem._ID = self._ID;
16 | copyItem.object = self.object;
17 | return copyItem;
18 | }
19 |
20 |
21 | - (id)mutableCopyWithZone:(nullable NSZone *)zone {
22 | TestObject *copyItem = [[self class] allocWithZone:zone];
23 | copyItem._ID = self._ID;
24 | copyItem.object = self.object;
25 | return copyItem;
26 | }
27 |
28 | @end
29 |
30 | @implementation Dog
31 |
32 | + (NSString *)primaryKey {
33 | return @"ID";
34 | }
35 |
36 | + (NSArray *)indexedProperties {
37 | return @[@"ID"];
38 | }
39 |
40 | + (NSInteger)incrementaID {
41 | Dog *retNext = [[[Dog allObjects] sortedResultsUsingKeyPath:@"ID" ascending:YES] lastObject];
42 | if (retNext == nil) {
43 | return 0;
44 | }
45 | return retNext.ID + 1;
46 | }
47 |
48 | + (NSDictionary *)defaultPropertyValues {
49 | return @{
50 | @"ID": @([Dog incrementaID])
51 | };
52 | }
53 |
54 | @end
55 |
56 | @implementation Person
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/RealmExamples/ViewContollers/RouteViewController3.m:
--------------------------------------------------------------------------------
1 | //
2 | // RouteViewController3.m
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import "RouteViewController3.h"
11 |
12 | @interface RouteViewController3 ()
13 |
14 | @end
15 |
16 | @implementation RouteViewController3
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view.
21 | self.view.backgroundColor = [UIColor whiteColor];
22 | if (self.title.length == 0) {
23 | self.navigationItem.title = [[self class] description];
24 | }
25 | __weak typeof(self) weakSelf = self;
26 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
27 | __strong typeof(weakSelf) strongSelf = weakSelf;
28 | if (strongSelf && strongSelf.routesCallback) {
29 | strongSelf.routesCallback(@"routesCallback!!!");
30 | }
31 | });
32 | }
33 |
34 | /*
35 | #pragma mark - Navigation
36 |
37 | // In a storyboard-based application, you will often want to do a little preparation before navigation
38 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
39 | // Get the new view controller using [segue destinationViewController].
40 | // Pass the selected object to the new view controller.
41 | }
42 | */
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/RealmExamples/UITextField+Swizzle.m:
--------------------------------------------------------------------------------
1 | //
2 | // UITextField+Swizzle.m
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/6/4.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import "UITextField+Swizzle.h"
11 | #import
12 |
13 | void Swizzle(Class c, SEL orig, SEL new) {
14 | Method origMethod = class_getInstanceMethod(c, orig);
15 | Method newMethod = class_getInstanceMethod(c, new);
16 | if (class_addMethod(c, orig, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))){
17 | class_replaceMethod(c, new, method_getImplementation(origMethod), method_getTypeEncoding(origMethod));
18 | } else {
19 | method_exchangeImplementations(origMethod, newMethod);
20 | }
21 | }
22 |
23 | @interface UITextField ()
24 |
25 |
26 | @end
27 |
28 | @implementation UITextField (Swizzle)
29 |
30 | + (void)load {
31 |
32 | Swizzle(self, @selector(setKeyboardType:), @selector(cc_setKeyboardType:));
33 |
34 | }
35 |
36 |
37 | - (void)cc_setKeyboardType:(UIKeyboardType)keyboardType {
38 | objc_setAssociatedObject(self, @"cc_keyboardType", @(keyboardType), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
39 | }
40 |
41 | - (UIKeyboardType)keyboardType {
42 | id type1 = objc_getAssociatedObject(self, @"cc_keyboardType");
43 | if (type1 != nil) {
44 | return [type1 intValue];
45 | }
46 | return UIKeyboardTypeDefault;
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/RealmExamples/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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # RealmExamples
2 |
3 | 主要是Realm & coobjc & JLRoutes 的相关用法。
4 |
5 | #### JLRoutes部分
6 |
7 | 主要是实现了简单的路由功能,可能后面还有扩展功能
8 |
9 | 在`AppDelegate`中配置默认的路由实现方式
10 | ```objc
11 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
12 | // Override point for customization after application launch.
13 | [[CCRouterManager shareManager] configDefaultRoutes];
14 | return YES;
15 | }
16 | ```
17 |
18 | 用法也很简单
19 | ```objc
20 | + (BOOL)routeURL:(nullable NSURL *)URL;
21 |
22 | - (BOOL)routeURL:(nullable NSURL *)URL;
23 |
24 | + (BOOL)routeURL:(nullable NSURL *)URL withParameters:(nullable NSDictionary *)parameters;
25 |
26 | - (BOOL)routeURL:(nullable NSURL *)URL withParameters:(nullable NSDictionary *)parameters;
27 | ```
28 |
29 | 也可以传入一个回调函数
30 |
31 | ```objc
32 | @interface JLRoutes (Block)
33 |
34 | + (BOOL)routeURL:(nullable NSURL *)URL callback:(RoutesCallback)callback;
35 |
36 | + (BOOL)routeURL:(nullable NSURL *)URL withParameters:(nullable NSDictionary *)parameters callback:(RoutesCallback)callback;
37 |
38 | @end
39 | ```
40 |
41 |
42 |
43 | **Example**
44 | ```objc
45 |
46 | - (IBAction)route1:(UIButton *)sender {
47 | NSString *routePath = [routePath1 stringByAppendingString:@"?keyword=xxkeyword&title=test_title"];
48 | BOOL r1 = [JLRoutes routeURL:[NSURL URLWithRoutePath:routePath]];
49 |
50 | BOOL r2 = [JLRoutes routeURL:[NSURL URLWithRoutePath:routePath2]];
51 |
52 | BOOL r3 = [JLRoutes routeURL:[NSURL URLWithRoutePath:routePath3] callback:^(id _Nonnull data) {
53 | NSLog(@"route3 callback %@", data);
54 | }];
55 |
56 |
57 |
58 | }
59 | ```
60 |
61 |
--------------------------------------------------------------------------------
/RealmExamples/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 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 | *.ipa
28 | *.dSYM.zip
29 | *.dSYM
30 |
31 | # CocoaPods
32 | #
33 | # We recommend against adding the Pods directory to your .gitignore. However
34 | # you should judge for yourself, the pros and cons are mentioned at:
35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
36 | #
37 | # Pods/
38 | #
39 | # Add this line if you want to avoid checking in source code from the Xcode workspace
40 | # *.xcworkspace
41 |
42 | # Carthage
43 | #
44 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
45 | # Carthage/Checkouts
46 |
47 | Carthage/Build
48 |
49 | # fastlane
50 | #
51 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
52 | # screenshots whenever they are needed.
53 | # For more information about the recommended setup visit:
54 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
55 |
56 | fastlane/report.xml
57 | fastlane/Preview.html
58 | fastlane/screenshots/**/*.png
59 | fastlane/test_output
60 |
61 | # Code Injection
62 | #
63 | # After new code Injection tools there's a generated folder /iOSInjectionProject
64 | # https://github.com/johnno1962/injectionforxcode
65 |
66 | iOSInjectionProject/
67 |
68 | /Pods
69 |
70 | .DS_Store
71 | */.DS_Store
72 | Podfile.lock
73 |
--------------------------------------------------------------------------------
/RealmExamples/Routers/Category/JLRoutes+Block.m:
--------------------------------------------------------------------------------
1 | //
2 | // JLRoutes+Block.m
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import "JLRoutes+Block.h"
11 | #import
12 |
13 | @implementation JLRoutes (Block)
14 |
15 | + (BOOL)routeURL:(nullable NSURL *)URL routerGuard:(CCRouterGuard *)routerGuard {
16 | return [self routeURL:URL withParameters:@{RouterGuardKey: routerGuard}];
17 | }
18 |
19 | + (BOOL)routeURL:(nullable NSURL *)URL routerGuard:(CCRouterGuard *)routerGuard callback:(RoutesCallback)callback {
20 | return [self routeURL:URL withParameters:@{RouterGuardKey: routerGuard, RoutesCallbackKey: callback}];
21 | }
22 |
23 | + (BOOL)routeURL:(nullable NSURL *)URL callback:(RoutesCallback)callback {
24 | // 将block 直接传入
25 | return [self routeURL:URL withParameters:@{RoutesCallbackKey: callback}];
26 | }
27 |
28 | + (BOOL)routeURL:(nullable NSURL *)URL withParameters:(nullable NSDictionary *)parameters callback:(RoutesCallback)callback {
29 | NSMutableDictionary *new_parameters = [NSMutableDictionary dictionaryWithDictionary:parameters];
30 | if (callback) {
31 | [new_parameters setObject:callback forKey:RoutesCallbackKey];
32 | }
33 | return [self routeURL:URL withParameters:new_parameters];
34 | }
35 |
36 | + (BOOL)routeURL:(nullable NSURL *)URL withParameters:(nullable NSDictionary *)parameters routerGuard:(CCRouterGuard *)routerGuard callback:(RoutesCallback)callback {
37 | NSMutableDictionary *new_parameters = [NSMutableDictionary dictionaryWithDictionary:parameters];
38 | if (callback) {
39 | [new_parameters setObject:callback forKey:RoutesCallbackKey];
40 | }
41 | if (routerGuard) {
42 | [new_parameters setObject:routerGuard forKey:RouterGuardKey];
43 | }
44 | return [self routeURL:URL withParameters:new_parameters];
45 | }
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/RealmExamples/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 | }
--------------------------------------------------------------------------------
/RealmExamples/RACViewController1.m:
--------------------------------------------------------------------------------
1 | //
2 | // RACViewController1.m
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/22.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import "RACViewController1.h"
11 | #import
12 |
13 | @interface RACViewController1 ()
14 |
15 | @end
16 |
17 | @implementation RACViewController1
18 |
19 | - (void)viewDidLoad {
20 | [super viewDidLoad];
21 | // Do any additional setup after loading the view.
22 | [self testFunc];
23 | }
24 |
25 | - (void)testFunc {
26 |
27 | RACBehaviorSubject *subject = [RACBehaviorSubject behaviorSubjectWithDefaultValue:@"1"];
28 |
29 | [[[subject filter:^BOOL(NSNumber * _Nullable value) {
30 | return [value integerValue] > 1;
31 | }] catch:^RACSignal * _Nonnull(NSError * _Nonnull error) {
32 | NSLog(@"%@", error);
33 | return [RACBehaviorSubject behaviorSubjectWithDefaultValue:@(5555)];
34 | }] subscribeNext:^(NSNumber * _Nullable x) {
35 | NSLog(@"%@", x);
36 | }];
37 |
38 | [subject sendNext:@(222)];
39 | [subject sendNext:@(0000)];
40 |
41 | NSArray *strings = @[@"11", @"222", @"333", @"44", @"555", @"666", @"777"];
42 | RACSequence *results = [[strings.rac_sequence filter:^BOOL(NSString * _Nullable value) {
43 | return value.length > 2;
44 | }] map:^id _Nullable(NSString * _Nullable value) {
45 | return [value stringByAppendingString:@"foobar"];
46 | }];
47 |
48 | for (id i in results) {
49 | NSLog(@"%@", i);
50 | }
51 |
52 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
53 | [subject sendNext:@(33333)];
54 | });
55 |
56 |
57 | [[subject bind:^RACSignalBindBlock _Nonnull{
58 | return ^ RACSignal * _Nullable(id _Nullable value, BOOL *stop) {
59 | if ([value integerValue] == 0) {
60 | *stop = NO;
61 | }
62 | return [RACSignal return:@(999)];
63 | };
64 | }] subscribeNext:^(id _Nullable x) {
65 | NSLog(@" ===== %@", x);
66 | }];
67 | // [subject sendError:[NSError errorWithDomain:@"1" code:1 userInfo:nil]];
68 |
69 | }
70 |
71 |
72 | /*
73 | #pragma mark - Navigation
74 |
75 | // In a storyboard-based application, you will often want to do a little preparation before navigation
76 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
77 | // Get the new view controller using [segue destinationViewController].
78 | // Pass the selected object to the new view controller.
79 | }
80 | */
81 |
82 | @end
83 |
--------------------------------------------------------------------------------
/RealmExamples/Routers/Category/UIViewController+Router.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+Extension.m
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 |
10 | #import "UIViewController+Router.h"
11 | #import
12 |
13 | @implementation UIApplication (Current)
14 |
15 | + (UIViewController *)topViewController {
16 | UIViewController *rootVC = [[UIApplication sharedApplication] keyWindow].rootViewController;
17 | return [self getCurrentControllerWith:rootVC];
18 | }
19 |
20 | + (UIViewController *)getCurrentControllerWith:(UIViewController *)root {
21 | if (root == nil) {
22 | return nil;
23 | }
24 | if (root.presentedViewController != nil) {
25 | return [self getCurrentControllerWith:root.presentedViewController];
26 | }
27 | if ([root isKindOfClass:[UITabBarController class]]) {
28 | UITabBarController *rootVC = (UITabBarController *)root;
29 | return [self getCurrentControllerWith:rootVC.selectedViewController];
30 | }else if ([root isKindOfClass:[UINavigationController class]]) {
31 | UINavigationController *rootVC = (UINavigationController *)root;
32 | return [self getCurrentControllerWith:rootVC.visibleViewController];
33 | }else {
34 | return root;
35 | }
36 | }
37 |
38 | @end
39 |
40 | static NSString *routesCallbackKey = @"routesCallbackKey";
41 |
42 | @implementation UIViewController (Routes)
43 | @dynamic routesCallback;
44 |
45 | + (instancetype)routeWithParameters:(NSDictionary *)parameters {
46 | UIViewController *vc = [[self alloc] init];
47 | NSString *title = [parameters objectForKey:@"title"];
48 | if (title) {
49 | vc.title = title;
50 | }
51 | unsigned int outCount = 0;
52 | objc_property_t *properties = class_copyPropertyList(vc.class , &outCount);
53 | for (int i = 0; i < outCount; i++) {
54 | objc_property_t property = properties[i];
55 | NSString *key = [NSString stringWithUTF8String:property_getName(property)];
56 | NSString *value = parameters[key];
57 | if (value != nil) {
58 | [vc setValue:value forKey:key];
59 | }
60 | }
61 | return vc;
62 | }
63 |
64 | - (void)responseCallback:(RoutesCallback)callBack {
65 | self.routesCallback = callBack;
66 | }
67 |
68 | - (void)setRoutesCallback:(RoutesCallback)routesCallback {
69 | objc_setAssociatedObject(self, &routesCallbackKey, routesCallback, OBJC_ASSOCIATION_COPY);
70 | }
71 |
72 | - (RoutesCallback)routesCallback {
73 | return (RoutesCallback)objc_getAssociatedObject(self, &routesCallbackKey);
74 | }
75 |
76 | @end
77 |
--------------------------------------------------------------------------------
/RealmExamples/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // RealmExamples
4 | //
5 | // Created by 赵光飞 on 2019/4/8.
6 | // Copyright © 2019 ash. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "Person.h"
11 | #import "UITextField+Swizzle.h"
12 |
13 | @interface ViewController ()
14 |
15 | @end
16 |
17 | @implementation ViewController
18 |
19 | - (void)viewDidLoad {
20 | [super viewDidLoad];
21 | // Do any additional setup after loading the view.
22 | /*
23 | RLMRealm *realm = [RLMRealm defaultRealm];
24 | // 获取 Realm 文件的父目录
25 | NSString *folderPath = realm.configuration.fileURL.URLByDeletingLastPathComponent.path;
26 | NSLog(@"%@", folderPath);
27 | // 使用的方法和常规 Objective‑C 对象的使用方法类似
28 | Dog *mydog = [[Dog alloc] init];
29 | mydog.name = @"Rex";
30 | mydog.age = 1;
31 | mydog.picture = nil; // 该属性是可空的
32 | NSLog(@"Name of dog: %@", mydog.name);
33 |
34 | // 检索 Realm 数据库,找到小于 2 岁 的所有狗狗
35 | RLMResults *puppies = [Dog objectsWhere:@"age < 2"];
36 | NSLog(@"%ld", puppies.count);
37 |
38 | // 存储数据十分简单
39 | [realm transactionWithBlock:^{
40 | [realm addObject:mydog];
41 | }];
42 | NSLog(@"%ld", puppies.count);
43 |
44 | // 可以在任何一个线程中执行检索、更新操作
45 |
46 | dispatch_async(dispatch_queue_create("background", 0), ^{
47 | @autoreleasepool {
48 | Dog *theDog = [[Dog objectsWhere:@"age == 1"] firstObject];
49 | RLMRealm *realm = [RLMRealm defaultRealm];
50 | [realm beginWriteTransaction];
51 | theDog.age = 3;
52 | [realm commitWriteTransaction];
53 |
54 | // 检索 Realm 数据库,找到小于 2 岁 的所有狗狗
55 | RLMResults *puppies = [Dog objectsWhere:@"age < 2"];
56 | NSLog(@"%ld", puppies.count);
57 | }
58 | });
59 | */
60 |
61 | // UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(0, 100, 200, 30)];
62 | // textField.backgroundColor = [UIColor redColor];
63 | // textField.keyboardType = UIKeyboardTypeNumberPad;
64 | // [self.view addSubview:textField];
65 |
66 |
67 | TestObject *test1 = [[TestObject alloc] init];
68 | test1._ID = @"2222";
69 | test1.object = [[TestObject alloc] init];
70 |
71 | NSLog(@"============== %@", test1.object);
72 |
73 | NSArray *arr = @[test1._ID];
74 | NSArray *arr1 = @[test1.object];
75 | TestObject* arr2[1] = {test1.object};
76 |
77 | NSLog(@"arr.firstObject === %@", arr.firstObject);
78 | NSLog(@"arr1.firstObject === %@", arr1.firstObject);
79 | NSLog(@"arr2[0] === %@", arr2[0]);
80 |
81 | NSLog(@"arr1.firstObject _ID === %@", arr1.firstObject._ID);
82 | NSLog(@"arr2[0] _ID === %@", arr2[0]._ID);
83 |
84 | test1._ID = @"33333";
85 | test1.object._ID = @"4444";
86 |
87 | NSLog(@"test1.object ============== %@", test1.object);
88 |
89 | NSLog(@"arr.firstObject === %@", arr.firstObject);
90 | NSLog(@"arr1.firstObject === %@", arr1.firstObject);
91 | NSLog(@"arr2[0] === %@", arr2[0]);
92 |
93 | NSLog(@"arr1.firstObject _ID === %@", arr1.firstObject._ID);
94 | NSLog(@"arr2[0] _ID === %@", arr2[0]._ID);
95 | }
96 |
97 | - (IBAction)route1:(UIButton *)sender {
98 |
99 | NSString *routePath = [routePath1 stringByAppendingString:@"?keyword=333&title=test_title"];
100 | BOOL r1 = [JLRoutes routeURL:[NSURL URLWithRoutePath:routePath]];
101 | NSLog(@"route1 === %d", r1);
102 | }
103 |
104 | - (IBAction)route2:(UIButton *)sender {
105 | BOOL r2 = [JLRoutes routeURL:[NSURL URLWithRoutePath:routePath2]];
106 | NSLog(@"route2 === %d", r2);
107 | }
108 |
109 | - (IBAction)route3:(UIButton *)sender {
110 | BOOL r3 = [JLRoutes routeURL:[NSURL URLWithRoutePath:routePath3] callback:^(id _Nonnull data) {
111 | NSLog(@"route3 callback %@", data);
112 | }];
113 | NSLog(@"route3 === %d", r3);
114 | }
115 |
116 | - (IBAction)present1:(UIButton *)sender {
117 | // 守卫可以进行拦截
118 | [JLRoutes routeURL:[NSURL URLWithRoutePath:routePath3] routerGuard:[CCRouterGuard routerGuardWithCallback:^BOOL{
119 | return NO;
120 | }]];
121 | }
122 |
123 |
124 | @end
125 |
--------------------------------------------------------------------------------
/RealmExamples/Routers/CCRouterManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCRouterManager.m
3 | // RealmExamples
4 | //
5 | // Created by ash on 2019/4/10.
6 | // Copyright © 2019 whty. All rights reserved.
7 | //
8 |
9 | #import "CCRouterManager.h"
10 | #import
11 |
12 | @implementation CCRouterManager
13 |
14 | + (instancetype)shareManager {
15 | static CCRouterManager *manager = nil;
16 | static dispatch_once_t onceToken;
17 | dispatch_once(&onceToken, ^{
18 | manager = [[self alloc] init];
19 | });
20 | return manager;
21 | }
22 |
23 | - (void)configDefaultRoutes {
24 | // configDefaultRoutes
25 | // 内部的scheme
26 | JLRoutes *route = [JLRoutes routesForScheme:route_scheme];
27 |
28 | [route addRoute:@"/push/:controller" handler:^BOOL(NSDictionary * _Nonnull parameters) {
29 | NSLog(@"%@", parameters);
30 | CCRouterGuard *routerGuard = [parameters objectForKey:RouterGuardKey];
31 | if (routerGuard) {
32 | BOOL result = [routerGuard routerGuardResult];
33 | if (!result) {
34 | return result;
35 | }
36 | }
37 | NSString *controller = [parameters objectForKey:@"controller"];
38 | UIViewController *pushVC = [CCRouterManager viewControllerWithClassName:controller parameters:parameters];
39 | if (pushVC) {
40 | pushVC.hidesBottomBarWhenPushed = YES;
41 | [[UIApplication topViewController].navigationController pushViewController:pushVC animated:YES];
42 | RoutesCallback callback = (RoutesCallback)[parameters objectForKey:RoutesCallbackKey];
43 | if ([pushVC respondsToSelector:@selector(responseCallback:)] && callback) {
44 | [pushVC performSelectorOnMainThread:@selector(responseCallback:) withObject:callback waitUntilDone:YES];
45 | }
46 | return YES;
47 | }
48 | return NO;
49 | }];
50 |
51 | [route addRoute:@"/present/:controller" handler:^BOOL(NSDictionary * _Nonnull parameters) {
52 | NSLog(@"%@", parameters);
53 | CCRouterGuard *routerGuard = [parameters objectForKey:RouterGuardKey];
54 | if (routerGuard) {
55 | BOOL result = [routerGuard routerGuardResult];
56 | if (!result) {
57 | return result;
58 | }
59 | }
60 | NSString *controller = [parameters objectForKey:@"controller"];
61 | UIViewController *presentVC = [CCRouterManager viewControllerWithClassName:controller parameters:parameters];
62 | if (presentVC) {
63 | [[UIApplication topViewController] presentViewController:presentVC animated:YES completion:nil];
64 | RoutesCallback callback = (RoutesCallback)[parameters objectForKey:RoutesCallbackKey];
65 | if ([presentVC respondsToSelector:@selector(responseCallback:)] && callback) {
66 | [presentVC performSelectorOnMainThread:@selector(responseCallback:) withObject:callback waitUntilDone:YES];
67 | }
68 | return YES;
69 | }
70 | return NO;
71 | }];
72 |
73 | [route addRoute:@"/present/navi/:controller" handler:^BOOL(NSDictionary * _Nonnull parameters) {
74 | NSLog(@"%@", parameters);
75 | CCRouterGuard *routerGuard = [parameters objectForKey:RouterGuardKey];
76 | if (routerGuard) {
77 | BOOL result = [routerGuard routerGuardResult];
78 | if (!result) {
79 | return result;
80 | }
81 | }
82 | NSString *controller = [parameters objectForKey:@"controller"];
83 | UIViewController *presentVC = [CCRouterManager viewControllerWithClassName:controller parameters:parameters];
84 | if (presentVC) {
85 | [[UIApplication topViewController] presentViewController:[[UINavigationController alloc] initWithRootViewController:presentVC] animated:YES completion:nil];
86 | RoutesCallback callback = (RoutesCallback)[parameters objectForKey:RoutesCallbackKey];
87 | if ([presentVC respondsToSelector:@selector(responseCallback:)] && callback) {
88 | [presentVC performSelectorOnMainThread:@selector(responseCallback:) withObject:callback waitUntilDone:YES];
89 | }
90 | return YES;
91 | }
92 | return NO;
93 | }];
94 |
95 | // 可以加入更多其他的路由
96 | }
97 |
98 | + (UIViewController *)viewControllerWithClassName:(NSString *)className parameters:(NSDictionary * _Nonnull)parameters {
99 | Class class = NSClassFromString(className);
100 | if ([class respondsToSelector:@selector(routeWithParameters:)]) {
101 | SEL sel = @selector(routeWithParameters:);
102 | NSLog(@"%@", class);
103 | id newVC = ((id (*) (id, SEL, id))objc_msgSend)(class, sel, parameters);
104 | UIViewController *VC = (UIViewController *)newVC;
105 | return VC;
106 | }
107 | return nil;
108 | }
109 |
110 | @end
111 |
--------------------------------------------------------------------------------
/RealmExamples/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // RealmExamples
4 | //
5 | // Created by 赵光飞 on 2019/4/8.
6 | // Copyright © 2019 ash. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "CCRouterManager.h"
11 |
12 | @interface AppDelegate ()
13 |
14 | @end
15 |
16 | @implementation AppDelegate
17 |
18 |
19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
20 | // Override point for customization after application launch.
21 | [[CCRouterManager shareManager] configDefaultRoutes];
22 | return YES;
23 | }
24 |
25 | - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options {
26 | return [JLRoutes routeURL:url];
27 | }
28 |
29 | - (void)applicationWillResignActive:(UIApplication *)application {
30 | // 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.
31 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
32 | }
33 |
34 |
35 | - (void)applicationDidEnterBackground:(UIApplication *)application {
36 | // 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.
37 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
38 | }
39 |
40 |
41 | - (void)applicationWillEnterForeground:(UIApplication *)application {
42 | // 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.
43 | }
44 |
45 |
46 | - (void)applicationDidBecomeActive:(UIApplication *)application {
47 | // 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.
48 | }
49 |
50 |
51 | - (void)applicationWillTerminate:(UIApplication *)application {
52 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
53 | // Saves changes in the application's managed object context before the application terminates.
54 | [self saveContext];
55 | }
56 |
57 |
58 | #pragma mark - Core Data stack
59 |
60 | @synthesize persistentContainer = _persistentContainer;
61 |
62 | - (NSPersistentContainer *)persistentContainer {
63 | // The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it.
64 | @synchronized (self) {
65 | if (_persistentContainer == nil) {
66 | _persistentContainer = [[NSPersistentContainer alloc] initWithName:@"RealmExamples"];
67 | [_persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) {
68 | if (error != nil) {
69 | // Replace this implementation with code to handle the error appropriately.
70 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
71 |
72 | /*
73 | Typical reasons for an error here include:
74 | * The parent directory does not exist, cannot be created, or disallows writing.
75 | * The persistent store is not accessible, due to permissions or data protection when the device is locked.
76 | * The device is out of space.
77 | * The store could not be migrated to the current model version.
78 | Check the error message to determine what the actual problem was.
79 | */
80 | NSLog(@"Unresolved error %@, %@", error, error.userInfo);
81 | abort();
82 | }
83 | }];
84 | }
85 | }
86 |
87 | return _persistentContainer;
88 | }
89 |
90 | #pragma mark - Core Data Saving support
91 |
92 | - (void)saveContext {
93 | NSManagedObjectContext *context = self.persistentContainer.viewContext;
94 | NSError *error = nil;
95 | if ([context hasChanges] && ![context save:&error]) {
96 | // Replace this implementation with code to handle the error appropriately.
97 | // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
98 | NSLog(@"Unresolved error %@, %@", error, error.userInfo);
99 | abort();
100 | }
101 | }
102 |
103 | @end
104 |
--------------------------------------------------------------------------------
/RealmExamples/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 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
45 |
53 |
61 |
69 |
74 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/RealmExamples.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 5E1DDC3A225B3E340044265E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E1DDC39225B3E340044265E /* AppDelegate.m */; };
11 | 5E1DDC3D225B3E340044265E /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E1DDC3C225B3E340044265E /* ViewController.m */; };
12 | 5E1DDC40225B3E340044265E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5E1DDC3E225B3E340044265E /* Main.storyboard */; };
13 | 5E1DDC43225B3E340044265E /* RealmExamples.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 5E1DDC41225B3E340044265E /* RealmExamples.xcdatamodeld */; };
14 | 5E1DDC45225B3E360044265E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5E1DDC44225B3E360044265E /* Assets.xcassets */; };
15 | 5E1DDC48225B3E360044265E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5E1DDC46225B3E360044265E /* LaunchScreen.storyboard */; };
16 | 5E1DDC4B225B3E360044265E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E1DDC4A225B3E360044265E /* main.m */; };
17 | 5E1DDC53225B8A260044265E /* Person.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E1DDC52225B8A260044265E /* Person.m */; };
18 | 5E4089FD225D9EEC0033BDFE /* CCRouterManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E4089FC225D9EEC0033BDFE /* CCRouterManager.m */; };
19 | 5E408A01225D9FE80033BDFE /* RouteViewController1.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E408A00225D9FE80033BDFE /* RouteViewController1.m */; };
20 | 5E408A04225D9FF90033BDFE /* RouteViewController2.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E408A03225D9FF90033BDFE /* RouteViewController2.m */; };
21 | 5E408A15225DDE050033BDFE /* RouteViewController3.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E408A14225DDE050033BDFE /* RouteViewController3.m */; };
22 | 5E408A51225F0C840033BDFE /* CCRouterGuard.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E408A50225F0C840033BDFE /* CCRouterGuard.m */; };
23 | 5E408A62225F17650033BDFE /* NSURL+Routes.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E408A5E225F17650033BDFE /* NSURL+Routes.m */; };
24 | 5E408A63225F17650033BDFE /* JLRoutes+Block.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E408A60225F17650033BDFE /* JLRoutes+Block.m */; };
25 | 5E408A64225F17650033BDFE /* UIViewController+Router.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E408A61225F17650033BDFE /* UIViewController+Router.m */; };
26 | 5E6CDCAA22A6206300F47BE7 /* UITextField+Swizzle.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E6CDCA922A6206300F47BE7 /* UITextField+Swizzle.m */; };
27 | 5EA37370226DA4B300CE3C28 /* RACViewController1.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EA3736F226DA4B300CE3C28 /* RACViewController1.m */; };
28 | 5EA3737A226DB69C00CE3C28 /* CCViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EA37379226DB69C00CE3C28 /* CCViewModel.m */; };
29 | 5EFC8267228C103500574E6E /* CCRoute.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EFC8266228C103500574E6E /* CCRoute.m */; };
30 | B6DF9EACFE7C36713E834D14 /* Pods_RealmExamples.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 39DF0E64568A9914D0207F74 /* Pods_RealmExamples.framework */; };
31 | /* End PBXBuildFile section */
32 |
33 | /* Begin PBXFileReference section */
34 | 39DF0E64568A9914D0207F74 /* Pods_RealmExamples.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RealmExamples.framework; sourceTree = BUILT_PRODUCTS_DIR; };
35 | 4C00994049337161E821C7E7 /* Pods-RealmExamples.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealmExamples.debug.xcconfig"; path = "Target Support Files/Pods-RealmExamples/Pods-RealmExamples.debug.xcconfig"; sourceTree = ""; };
36 | 5E1DDC35225B3E340044265E /* RealmExamples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RealmExamples.app; sourceTree = BUILT_PRODUCTS_DIR; };
37 | 5E1DDC38225B3E340044265E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
38 | 5E1DDC39225B3E340044265E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
39 | 5E1DDC3B225B3E340044265E /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
40 | 5E1DDC3C225B3E340044265E /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
41 | 5E1DDC3F225B3E340044265E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 5E1DDC42225B3E340044265E /* RealmExamples.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = RealmExamples.xcdatamodel; sourceTree = ""; };
43 | 5E1DDC44225B3E360044265E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
44 | 5E1DDC47225B3E360044265E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
45 | 5E1DDC49225B3E360044265E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
46 | 5E1DDC4A225B3E360044265E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
47 | 5E1DDC51225B8A260044265E /* Person.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Person.h; sourceTree = ""; };
48 | 5E1DDC52225B8A260044265E /* Person.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Person.m; sourceTree = ""; };
49 | 5E1DDC54225B8A5B0044265E /* RealmExamples.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RealmExamples.pch; sourceTree = ""; };
50 | 5E4089FB225D9EEC0033BDFE /* CCRouterManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCRouterManager.h; sourceTree = ""; };
51 | 5E4089FC225D9EEC0033BDFE /* CCRouterManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CCRouterManager.m; sourceTree = ""; };
52 | 5E4089FF225D9FE80033BDFE /* RouteViewController1.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RouteViewController1.h; sourceTree = ""; };
53 | 5E408A00225D9FE80033BDFE /* RouteViewController1.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RouteViewController1.m; sourceTree = ""; };
54 | 5E408A02225D9FF90033BDFE /* RouteViewController2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RouteViewController2.h; sourceTree = ""; };
55 | 5E408A03225D9FF90033BDFE /* RouteViewController2.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RouteViewController2.m; sourceTree = ""; };
56 | 5E408A08225DBB9F0033BDFE /* RoutesConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoutesConfig.h; sourceTree = ""; };
57 | 5E408A13225DDE050033BDFE /* RouteViewController3.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RouteViewController3.h; sourceTree = ""; };
58 | 5E408A14225DDE050033BDFE /* RouteViewController3.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RouteViewController3.m; sourceTree = ""; };
59 | 5E408A4F225F0C830033BDFE /* CCRouterGuard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCRouterGuard.h; sourceTree = ""; };
60 | 5E408A50225F0C840033BDFE /* CCRouterGuard.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CCRouterGuard.m; sourceTree = ""; };
61 | 5E408A5C225F17650033BDFE /* NSURL+Routes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSURL+Routes.h"; path = "RealmExamples/Routers/Category/NSURL+Routes.h"; sourceTree = SOURCE_ROOT; };
62 | 5E408A5D225F17650033BDFE /* JLRoutes+Block.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "JLRoutes+Block.h"; path = "RealmExamples/Routers/Category/JLRoutes+Block.h"; sourceTree = SOURCE_ROOT; };
63 | 5E408A5E225F17650033BDFE /* NSURL+Routes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSURL+Routes.m"; path = "RealmExamples/Routers/Category/NSURL+Routes.m"; sourceTree = SOURCE_ROOT; };
64 | 5E408A5F225F17650033BDFE /* UIViewController+Router.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+Router.h"; path = "RealmExamples/Routers/Category/UIViewController+Router.h"; sourceTree = SOURCE_ROOT; };
65 | 5E408A60225F17650033BDFE /* JLRoutes+Block.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "JLRoutes+Block.m"; path = "RealmExamples/Routers/Category/JLRoutes+Block.m"; sourceTree = SOURCE_ROOT; };
66 | 5E408A61225F17650033BDFE /* UIViewController+Router.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+Router.m"; path = "RealmExamples/Routers/Category/UIViewController+Router.m"; sourceTree = SOURCE_ROOT; };
67 | 5E6CDCA822A6206300F47BE7 /* UITextField+Swizzle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UITextField+Swizzle.h"; sourceTree = ""; };
68 | 5E6CDCA922A6206300F47BE7 /* UITextField+Swizzle.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UITextField+Swizzle.m"; sourceTree = ""; };
69 | 5EA3736E226DA4B300CE3C28 /* RACViewController1.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RACViewController1.h; sourceTree = ""; };
70 | 5EA3736F226DA4B300CE3C28 /* RACViewController1.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RACViewController1.m; sourceTree = ""; };
71 | 5EA37378226DB69C00CE3C28 /* CCViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCViewModel.h; sourceTree = ""; };
72 | 5EA37379226DB69C00CE3C28 /* CCViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CCViewModel.m; sourceTree = ""; };
73 | 5EFC8265228C103500574E6E /* CCRoute.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCRoute.h; sourceTree = ""; };
74 | 5EFC8266228C103500574E6E /* CCRoute.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CCRoute.m; sourceTree = ""; };
75 | 8EEE3F922CE8157C21C37FBB /* Pods-RealmExamples.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RealmExamples.release.xcconfig"; path = "Target Support Files/Pods-RealmExamples/Pods-RealmExamples.release.xcconfig"; sourceTree = ""; };
76 | /* End PBXFileReference section */
77 |
78 | /* Begin PBXFrameworksBuildPhase section */
79 | 5E1DDC32225B3E340044265E /* Frameworks */ = {
80 | isa = PBXFrameworksBuildPhase;
81 | buildActionMask = 2147483647;
82 | files = (
83 | B6DF9EACFE7C36713E834D14 /* Pods_RealmExamples.framework in Frameworks */,
84 | );
85 | runOnlyForDeploymentPostprocessing = 0;
86 | };
87 | /* End PBXFrameworksBuildPhase section */
88 |
89 | /* Begin PBXGroup section */
90 | 5E1DDC2C225B3E340044265E = {
91 | isa = PBXGroup;
92 | children = (
93 | 5E1DDC37225B3E340044265E /* RealmExamples */,
94 | 5E1DDC36225B3E340044265E /* Products */,
95 | 71D16B402D22680AA53B4FE1 /* Pods */,
96 | ACA3FF090D2631B70298BAFD /* Frameworks */,
97 | );
98 | sourceTree = "";
99 | };
100 | 5E1DDC36225B3E340044265E /* Products */ = {
101 | isa = PBXGroup;
102 | children = (
103 | 5E1DDC35225B3E340044265E /* RealmExamples.app */,
104 | );
105 | name = Products;
106 | sourceTree = "";
107 | };
108 | 5E1DDC37225B3E340044265E /* RealmExamples */ = {
109 | isa = PBXGroup;
110 | children = (
111 | 5EA37375226DB66E00CE3C28 /* MVVM */,
112 | 5EA3736D226DA48300CE3C28 /* ReactiveCocoa */,
113 | 5E4089FE225D9FC50033BDFE /* ViewContollers */,
114 | 5E4089FA225D957D0033BDFE /* Routers */,
115 | 5E1DDC38225B3E340044265E /* AppDelegate.h */,
116 | 5E1DDC39225B3E340044265E /* AppDelegate.m */,
117 | 5E1DDC3B225B3E340044265E /* ViewController.h */,
118 | 5E1DDC3C225B3E340044265E /* ViewController.m */,
119 | 5E6CDCA822A6206300F47BE7 /* UITextField+Swizzle.h */,
120 | 5E6CDCA922A6206300F47BE7 /* UITextField+Swizzle.m */,
121 | 5E1DDC51225B8A260044265E /* Person.h */,
122 | 5E1DDC52225B8A260044265E /* Person.m */,
123 | 5E1DDC54225B8A5B0044265E /* RealmExamples.pch */,
124 | 5E1DDC3E225B3E340044265E /* Main.storyboard */,
125 | 5E1DDC44225B3E360044265E /* Assets.xcassets */,
126 | 5E1DDC46225B3E360044265E /* LaunchScreen.storyboard */,
127 | 5E1DDC49225B3E360044265E /* Info.plist */,
128 | 5E1DDC4A225B3E360044265E /* main.m */,
129 | 5E1DDC41225B3E340044265E /* RealmExamples.xcdatamodeld */,
130 | );
131 | path = RealmExamples;
132 | sourceTree = "";
133 | };
134 | 5E4089FA225D957D0033BDFE /* Routers */ = {
135 | isa = PBXGroup;
136 | children = (
137 | 5EFC8264228C100F00574E6E /* CustomRoutes */,
138 | 5E408A0C225DC80A0033BDFE /* Category */,
139 | 5E408A08225DBB9F0033BDFE /* RoutesConfig.h */,
140 | 5E4089FB225D9EEC0033BDFE /* CCRouterManager.h */,
141 | 5E4089FC225D9EEC0033BDFE /* CCRouterManager.m */,
142 | 5E408A4F225F0C830033BDFE /* CCRouterGuard.h */,
143 | 5E408A50225F0C840033BDFE /* CCRouterGuard.m */,
144 | );
145 | path = Routers;
146 | sourceTree = "";
147 | };
148 | 5E4089FE225D9FC50033BDFE /* ViewContollers */ = {
149 | isa = PBXGroup;
150 | children = (
151 | 5E4089FF225D9FE80033BDFE /* RouteViewController1.h */,
152 | 5E408A00225D9FE80033BDFE /* RouteViewController1.m */,
153 | 5E408A02225D9FF90033BDFE /* RouteViewController2.h */,
154 | 5E408A03225D9FF90033BDFE /* RouteViewController2.m */,
155 | 5E408A13225DDE050033BDFE /* RouteViewController3.h */,
156 | 5E408A14225DDE050033BDFE /* RouteViewController3.m */,
157 | );
158 | path = ViewContollers;
159 | sourceTree = "";
160 | };
161 | 5E408A0C225DC80A0033BDFE /* Category */ = {
162 | isa = PBXGroup;
163 | children = (
164 | 5E408A5D225F17650033BDFE /* JLRoutes+Block.h */,
165 | 5E408A60225F17650033BDFE /* JLRoutes+Block.m */,
166 | 5E408A5C225F17650033BDFE /* NSURL+Routes.h */,
167 | 5E408A5E225F17650033BDFE /* NSURL+Routes.m */,
168 | 5E408A5F225F17650033BDFE /* UIViewController+Router.h */,
169 | 5E408A61225F17650033BDFE /* UIViewController+Router.m */,
170 | );
171 | name = Category;
172 | path = ../Category;
173 | sourceTree = "";
174 | };
175 | 5EA3736D226DA48300CE3C28 /* ReactiveCocoa */ = {
176 | isa = PBXGroup;
177 | children = (
178 | 5EA3736E226DA4B300CE3C28 /* RACViewController1.h */,
179 | 5EA3736F226DA4B300CE3C28 /* RACViewController1.m */,
180 | );
181 | name = ReactiveCocoa;
182 | sourceTree = "";
183 | };
184 | 5EA37375226DB66E00CE3C28 /* MVVM */ = {
185 | isa = PBXGroup;
186 | children = (
187 | 5EA37376226DB67700CE3C28 /* ViewModels */,
188 | );
189 | path = MVVM;
190 | sourceTree = "";
191 | };
192 | 5EA37376226DB67700CE3C28 /* ViewModels */ = {
193 | isa = PBXGroup;
194 | children = (
195 | 5EA37377226DB68C00CE3C28 /* BaseClass */,
196 | );
197 | path = ViewModels;
198 | sourceTree = "";
199 | };
200 | 5EA37377226DB68C00CE3C28 /* BaseClass */ = {
201 | isa = PBXGroup;
202 | children = (
203 | 5EA37378226DB69C00CE3C28 /* CCViewModel.h */,
204 | 5EA37379226DB69C00CE3C28 /* CCViewModel.m */,
205 | );
206 | path = BaseClass;
207 | sourceTree = "";
208 | };
209 | 5EFC8264228C100F00574E6E /* CustomRoutes */ = {
210 | isa = PBXGroup;
211 | children = (
212 | 5EFC8265228C103500574E6E /* CCRoute.h */,
213 | 5EFC8266228C103500574E6E /* CCRoute.m */,
214 | );
215 | path = CustomRoutes;
216 | sourceTree = "";
217 | };
218 | 71D16B402D22680AA53B4FE1 /* Pods */ = {
219 | isa = PBXGroup;
220 | children = (
221 | 4C00994049337161E821C7E7 /* Pods-RealmExamples.debug.xcconfig */,
222 | 8EEE3F922CE8157C21C37FBB /* Pods-RealmExamples.release.xcconfig */,
223 | );
224 | path = Pods;
225 | sourceTree = "";
226 | };
227 | ACA3FF090D2631B70298BAFD /* Frameworks */ = {
228 | isa = PBXGroup;
229 | children = (
230 | 39DF0E64568A9914D0207F74 /* Pods_RealmExamples.framework */,
231 | );
232 | name = Frameworks;
233 | sourceTree = "";
234 | };
235 | /* End PBXGroup section */
236 |
237 | /* Begin PBXNativeTarget section */
238 | 5E1DDC34225B3E340044265E /* RealmExamples */ = {
239 | isa = PBXNativeTarget;
240 | buildConfigurationList = 5E1DDC4E225B3E360044265E /* Build configuration list for PBXNativeTarget "RealmExamples" */;
241 | buildPhases = (
242 | 14C9CCE6816483974813B9BD /* [CP] Check Pods Manifest.lock */,
243 | 5E1DDC31225B3E340044265E /* Sources */,
244 | 5E1DDC32225B3E340044265E /* Frameworks */,
245 | 5E1DDC33225B3E340044265E /* Resources */,
246 | 96EAB06CB2351712C10C6A35 /* [CP] Embed Pods Frameworks */,
247 | );
248 | buildRules = (
249 | );
250 | dependencies = (
251 | );
252 | name = RealmExamples;
253 | productName = RealmExamples;
254 | productReference = 5E1DDC35225B3E340044265E /* RealmExamples.app */;
255 | productType = "com.apple.product-type.application";
256 | };
257 | /* End PBXNativeTarget section */
258 |
259 | /* Begin PBXProject section */
260 | 5E1DDC2D225B3E340044265E /* Project object */ = {
261 | isa = PBXProject;
262 | attributes = {
263 | CLASSPREFIX = CC;
264 | LastUpgradeCheck = 1020;
265 | ORGANIZATIONNAME = whty;
266 | TargetAttributes = {
267 | 5E1DDC34225B3E340044265E = {
268 | CreatedOnToolsVersion = 10.2;
269 | };
270 | };
271 | };
272 | buildConfigurationList = 5E1DDC30225B3E340044265E /* Build configuration list for PBXProject "RealmExamples" */;
273 | compatibilityVersion = "Xcode 9.3";
274 | developmentRegion = en;
275 | hasScannedForEncodings = 0;
276 | knownRegions = (
277 | en,
278 | Base,
279 | );
280 | mainGroup = 5E1DDC2C225B3E340044265E;
281 | productRefGroup = 5E1DDC36225B3E340044265E /* Products */;
282 | projectDirPath = "";
283 | projectRoot = "";
284 | targets = (
285 | 5E1DDC34225B3E340044265E /* RealmExamples */,
286 | );
287 | };
288 | /* End PBXProject section */
289 |
290 | /* Begin PBXResourcesBuildPhase section */
291 | 5E1DDC33225B3E340044265E /* Resources */ = {
292 | isa = PBXResourcesBuildPhase;
293 | buildActionMask = 2147483647;
294 | files = (
295 | 5E1DDC48225B3E360044265E /* LaunchScreen.storyboard in Resources */,
296 | 5E1DDC45225B3E360044265E /* Assets.xcassets in Resources */,
297 | 5E1DDC40225B3E340044265E /* Main.storyboard in Resources */,
298 | );
299 | runOnlyForDeploymentPostprocessing = 0;
300 | };
301 | /* End PBXResourcesBuildPhase section */
302 |
303 | /* Begin PBXShellScriptBuildPhase section */
304 | 14C9CCE6816483974813B9BD /* [CP] Check Pods Manifest.lock */ = {
305 | isa = PBXShellScriptBuildPhase;
306 | buildActionMask = 2147483647;
307 | files = (
308 | );
309 | inputFileListPaths = (
310 | );
311 | inputPaths = (
312 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
313 | "${PODS_ROOT}/Manifest.lock",
314 | );
315 | name = "[CP] Check Pods Manifest.lock";
316 | outputFileListPaths = (
317 | );
318 | outputPaths = (
319 | "$(DERIVED_FILE_DIR)/Pods-RealmExamples-checkManifestLockResult.txt",
320 | );
321 | runOnlyForDeploymentPostprocessing = 0;
322 | shellPath = /bin/sh;
323 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
324 | showEnvVarsInLog = 0;
325 | };
326 | 96EAB06CB2351712C10C6A35 /* [CP] Embed Pods Frameworks */ = {
327 | isa = PBXShellScriptBuildPhase;
328 | buildActionMask = 2147483647;
329 | files = (
330 | );
331 | inputFileListPaths = (
332 | );
333 | inputPaths = (
334 | "${PODS_ROOT}/Target Support Files/Pods-RealmExamples/Pods-RealmExamples-frameworks.sh",
335 | "${BUILT_PRODUCTS_DIR}/JLRoutes/JLRoutes.framework",
336 | "${BUILT_PRODUCTS_DIR}/ReactiveObjC/ReactiveObjC.framework",
337 | "${BUILT_PRODUCTS_DIR}/Realm/Realm.framework",
338 | "${BUILT_PRODUCTS_DIR}/cocore/cocore.framework",
339 | "${BUILT_PRODUCTS_DIR}/coobjc/coobjc.framework",
340 | );
341 | name = "[CP] Embed Pods Frameworks";
342 | outputFileListPaths = (
343 | );
344 | outputPaths = (
345 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JLRoutes.framework",
346 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ReactiveObjC.framework",
347 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework",
348 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cocore.framework",
349 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/coobjc.framework",
350 | );
351 | runOnlyForDeploymentPostprocessing = 0;
352 | shellPath = /bin/sh;
353 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RealmExamples/Pods-RealmExamples-frameworks.sh\"\n";
354 | showEnvVarsInLog = 0;
355 | };
356 | /* End PBXShellScriptBuildPhase section */
357 |
358 | /* Begin PBXSourcesBuildPhase section */
359 | 5E1DDC31225B3E340044265E /* Sources */ = {
360 | isa = PBXSourcesBuildPhase;
361 | buildActionMask = 2147483647;
362 | files = (
363 | 5E1DDC3D225B3E340044265E /* ViewController.m in Sources */,
364 | 5E408A63225F17650033BDFE /* JLRoutes+Block.m in Sources */,
365 | 5E408A62225F17650033BDFE /* NSURL+Routes.m in Sources */,
366 | 5EA37370226DA4B300CE3C28 /* RACViewController1.m in Sources */,
367 | 5E408A15225DDE050033BDFE /* RouteViewController3.m in Sources */,
368 | 5E408A04225D9FF90033BDFE /* RouteViewController2.m in Sources */,
369 | 5E408A01225D9FE80033BDFE /* RouteViewController1.m in Sources */,
370 | 5E1DDC3A225B3E340044265E /* AppDelegate.m in Sources */,
371 | 5EA3737A226DB69C00CE3C28 /* CCViewModel.m in Sources */,
372 | 5EFC8267228C103500574E6E /* CCRoute.m in Sources */,
373 | 5E4089FD225D9EEC0033BDFE /* CCRouterManager.m in Sources */,
374 | 5E408A64225F17650033BDFE /* UIViewController+Router.m in Sources */,
375 | 5E1DDC53225B8A260044265E /* Person.m in Sources */,
376 | 5E1DDC4B225B3E360044265E /* main.m in Sources */,
377 | 5E6CDCAA22A6206300F47BE7 /* UITextField+Swizzle.m in Sources */,
378 | 5E408A51225F0C840033BDFE /* CCRouterGuard.m in Sources */,
379 | 5E1DDC43225B3E340044265E /* RealmExamples.xcdatamodeld in Sources */,
380 | );
381 | runOnlyForDeploymentPostprocessing = 0;
382 | };
383 | /* End PBXSourcesBuildPhase section */
384 |
385 | /* Begin PBXVariantGroup section */
386 | 5E1DDC3E225B3E340044265E /* Main.storyboard */ = {
387 | isa = PBXVariantGroup;
388 | children = (
389 | 5E1DDC3F225B3E340044265E /* Base */,
390 | );
391 | name = Main.storyboard;
392 | sourceTree = "";
393 | };
394 | 5E1DDC46225B3E360044265E /* LaunchScreen.storyboard */ = {
395 | isa = PBXVariantGroup;
396 | children = (
397 | 5E1DDC47225B3E360044265E /* Base */,
398 | );
399 | name = LaunchScreen.storyboard;
400 | sourceTree = "";
401 | };
402 | /* End PBXVariantGroup section */
403 |
404 | /* Begin XCBuildConfiguration section */
405 | 5E1DDC4C225B3E360044265E /* Debug */ = {
406 | isa = XCBuildConfiguration;
407 | buildSettings = {
408 | ALWAYS_SEARCH_USER_PATHS = NO;
409 | CLANG_ANALYZER_NONNULL = YES;
410 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
411 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
412 | CLANG_CXX_LIBRARY = "libc++";
413 | CLANG_ENABLE_MODULES = YES;
414 | CLANG_ENABLE_OBJC_ARC = YES;
415 | CLANG_ENABLE_OBJC_WEAK = YES;
416 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
417 | CLANG_WARN_BOOL_CONVERSION = YES;
418 | CLANG_WARN_COMMA = YES;
419 | CLANG_WARN_CONSTANT_CONVERSION = YES;
420 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
421 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
422 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
423 | CLANG_WARN_EMPTY_BODY = YES;
424 | CLANG_WARN_ENUM_CONVERSION = YES;
425 | CLANG_WARN_INFINITE_RECURSION = YES;
426 | CLANG_WARN_INT_CONVERSION = YES;
427 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
428 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
429 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
430 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
431 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
432 | CLANG_WARN_STRICT_PROTOTYPES = YES;
433 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
434 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
435 | CLANG_WARN_UNREACHABLE_CODE = YES;
436 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
437 | CODE_SIGN_IDENTITY = "iPhone Developer";
438 | COPY_PHASE_STRIP = NO;
439 | DEBUG_INFORMATION_FORMAT = dwarf;
440 | ENABLE_STRICT_OBJC_MSGSEND = YES;
441 | ENABLE_TESTABILITY = YES;
442 | GCC_C_LANGUAGE_STANDARD = gnu11;
443 | GCC_DYNAMIC_NO_PIC = NO;
444 | GCC_NO_COMMON_BLOCKS = YES;
445 | GCC_OPTIMIZATION_LEVEL = 0;
446 | GCC_PREPROCESSOR_DEFINITIONS = (
447 | "DEBUG=1",
448 | "$(inherited)",
449 | );
450 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
451 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
452 | GCC_WARN_UNDECLARED_SELECTOR = YES;
453 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
454 | GCC_WARN_UNUSED_FUNCTION = YES;
455 | GCC_WARN_UNUSED_VARIABLE = YES;
456 | IPHONEOS_DEPLOYMENT_TARGET = 12.2;
457 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
458 | MTL_FAST_MATH = YES;
459 | ONLY_ACTIVE_ARCH = YES;
460 | SDKROOT = iphoneos;
461 | };
462 | name = Debug;
463 | };
464 | 5E1DDC4D225B3E360044265E /* Release */ = {
465 | isa = XCBuildConfiguration;
466 | buildSettings = {
467 | ALWAYS_SEARCH_USER_PATHS = NO;
468 | CLANG_ANALYZER_NONNULL = YES;
469 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
470 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
471 | CLANG_CXX_LIBRARY = "libc++";
472 | CLANG_ENABLE_MODULES = YES;
473 | CLANG_ENABLE_OBJC_ARC = YES;
474 | CLANG_ENABLE_OBJC_WEAK = YES;
475 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
476 | CLANG_WARN_BOOL_CONVERSION = YES;
477 | CLANG_WARN_COMMA = YES;
478 | CLANG_WARN_CONSTANT_CONVERSION = YES;
479 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
480 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
481 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
482 | CLANG_WARN_EMPTY_BODY = YES;
483 | CLANG_WARN_ENUM_CONVERSION = YES;
484 | CLANG_WARN_INFINITE_RECURSION = YES;
485 | CLANG_WARN_INT_CONVERSION = YES;
486 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
487 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
488 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
489 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
490 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
491 | CLANG_WARN_STRICT_PROTOTYPES = YES;
492 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
493 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
494 | CLANG_WARN_UNREACHABLE_CODE = YES;
495 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
496 | CODE_SIGN_IDENTITY = "iPhone Developer";
497 | COPY_PHASE_STRIP = NO;
498 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
499 | ENABLE_NS_ASSERTIONS = NO;
500 | ENABLE_STRICT_OBJC_MSGSEND = YES;
501 | GCC_C_LANGUAGE_STANDARD = gnu11;
502 | GCC_NO_COMMON_BLOCKS = YES;
503 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
504 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
505 | GCC_WARN_UNDECLARED_SELECTOR = YES;
506 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
507 | GCC_WARN_UNUSED_FUNCTION = YES;
508 | GCC_WARN_UNUSED_VARIABLE = YES;
509 | IPHONEOS_DEPLOYMENT_TARGET = 12.2;
510 | MTL_ENABLE_DEBUG_INFO = NO;
511 | MTL_FAST_MATH = YES;
512 | SDKROOT = iphoneos;
513 | VALIDATE_PRODUCT = YES;
514 | };
515 | name = Release;
516 | };
517 | 5E1DDC4F225B3E360044265E /* Debug */ = {
518 | isa = XCBuildConfiguration;
519 | baseConfigurationReference = 4C00994049337161E821C7E7 /* Pods-RealmExamples.debug.xcconfig */;
520 | buildSettings = {
521 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
522 | CODE_SIGN_STYLE = Automatic;
523 | GCC_PRECOMPILE_PREFIX_HEADER = NO;
524 | GCC_PREFIX_HEADER = "$(SRCROOT)/RealmExamples/RealmExamples.pch";
525 | INFOPLIST_FILE = RealmExamples/Info.plist;
526 | LD_RUNPATH_SEARCH_PATHS = (
527 | "$(inherited)",
528 | "@executable_path/Frameworks",
529 | );
530 | PRODUCT_BUNDLE_IDENTIFIER = ash.RealmExamples;
531 | PRODUCT_NAME = "$(TARGET_NAME)";
532 | TARGETED_DEVICE_FAMILY = "1,2";
533 | };
534 | name = Debug;
535 | };
536 | 5E1DDC50225B3E360044265E /* Release */ = {
537 | isa = XCBuildConfiguration;
538 | baseConfigurationReference = 8EEE3F922CE8157C21C37FBB /* Pods-RealmExamples.release.xcconfig */;
539 | buildSettings = {
540 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
541 | CODE_SIGN_STYLE = Automatic;
542 | GCC_PRECOMPILE_PREFIX_HEADER = NO;
543 | GCC_PREFIX_HEADER = "$(SRCROOT)/RealmExamples/RealmExamples.pch";
544 | INFOPLIST_FILE = RealmExamples/Info.plist;
545 | LD_RUNPATH_SEARCH_PATHS = (
546 | "$(inherited)",
547 | "@executable_path/Frameworks",
548 | );
549 | PRODUCT_BUNDLE_IDENTIFIER = ash.RealmExamples;
550 | PRODUCT_NAME = "$(TARGET_NAME)";
551 | TARGETED_DEVICE_FAMILY = "1,2";
552 | };
553 | name = Release;
554 | };
555 | /* End XCBuildConfiguration section */
556 |
557 | /* Begin XCConfigurationList section */
558 | 5E1DDC30225B3E340044265E /* Build configuration list for PBXProject "RealmExamples" */ = {
559 | isa = XCConfigurationList;
560 | buildConfigurations = (
561 | 5E1DDC4C225B3E360044265E /* Debug */,
562 | 5E1DDC4D225B3E360044265E /* Release */,
563 | );
564 | defaultConfigurationIsVisible = 0;
565 | defaultConfigurationName = Release;
566 | };
567 | 5E1DDC4E225B3E360044265E /* Build configuration list for PBXNativeTarget "RealmExamples" */ = {
568 | isa = XCConfigurationList;
569 | buildConfigurations = (
570 | 5E1DDC4F225B3E360044265E /* Debug */,
571 | 5E1DDC50225B3E360044265E /* Release */,
572 | );
573 | defaultConfigurationIsVisible = 0;
574 | defaultConfigurationName = Release;
575 | };
576 | /* End XCConfigurationList section */
577 |
578 | /* Begin XCVersionGroup section */
579 | 5E1DDC41225B3E340044265E /* RealmExamples.xcdatamodeld */ = {
580 | isa = XCVersionGroup;
581 | children = (
582 | 5E1DDC42225B3E340044265E /* RealmExamples.xcdatamodel */,
583 | );
584 | currentVersion = 5E1DDC42225B3E340044265E /* RealmExamples.xcdatamodel */;
585 | path = RealmExamples.xcdatamodeld;
586 | sourceTree = "";
587 | versionGroupType = wrapper.xcdatamodel;
588 | };
589 | /* End XCVersionGroup section */
590 | };
591 | rootObject = 5E1DDC2D225B3E340044265E /* Project object */;
592 | }
593 |
--------------------------------------------------------------------------------