├── README.md
├── StepDemo
├── MMPSilence.wav
├── StepModel.m
├── ViewController.h
├── AppDelegate.h
├── main.m
├── StepModel.h
├── StepManager.h
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── ViewController.m
├── Info.plist
├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.storyboard
├── AppDelegate.m
├── MMPDeepSleepPreventer.h
├── MMPDeepSleepPreventer.m
└── StepManager.m
├── StepDemo.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── leijianmin.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── xcuserdata
│ └── leijianmin.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── StepDemo.xcscheme
└── project.pbxproj
├── StepDemoTests
├── Info.plist
└── StepDemoTests.m
└── StepDemoUITests
├── Info.plist
└── StepDemoUITests.m
/README.md:
--------------------------------------------------------------------------------
1 | # StepDemo
2 | 利用加速度传感器实现的,实时计步小demo!
3 |
--------------------------------------------------------------------------------
/StepDemo/MMPSilence.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leijmin/StepDemo/HEAD/StepDemo/MMPSilence.wav
--------------------------------------------------------------------------------
/StepDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/StepDemo.xcodeproj/project.xcworkspace/xcuserdata/leijianmin.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/leijmin/StepDemo/HEAD/StepDemo.xcodeproj/project.xcworkspace/xcuserdata/leijianmin.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/StepDemo/StepModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // StepModel.m
3 | // StepDemo
4 | //
5 | // Created by 雷建民 on 16/7/22.
6 | // Copyright © 2016年 雷建民. All rights reserved.
7 | //
8 |
9 | #import "StepModel.h"
10 |
11 | @implementation StepModel
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/StepDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // StepDemo
4 | //
5 | // Created by 雷建民 on 16/7/22.
6 | // Copyright © 2016年 雷建民. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/StepDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/StepDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // StepDemo
4 | //
5 | // Created by 雷建民 on 16/7/22.
6 | // Copyright © 2016年 雷建民. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/StepDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // StepDemo
4 | //
5 | // Created by 雷建民 on 16/7/22.
6 | // Copyright © 2016年 雷建民. 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 |
--------------------------------------------------------------------------------
/StepDemo/StepModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // StepModel.h
3 | // StepDemo
4 | //
5 | // Created by 雷建民 on 16/7/22.
6 | // Copyright © 2016年 雷建民. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface StepModel : NSObject
12 |
13 | @property(nonatomic,strong) NSDate *date;
14 |
15 | @property(nonatomic,assign) int record_no;
16 |
17 | @property(nonatomic, strong) NSString *record_time;
18 |
19 | @property(nonatomic,assign) int step;
20 |
21 | //g是一个震动幅度的系数,通过一定的判断条件来判断是否计做一步
22 | @property(nonatomic,assign) double g;
23 |
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/StepDemo/StepManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // StepManager.h
3 | // StepDemo
4 | //
5 | // Created by 雷建民 on 16/7/22.
6 | // Copyright © 2016年 雷建民. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface StepManager : NSObject
13 |
14 |
15 | @property (nonatomic) NSInteger step; // 运动步数(总计)
16 |
17 | + (StepManager *)sharedManager;
18 |
19 | //开始计步
20 | - (void)startWithStep;
21 |
22 | ////得到计步所消耗的卡路里
23 | //+ (NSInteger)getStepCalorie;
24 | //
25 | ////得到所走的路程(单位:米)
26 | //+ (CGFloat)getStepDistance;
27 | //
28 | ////得到运动所用的时间
29 | //+ (NSInteger)getStepTime;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/StepDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/StepDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/StepDemoUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/StepDemo.xcodeproj/xcuserdata/leijianmin.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | StepDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 255564D71D421A6B00287E22
16 |
17 | primary
18 |
19 |
20 | 255564F01D421A6B00287E22
21 |
22 | primary
23 |
24 |
25 | 255564FB1D421A6B00287E22
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/StepDemoTests/StepDemoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // StepDemoTests.m
3 | // StepDemoTests
4 | //
5 | // Created by 雷建民 on 16/7/22.
6 | // Copyright © 2016年 雷建民. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface StepDemoTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation StepDemoTests
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 |
--------------------------------------------------------------------------------
/StepDemo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // StepDemo
4 | //
5 | // Created by 雷建民 on 16/7/22.
6 | // Copyright © 2016年 雷建民. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "StepManager.h"
11 | @interface ViewController ()
12 | {
13 | NSTimer *_timer;
14 | UILabel *lable;
15 | }
16 | @end
17 |
18 | @implementation ViewController
19 |
20 | - (void)viewDidLoad {
21 | [super viewDidLoad];
22 | [[StepManager sharedManager] startWithStep];
23 | lable =[[ UILabel alloc]initWithFrame:CGRectMake(100, 300, 300, 40)];
24 | lable.backgroundColor =[UIColor redColor];
25 |
26 | [self.view addSubview:lable];
27 | _timer = [NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(getStepNumber) userInfo:nil repeats:YES];
28 | [[NSRunLoop currentRunLoop] addTimer:_timer forMode:NSDefaultRunLoopMode];
29 | }
30 |
31 |
32 | - (void)getStepNumber
33 | {
34 |
35 | lable.text = [NSString stringWithFormat:@"我走了 %ld步",[StepManager sharedManager].step];
36 | }
37 |
38 | - (void)didReceiveMemoryWarning {
39 | [super didReceiveMemoryWarning];
40 | // Dispose of any resources that can be recreated.
41 | }
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/StepDemoUITests/StepDemoUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // StepDemoUITests.m
3 | // StepDemoUITests
4 | //
5 | // Created by 雷建民 on 16/7/22.
6 | // Copyright © 2016年 雷建民. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface StepDemoUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation StepDemoUITests
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 |
--------------------------------------------------------------------------------
/StepDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UIBackgroundModes
26 |
27 | audio
28 | remote-notification
29 |
30 | UILaunchStoryboardName
31 | LaunchScreen
32 | UIMainStoryboardFile
33 | Main
34 | UIRequiredDeviceCapabilities
35 |
36 | armv7
37 |
38 | UISupportedInterfaceOrientations
39 |
40 | UIInterfaceOrientationPortrait
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/StepDemo/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 |
--------------------------------------------------------------------------------
/StepDemo/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 |
27 |
28 |
--------------------------------------------------------------------------------
/StepDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // StepDemo
4 | //
5 | // Created by 雷建民 on 16/7/22.
6 | // Copyright © 2016年 雷建民. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "MMPDeepSleepPreventer.h"
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 |
21 | return YES;
22 | }
23 |
24 | - (void)applicationWillResignActive:(UIApplication *)application {
25 | // 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.
26 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
27 | }
28 |
29 | - (void)applicationDidEnterBackground:(UIApplication *)application {
30 | //播放一段无声音乐,避免被kill
31 | [[MMPDeepSleepPreventer sharedSingleton] startPreventSleep];
32 | }
33 |
34 | - (void)applicationWillEnterForeground:(UIApplication *)application {
35 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
36 | }
37 |
38 | - (void)applicationDidBecomeActive:(UIApplication *)application {
39 | // 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.
40 | }
41 |
42 | - (void)applicationWillTerminate:(UIApplication *)application {
43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/StepDemo/MMPDeepSleepPreventer.h:
--------------------------------------------------------------------------------
1 | //
2 | // MMPDeepSleepPreventer.h
3 | // MMPDeepSleepPreventer
4 | //
5 | // Created by Marco Peluso on 20.08.09.
6 | // Copyright (c) 2009-2010, Marco Peluso - marcopeluso.com
7 | // All rights reserved.
8 | //
9 | // Redistribution and use in source and binary forms, with or without
10 | // modification, are permitted provided that the following conditions are met:
11 | //
12 | // 1. Redistributions of source code must retain the above copyright notice,
13 | // this list of conditions and the following disclaimer.
14 | //
15 | // 2. Redistributions in binary form must reproduce the above copyright
16 | // notice, this list of conditions and the following disclaimer in the
17 | // documentation and/or other materials provided with the distribution.
18 | //
19 | // 3. Neither the name of the copyright holders nor the names of its
20 | // contributors may be used to endorse or promote products derived from
21 | // this software without specific prior written permission.
22 | //
23 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
25 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
27 | // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
30 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
32 | // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
33 | // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 | //
35 |
36 | #pragma mark -
37 | #pragma mark MMPLog
38 |
39 | // Set up some advanced logging preprocessor macros to replace NSLog.
40 | // I usually have this in an external file (MMPLog.h) which is maintained in its own git repository.
41 | // I add this repository in my other projects as a submodule (via git submodule) and import the MMPLog.h
42 | // in a project's Prefix.pch.
43 | //
44 | // For convenience reasons, I just include these macros here, so other people are not confused by
45 | // git submodule if they are unfamiliar with it or simply don't have to bother and can use MMPDeepSleepPreventer
46 | // as simple drop-in code.
47 |
48 | #ifndef MMPDLog
49 | #ifdef DEBUG
50 | #define MMPDLog(format, ...) NSLog((@"%s [Line %d] " format), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
51 | #else
52 | #define MMPDLog(...) do { } while (0)
53 | #endif
54 | #endif
55 |
56 | #ifndef MMPALog
57 | #define MMPALog(format, ...) NSLog((@"%s [Line %d] " format), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
58 | #endif
59 |
60 |
61 | #pragma mark -
62 | #pragma mark Imports and Forward Declarations
63 |
64 | #import
65 |
66 | @class AVAudioPlayer;
67 |
68 |
69 | #pragma mark -
70 | #pragma mark Public Interface
71 |
72 | @interface MMPDeepSleepPreventer : NSObject
73 | {
74 |
75 | }
76 |
77 |
78 | #pragma mark -
79 | #pragma mark Properties
80 |
81 | @property (nonatomic, retain) AVAudioPlayer *audioPlayer;
82 | @property (nonatomic, retain) NSTimer *preventSleepTimer;
83 |
84 |
85 | #pragma mark -
86 | #pragma mark Public Methods
87 |
88 | - (void)startPreventSleep;
89 | - (void)stopPreventSleep;
90 | + (MMPDeepSleepPreventer *)sharedSingleton;
91 |
92 | @end
93 |
--------------------------------------------------------------------------------
/StepDemo.xcodeproj/xcuserdata/leijianmin.xcuserdatad/xcschemes/StepDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
42 |
48 |
49 |
50 |
52 |
58 |
59 |
60 |
61 |
62 |
72 |
74 |
80 |
81 |
82 |
83 |
89 |
91 |
97 |
98 |
99 |
100 |
102 |
103 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/StepDemo/MMPDeepSleepPreventer.m:
--------------------------------------------------------------------------------
1 | //
2 | // MMPDeepSleepPreventer.m
3 | // MMPDeepSleepPreventer
4 | //
5 | // Created by Marco Peluso on 20.08.09.
6 | // Copyright (c) 2009-2010, Marco Peluso - marcopeluso.com
7 | // All rights reserved.
8 | //
9 | // Redistribution and use in source and binary forms, with or without
10 | // modification, are permitted provided that the following conditions are met:
11 | //
12 | // 1. Redistributions of source code must retain the above copyright notice,
13 | // this list of conditions and the following disclaimer.
14 | //
15 | // 2. Redistributions in binary form must reproduce the above copyright
16 | // notice, this list of conditions and the following disclaimer in the
17 | // documentation and/or other materials provided with the distribution.
18 | //
19 | // 3. Neither the name of the copyright holders nor the names of its
20 | // contributors may be used to endorse or promote products derived from
21 | // this software without specific prior written permission.
22 | //
23 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
25 | // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26 | // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
27 | // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28 | // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
30 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
32 | // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
33 | // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 | //
35 |
36 | #pragma mark -
37 | #pragma mark Imports
38 |
39 | #import "MMPDeepSleepPreventer.h"
40 | #import
41 | #import
42 |
43 |
44 | #pragma mark -
45 | #pragma mark MMPDeepSleepPreventer Private Interface
46 |
47 | @interface MMPDeepSleepPreventer ()
48 |
49 | - (void)mmp_playPreventSleepSound;
50 | - (void)mmp_setUpAudioSession;
51 |
52 | @end
53 |
54 |
55 | @implementation MMPDeepSleepPreventer
56 |
57 |
58 | #pragma mark -
59 | #pragma mark Synthesizes
60 |
61 | @synthesize audioPlayer = audioPlayer_;
62 | @synthesize preventSleepTimer = preventSleepTimer_;
63 |
64 |
65 | #pragma mark -
66 | #pragma mark Creation and Destruction
67 |
68 | + (MMPDeepSleepPreventer *)sharedSingleton
69 | {
70 | static MMPDeepSleepPreventer * _sharedSingleton = nil;
71 | @synchronized([MMPDeepSleepPreventer class]){
72 | if (_sharedSingleton == nil) {
73 | _sharedSingleton = [[MMPDeepSleepPreventer alloc] init];
74 | }
75 | }
76 | return _sharedSingleton;
77 | }
78 |
79 | - (id)init
80 | {
81 | if ( !(self = [super init]) )
82 | return nil;
83 |
84 | [self mmp_setUpAudioSession];
85 |
86 | // Set up path to sound file
87 | NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:@"MMPSilence"
88 | ofType:@"wav"];
89 |
90 | NSURL *fileURL = [[NSURL alloc] initFileURLWithPath:soundFilePath];
91 |
92 | // Set up audio player with sound file
93 | audioPlayer_ = [[AVAudioPlayer alloc] initWithContentsOfURL:fileURL
94 | error:nil];
95 |
96 | [self.audioPlayer prepareToPlay];
97 |
98 | self.audioPlayer.volume = 0;
99 |
100 | self.audioPlayer.numberOfLoops = -1;
101 |
102 | return self;
103 | }
104 |
105 |
106 | #pragma mark -
107 | #pragma mark Public Methods
108 |
109 | - (void)startPreventSleep
110 | {
111 | // We need to play a sound at least every 10 seconds to keep the iPhone awake.
112 | // It doesn't seem to affect battery life how often inbetween these 10 seconds the sound file is played.
113 | // To prevent the iPhone from falling asleep due to timing/performance issues, we play a sound file every five seconds.
114 |
115 | // We create a new repeating timer, that begins firing immediately and then every five seconds afterwards.
116 | // Every time it fires, it calls -mmp_playPreventSleepSound.
117 |
118 | NSTimer *preventSleepTimer = [[NSTimer alloc] initWithFireDate:[NSDate date]
119 | interval:5.0
120 | target:self
121 | selector:@selector(mmp_playPreventSleepSound)
122 | userInfo:nil
123 | repeats:YES];
124 | self.preventSleepTimer = preventSleepTimer;
125 |
126 | // Add the timer to the current run loop.
127 | [[NSRunLoop currentRunLoop] addTimer:self.preventSleepTimer
128 | forMode:NSDefaultRunLoopMode];
129 |
130 | [self.audioPlayer play];
131 | }
132 |
133 |
134 | - (void)stopPreventSleep
135 | {
136 | // [self.preventSleepTimer invalidate];
137 | // self.preventSleepTimer = nil;
138 |
139 | [self.audioPlayer stop];
140 | }
141 |
142 |
143 | #pragma mark -
144 | #pragma mark Private Methods
145 |
146 | - (void)mmp_playPreventSleepSound
147 | {
148 | [self.audioPlayer play];
149 | }
150 |
151 |
152 | - (void)mmp_setUpAudioSession
153 | {
154 | // AudioSession functions are deprecated from iOS 7.0, so prefer using AVAudioSession
155 | AVAudioSession *audioSession = [AVAudioSession sharedInstance];
156 |
157 | if ([audioSession respondsToSelector:@selector(setCategory:withOptions:error:)]) {
158 |
159 | NSError *categorySetError = nil;
160 | [audioSession setCategory:AVAudioSessionCategoryPlayback
161 | withOptions:AVAudioSessionCategoryOptionMixWithOthers
162 | error:&categorySetError];
163 |
164 | if (categorySetError) {
165 | MMPALog(@"Error setting AVAudioSession category: %@", categorySetError);
166 | }
167 |
168 | NSError *activeSetError = nil;
169 | [audioSession setActive:YES
170 | error:&activeSetError];
171 |
172 | if (activeSetError) {
173 | MMPALog(@"Error activating AVAudioSession: %@", activeSetError);
174 | }
175 | } else {
176 | #pragma clang diagnostic push
177 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" // supress deprecated warning
178 |
179 | // Initialize audio session
180 | AudioSessionInitialize
181 | (
182 | NULL, // Use NULL to use the default (main) run loop.
183 | NULL, // Use NULL to use the default run loop mode.
184 | NULL, // A reference to your interruption listener callback function.
185 | // See “Responding to Audio Session Interruptions” in Apple's "Audio Session Programming Guide" for a description of how to write
186 | // and use an interruption callback function.
187 | NULL // Data you intend to be passed to your interruption listener callback function when the audio session object invokes it.
188 | );
189 |
190 | // Set up audio session category to kAudioSessionCategory_MediaPlayback.
191 | // While playing sounds using this session category at least every 10 seconds, the iPhone doesn't go to sleep.
192 | UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback; // Defines a new variable of type UInt32 and initializes it with the identifier
193 | // for the category you want to apply to the audio session.
194 | AudioSessionSetProperty
195 | (
196 | kAudioSessionProperty_AudioCategory, // The identifier, or key, for the audio session property you want to set.
197 | sizeof(sessionCategory), // The size, in bytes, of the property value that you are applying.
198 | &sessionCategory // The category you want to apply to the audio session.
199 | );
200 |
201 | // Set up audio session playback mixing behavior.
202 | // kAudioSessionCategory_MediaPlayback usually prevents playback mixing, so we allow it here. This way, we don't get in the way of other sound playback in an application.
203 | // This property has a value of false (0) by default. When the audio session category changes, such as during an interruption, the value of this property reverts to false.
204 | // To regain mixing behavior you must then set this property again.
205 |
206 | // Always check to see if setting this property succeeds or fails, and react appropriately; behavior may change in future releases of iPhone OS.
207 | OSStatus propertySetError = 0;
208 | UInt32 allowMixing = true;
209 |
210 | propertySetError = AudioSessionSetProperty
211 | (
212 | kAudioSessionProperty_OverrideCategoryMixWithOthers, // The identifier, or key, for the audio session property you want to set.
213 | sizeof(allowMixing), // The size, in bytes, of the property value that you are applying.
214 | &allowMixing // The value to apply to the property.
215 | );
216 |
217 | if (propertySetError)
218 | {
219 | MMPALog(@"Error setting kAudioSessionProperty_OverrideCategoryMixWithOthers: %ld", propertySetError);
220 | }
221 |
222 | // Activate audio session
223 | OSStatus activationResult = 0;
224 | activationResult = AudioSessionSetActive(true);
225 |
226 | if (activationResult)
227 | {
228 | MMPDLog(@"AudioSession is active");
229 | }
230 |
231 | #pragma clang diagnostic pop
232 | }
233 | }
234 |
235 | @end
236 |
--------------------------------------------------------------------------------
/StepDemo/StepManager.m:
--------------------------------------------------------------------------------
1 | //
2 | // StepManager.m
3 | // StepDemo
4 | //
5 | // Created by 雷建民 on 16/7/22.
6 | // Copyright © 2016年 雷建民. All rights reserved.
7 | //
8 |
9 | #import "StepManager.h"
10 | #import "StepModel.h"
11 | #import
12 |
13 | // 计步器开始计步时间(秒)
14 | #define ACCELERO_START_TIME 2
15 |
16 | // 计步器开始计步步数(步)
17 | #define ACCELERO_START_STEP 1
18 |
19 | // 数据库存储步数采集间隔(步)
20 | #define DB_STEP_INTERVAL 1
21 |
22 |
23 | @interface StepManager ()
24 |
25 | {
26 |
27 |
28 | NSMutableArray *arrAll; // 加速度传感器采集的原始数组
29 | int record_no_save;
30 | int record_no;
31 | NSDate *lastDate;
32 |
33 | }
34 | @property (nonatomic) NSInteger startStep; // 计步器开始步数
35 |
36 | @property (nonatomic, retain) NSMutableArray *arrSteps; // 步数数组
37 | @property (nonatomic, retain) NSMutableArray *arrStepsSave; // 数据库纪录步数数组
38 |
39 | @property (nonatomic) CGFloat gpsDistance; // GPS轨迹的移动距离(总计)
40 | @property (nonatomic) CGFloat agoGpsDistance; // GPS轨迹的移动距离(之前)
41 | @property (nonatomic) CGFloat agoActionDistance; // 实际运动的移动距离(之前)
42 |
43 | @property (nonatomic, retain) NSString *actionId; // 运动识别ID
44 | @property (nonatomic) CGFloat distance; // 运动里程(总计)
45 | @property (nonatomic) NSInteger calorie; // 消耗卡路里(总计)
46 | @property (nonatomic) NSInteger second; // 运动用时(总计)
47 |
48 | @end
49 |
50 | @implementation StepManager
51 |
52 | static StepManager *sharedManager;
53 | static CMMotionManager *motionManager;
54 |
55 | + (StepManager *)sharedManager
56 | {
57 | @synchronized (self) {
58 | if (!sharedManager) {
59 | sharedManager = [[StepManager alloc]init];
60 | motionManager = [[CMMotionManager alloc]init];
61 | }
62 | }
63 | return sharedManager;
64 | }
65 |
66 | //开始计步
67 | - (void)startWithStep
68 | {
69 |
70 | /*
71 | 环境光传感器 感应周围光线强弱 (自动调节屏幕亮度)
72 | 距离传感器 感应是否有物体靠近手机 (抬起手机 亮起屏幕,打电话等)
73 | 磁力传感器 感应设备周围磁场,类似翻盖手机,合盖锁屏 [motionManager startMagnetometerUpdates]
74 | 内部温度传感器 感应设备内部温度
75 | 湿度传感器 感应设备是否进水
76 | 陀螺仪传感器 感应设备握持的方向 类似赛车游戏
77 | 加速计 感应设备运动情况 常用计步
78 |
79 | 无论哪种方式拉取数据必须设置采样率:
80 | accelerometerUpdateInterval 加速计采样率
81 | gyroUpdateInterval 陀螺仪采样率
82 | deviceMotionUpdateInterval 磁力计采样率
83 |
84 | 传感器分为2种方式拉取数据:
85 | pull 方式: 在需要数据时去更新获取数据
86 | push 方式: 实时更新数据
87 | */
88 | if (!motionManager.isAccelerometerAvailable) {
89 | NSLog(@"加速度传感器不可用");
90 | return;
91 | }else {
92 | //设置加速传感器的 采样率 1秒采样30次
93 | motionManager.accelerometerUpdateInterval = 1.0/1;
94 | }
95 | [self startAccelerometer];
96 |
97 | }
98 |
99 | - (void)startAccelerometer
100 | {
101 |
102 | //pull 方式拉取
103 | // [motionManager startAccelerometerUpdates];
104 | // CMAccelerometerData *data = motionManager.accelerometerData;
105 | // NSLog(@"x : %f, y : %f, z : %f", data.acceleration.x, data.acceleration.y, data.acceleration.z);
106 | // [motionManager stopAccelerometerUpdates];
107 |
108 | //push 方式拉取
109 | NSOperationQueue *queue = [[NSOperationQueue alloc] init];
110 | //加速计开始采样
111 | [motionManager startAccelerometerUpdatesToQueue:queue withHandler:^(CMAccelerometerData * _Nullable accelerometerData, NSError * _Nullable error) {
112 |
113 | // 正值负值: 轴的方向, 哪个指向地面, 就会打印出打个方向的值
114 | // 只要在某个轴上, 进行快速移动, 那么值就会发生变化
115 | // NSLog(@"x : %f, y : %f, z : %f", accelerometerData.acceleration.x, accelerometerData.acceleration.y, accelerometerData.acceleration.z);
116 |
117 | NSLog(@"x : %f", accelerometerData.acceleration.x);
118 | //根据 x y z 三个方向的 数据来 进行 步数建模
119 | //建模大体思路逻辑 https://cdc.tencent.com/2013/07/26/%E5%88%A9%E7%94%A8%E4%B8%89%E8%BD%B4%E5%8A%A0%E9%80%9F%E5%99%A8%E7%9A%84%E8%AE%A1%E6%AD%A5%E6%B5%8B%E7%AE%97%E6%96%B9%E6%B3%95/
120 |
121 | }];
122 | }
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 | // @try
137 | // {
138 | // //如果不支持陀螺仪,需要用加速传感器来采集数据
139 | // if (!motionManager.isAccelerometerActive) {// isAccelerometerAvailable方法用来查看加速度器的状态:是否Active(启动)。
140 | //
141 | // // 加速度传感器采集的原始数组
142 | // if (arrAll == nil) {
143 | // arrAll = [[NSMutableArray alloc] init];
144 | // }
145 | // else {
146 | // [arrAll removeAllObjects];
147 | // }
148 | //
149 | // /*
150 | // 1.push方式
151 | // 这种方式,是实时获取到Accelerometer的数据,并且用相应的队列来显示。即主动获取加速计的数据。
152 | // */
153 | // NSOperationQueue *queue = [[NSOperationQueue alloc] init];
154 | //
155 | // [motionManager startAccelerometerUpdatesToQueue:queue withHandler:^(CMAccelerometerData *accelerometerData, NSError *error){
156 | //
157 | // if (!motionManager.isAccelerometerActive) {
158 | // return;
159 | // }
160 | //
161 | // //三个方向加速度值
162 | // double x = accelerometerData.acceleration.x;
163 | // double y = accelerometerData.acceleration.y;
164 | // double z = accelerometerData.acceleration.z;
165 | // //g是一个double值 ,根据它的大小来判断是否计为1步.
166 | // double g = sqrt(pow(x, 2) + pow(y, 2) + pow(z, 2)) - 1;
167 | //
168 | // //将信息保存在步数模型中
169 | // StepModel *stepsAll = [[StepModel alloc] init];
170 | //
171 | // stepsAll.date = [NSDate date];
172 | //
173 | // //日期
174 | // NSDateFormatter *df = [[NSDateFormatter alloc] init] ;
175 | // df.dateFormat = @"yyyy-MM-dd HH:mm:ss";
176 | // NSString *strYmd = [df stringFromDate:stepsAll.date];
177 | // df = nil;
178 | // stepsAll.record_time =strYmd;
179 | //
180 | // stepsAll.g = g;
181 | // // 加速度传感器采集的原始数组
182 | // [arrAll addObject:stepsAll];
183 | //
184 | // // 每采集10条,大约1.2秒的数据时,进行分析
185 | // if (arrAll.count == 10) {
186 | //
187 | // // 步数缓存数组
188 | // NSMutableArray *arrBuffer = [[NSMutableArray alloc] init];
189 | //
190 | // arrBuffer = [arrAll copy];
191 | // [arrAll removeAllObjects];
192 | //
193 | // // 踩点数组
194 | // NSMutableArray *arrCaiDian = [[NSMutableArray alloc] init];
195 | //
196 | // //遍历步数缓存数组
197 | // for (int i = 1; i < arrBuffer.count - 2; i++) {
198 | // //如果数组个数大于3,继续,否则跳出循环,用连续的三个点,要判断其振幅是否一样,如果一样,然并卵
199 | // if (![arrBuffer objectAtIndex:i-1] || ![arrBuffer objectAtIndex:i] || ![arrBuffer objectAtIndex:i+1])
200 | // {
201 | // continue;
202 | // }
203 | // StepModel *bufferPrevious = (StepModel *)[arrBuffer objectAtIndex:i-1];
204 | // StepModel *bufferCurrent = (StepModel *)[arrBuffer objectAtIndex:i];
205 | // StepModel *bufferNext = (StepModel *)[arrBuffer objectAtIndex:i+1];
206 | // //控制震动幅度,,,,,,根据震动幅度让其加入踩点数组,
207 | // if (bufferCurrent.g < -0.12 && bufferCurrent.g < bufferPrevious.g && bufferCurrent.g < bufferNext.g) {
208 | // [arrCaiDian addObject:bufferCurrent];
209 | // }
210 | // }
211 | //
212 | // //如果没有步数数组,初始化
213 | // if (nil == self.arrSteps) {
214 | // self.arrSteps = [[NSMutableArray alloc] init];
215 | // self.arrStepsSave = [[NSMutableArray alloc] init];
216 | // }
217 | //
218 | // // 踩点过滤
219 | // for (int j = 0; j < arrCaiDian.count; j++) {
220 | // StepModel *caidianCurrent = (StepModel *)[arrCaiDian objectAtIndex:j];
221 | //
222 | // //如果之前的步数为0,则重新开始记录
223 | // if (self.arrSteps.count == 0) {
224 | // //上次记录的时间
225 | // lastDate = caidianCurrent.date;
226 | //
227 | // // 重新开始时,纪录No初始化
228 | // record_no = 1;
229 | // record_no_save = 1;
230 | //
231 | // // 运动识别号
232 | // NSTimeInterval interval = [caidianCurrent.date timeIntervalSince1970];
233 | // NSNumber *numInter = [[NSNumber alloc] initWithDouble:interval*1000];
234 | // long long llInter = numInter.longLongValue;
235 | // //运动识别id
236 | // self.actionId = [NSString stringWithFormat:@"%lld",llInter];
237 | //
238 | // self.distance = 0.00f;
239 | // self.second = 0;
240 | // self.calorie = 0;
241 | // self.step = 0;
242 | //
243 | // self.gpsDistance = 0.00f;
244 | // self.agoGpsDistance = 0.00f;
245 | // self.agoActionDistance = 0.00f;
246 | //
247 | // caidianCurrent.record_no = record_no;
248 | // caidianCurrent.step = (int)self.step;
249 | //
250 | // [self.arrSteps addObject:caidianCurrent];
251 | // [self.arrStepsSave addObject:caidianCurrent];
252 | //
253 | // }
254 | // else {
255 | //
256 | // int intervalCaidian = [caidianCurrent.date timeIntervalSinceDate:lastDate] * 1000;
257 | //
258 | // // 步行最大每秒2.5步,跑步最大每秒3.5步,超过此范围,数据有可能丢失
259 | // int min = 259;
260 | // if (intervalCaidian >= min) {
261 | //
262 | // if (motionManager.isAccelerometerActive) {
263 | //
264 | // //存一下时间
265 | // lastDate = caidianCurrent.date;
266 | //
267 | // if (intervalCaidian >= ACCELERO_START_TIME * 1000) {// 计步器开始计步时间(秒)
268 | // self.startStep = 0;
269 | // }
270 | //
271 | // if (self.startStep < ACCELERO_START_STEP) {//计步器开始计步步数 (步)
272 | //
273 | // self.startStep ++;
274 | // break;
275 | // }
276 | // else if (self.startStep == ACCELERO_START_STEP) {
277 | // self.startStep ++;
278 | // // 计步器开始步数
279 | // // 运动步数(总计)
280 | // self.step = self.step + self.startStep;
281 | // }
282 | // else {
283 | // self.step ++;
284 | // }
285 | //
286 | //
287 | //
288 | // //步数在这里
289 | // NSLog(@"步数%ld",self.step);
290 | //
291 | // int intervalMillSecond = [caidianCurrent.date timeIntervalSinceDate:[[self.arrSteps lastObject] date]] * 1000;
292 | // if (intervalMillSecond >= 1000) {
293 | //
294 | // record_no++;
295 | //
296 | // caidianCurrent.record_no = record_no;
297 | //
298 | // caidianCurrent.step = (int)self.step;
299 | // [self.arrSteps addObject:caidianCurrent];
300 | // }
301 | //
302 | // // 每隔100步保存一条数据(将来插入DB用)
303 | // StepModel *arrStepsSaveVHSSteps = (StepModel *)[self.arrStepsSave lastObject];
304 | // int intervalStep = caidianCurrent.step - arrStepsSaveVHSSteps.step;
305 | //
306 | // // DB_STEP_INTERVAL 数据库存储步数采集间隔(步) 100步
307 | // if (self.arrStepsSave.count == 1 || intervalStep >= DB_STEP_INTERVAL) {
308 | // //保存次数
309 | // record_no_save++;
310 | // caidianCurrent.record_no = record_no_save;
311 | // [self.arrStepsSave addObject:caidianCurrent];
312 | //
313 | // NSLog(@"---***%ld",self.step);
314 | // // 备份当前运动数据至文件中,以备APP异常退出时数据也不会丢失
315 | // // [self bkRunningData];
316 | //
317 | // }
318 | // }
319 | // }
320 | //
321 | // // 运动提醒检查
322 | // // [self checkActionAlarm];
323 | // }
324 | // }
325 | // }
326 | // }];
327 | //
328 | // }
329 | // }@catch (NSException * e) {
330 | // NSLog(@"Exception: %@", e);
331 | // return;
332 | // }
333 |
334 | ////得到计步所消耗的卡路里
335 | //+ (NSInteger)getStepCalorie
336 | //{
337 | //
338 | //}
339 | //
340 | ////得到所走的路程(单位:米)
341 | //+ (CGFloat)getStepDistance
342 | //{
343 | //
344 | //}
345 | //
346 | ////得到运动所用的时间
347 | //+ (NSInteger)getStepTime
348 | //{
349 | //
350 | //}
351 |
352 | @end
353 |
--------------------------------------------------------------------------------
/StepDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 255564DD1D421A6B00287E22 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 255564DC1D421A6B00287E22 /* main.m */; };
11 | 255564E01D421A6B00287E22 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 255564DF1D421A6B00287E22 /* AppDelegate.m */; };
12 | 255564E31D421A6B00287E22 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 255564E21D421A6B00287E22 /* ViewController.m */; };
13 | 255564E61D421A6B00287E22 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 255564E41D421A6B00287E22 /* Main.storyboard */; };
14 | 255564E81D421A6B00287E22 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 255564E71D421A6B00287E22 /* Assets.xcassets */; };
15 | 255564EB1D421A6B00287E22 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 255564E91D421A6B00287E22 /* LaunchScreen.storyboard */; };
16 | 255564F61D421A6B00287E22 /* StepDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 255564F51D421A6B00287E22 /* StepDemoTests.m */; };
17 | 255565011D421A6B00287E22 /* StepDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 255565001D421A6B00287E22 /* StepDemoUITests.m */; };
18 | 255565131D4226D200287E22 /* StepManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 255565121D4226D200287E22 /* StepManager.m */; };
19 | 255565161D422FF700287E22 /* StepModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 255565151D422FF700287E22 /* StepModel.m */; };
20 | 2555651A1D4243C800287E22 /* MMPDeepSleepPreventer.m in Sources */ = {isa = PBXBuildFile; fileRef = 255565181D4243C800287E22 /* MMPDeepSleepPreventer.m */; };
21 | 2555651B1D4243C800287E22 /* MMPSilence.wav in Resources */ = {isa = PBXBuildFile; fileRef = 255565191D4243C800287E22 /* MMPSilence.wav */; };
22 | /* End PBXBuildFile section */
23 |
24 | /* Begin PBXContainerItemProxy section */
25 | 255564F21D421A6B00287E22 /* PBXContainerItemProxy */ = {
26 | isa = PBXContainerItemProxy;
27 | containerPortal = 255564D01D421A6B00287E22 /* Project object */;
28 | proxyType = 1;
29 | remoteGlobalIDString = 255564D71D421A6B00287E22;
30 | remoteInfo = StepDemo;
31 | };
32 | 255564FD1D421A6B00287E22 /* PBXContainerItemProxy */ = {
33 | isa = PBXContainerItemProxy;
34 | containerPortal = 255564D01D421A6B00287E22 /* Project object */;
35 | proxyType = 1;
36 | remoteGlobalIDString = 255564D71D421A6B00287E22;
37 | remoteInfo = StepDemo;
38 | };
39 | /* End PBXContainerItemProxy section */
40 |
41 | /* Begin PBXFileReference section */
42 | 255564D81D421A6B00287E22 /* StepDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StepDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
43 | 255564DC1D421A6B00287E22 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
44 | 255564DE1D421A6B00287E22 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
45 | 255564DF1D421A6B00287E22 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
46 | 255564E11D421A6B00287E22 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
47 | 255564E21D421A6B00287E22 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
48 | 255564E51D421A6B00287E22 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
49 | 255564E71D421A6B00287E22 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
50 | 255564EA1D421A6B00287E22 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
51 | 255564EC1D421A6B00287E22 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
52 | 255564F11D421A6B00287E22 /* StepDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StepDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
53 | 255564F51D421A6B00287E22 /* StepDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StepDemoTests.m; sourceTree = ""; };
54 | 255564F71D421A6B00287E22 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
55 | 255564FC1D421A6B00287E22 /* StepDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StepDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
56 | 255565001D421A6B00287E22 /* StepDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StepDemoUITests.m; sourceTree = ""; };
57 | 255565021D421A6B00287E22 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
58 | 255565111D4226D200287E22 /* StepManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StepManager.h; sourceTree = ""; };
59 | 255565121D4226D200287E22 /* StepManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StepManager.m; sourceTree = ""; };
60 | 255565141D422FF700287E22 /* StepModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StepModel.h; sourceTree = ""; };
61 | 255565151D422FF700287E22 /* StepModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StepModel.m; sourceTree = ""; };
62 | 255565171D4243C800287E22 /* MMPDeepSleepPreventer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMPDeepSleepPreventer.h; sourceTree = ""; };
63 | 255565181D4243C800287E22 /* MMPDeepSleepPreventer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMPDeepSleepPreventer.m; sourceTree = ""; };
64 | 255565191D4243C800287E22 /* MMPSilence.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = MMPSilence.wav; sourceTree = ""; };
65 | /* End PBXFileReference section */
66 |
67 | /* Begin PBXFrameworksBuildPhase section */
68 | 255564D51D421A6B00287E22 /* Frameworks */ = {
69 | isa = PBXFrameworksBuildPhase;
70 | buildActionMask = 2147483647;
71 | files = (
72 | );
73 | runOnlyForDeploymentPostprocessing = 0;
74 | };
75 | 255564EE1D421A6B00287E22 /* Frameworks */ = {
76 | isa = PBXFrameworksBuildPhase;
77 | buildActionMask = 2147483647;
78 | files = (
79 | );
80 | runOnlyForDeploymentPostprocessing = 0;
81 | };
82 | 255564F91D421A6B00287E22 /* Frameworks */ = {
83 | isa = PBXFrameworksBuildPhase;
84 | buildActionMask = 2147483647;
85 | files = (
86 | );
87 | runOnlyForDeploymentPostprocessing = 0;
88 | };
89 | /* End PBXFrameworksBuildPhase section */
90 |
91 | /* Begin PBXGroup section */
92 | 255564CF1D421A6B00287E22 = {
93 | isa = PBXGroup;
94 | children = (
95 | 255564DA1D421A6B00287E22 /* StepDemo */,
96 | 255564F41D421A6B00287E22 /* StepDemoTests */,
97 | 255564FF1D421A6B00287E22 /* StepDemoUITests */,
98 | 255564D91D421A6B00287E22 /* Products */,
99 | );
100 | sourceTree = "";
101 | };
102 | 255564D91D421A6B00287E22 /* Products */ = {
103 | isa = PBXGroup;
104 | children = (
105 | 255564D81D421A6B00287E22 /* StepDemo.app */,
106 | 255564F11D421A6B00287E22 /* StepDemoTests.xctest */,
107 | 255564FC1D421A6B00287E22 /* StepDemoUITests.xctest */,
108 | );
109 | name = Products;
110 | sourceTree = "";
111 | };
112 | 255564DA1D421A6B00287E22 /* StepDemo */ = {
113 | isa = PBXGroup;
114 | children = (
115 | 255565101D421ABA00287E22 /* Demo */,
116 | 255564DE1D421A6B00287E22 /* AppDelegate.h */,
117 | 255564DF1D421A6B00287E22 /* AppDelegate.m */,
118 | 255564E11D421A6B00287E22 /* ViewController.h */,
119 | 255564E21D421A6B00287E22 /* ViewController.m */,
120 | 255564E41D421A6B00287E22 /* Main.storyboard */,
121 | 255564E71D421A6B00287E22 /* Assets.xcassets */,
122 | 255564E91D421A6B00287E22 /* LaunchScreen.storyboard */,
123 | 255564EC1D421A6B00287E22 /* Info.plist */,
124 | 255564DB1D421A6B00287E22 /* Supporting Files */,
125 | );
126 | path = StepDemo;
127 | sourceTree = "";
128 | };
129 | 255564DB1D421A6B00287E22 /* Supporting Files */ = {
130 | isa = PBXGroup;
131 | children = (
132 | 255564DC1D421A6B00287E22 /* main.m */,
133 | );
134 | name = "Supporting Files";
135 | sourceTree = "";
136 | };
137 | 255564F41D421A6B00287E22 /* StepDemoTests */ = {
138 | isa = PBXGroup;
139 | children = (
140 | 255564F51D421A6B00287E22 /* StepDemoTests.m */,
141 | 255564F71D421A6B00287E22 /* Info.plist */,
142 | );
143 | path = StepDemoTests;
144 | sourceTree = "";
145 | };
146 | 255564FF1D421A6B00287E22 /* StepDemoUITests */ = {
147 | isa = PBXGroup;
148 | children = (
149 | 255565001D421A6B00287E22 /* StepDemoUITests.m */,
150 | 255565021D421A6B00287E22 /* Info.plist */,
151 | );
152 | path = StepDemoUITests;
153 | sourceTree = "";
154 | };
155 | 255565101D421ABA00287E22 /* Demo */ = {
156 | isa = PBXGroup;
157 | children = (
158 | 255565171D4243C800287E22 /* MMPDeepSleepPreventer.h */,
159 | 255565181D4243C800287E22 /* MMPDeepSleepPreventer.m */,
160 | 255565191D4243C800287E22 /* MMPSilence.wav */,
161 | 255565141D422FF700287E22 /* StepModel.h */,
162 | 255565151D422FF700287E22 /* StepModel.m */,
163 | 255565111D4226D200287E22 /* StepManager.h */,
164 | 255565121D4226D200287E22 /* StepManager.m */,
165 | );
166 | name = Demo;
167 | sourceTree = "";
168 | };
169 | /* End PBXGroup section */
170 |
171 | /* Begin PBXNativeTarget section */
172 | 255564D71D421A6B00287E22 /* StepDemo */ = {
173 | isa = PBXNativeTarget;
174 | buildConfigurationList = 255565051D421A6B00287E22 /* Build configuration list for PBXNativeTarget "StepDemo" */;
175 | buildPhases = (
176 | 255564D41D421A6B00287E22 /* Sources */,
177 | 255564D51D421A6B00287E22 /* Frameworks */,
178 | 255564D61D421A6B00287E22 /* Resources */,
179 | );
180 | buildRules = (
181 | );
182 | dependencies = (
183 | );
184 | name = StepDemo;
185 | productName = StepDemo;
186 | productReference = 255564D81D421A6B00287E22 /* StepDemo.app */;
187 | productType = "com.apple.product-type.application";
188 | };
189 | 255564F01D421A6B00287E22 /* StepDemoTests */ = {
190 | isa = PBXNativeTarget;
191 | buildConfigurationList = 255565081D421A6B00287E22 /* Build configuration list for PBXNativeTarget "StepDemoTests" */;
192 | buildPhases = (
193 | 255564ED1D421A6B00287E22 /* Sources */,
194 | 255564EE1D421A6B00287E22 /* Frameworks */,
195 | 255564EF1D421A6B00287E22 /* Resources */,
196 | );
197 | buildRules = (
198 | );
199 | dependencies = (
200 | 255564F31D421A6B00287E22 /* PBXTargetDependency */,
201 | );
202 | name = StepDemoTests;
203 | productName = StepDemoTests;
204 | productReference = 255564F11D421A6B00287E22 /* StepDemoTests.xctest */;
205 | productType = "com.apple.product-type.bundle.unit-test";
206 | };
207 | 255564FB1D421A6B00287E22 /* StepDemoUITests */ = {
208 | isa = PBXNativeTarget;
209 | buildConfigurationList = 2555650B1D421A6B00287E22 /* Build configuration list for PBXNativeTarget "StepDemoUITests" */;
210 | buildPhases = (
211 | 255564F81D421A6B00287E22 /* Sources */,
212 | 255564F91D421A6B00287E22 /* Frameworks */,
213 | 255564FA1D421A6B00287E22 /* Resources */,
214 | );
215 | buildRules = (
216 | );
217 | dependencies = (
218 | 255564FE1D421A6B00287E22 /* PBXTargetDependency */,
219 | );
220 | name = StepDemoUITests;
221 | productName = StepDemoUITests;
222 | productReference = 255564FC1D421A6B00287E22 /* StepDemoUITests.xctest */;
223 | productType = "com.apple.product-type.bundle.ui-testing";
224 | };
225 | /* End PBXNativeTarget section */
226 |
227 | /* Begin PBXProject section */
228 | 255564D01D421A6B00287E22 /* Project object */ = {
229 | isa = PBXProject;
230 | attributes = {
231 | LastUpgradeCheck = 1140;
232 | ORGANIZATIONNAME = "雷建民";
233 | TargetAttributes = {
234 | 255564D71D421A6B00287E22 = {
235 | CreatedOnToolsVersion = 7.3.1;
236 | DevelopmentTeam = 9FG73H6N5N;
237 | };
238 | 255564F01D421A6B00287E22 = {
239 | CreatedOnToolsVersion = 7.3.1;
240 | DevelopmentTeam = 2Q2PYRW3T7;
241 | TestTargetID = 255564D71D421A6B00287E22;
242 | };
243 | 255564FB1D421A6B00287E22 = {
244 | CreatedOnToolsVersion = 7.3.1;
245 | DevelopmentTeam = 2Q2PYRW3T7;
246 | TestTargetID = 255564D71D421A6B00287E22;
247 | };
248 | };
249 | };
250 | buildConfigurationList = 255564D31D421A6B00287E22 /* Build configuration list for PBXProject "StepDemo" */;
251 | compatibilityVersion = "Xcode 3.2";
252 | developmentRegion = en;
253 | hasScannedForEncodings = 0;
254 | knownRegions = (
255 | en,
256 | Base,
257 | );
258 | mainGroup = 255564CF1D421A6B00287E22;
259 | productRefGroup = 255564D91D421A6B00287E22 /* Products */;
260 | projectDirPath = "";
261 | projectRoot = "";
262 | targets = (
263 | 255564D71D421A6B00287E22 /* StepDemo */,
264 | 255564F01D421A6B00287E22 /* StepDemoTests */,
265 | 255564FB1D421A6B00287E22 /* StepDemoUITests */,
266 | );
267 | };
268 | /* End PBXProject section */
269 |
270 | /* Begin PBXResourcesBuildPhase section */
271 | 255564D61D421A6B00287E22 /* Resources */ = {
272 | isa = PBXResourcesBuildPhase;
273 | buildActionMask = 2147483647;
274 | files = (
275 | 255564EB1D421A6B00287E22 /* LaunchScreen.storyboard in Resources */,
276 | 255564E81D421A6B00287E22 /* Assets.xcassets in Resources */,
277 | 255564E61D421A6B00287E22 /* Main.storyboard in Resources */,
278 | 2555651B1D4243C800287E22 /* MMPSilence.wav in Resources */,
279 | );
280 | runOnlyForDeploymentPostprocessing = 0;
281 | };
282 | 255564EF1D421A6B00287E22 /* Resources */ = {
283 | isa = PBXResourcesBuildPhase;
284 | buildActionMask = 2147483647;
285 | files = (
286 | );
287 | runOnlyForDeploymentPostprocessing = 0;
288 | };
289 | 255564FA1D421A6B00287E22 /* Resources */ = {
290 | isa = PBXResourcesBuildPhase;
291 | buildActionMask = 2147483647;
292 | files = (
293 | );
294 | runOnlyForDeploymentPostprocessing = 0;
295 | };
296 | /* End PBXResourcesBuildPhase section */
297 |
298 | /* Begin PBXSourcesBuildPhase section */
299 | 255564D41D421A6B00287E22 /* Sources */ = {
300 | isa = PBXSourcesBuildPhase;
301 | buildActionMask = 2147483647;
302 | files = (
303 | 255565161D422FF700287E22 /* StepModel.m in Sources */,
304 | 255564E31D421A6B00287E22 /* ViewController.m in Sources */,
305 | 2555651A1D4243C800287E22 /* MMPDeepSleepPreventer.m in Sources */,
306 | 255564E01D421A6B00287E22 /* AppDelegate.m in Sources */,
307 | 255564DD1D421A6B00287E22 /* main.m in Sources */,
308 | 255565131D4226D200287E22 /* StepManager.m in Sources */,
309 | );
310 | runOnlyForDeploymentPostprocessing = 0;
311 | };
312 | 255564ED1D421A6B00287E22 /* Sources */ = {
313 | isa = PBXSourcesBuildPhase;
314 | buildActionMask = 2147483647;
315 | files = (
316 | 255564F61D421A6B00287E22 /* StepDemoTests.m in Sources */,
317 | );
318 | runOnlyForDeploymentPostprocessing = 0;
319 | };
320 | 255564F81D421A6B00287E22 /* Sources */ = {
321 | isa = PBXSourcesBuildPhase;
322 | buildActionMask = 2147483647;
323 | files = (
324 | 255565011D421A6B00287E22 /* StepDemoUITests.m in Sources */,
325 | );
326 | runOnlyForDeploymentPostprocessing = 0;
327 | };
328 | /* End PBXSourcesBuildPhase section */
329 |
330 | /* Begin PBXTargetDependency section */
331 | 255564F31D421A6B00287E22 /* PBXTargetDependency */ = {
332 | isa = PBXTargetDependency;
333 | target = 255564D71D421A6B00287E22 /* StepDemo */;
334 | targetProxy = 255564F21D421A6B00287E22 /* PBXContainerItemProxy */;
335 | };
336 | 255564FE1D421A6B00287E22 /* PBXTargetDependency */ = {
337 | isa = PBXTargetDependency;
338 | target = 255564D71D421A6B00287E22 /* StepDemo */;
339 | targetProxy = 255564FD1D421A6B00287E22 /* PBXContainerItemProxy */;
340 | };
341 | /* End PBXTargetDependency section */
342 |
343 | /* Begin PBXVariantGroup section */
344 | 255564E41D421A6B00287E22 /* Main.storyboard */ = {
345 | isa = PBXVariantGroup;
346 | children = (
347 | 255564E51D421A6B00287E22 /* Base */,
348 | );
349 | name = Main.storyboard;
350 | sourceTree = "";
351 | };
352 | 255564E91D421A6B00287E22 /* LaunchScreen.storyboard */ = {
353 | isa = PBXVariantGroup;
354 | children = (
355 | 255564EA1D421A6B00287E22 /* Base */,
356 | );
357 | name = LaunchScreen.storyboard;
358 | sourceTree = "";
359 | };
360 | /* End PBXVariantGroup section */
361 |
362 | /* Begin XCBuildConfiguration section */
363 | 255565031D421A6B00287E22 /* Debug */ = {
364 | isa = XCBuildConfiguration;
365 | buildSettings = {
366 | ALWAYS_SEARCH_USER_PATHS = NO;
367 | CLANG_ANALYZER_NONNULL = YES;
368 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
369 | CLANG_CXX_LIBRARY = "libc++";
370 | CLANG_ENABLE_MODULES = YES;
371 | CLANG_ENABLE_OBJC_ARC = YES;
372 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
373 | CLANG_WARN_BOOL_CONVERSION = YES;
374 | CLANG_WARN_COMMA = YES;
375 | CLANG_WARN_CONSTANT_CONVERSION = YES;
376 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
377 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
378 | CLANG_WARN_EMPTY_BODY = YES;
379 | CLANG_WARN_ENUM_CONVERSION = YES;
380 | CLANG_WARN_INFINITE_RECURSION = YES;
381 | CLANG_WARN_INT_CONVERSION = YES;
382 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
383 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
384 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
385 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
386 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
387 | CLANG_WARN_STRICT_PROTOTYPES = YES;
388 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
389 | CLANG_WARN_UNREACHABLE_CODE = YES;
390 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
391 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
392 | COPY_PHASE_STRIP = NO;
393 | DEBUG_INFORMATION_FORMAT = dwarf;
394 | ENABLE_STRICT_OBJC_MSGSEND = YES;
395 | ENABLE_TESTABILITY = YES;
396 | GCC_C_LANGUAGE_STANDARD = gnu99;
397 | GCC_DYNAMIC_NO_PIC = NO;
398 | GCC_NO_COMMON_BLOCKS = YES;
399 | GCC_OPTIMIZATION_LEVEL = 0;
400 | GCC_PREPROCESSOR_DEFINITIONS = (
401 | "DEBUG=1",
402 | "$(inherited)",
403 | );
404 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
405 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
406 | GCC_WARN_UNDECLARED_SELECTOR = YES;
407 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
408 | GCC_WARN_UNUSED_FUNCTION = YES;
409 | GCC_WARN_UNUSED_VARIABLE = YES;
410 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
411 | MTL_ENABLE_DEBUG_INFO = YES;
412 | ONLY_ACTIVE_ARCH = YES;
413 | SDKROOT = iphoneos;
414 | };
415 | name = Debug;
416 | };
417 | 255565041D421A6B00287E22 /* Release */ = {
418 | isa = XCBuildConfiguration;
419 | buildSettings = {
420 | ALWAYS_SEARCH_USER_PATHS = NO;
421 | CLANG_ANALYZER_NONNULL = YES;
422 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
423 | CLANG_CXX_LIBRARY = "libc++";
424 | CLANG_ENABLE_MODULES = YES;
425 | CLANG_ENABLE_OBJC_ARC = YES;
426 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
427 | CLANG_WARN_BOOL_CONVERSION = YES;
428 | CLANG_WARN_COMMA = YES;
429 | CLANG_WARN_CONSTANT_CONVERSION = YES;
430 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
431 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
432 | CLANG_WARN_EMPTY_BODY = YES;
433 | CLANG_WARN_ENUM_CONVERSION = YES;
434 | CLANG_WARN_INFINITE_RECURSION = YES;
435 | CLANG_WARN_INT_CONVERSION = YES;
436 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
437 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
438 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
439 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
440 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
441 | CLANG_WARN_STRICT_PROTOTYPES = YES;
442 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
443 | CLANG_WARN_UNREACHABLE_CODE = YES;
444 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
445 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
446 | COPY_PHASE_STRIP = NO;
447 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
448 | ENABLE_NS_ASSERTIONS = NO;
449 | ENABLE_STRICT_OBJC_MSGSEND = YES;
450 | GCC_C_LANGUAGE_STANDARD = gnu99;
451 | GCC_NO_COMMON_BLOCKS = YES;
452 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
453 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
454 | GCC_WARN_UNDECLARED_SELECTOR = YES;
455 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
456 | GCC_WARN_UNUSED_FUNCTION = YES;
457 | GCC_WARN_UNUSED_VARIABLE = YES;
458 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
459 | MTL_ENABLE_DEBUG_INFO = NO;
460 | SDKROOT = iphoneos;
461 | VALIDATE_PRODUCT = YES;
462 | };
463 | name = Release;
464 | };
465 | 255565061D421A6B00287E22 /* Debug */ = {
466 | isa = XCBuildConfiguration;
467 | buildSettings = {
468 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
469 | DEVELOPMENT_TEAM = 9FG73H6N5N;
470 | INFOPLIST_FILE = StepDemo/Info.plist;
471 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
472 | PRODUCT_BUNDLE_IDENTIFIER = leijianmin.StepDemo;
473 | PRODUCT_NAME = "$(TARGET_NAME)";
474 | };
475 | name = Debug;
476 | };
477 | 255565071D421A6B00287E22 /* Release */ = {
478 | isa = XCBuildConfiguration;
479 | buildSettings = {
480 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
481 | INFOPLIST_FILE = StepDemo/Info.plist;
482 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
483 | PRODUCT_BUNDLE_IDENTIFIER = leijianmin.StepDemo;
484 | PRODUCT_NAME = "$(TARGET_NAME)";
485 | };
486 | name = Release;
487 | };
488 | 255565091D421A6B00287E22 /* Debug */ = {
489 | isa = XCBuildConfiguration;
490 | buildSettings = {
491 | BUNDLE_LOADER = "$(TEST_HOST)";
492 | INFOPLIST_FILE = StepDemoTests/Info.plist;
493 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
494 | PRODUCT_BUNDLE_IDENTIFIER = leijianmin.StepDemoTests;
495 | PRODUCT_NAME = "$(TARGET_NAME)";
496 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StepDemo.app/StepDemo";
497 | };
498 | name = Debug;
499 | };
500 | 2555650A1D421A6B00287E22 /* Release */ = {
501 | isa = XCBuildConfiguration;
502 | buildSettings = {
503 | BUNDLE_LOADER = "$(TEST_HOST)";
504 | INFOPLIST_FILE = StepDemoTests/Info.plist;
505 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
506 | PRODUCT_BUNDLE_IDENTIFIER = leijianmin.StepDemoTests;
507 | PRODUCT_NAME = "$(TARGET_NAME)";
508 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/StepDemo.app/StepDemo";
509 | };
510 | name = Release;
511 | };
512 | 2555650C1D421A6B00287E22 /* Debug */ = {
513 | isa = XCBuildConfiguration;
514 | buildSettings = {
515 | INFOPLIST_FILE = StepDemoUITests/Info.plist;
516 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
517 | PRODUCT_BUNDLE_IDENTIFIER = leijianmin.StepDemoUITests;
518 | PRODUCT_NAME = "$(TARGET_NAME)";
519 | TEST_TARGET_NAME = StepDemo;
520 | };
521 | name = Debug;
522 | };
523 | 2555650D1D421A6B00287E22 /* Release */ = {
524 | isa = XCBuildConfiguration;
525 | buildSettings = {
526 | INFOPLIST_FILE = StepDemoUITests/Info.plist;
527 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
528 | PRODUCT_BUNDLE_IDENTIFIER = leijianmin.StepDemoUITests;
529 | PRODUCT_NAME = "$(TARGET_NAME)";
530 | TEST_TARGET_NAME = StepDemo;
531 | };
532 | name = Release;
533 | };
534 | /* End XCBuildConfiguration section */
535 |
536 | /* Begin XCConfigurationList section */
537 | 255564D31D421A6B00287E22 /* Build configuration list for PBXProject "StepDemo" */ = {
538 | isa = XCConfigurationList;
539 | buildConfigurations = (
540 | 255565031D421A6B00287E22 /* Debug */,
541 | 255565041D421A6B00287E22 /* Release */,
542 | );
543 | defaultConfigurationIsVisible = 0;
544 | defaultConfigurationName = Release;
545 | };
546 | 255565051D421A6B00287E22 /* Build configuration list for PBXNativeTarget "StepDemo" */ = {
547 | isa = XCConfigurationList;
548 | buildConfigurations = (
549 | 255565061D421A6B00287E22 /* Debug */,
550 | 255565071D421A6B00287E22 /* Release */,
551 | );
552 | defaultConfigurationIsVisible = 0;
553 | defaultConfigurationName = Release;
554 | };
555 | 255565081D421A6B00287E22 /* Build configuration list for PBXNativeTarget "StepDemoTests" */ = {
556 | isa = XCConfigurationList;
557 | buildConfigurations = (
558 | 255565091D421A6B00287E22 /* Debug */,
559 | 2555650A1D421A6B00287E22 /* Release */,
560 | );
561 | defaultConfigurationIsVisible = 0;
562 | defaultConfigurationName = Release;
563 | };
564 | 2555650B1D421A6B00287E22 /* Build configuration list for PBXNativeTarget "StepDemoUITests" */ = {
565 | isa = XCConfigurationList;
566 | buildConfigurations = (
567 | 2555650C1D421A6B00287E22 /* Debug */,
568 | 2555650D1D421A6B00287E22 /* Release */,
569 | );
570 | defaultConfigurationIsVisible = 0;
571 | defaultConfigurationName = Release;
572 | };
573 | /* End XCConfigurationList section */
574 | };
575 | rootObject = 255564D01D421A6B00287E22 /* Project object */;
576 | }
577 |
--------------------------------------------------------------------------------