├── example
└── Bedtime
│ ├── .watchmanconfig
│ ├── .gitattributes
│ ├── index.android.js
│ ├── index.ios.js
│ ├── .babelrc
│ ├── android
│ ├── app
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ └── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── bedtime
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── MainApplication.java
│ │ │ │ └── AndroidManifest.xml
│ │ ├── BUCK
│ │ ├── proguard-rules.pro
│ │ └── build.gradle
│ ├── keystores
│ │ ├── debug.keystore.properties
│ │ └── BUCK
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── settings.gradle
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradlew.bat
│ └── gradlew
│ ├── .buckconfig
│ ├── __tests__
│ ├── index.ios.js
│ └── index.android.js
│ ├── ios
│ ├── Bedtime
│ │ ├── AppDelegate.h
│ │ ├── main.m
│ │ ├── Images.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.m
│ │ ├── Info.plist
│ │ └── Base.lproj
│ │ │ └── LaunchScreen.xib
│ ├── BedtimeTests
│ │ ├── Info.plist
│ │ └── BedtimeTests.m
│ └── Bedtime.xcodeproj
│ │ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Bedtime.xcscheme
│ │ └── project.pbxproj
│ ├── .gitignore
│ ├── package.json
│ ├── components
│ └── TimerText.js
│ ├── .flowconfig
│ └── main.js
├── example-exponent
└── Bedtime
│ ├── .watchmanconfig
│ ├── .gitattributes
│ ├── .babelrc
│ ├── .buckconfig
│ ├── package.json
│ ├── exp.json
│ ├── .gitignore
│ ├── components
│ └── TimerText.js
│ ├── .flowconfig
│ └── main.js
├── screenshot.gif
├── .gitignore
├── LICENSE
├── package.json
├── src
├── ClockFace.js
└── CircularSlider.js
└── README.md
/example/Bedtime/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/example-exponent/Bedtime/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/example/Bedtime/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/example/Bedtime/index.android.js:
--------------------------------------------------------------------------------
1 | require('./main.js');
2 |
--------------------------------------------------------------------------------
/example/Bedtime/index.ios.js:
--------------------------------------------------------------------------------
1 | require('./main.js');
2 |
--------------------------------------------------------------------------------
/example-exponent/Bedtime/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/example/Bedtime/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react-native"]
3 | }
--------------------------------------------------------------------------------
/example-exponent/Bedtime/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "babel-preset-exponent"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/screenshot.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bartgryszko/react-native-circular-slider/HEAD/screenshot.gif
--------------------------------------------------------------------------------
/example/Bedtime/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Bedtime
3 |
4 |
--------------------------------------------------------------------------------
/example/Bedtime/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/example-exponent/Bedtime/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/example/Bedtime/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/example/Bedtime/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bartgryszko/react-native-circular-slider/HEAD/example/Bedtime/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/example/Bedtime/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = 'debug',
3 | store = 'debug.keystore',
4 | properties = 'debug.keystore.properties',
5 | visibility = [
6 | 'PUBLIC',
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/example/Bedtime/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bartgryszko/react-native-circular-slider/HEAD/example/Bedtime/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/Bedtime/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bartgryszko/react-native-circular-slider/HEAD/example/Bedtime/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/Bedtime/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bartgryszko/react-native-circular-slider/HEAD/example/Bedtime/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/Bedtime/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bartgryszko/react-native-circular-slider/HEAD/example/Bedtime/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/Bedtime/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'Bedtime'
2 | include ':react-native-svg'
3 | project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
4 |
5 | include ':app'
6 |
--------------------------------------------------------------------------------
/example/Bedtime/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/Bedtime/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
6 |
--------------------------------------------------------------------------------
/example/Bedtime/__tests__/index.ios.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import Index from '../index.ios.js';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | it('renders correctly', () => {
9 | const tree = renderer.create(
10 |
11 | );
12 | });
13 |
--------------------------------------------------------------------------------
/example/Bedtime/__tests__/index.android.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import Index from '../index.android.js';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | it('renders correctly', () => {
9 | const tree = renderer.create(
10 |
11 | );
12 | });
13 |
--------------------------------------------------------------------------------
/example/Bedtime/android/app/src/main/java/com/bedtime/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.bedtime;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "Bedtime";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/Bedtime/ios/Bedtime/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/example-exponent/Bedtime/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Bedtime",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start",
7 | "test": "jest"
8 | },
9 | "dependencies": {
10 | "react-native-circular-slider": "file:../..",
11 | "react": "~15.3.2",
12 | "react-native": "github:exponentjs/react-native#sdk-12.0.0",
13 | "@exponent/vector-icons": "~2.0.3",
14 | "exponent": "~12.0.3"
15 | },
16 | "jest": {
17 | "preset": "react-native"
18 | },
19 | "main": "main.js"
20 | }
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 |
38 | # BUCK
39 | buck-out/
40 | \.buckd/
41 | android/app/libs
42 | *.keystore
43 |
--------------------------------------------------------------------------------
/example-exponent/Bedtime/exp.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Bedtime",
3 | "description": "react-native-circular-slider is a component for creating circular sliders, this example uses it to re-create Apple Bedtime.",
4 | "slug": "bedtime",
5 | "sdkVersion": "12.0.0",
6 | "version": "1.0.0",
7 | "orientation": "portrait",
8 | "primaryColor": "#cccccc",
9 | "iconUrl": "http://url.brentvatne.ca/YBqq.png",
10 | "loading": {
11 | "iconUrl": "http://url.brentvatne.ca/YBqq.png",
12 | "hideExponentText": false
13 | },
14 | "packagerOpts": {
15 | "assetExts": [
16 | "ttf"
17 | ]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/example/Bedtime/ios/Bedtime/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "AppDelegate.h"
13 |
14 | int main(int argc, char * argv[]) {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/example/Bedtime/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 |
38 | # BUCK
39 | buck-out/
40 | \.buckd/
41 | android/app/libs
42 | *.keystore
43 |
--------------------------------------------------------------------------------
/example-exponent/Bedtime/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 |
38 | # BUCK
39 | buck-out/
40 | \.buckd/
41 | android/app/libs
42 | *.keystore
43 |
44 | .exponent
45 |
--------------------------------------------------------------------------------
/example/Bedtime/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Bedtime",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start",
7 | "test": "jest"
8 | },
9 | "dependencies": {
10 | "react-native-circular-slider": "file:../..",
11 | "react": "15.4.1",
12 | "react-native": "0.39.2",
13 | "react-native-svg": ">=4.3.3"
14 | },
15 | "devDependencies": {
16 | "babel-jest": "18.0.0",
17 | "babel-preset-react-native": "1.9.1",
18 | "jest": "18.0.0",
19 | "react-test-renderer": "15.4.1"
20 | },
21 | "jest": {
22 | "preset": "react-native"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/example/Bedtime/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.3.1'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | maven {
20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21 | url "$rootDir/../node_modules/react-native/android"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/example/Bedtime/ios/Bedtime/Images.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 | }
--------------------------------------------------------------------------------
/example/Bedtime/ios/BedtimeTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
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 |
--------------------------------------------------------------------------------
/example/Bedtime/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Bart Gryszko
4 |
5 |
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 |
15 |
16 | The above copyright notice and this permission notice shall be included in
17 | all copies or substantial portions of the Software.
18 |
19 |
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 | THE SOFTWARE.
28 |
--------------------------------------------------------------------------------
/example/Bedtime/components/TimerText.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Text, View, StyleSheet } from 'react-native';
3 |
4 |
5 | export default class TimerText extends Component {
6 |
7 | render() {
8 | const { minutesLong, ...rest } = this.props;
9 |
10 | const hours = Math.floor(minutesLong / 60);
11 | const minutes = minutesLong - hours * 60;
12 |
13 | return (
14 |
15 |
16 | {hours}
17 | HR
18 | {minutes}
19 | MIN
20 |
21 |
22 | );
23 | }
24 | }
25 |
26 | const styles = StyleSheet.create({
27 | timerContainer: {
28 | justifyContent: 'center',
29 | alignItems: 'flex-end',
30 | flexDirection: 'row',
31 | },
32 | time: {
33 | color: 'white',
34 | fontSize: 35,
35 | fontWeight: "300",
36 | },
37 | span: {
38 | marginLeft: 10,
39 | },
40 | text: {
41 | color: 'white',
42 | fontSize: 15,
43 | fontWeight: "300",
44 | marginBottom: 5,
45 | },
46 | });
47 |
--------------------------------------------------------------------------------
/example-exponent/Bedtime/components/TimerText.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Text, View, StyleSheet } from 'react-native';
3 |
4 |
5 | export default class TimerText extends Component {
6 |
7 | render() {
8 | const { minutesLong, ...rest } = this.props;
9 |
10 | const hours = Math.floor(minutesLong / 60);
11 | const minutes = minutesLong - hours * 60;
12 |
13 | return (
14 |
15 |
16 | {hours}
17 | HR
18 | {minutes}
19 | MIN
20 |
21 |
22 | );
23 | }
24 | }
25 |
26 | const styles = StyleSheet.create({
27 | timerContainer: {
28 | justifyContent: 'center',
29 | alignItems: 'flex-end',
30 | flexDirection: 'row',
31 | },
32 | time: {
33 | color: 'white',
34 | fontSize: 35,
35 | fontWeight: "300",
36 | },
37 | span: {
38 | marginLeft: 10,
39 | },
40 | text: {
41 | color: 'white',
42 | fontSize: 15,
43 | fontWeight: "300",
44 | marginBottom: 5,
45 | },
46 | });
47 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-circular-slider",
3 | "version": "1.0.1",
4 | "description": "React Native component for creating circular slider",
5 | "main": "src/CircularSlider.js",
6 | "repository": {
7 | "type": "git",
8 | "url": "git+ssh://git@github.com/bgryszko/react-native-circular-slider.git"
9 | },
10 | "keywords": [
11 | "react",
12 | "react-native",
13 | "slider",
14 | "chart",
15 | "svg",
16 | "bedtime",
17 | "circular",
18 | "circle",
19 | "round",
20 | "time",
21 | "timer",
22 | "react-component"
23 | ],
24 | "author": {
25 | "name": "Bart Gryszko",
26 | "email": "b@gryszko.com"
27 | },
28 | "files": [
29 | "src",
30 | "README.md"
31 | ],
32 | "license": "MIT",
33 | "bugs": {
34 | "url": "https://github.com/bgryszko/react-native-circular-slider/issues"
35 | },
36 | "homepage": "https://github.com/bgryszko/react-native-circular-slider",
37 | "dependencies": {
38 | "d3-interpolate": "^1.1.2",
39 | "lodash.range": "^3.2.0",
40 | "prop-types": "^15.7.2",
41 | "react-native-svg": "^5.1.5"
42 | },
43 | "peerDependencies": {
44 | "react-native": ">=0.40.0",
45 | "react": ">=15.4.0"
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/example/Bedtime/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/example/Bedtime/android/app/src/main/java/com/bedtime/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.bedtime;
2 |
3 | import android.app.Application;
4 | import android.util.Log;
5 |
6 | import com.facebook.react.ReactApplication;
7 | import com.horcrux.svg.RNSvgPackage;
8 | import com.facebook.react.ReactInstanceManager;
9 | import com.facebook.react.ReactNativeHost;
10 | import com.facebook.react.ReactPackage;
11 | import com.facebook.react.shell.MainReactPackage;
12 | import com.facebook.soloader.SoLoader;
13 |
14 | import java.util.Arrays;
15 | import java.util.List;
16 |
17 | public class MainApplication extends Application implements ReactApplication {
18 |
19 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
20 | @Override
21 | protected boolean getUseDeveloperSupport() {
22 | return BuildConfig.DEBUG;
23 | }
24 |
25 | @Override
26 | protected List getPackages() {
27 | return Arrays.asList(
28 | new MainReactPackage(),
29 | new RNSvgPackage()
30 | );
31 | }
32 | };
33 |
34 | @Override
35 | public ReactNativeHost getReactNativeHost() {
36 | return mReactNativeHost;
37 | }
38 |
39 | @Override
40 | public void onCreate() {
41 | super.onCreate();
42 | SoLoader.init(this, /* native exopackage */ false);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/example/Bedtime/ios/Bedtime/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 |
12 | #import "RCTBundleURLProvider.h"
13 | #import "RCTRootView.h"
14 |
15 | @implementation AppDelegate
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
18 | {
19 | NSURL *jsCodeLocation;
20 |
21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
22 |
23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
24 | moduleName:@"Bedtime"
25 | initialProperties:nil
26 | launchOptions:launchOptions];
27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
28 |
29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
30 | UIViewController *rootViewController = [UIViewController new];
31 | rootViewController.view = rootView;
32 | self.window.rootViewController = rootViewController;
33 | [self.window makeKeyAndVisible];
34 | return YES;
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/example/Bedtime/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore unexpected extra "@providesModule"
9 | .*/node_modules/.*/node_modules/fbjs/.*
10 |
11 | ; Ignore duplicate module providers
12 | ; For RN Apps installed via npm, "Libraries" folder is inside
13 | ; "node_modules/react-native" but in the source repo it is in the root
14 | .*/Libraries/react-native/React.js
15 | .*/Libraries/react-native/ReactNative.js
16 |
17 | [include]
18 |
19 | [libs]
20 | node_modules/react-native/Libraries/react-native/react-native-interface.js
21 | node_modules/react-native/flow
22 | flow/
23 |
24 | [options]
25 | module.system=haste
26 |
27 | experimental.strict_type_args=true
28 |
29 | munge_underscores=true
30 |
31 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
32 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
33 |
34 | suppress_type=$FlowIssue
35 | suppress_type=$FlowFixMe
36 | suppress_type=$FixMe
37 |
38 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-5]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
39 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-5]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
40 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
41 |
42 | unsafe.enable_getters_and_setters=true
43 |
44 | [version]
45 | ^0.35.0
46 |
--------------------------------------------------------------------------------
/example-exponent/Bedtime/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore unexpected extra "@providesModule"
9 | .*/node_modules/.*/node_modules/fbjs/.*
10 |
11 | ; Ignore duplicate module providers
12 | ; For RN Apps installed via npm, "Libraries" folder is inside
13 | ; "node_modules/react-native" but in the source repo it is in the root
14 | .*/Libraries/react-native/React.js
15 | .*/Libraries/react-native/ReactNative.js
16 |
17 | [include]
18 |
19 | [libs]
20 | node_modules/react-native/Libraries/react-native/react-native-interface.js
21 | node_modules/react-native/flow
22 | flow/
23 |
24 | [options]
25 | module.system=haste
26 |
27 | experimental.strict_type_args=true
28 |
29 | munge_underscores=true
30 |
31 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
32 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
33 |
34 | suppress_type=$FlowIssue
35 | suppress_type=$FlowFixMe
36 | suppress_type=$FixMe
37 |
38 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-5]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
39 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-5]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
40 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
41 |
42 | unsafe.enable_getters_and_setters=true
43 |
44 | [version]
45 | ^0.35.0
46 |
--------------------------------------------------------------------------------
/src/ClockFace.js:
--------------------------------------------------------------------------------
1 | import React, { PureComponent } from 'react';
2 | import { G, Circle, Text, Line } from 'react-native-svg';
3 | import range from 'lodash.range';
4 | import PropTypes from 'prop-types'; // ES6
5 |
6 |
7 | export default class ClockFace extends PureComponent {
8 |
9 | static propTypes = {
10 | r: PropTypes.number,
11 | stroke: PropTypes.string,
12 | }
13 |
14 | render() {
15 | const { r, stroke } = this.props;
16 | const faceRadius = r - 5;
17 | const textRadius = r - 26;
18 |
19 | return (
20 |
21 | {
22 | range(48).map(i => {
23 | const cos = Math.cos(2 * Math.PI / 48 * i);
24 | const sin = Math.sin(2 * Math.PI / 48 * i);
25 |
26 | return (
27 |
36 | );
37 | })
38 | }
39 |
40 | {
41 | range(12).map((h, i) => (
42 |
50 | {h + 1}
51 |
52 | ))
53 | }
54 |
55 |
56 | );
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/example/Bedtime/android/app/BUCK:
--------------------------------------------------------------------------------
1 | import re
2 |
3 | # To learn about Buck see [Docs](https://buckbuild.com/).
4 | # To run your application with Buck:
5 | # - install Buck
6 | # - `npm start` - to start the packager
7 | # - `cd android`
8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
10 | # - `buck install -r android/app` - compile, install and run application
11 | #
12 |
13 | lib_deps = []
14 | for jarfile in glob(['libs/*.jar']):
15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
16 | lib_deps.append(':' + name)
17 | prebuilt_jar(
18 | name = name,
19 | binary_jar = jarfile,
20 | )
21 |
22 | for aarfile in glob(['libs/*.aar']):
23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
24 | lib_deps.append(':' + name)
25 | android_prebuilt_aar(
26 | name = name,
27 | aar = aarfile,
28 | )
29 |
30 | android_library(
31 | name = 'all-libs',
32 | exported_deps = lib_deps
33 | )
34 |
35 | android_library(
36 | name = 'app-code',
37 | srcs = glob([
38 | 'src/main/java/**/*.java',
39 | ]),
40 | deps = [
41 | ':all-libs',
42 | ':build_config',
43 | ':res',
44 | ],
45 | )
46 |
47 | android_build_config(
48 | name = 'build_config',
49 | package = 'com.bedtime',
50 | )
51 |
52 | android_resource(
53 | name = 'res',
54 | res = 'src/main/res',
55 | package = 'com.bedtime',
56 | )
57 |
58 | android_binary(
59 | name = 'app',
60 | package_type = 'debug',
61 | manifest = 'src/main/AndroidManifest.xml',
62 | keystore = '//android/keystores:debug',
63 | deps = [
64 | ':app-code',
65 | ],
66 | )
67 |
--------------------------------------------------------------------------------
/example/Bedtime/ios/Bedtime/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | NSLocationWhenInUseUsageDescription
40 |
41 | NSAppTransportSecurity
42 |
43 |
44 | NSExceptionDomains
45 |
46 | localhost
47 |
48 | NSExceptionAllowsInsecureHTTPLoads
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/example/Bedtime/ios/BedtimeTests/BedtimeTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | #import "RCTLog.h"
14 | #import "RCTRootView.h"
15 |
16 | #define TIMEOUT_SECONDS 600
17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
18 |
19 | @interface BedtimeTests : XCTestCase
20 |
21 | @end
22 |
23 | @implementation BedtimeTests
24 |
25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
26 | {
27 | if (test(view)) {
28 | return YES;
29 | }
30 | for (UIView *subview in [view subviews]) {
31 | if ([self findSubviewInView:subview matching:test]) {
32 | return YES;
33 | }
34 | }
35 | return NO;
36 | }
37 |
38 | - (void)testRendersWelcomeScreen
39 | {
40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
42 | BOOL foundElement = NO;
43 |
44 | __block NSString *redboxError = nil;
45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
46 | if (level >= RCTLogLevelError) {
47 | redboxError = message;
48 | }
49 | });
50 |
51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
54 |
55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
57 | return YES;
58 | }
59 | return NO;
60 | }];
61 | }
62 |
63 | RCTSetLogFunction(RCTDefaultLogFunction);
64 |
65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
67 | }
68 |
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/example/Bedtime/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Disabling obfuscation is useful if you collect stack traces from production crashes
20 | # (unless you are using a system that supports de-obfuscate the stack traces).
21 | -dontobfuscate
22 |
23 | # React Native
24 |
25 | # Keep our interfaces so they can be used by other ProGuard rules.
26 | # See http://sourceforge.net/p/proguard/bugs/466/
27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30 |
31 | # Do not strip any method/class that is annotated with @DoNotStrip
32 | -keep @com.facebook.proguard.annotations.DoNotStrip class *
33 | -keep @com.facebook.common.internal.DoNotStrip class *
34 | -keepclassmembers class * {
35 | @com.facebook.proguard.annotations.DoNotStrip *;
36 | @com.facebook.common.internal.DoNotStrip *;
37 | }
38 |
39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40 | void set*(***);
41 | *** get*();
42 | }
43 |
44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; }
46 | -keepclassmembers,includedescriptorclasses class * { native ; }
47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; }
48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; }
49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; }
50 |
51 | -dontwarn com.facebook.react.**
52 |
53 | # okhttp
54 |
55 | -keepattributes Signature
56 | -keepattributes *Annotation*
57 | -keep class okhttp3.** { *; }
58 | -keep interface okhttp3.** { *; }
59 | -dontwarn okhttp3.**
60 |
61 | # okio
62 |
63 | -keep class sun.misc.Unsafe { *; }
64 | -dontwarn java.nio.file.*
65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
66 | -dontwarn okio.**
67 |
--------------------------------------------------------------------------------
/example/Bedtime/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/example/Bedtime/ios/Bedtime/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | []()
2 | [](https://www.npmjs.com/package/react-native-circular-slider)
3 | [](https://twitter.com/bgryszko)
4 |
5 | # react-native-circular-slider :radio_button:
6 |
7 | React Native component for creating circular slider.
8 |
9 | ## Example app – inspired by Apple's Bedtime :alarm_clock:
10 | (It's just an example what you can achieve – with this package you can create any circular slider)
11 |
12 | 
13 |
14 | ## Installation
15 |
16 | 1. Install library and react-native-svg
17 |
18 | ```
19 | npm i --save react-native-circular-slider react-native-svg
20 | ```
21 | 2. Link native code for SVG
22 |
23 | ```
24 | react-native link react-native-svg
25 | ```
26 |
27 | ## Usage
28 |
29 | Import Circular Slider
30 |
31 | ```js
32 | import CircularSlider from 'react-native-circular-slider';
33 | ```
34 |
35 | Use as follows:
36 |
37 | ```jsx
38 | this.setState({ startAngle, angleLength })}
42 | segments={5}
43 | strokeWidth={40}
44 | radius={145}
45 | gradientColorFrom="#ff9800"
46 | gradientColorTo="#ffcf00"
47 | showClockFace
48 | clockFaceColor="#9d9d9d"
49 | bgCircleColor="#171717"
50 | stopIcon={}
51 | startIcon={}
52 | />
53 | ```
54 |
55 |
56 | ## Configuration
57 |
58 | You can configure the passing by following props:
59 |
60 | - **startAngle** – angle where the slider starts (from 0 to 2π)
61 | - **angleLength** - length of the slider (from 0 to 2π)
62 | - **onUpdate({ startAngle, angleLength })** - when slider is moved, onUpdate(data) is triggered, where data is an object of new values of startAngle and angleLength.
63 | - **segments (optional)** - SVG doesn't support canonical gradients, so it's imitated by using multiple linear gradients across the slider. In most cases 5 should be fine.
64 | - **strokeWidth (optional)** - width of slider
65 | - **radius (optional)** - size of the slider
66 | - **gradientColorFrom (optional)** - initial gradient color
67 | - **gradientColorTo (optional)** - final gradient color
68 | - **showClockFace (optional)** - if component should render clock face
69 | - **bgCircleColor (optional)** - color of the circle under the slider (pathway for a slider)
70 | - **stopIcon (optional)** - SVG Path for a stop icon (see the example)
71 | - **startIcon (optional)** - SVG Path for a start icon (see the example)
72 |
73 |
74 | ## Working example app
75 |
76 | ### With XCode
77 |
78 | You'll find working example in the `example` directory of this repository. You can run it by:
79 |
80 | ```sh
81 | git clone https://github.com/bgryszko/react-native-circular-slider.git
82 | cd react-native-circular-slider/example/Bedtime
83 | npm install
84 | open ios/Bedtime.xcodeproj
85 | ```
86 | XCode will open. Click Run button and that's it.
87 |
88 |
89 | ### With Exponent
90 |
91 | The easiest way to run it is with Exponent: https://getexponent.com/@community/bedtime
92 |
93 | If you'd rather build it locally, follow these steps:
94 |
95 | 1. [Download XDE](https://docs.getexponent.com/versions/latest/introduction/installation.html)
96 | 2. Clone the repo and install dependencies
97 |
98 | ```sh
99 | git clone https://github.com/bgryszko/react-native-circular-slider.git
100 | cd react-native-circular-slider/example-exponent/Bedtime
101 | npm install
102 | ```
103 | 3. Open the project with XDE
104 |
105 |
106 | ## Author
107 |
108 | Bartosz Gryszko (b@gryszko.com)
109 |
110 | For new components and updates [follow me on twitter](http://twitter.com/bgryszko).
111 |
112 | ## License
113 |
114 | MIT
115 |
--------------------------------------------------------------------------------
/example/Bedtime/ios/Bedtime.xcodeproj/xcshareddata/xcschemes/Bedtime.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/example/Bedtime/main.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { AppRegistry, StyleSheet, Text, View } from 'react-native';
3 | import Svg, { G, Path } from 'react-native-svg';
4 |
5 | import CircularSlider from 'react-native-circular-slider';
6 | import TimerText from './components/TimerText';
7 |
8 | const WAKE_ICON = (
9 |
10 |
13 |
14 |
15 | );
16 |
17 | const BEDTIME_ICON = (
18 |
19 |
21 |
22 |
23 |
24 |
25 | );
26 |
27 |
28 | function calculateMinutesFromAngle(angle) {
29 | return Math.round(angle / (2 * Math.PI / (12 * 12))) * 5;
30 | }
31 |
32 | function calculateTimeFromAngle(angle) {
33 | const minutes = calculateMinutesFromAngle(angle);
34 | const h = Math.floor(minutes / 60);
35 | const m = minutes - h * 60;
36 |
37 | return { h, m };
38 | }
39 |
40 | function roundAngleToFives(angle) {
41 | const fiveMinuteAngle = 2 * Math.PI / 144;
42 |
43 | return Math.round(angle / fiveMinuteAngle) * fiveMinuteAngle;
44 | }
45 |
46 | function padMinutes(min) {
47 | if (`${min}`.length < 2) {
48 | return `0${min}`;
49 | }
50 |
51 | return min;
52 | }
53 |
54 | export default class Bedtime extends Component {
55 |
56 | state = {
57 | startAngle: Math.PI * 10/6,
58 | angleLength: Math.PI * 7/6,
59 | }
60 |
61 | onTimeUpdate = (fromTimeInMinutes, minutesLong) => {
62 | this.setState({ minutesLong });
63 | }
64 |
65 | onUpdate = ({ startAngle, angleLength }) => {
66 | this.setState({
67 | startAngle: roundAngleToFives(startAngle),
68 | angleLength: roundAngleToFives(angleLength)
69 | });
70 | }
71 |
72 | render() {
73 | const { startAngle, angleLength } = this.state;
74 | const bedtime = calculateTimeFromAngle(startAngle);
75 | const waketime = calculateTimeFromAngle((startAngle + angleLength) % (2 * Math.PI));
76 |
77 | return (
78 |
79 |
80 |
81 |
82 |
85 | Bedtime
86 |
87 | {bedtime.h}:{padMinutes(bedtime.m)}
88 |
89 |
90 |
91 |
94 | Wake
95 |
96 | {waketime.h}:{padMinutes(waketime.m)}
97 |
98 |
99 |
100 |
104 | {WAKE_ICON}}
117 | startIcon={{BEDTIME_ICON}}
118 | />
119 |
120 |
121 | );
122 | }
123 | }
124 |
125 | const styles = StyleSheet.create({
126 | container: {
127 | flex: 1,
128 | alignItems: 'center',
129 | justifyContent: 'center',
130 | backgroundColor: '#0D0D0D',
131 | },
132 | bedtimeText: {
133 | color: '#ff9800',
134 | marginLeft: 3,
135 | fontSize: 16,
136 | },
137 | wakeText: {
138 | color: '#ffcf00',
139 | marginLeft: 3,
140 | fontSize: 16,
141 | },
142 | timeContainer: {
143 | flexDirection: 'row',
144 | justifyContent: 'space-between',
145 | marginBottom: 20,
146 | },
147 | time: {
148 | alignItems: 'center',
149 | flex: 1,
150 | },
151 | timeHeader: {
152 | flexDirection: 'row',
153 | alignItems: 'center',
154 | },
155 | timeValue: {
156 | color: 'white',
157 | fontSize: 35,
158 | fontWeight: "300",
159 | },
160 | sleepTimeContainer: {
161 | flex: 1,
162 | justifyContent: 'center',
163 | position: 'absolute',
164 | top: 0,
165 | bottom: 0,
166 | left: 0,
167 | right: 0
168 | }
169 | });
170 |
171 | AppRegistry.registerComponent('Bedtime', () => Bedtime);
172 |
--------------------------------------------------------------------------------
/example-exponent/Bedtime/main.js:
--------------------------------------------------------------------------------
1 | import Exponent from 'exponent';
2 | import React, { Component } from 'react';
3 | import { StyleSheet, Text, View } from 'react-native';
4 | import Svg, { G, Path } from 'react-native-svg';
5 |
6 | import CircularSlider from 'react-native-circular-slider';
7 | import TimerText from './components/TimerText';
8 |
9 | const WAKE_ICON = (
10 |
11 |
14 |
15 |
16 | );
17 |
18 | const BEDTIME_ICON = (
19 |
20 |
22 |
23 |
24 |
25 |
26 | );
27 |
28 |
29 | function calculateMinutesFromAngle(angle) {
30 | return Math.round(angle / (2 * Math.PI / (12 * 12))) * 5;
31 | }
32 |
33 | function calculateTimeFromAngle(angle) {
34 | const minutes = calculateMinutesFromAngle(angle);
35 | const h = Math.floor(minutes / 60);
36 | const m = minutes - h * 60;
37 |
38 | return { h, m };
39 | }
40 |
41 | function roundAngleToFives(angle) {
42 | const fiveMinuteAngle = 2 * Math.PI / 144;
43 |
44 | return Math.round(angle / fiveMinuteAngle) * fiveMinuteAngle;
45 | }
46 |
47 | function padMinutes(min) {
48 | if (`${min}`.length < 2) {
49 | return `0${min}`;
50 | }
51 |
52 | return min;
53 | }
54 |
55 | export default class Bedtime extends Component {
56 |
57 | state = {
58 | startAngle: Math.PI * 10/6,
59 | angleLength: Math.PI * 7/6,
60 | }
61 |
62 | onTimeUpdate = (fromTimeInMinutes, minutesLong) => {
63 | this.setState({ minutesLong });
64 | }
65 |
66 | onUpdate = ({ startAngle, angleLength }) => {
67 | this.setState({
68 | startAngle: roundAngleToFives(startAngle),
69 | angleLength: roundAngleToFives(angleLength)
70 | });
71 | }
72 |
73 | render() {
74 | const { startAngle, angleLength } = this.state;
75 | const bedtime = calculateTimeFromAngle(startAngle);
76 | const waketime = calculateTimeFromAngle((startAngle + angleLength) % (2 * Math.PI));
77 |
78 | return (
79 |
80 |
81 |
82 |
83 |
86 | Bedtime
87 |
88 | {bedtime.h}:{padMinutes(bedtime.m)}
89 |
90 |
91 |
92 |
95 | Wake
96 |
97 | {waketime.h}:{padMinutes(waketime.m)}
98 |
99 |
100 |
101 |
105 | {WAKE_ICON}}
118 | startIcon={{BEDTIME_ICON}}
119 | />
120 |
121 |
122 | );
123 | }
124 | }
125 |
126 | const styles = StyleSheet.create({
127 | container: {
128 | flex: 1,
129 | alignItems: 'center',
130 | justifyContent: 'center',
131 | backgroundColor: '#0D0D0D',
132 | },
133 | bedtimeText: {
134 | color: '#ff9800',
135 | marginLeft: 3,
136 | fontSize: 16,
137 | },
138 | wakeText: {
139 | color: '#ffcf00',
140 | marginLeft: 3,
141 | fontSize: 16,
142 | },
143 | timeContainer: {
144 | flexDirection: 'row',
145 | justifyContent: 'space-between',
146 | marginBottom: 20,
147 | },
148 | time: {
149 | alignItems: 'center',
150 | flex: 1,
151 | },
152 | timeHeader: {
153 | flexDirection: 'row',
154 | alignItems: 'center',
155 | },
156 | timeValue: {
157 | color: 'white',
158 | fontSize: 35,
159 | fontWeight: "300",
160 | },
161 | sleepTimeContainer: {
162 | flex: 1,
163 | justifyContent: 'center',
164 | position: 'absolute',
165 | top: 0,
166 | bottom: 0,
167 | left: 0,
168 | right: 0
169 | }
170 | });
171 |
172 | Exponent.registerRootComponent(Bedtime);
173 |
--------------------------------------------------------------------------------
/example/Bedtime/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/example/Bedtime/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation
19 | * entryFile: "index.android.js",
20 | *
21 | * // whether to bundle JS and assets in debug mode
22 | * bundleInDebug: false,
23 | *
24 | * // whether to bundle JS and assets in release mode
25 | * bundleInRelease: true,
26 | *
27 | * // whether to bundle JS and assets in another build variant (if configured).
28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
29 | * // The configuration property can be in the following formats
30 | * // 'bundleIn${productFlavor}${buildType}'
31 | * // 'bundleIn${buildType}'
32 | * // bundleInFreeDebug: true,
33 | * // bundleInPaidRelease: true,
34 | * // bundleInBeta: true,
35 | *
36 | * // the root of your project, i.e. where "package.json" lives
37 | * root: "../../",
38 | *
39 | * // where to put the JS bundle asset in debug mode
40 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
41 | *
42 | * // where to put the JS bundle asset in release mode
43 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
44 | *
45 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
46 | * // require('./image.png')), in debug mode
47 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
48 | *
49 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
50 | * // require('./image.png')), in release mode
51 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
52 | *
53 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
54 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
55 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
56 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
57 | * // for example, you might want to remove it from here.
58 | * inputExcludes: ["android/**", "ios/**"],
59 | *
60 | * // override which node gets called and with what additional arguments
61 | * nodeExecutableAndArgs: ["node"]
62 | *
63 | * // supply additional arguments to the packager
64 | * extraPackagerArgs: []
65 | * ]
66 | */
67 |
68 | apply from: "../../node_modules/react-native/react.gradle"
69 |
70 | /**
71 | * Set this to true to create two separate APKs instead of one:
72 | * - An APK that only works on ARM devices
73 | * - An APK that only works on x86 devices
74 | * The advantage is the size of the APK is reduced by about 4MB.
75 | * Upload all the APKs to the Play Store and people will download
76 | * the correct one based on the CPU architecture of their device.
77 | */
78 | def enableSeparateBuildPerCPUArchitecture = false
79 |
80 | /**
81 | * Run Proguard to shrink the Java bytecode in release builds.
82 | */
83 | def enableProguardInReleaseBuilds = false
84 |
85 | android {
86 | compileSdkVersion 23
87 | buildToolsVersion "23.0.1"
88 |
89 | defaultConfig {
90 | applicationId "com.bedtime"
91 | minSdkVersion 16
92 | targetSdkVersion 22
93 | versionCode 1
94 | versionName "1.0"
95 | ndk {
96 | abiFilters "armeabi-v7a", "x86"
97 | }
98 | }
99 | splits {
100 | abi {
101 | reset()
102 | enable enableSeparateBuildPerCPUArchitecture
103 | universalApk false // If true, also generate a universal APK
104 | include "armeabi-v7a", "x86"
105 | }
106 | }
107 | buildTypes {
108 | release {
109 | minifyEnabled enableProguardInReleaseBuilds
110 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
111 | }
112 | }
113 | // applicationVariants are e.g. debug, release
114 | applicationVariants.all { variant ->
115 | variant.outputs.each { output ->
116 | // For each separate APK per architecture, set a unique version code as described here:
117 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
118 | def versionCodes = ["armeabi-v7a":1, "x86":2]
119 | def abi = output.getFilter(OutputFile.ABI)
120 | if (abi != null) { // null for the universal-debug, universal-release variants
121 | output.versionCodeOverride =
122 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
123 | }
124 | }
125 | }
126 | }
127 |
128 | dependencies {
129 | compile project(':react-native-svg')
130 | compile fileTree(dir: "libs", include: ["*.jar"])
131 | compile "com.android.support:appcompat-v7:23.0.1"
132 | compile "com.facebook.react:react-native:+" // From node_modules
133 | }
134 |
135 | // Run this once to be able to run the application with BUCK
136 | // puts all compile dependencies into folder libs for BUCK to use
137 | task copyDownloadableDepsToLibs(type: Copy) {
138 | from configurations.compile
139 | into 'libs'
140 | }
141 |
--------------------------------------------------------------------------------
/src/CircularSlider.js:
--------------------------------------------------------------------------------
1 | import React, { PureComponent } from 'react';
2 | import { PanResponder, View } from 'react-native';
3 | import Svg, { Circle, G, LinearGradient, Path, Defs, Stop } from 'react-native-svg';
4 | import range from 'lodash.range';
5 | import { interpolateHcl as interpolateGradient } from 'd3-interpolate';
6 | import ClockFace from './ClockFace';
7 | import PropTypes from 'prop-types'; // ES6
8 |
9 |
10 | function calculateArcColor(index0, segments, gradientColorFrom, gradientColorTo) {
11 | const interpolate = interpolateGradient(gradientColorFrom, gradientColorTo);
12 |
13 | return {
14 | fromColor: interpolate(index0 / segments),
15 | toColor: interpolate((index0 + 1) / segments),
16 | }
17 | }
18 |
19 | function calculateArcCircle(index0, segments, radius, startAngle0 = 0, angleLength0 = 2 * Math.PI) {
20 | // Add 0.0001 to the possible angle so when start = stop angle, whole circle is drawn
21 | const startAngle = startAngle0 % (2 * Math.PI);
22 | const angleLength = angleLength0 % (2 * Math.PI);
23 | const index = index0 + 1;
24 | const fromAngle = angleLength / segments * (index - 1) + startAngle;
25 | const toAngle = angleLength / segments * index + startAngle;
26 | const fromX = radius * Math.sin(fromAngle);
27 | const fromY = -radius * Math.cos(fromAngle);
28 | const realToX = radius * Math.sin(toAngle);
29 | const realToY = -radius * Math.cos(toAngle);
30 |
31 | // add 0.005 to start drawing a little bit earlier so segments stick together
32 | const toX = radius * Math.sin(toAngle + 0.005);
33 | const toY = -radius * Math.cos(toAngle + 0.005);
34 |
35 | return {
36 | fromX,
37 | fromY,
38 | toX,
39 | toY,
40 | realToX,
41 | realToY,
42 | };
43 | }
44 |
45 | function getGradientId(index) {
46 | return `gradient${index}`;
47 | }
48 |
49 | export default class CircularSlider extends PureComponent {
50 |
51 | static propTypes = {
52 | onUpdate: PropTypes.func.isRequired,
53 | startAngle: PropTypes.number.isRequired,
54 | angleLength: PropTypes.number.isRequired,
55 | segments: PropTypes.number,
56 | strokeWidth: PropTypes.number,
57 | radius: PropTypes.number,
58 | gradientColorFrom: PropTypes.string,
59 | gradientColorTo: PropTypes.string,
60 | showClockFace: PropTypes.bool,
61 | clockFaceColor: PropTypes.string,
62 | bgCircleColor: PropTypes.string,
63 | stopIcon: PropTypes.element,
64 | startIcon: PropTypes.element,
65 | }
66 |
67 | static defaultProps = {
68 | segments: 5,
69 | strokeWidth: 40,
70 | radius: 145,
71 | gradientColorFrom: '#ff9800',
72 | gradientColorTo: '#ffcf00',
73 | clockFaceColor: '#9d9d9d',
74 | bgCircleColor: '#171717',
75 | }
76 |
77 | state = {
78 | circleCenterX: false,
79 | circleCenterY: false,
80 | }
81 |
82 | componentWillMount() {
83 | this._sleepPanResponder = PanResponder.create({
84 | onMoveShouldSetPanResponder: (evt, gestureState) => true,
85 | onMoveShouldSetPanResponderCapture: (evt, gestureState) => true,
86 | onPanResponderGrant: (evt, gestureState) => this.setCircleCenter(),
87 | onPanResponderMove: (evt, { moveX, moveY }) => {
88 | const { circleCenterX, circleCenterY } = this.state;
89 | const { angleLength, startAngle, onUpdate } = this.props;
90 |
91 | const currentAngleStop = (startAngle + angleLength) % (2 * Math.PI);
92 | let newAngle = Math.atan2(moveY - circleCenterY, moveX - circleCenterX) + Math.PI/2;
93 |
94 | if (newAngle < 0) {
95 | newAngle += 2 * Math.PI;
96 | }
97 |
98 | let newAngleLength = currentAngleStop - newAngle;
99 |
100 | if (newAngleLength < 0) {
101 | newAngleLength += 2 * Math.PI;
102 | }
103 |
104 | onUpdate({ startAngle: newAngle, angleLength: newAngleLength % (2 * Math.PI) });
105 | },
106 | });
107 |
108 | this._wakePanResponder = PanResponder.create({
109 | onMoveShouldSetPanResponder: (evt, gestureState) => true,
110 | onMoveShouldSetPanResponderCapture: (evt, gestureState) => true,
111 | onPanResponderGrant: (evt, gestureState) => this.setCircleCenter(),
112 | onPanResponderMove: (evt, { moveX, moveY }) => {
113 | const { circleCenterX, circleCenterY } = this.state;
114 | const { angleLength, startAngle, onUpdate } = this.props;
115 |
116 | let newAngle = Math.atan2(moveY - circleCenterY, moveX - circleCenterX) + Math.PI/2;
117 | let newAngleLength = (newAngle - startAngle) % (2 * Math.PI);
118 |
119 | if (newAngleLength < 0) {
120 | newAngleLength += 2 * Math.PI;
121 | }
122 |
123 | onUpdate({ startAngle, angleLength: newAngleLength });
124 | },
125 | });
126 | }
127 |
128 | onLayout = () => {
129 | this.setCircleCenter();
130 | }
131 |
132 | setCircleCenter = () => {
133 | this._circle.measure((x, y, w, h, px , py) => {
134 | const halfOfContainer = this.getContainerWidth() / 2;
135 | this.setState({ circleCenterX: px + halfOfContainer, circleCenterY: py + halfOfContainer });
136 | });
137 | }
138 |
139 | getContainerWidth() {
140 | const { strokeWidth, radius } = this.props;
141 | return strokeWidth + radius * 2 + 2;
142 | }
143 |
144 | render() {
145 | const { startAngle, angleLength, segments, strokeWidth, radius, gradientColorFrom, gradientColorTo, bgCircleColor,
146 | showClockFace, clockFaceColor, startIcon, stopIcon } = this.props;
147 |
148 | const containerWidth = this.getContainerWidth();
149 |
150 | const start = calculateArcCircle(0, segments, radius, startAngle, angleLength);
151 | const stop = calculateArcCircle(segments - 1, segments, radius, startAngle, angleLength);
152 |
153 | return (
154 |
155 |
254 |
255 | );
256 | }
257 | }
258 |
--------------------------------------------------------------------------------
/example/Bedtime/ios/Bedtime.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; };
13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
15 | 00E356F31AD99517003FC87E /* BedtimeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* BedtimeTests.m */; };
16 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
17 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
18 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
23 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
24 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
25 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
26 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
27 | DAABBFA3DBE74D0DAE753694 /* libRNSVG.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 191A3592A01843F8A11ACFA0 /* libRNSVG.a */; };
28 | /* End PBXBuildFile section */
29 |
30 | /* Begin PBXContainerItemProxy section */
31 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
32 | isa = PBXContainerItemProxy;
33 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
34 | proxyType = 2;
35 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
36 | remoteInfo = RCTActionSheet;
37 | };
38 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
39 | isa = PBXContainerItemProxy;
40 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
41 | proxyType = 2;
42 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
43 | remoteInfo = RCTGeolocation;
44 | };
45 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
46 | isa = PBXContainerItemProxy;
47 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
48 | proxyType = 2;
49 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
50 | remoteInfo = RCTImage;
51 | };
52 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
53 | isa = PBXContainerItemProxy;
54 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
55 | proxyType = 2;
56 | remoteGlobalIDString = 58B511DB1A9E6C8500147676;
57 | remoteInfo = RCTNetwork;
58 | };
59 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
60 | isa = PBXContainerItemProxy;
61 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
62 | proxyType = 2;
63 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
64 | remoteInfo = RCTVibration;
65 | };
66 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
67 | isa = PBXContainerItemProxy;
68 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
69 | proxyType = 1;
70 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
71 | remoteInfo = Bedtime;
72 | };
73 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
74 | isa = PBXContainerItemProxy;
75 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
76 | proxyType = 2;
77 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
78 | remoteInfo = RCTSettings;
79 | };
80 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
81 | isa = PBXContainerItemProxy;
82 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
83 | proxyType = 2;
84 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
85 | remoteInfo = RCTWebSocket;
86 | };
87 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
88 | isa = PBXContainerItemProxy;
89 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
90 | proxyType = 2;
91 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
92 | remoteInfo = React;
93 | };
94 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
95 | isa = PBXContainerItemProxy;
96 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
97 | proxyType = 2;
98 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
99 | remoteInfo = RCTAnimation;
100 | };
101 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
102 | isa = PBXContainerItemProxy;
103 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
104 | proxyType = 2;
105 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
106 | remoteInfo = "RCTAnimation-tvOS";
107 | };
108 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
109 | isa = PBXContainerItemProxy;
110 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
111 | proxyType = 2;
112 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
113 | remoteInfo = RCTLinking;
114 | };
115 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
116 | isa = PBXContainerItemProxy;
117 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
118 | proxyType = 2;
119 | remoteGlobalIDString = 58B5119B1A9E6C1200147676;
120 | remoteInfo = RCTText;
121 | };
122 | CCD537531E13DD0200FFCA50 /* PBXContainerItemProxy */ = {
123 | isa = PBXContainerItemProxy;
124 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
125 | proxyType = 2;
126 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D;
127 | remoteInfo = "RCTImage-tvOS";
128 | };
129 | CCD537571E13DD0200FFCA50 /* PBXContainerItemProxy */ = {
130 | isa = PBXContainerItemProxy;
131 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
132 | proxyType = 2;
133 | remoteGlobalIDString = 2D2A28471D9B043800D4039D;
134 | remoteInfo = "RCTLinking-tvOS";
135 | };
136 | CCD5375B1E13DD0200FFCA50 /* PBXContainerItemProxy */ = {
137 | isa = PBXContainerItemProxy;
138 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
139 | proxyType = 2;
140 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D;
141 | remoteInfo = "RCTNetwork-tvOS";
142 | };
143 | CCD5375F1E13DD0200FFCA50 /* PBXContainerItemProxy */ = {
144 | isa = PBXContainerItemProxy;
145 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
146 | proxyType = 2;
147 | remoteGlobalIDString = 2D2A28611D9B046600D4039D;
148 | remoteInfo = "RCTSettings-tvOS";
149 | };
150 | CCD537631E13DD0200FFCA50 /* PBXContainerItemProxy */ = {
151 | isa = PBXContainerItemProxy;
152 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
153 | proxyType = 2;
154 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D;
155 | remoteInfo = "RCTText-tvOS";
156 | };
157 | CCD537681E13DD0200FFCA50 /* PBXContainerItemProxy */ = {
158 | isa = PBXContainerItemProxy;
159 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
160 | proxyType = 2;
161 | remoteGlobalIDString = 2D2A28881D9B049200D4039D;
162 | remoteInfo = "RCTWebSocket-tvOS";
163 | };
164 | CCD5376C1E13DD0200FFCA50 /* PBXContainerItemProxy */ = {
165 | isa = PBXContainerItemProxy;
166 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
167 | proxyType = 2;
168 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
169 | remoteInfo = "React-tvOS";
170 | };
171 | CCD5376F1E13DD0200FFCA50 /* PBXContainerItemProxy */ = {
172 | isa = PBXContainerItemProxy;
173 | containerPortal = 91C2071448B149F5BCBF0D76 /* RNSVG.xcodeproj */;
174 | proxyType = 2;
175 | remoteGlobalIDString = 0CF68AC11AF0540F00FF9E5C;
176 | remoteInfo = RNSVG;
177 | };
178 | /* End PBXContainerItemProxy section */
179 |
180 | /* Begin PBXFileReference section */
181 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
182 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; };
183 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; };
184 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; };
185 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; };
186 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; };
187 | 00E356EE1AD99517003FC87E /* BedtimeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BedtimeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
188 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
189 | 00E356F21AD99517003FC87E /* BedtimeTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BedtimeTests.m; sourceTree = ""; };
190 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; };
191 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; };
192 | 13B07F961A680F5B00A75B9A /* Bedtime.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Bedtime.app; sourceTree = BUILT_PRODUCTS_DIR; };
193 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Bedtime/AppDelegate.h; sourceTree = ""; };
194 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Bedtime/AppDelegate.m; sourceTree = ""; };
195 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
196 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Bedtime/Images.xcassets; sourceTree = ""; };
197 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Bedtime/Info.plist; sourceTree = ""; };
198 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Bedtime/main.m; sourceTree = ""; };
199 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
200 | 191A3592A01843F8A11ACFA0 /* libRNSVG.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSVG.a; sourceTree = ""; };
201 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; };
202 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
203 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
204 | 91C2071448B149F5BCBF0D76 /* RNSVG.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSVG.xcodeproj; path = "../node_modules/react-native-svg/ios/RNSVG.xcodeproj"; sourceTree = ""; };
205 | /* End PBXFileReference section */
206 |
207 | /* Begin PBXFrameworksBuildPhase section */
208 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
209 | isa = PBXFrameworksBuildPhase;
210 | buildActionMask = 2147483647;
211 | files = (
212 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
213 | );
214 | runOnlyForDeploymentPostprocessing = 0;
215 | };
216 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
217 | isa = PBXFrameworksBuildPhase;
218 | buildActionMask = 2147483647;
219 | files = (
220 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
221 | 146834051AC3E58100842450 /* libReact.a in Frameworks */,
222 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
223 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
224 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
225 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
226 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
227 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
228 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
229 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
230 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
231 | DAABBFA3DBE74D0DAE753694 /* libRNSVG.a in Frameworks */,
232 | );
233 | runOnlyForDeploymentPostprocessing = 0;
234 | };
235 | /* End PBXFrameworksBuildPhase section */
236 |
237 | /* Begin PBXGroup section */
238 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = {
239 | isa = PBXGroup;
240 | children = (
241 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
242 | );
243 | name = Products;
244 | sourceTree = "";
245 | };
246 | 00C302B61ABCB90400DB3ED1 /* Products */ = {
247 | isa = PBXGroup;
248 | children = (
249 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
250 | );
251 | name = Products;
252 | sourceTree = "";
253 | };
254 | 00C302BC1ABCB91800DB3ED1 /* Products */ = {
255 | isa = PBXGroup;
256 | children = (
257 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
258 | CCD537541E13DD0200FFCA50 /* libRCTImage-tvOS.a */,
259 | );
260 | name = Products;
261 | sourceTree = "";
262 | };
263 | 00C302D41ABCB9D200DB3ED1 /* Products */ = {
264 | isa = PBXGroup;
265 | children = (
266 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
267 | CCD5375C1E13DD0200FFCA50 /* libRCTNetwork-tvOS.a */,
268 | );
269 | name = Products;
270 | sourceTree = "";
271 | };
272 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = {
273 | isa = PBXGroup;
274 | children = (
275 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
276 | );
277 | name = Products;
278 | sourceTree = "";
279 | };
280 | 00E356EF1AD99517003FC87E /* BedtimeTests */ = {
281 | isa = PBXGroup;
282 | children = (
283 | 00E356F21AD99517003FC87E /* BedtimeTests.m */,
284 | 00E356F01AD99517003FC87E /* Supporting Files */,
285 | );
286 | path = BedtimeTests;
287 | sourceTree = "";
288 | };
289 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
290 | isa = PBXGroup;
291 | children = (
292 | 00E356F11AD99517003FC87E /* Info.plist */,
293 | );
294 | name = "Supporting Files";
295 | sourceTree = "";
296 | };
297 | 139105B71AF99BAD00B5F7CC /* Products */ = {
298 | isa = PBXGroup;
299 | children = (
300 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
301 | CCD537601E13DD0200FFCA50 /* libRCTSettings-tvOS.a */,
302 | );
303 | name = Products;
304 | sourceTree = "";
305 | };
306 | 139FDEE71B06529A00C62182 /* Products */ = {
307 | isa = PBXGroup;
308 | children = (
309 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
310 | CCD537691E13DD0200FFCA50 /* libRCTWebSocket-tvOS.a */,
311 | );
312 | name = Products;
313 | sourceTree = "";
314 | };
315 | 13B07FAE1A68108700A75B9A /* Bedtime */ = {
316 | isa = PBXGroup;
317 | children = (
318 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
319 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
320 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
321 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
322 | 13B07FB61A68108700A75B9A /* Info.plist */,
323 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
324 | 13B07FB71A68108700A75B9A /* main.m */,
325 | );
326 | name = Bedtime;
327 | sourceTree = "";
328 | };
329 | 146834001AC3E56700842450 /* Products */ = {
330 | isa = PBXGroup;
331 | children = (
332 | 146834041AC3E56700842450 /* libReact.a */,
333 | CCD5376D1E13DD0200FFCA50 /* libReact-tvOS.a */,
334 | );
335 | name = Products;
336 | sourceTree = "";
337 | };
338 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = {
339 | isa = PBXGroup;
340 | children = (
341 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */,
342 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */,
343 | );
344 | name = Products;
345 | sourceTree = "";
346 | };
347 | 78C398B11ACF4ADC00677621 /* Products */ = {
348 | isa = PBXGroup;
349 | children = (
350 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
351 | CCD537581E13DD0200FFCA50 /* libRCTLinking-tvOS.a */,
352 | );
353 | name = Products;
354 | sourceTree = "";
355 | };
356 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
357 | isa = PBXGroup;
358 | children = (
359 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
360 | 146833FF1AC3E56700842450 /* React.xcodeproj */,
361 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
362 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
363 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
364 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
365 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
366 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
367 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
368 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
369 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
370 | 91C2071448B149F5BCBF0D76 /* RNSVG.xcodeproj */,
371 | );
372 | name = Libraries;
373 | sourceTree = "";
374 | };
375 | 832341B11AAA6A8300B99B32 /* Products */ = {
376 | isa = PBXGroup;
377 | children = (
378 | 832341B51AAA6A8300B99B32 /* libRCTText.a */,
379 | CCD537641E13DD0200FFCA50 /* libRCTText-tvOS.a */,
380 | );
381 | name = Products;
382 | sourceTree = "";
383 | };
384 | 83CBB9F61A601CBA00E9B192 = {
385 | isa = PBXGroup;
386 | children = (
387 | 13B07FAE1A68108700A75B9A /* Bedtime */,
388 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
389 | 00E356EF1AD99517003FC87E /* BedtimeTests */,
390 | 83CBBA001A601CBA00E9B192 /* Products */,
391 | );
392 | indentWidth = 2;
393 | sourceTree = "";
394 | tabWidth = 2;
395 | };
396 | 83CBBA001A601CBA00E9B192 /* Products */ = {
397 | isa = PBXGroup;
398 | children = (
399 | 13B07F961A680F5B00A75B9A /* Bedtime.app */,
400 | 00E356EE1AD99517003FC87E /* BedtimeTests.xctest */,
401 | );
402 | name = Products;
403 | sourceTree = "";
404 | };
405 | CCD5374B1E13DD0100FFCA50 /* Products */ = {
406 | isa = PBXGroup;
407 | children = (
408 | CCD537701E13DD0200FFCA50 /* libRNSVG.a */,
409 | );
410 | name = Products;
411 | sourceTree = "";
412 | };
413 | /* End PBXGroup section */
414 |
415 | /* Begin PBXNativeTarget section */
416 | 00E356ED1AD99517003FC87E /* BedtimeTests */ = {
417 | isa = PBXNativeTarget;
418 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "BedtimeTests" */;
419 | buildPhases = (
420 | 00E356EA1AD99517003FC87E /* Sources */,
421 | 00E356EB1AD99517003FC87E /* Frameworks */,
422 | 00E356EC1AD99517003FC87E /* Resources */,
423 | );
424 | buildRules = (
425 | );
426 | dependencies = (
427 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
428 | );
429 | name = BedtimeTests;
430 | productName = BedtimeTests;
431 | productReference = 00E356EE1AD99517003FC87E /* BedtimeTests.xctest */;
432 | productType = "com.apple.product-type.bundle.unit-test";
433 | };
434 | 13B07F861A680F5B00A75B9A /* Bedtime */ = {
435 | isa = PBXNativeTarget;
436 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Bedtime" */;
437 | buildPhases = (
438 | 13B07F871A680F5B00A75B9A /* Sources */,
439 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
440 | 13B07F8E1A680F5B00A75B9A /* Resources */,
441 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
442 | );
443 | buildRules = (
444 | );
445 | dependencies = (
446 | );
447 | name = Bedtime;
448 | productName = "Hello World";
449 | productReference = 13B07F961A680F5B00A75B9A /* Bedtime.app */;
450 | productType = "com.apple.product-type.application";
451 | };
452 | /* End PBXNativeTarget section */
453 |
454 | /* Begin PBXProject section */
455 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
456 | isa = PBXProject;
457 | attributes = {
458 | LastUpgradeCheck = 610;
459 | ORGANIZATIONNAME = Facebook;
460 | TargetAttributes = {
461 | 00E356ED1AD99517003FC87E = {
462 | CreatedOnToolsVersion = 6.2;
463 | DevelopmentTeam = M4EP6H27EK;
464 | TestTargetID = 13B07F861A680F5B00A75B9A;
465 | };
466 | 13B07F861A680F5B00A75B9A = {
467 | DevelopmentTeam = M4EP6H27EK;
468 | };
469 | };
470 | };
471 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Bedtime" */;
472 | compatibilityVersion = "Xcode 3.2";
473 | developmentRegion = English;
474 | hasScannedForEncodings = 0;
475 | knownRegions = (
476 | en,
477 | Base,
478 | );
479 | mainGroup = 83CBB9F61A601CBA00E9B192;
480 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
481 | projectDirPath = "";
482 | projectReferences = (
483 | {
484 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
485 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
486 | },
487 | {
488 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */;
489 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
490 | },
491 | {
492 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
493 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
494 | },
495 | {
496 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
497 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
498 | },
499 | {
500 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
501 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
502 | },
503 | {
504 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
505 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
506 | },
507 | {
508 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
509 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
510 | },
511 | {
512 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
513 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
514 | },
515 | {
516 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
517 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
518 | },
519 | {
520 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
521 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
522 | },
523 | {
524 | ProductGroup = 146834001AC3E56700842450 /* Products */;
525 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
526 | },
527 | {
528 | ProductGroup = CCD5374B1E13DD0100FFCA50 /* Products */;
529 | ProjectRef = 91C2071448B149F5BCBF0D76 /* RNSVG.xcodeproj */;
530 | },
531 | );
532 | projectRoot = "";
533 | targets = (
534 | 13B07F861A680F5B00A75B9A /* Bedtime */,
535 | 00E356ED1AD99517003FC87E /* BedtimeTests */,
536 | );
537 | };
538 | /* End PBXProject section */
539 |
540 | /* Begin PBXReferenceProxy section */
541 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
542 | isa = PBXReferenceProxy;
543 | fileType = archive.ar;
544 | path = libRCTActionSheet.a;
545 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
546 | sourceTree = BUILT_PRODUCTS_DIR;
547 | };
548 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
549 | isa = PBXReferenceProxy;
550 | fileType = archive.ar;
551 | path = libRCTGeolocation.a;
552 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
553 | sourceTree = BUILT_PRODUCTS_DIR;
554 | };
555 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
556 | isa = PBXReferenceProxy;
557 | fileType = archive.ar;
558 | path = libRCTImage.a;
559 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
560 | sourceTree = BUILT_PRODUCTS_DIR;
561 | };
562 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
563 | isa = PBXReferenceProxy;
564 | fileType = archive.ar;
565 | path = libRCTNetwork.a;
566 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
567 | sourceTree = BUILT_PRODUCTS_DIR;
568 | };
569 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
570 | isa = PBXReferenceProxy;
571 | fileType = archive.ar;
572 | path = libRCTVibration.a;
573 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
574 | sourceTree = BUILT_PRODUCTS_DIR;
575 | };
576 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
577 | isa = PBXReferenceProxy;
578 | fileType = archive.ar;
579 | path = libRCTSettings.a;
580 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
581 | sourceTree = BUILT_PRODUCTS_DIR;
582 | };
583 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
584 | isa = PBXReferenceProxy;
585 | fileType = archive.ar;
586 | path = libRCTWebSocket.a;
587 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
588 | sourceTree = BUILT_PRODUCTS_DIR;
589 | };
590 | 146834041AC3E56700842450 /* libReact.a */ = {
591 | isa = PBXReferenceProxy;
592 | fileType = archive.ar;
593 | path = libReact.a;
594 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
595 | sourceTree = BUILT_PRODUCTS_DIR;
596 | };
597 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
598 | isa = PBXReferenceProxy;
599 | fileType = archive.ar;
600 | path = libRCTAnimation.a;
601 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
602 | sourceTree = BUILT_PRODUCTS_DIR;
603 | };
604 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = {
605 | isa = PBXReferenceProxy;
606 | fileType = archive.ar;
607 | path = "libRCTAnimation-tvOS.a";
608 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
609 | sourceTree = BUILT_PRODUCTS_DIR;
610 | };
611 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
612 | isa = PBXReferenceProxy;
613 | fileType = archive.ar;
614 | path = libRCTLinking.a;
615 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
616 | sourceTree = BUILT_PRODUCTS_DIR;
617 | };
618 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
619 | isa = PBXReferenceProxy;
620 | fileType = archive.ar;
621 | path = libRCTText.a;
622 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
623 | sourceTree = BUILT_PRODUCTS_DIR;
624 | };
625 | CCD537541E13DD0200FFCA50 /* libRCTImage-tvOS.a */ = {
626 | isa = PBXReferenceProxy;
627 | fileType = archive.ar;
628 | path = "libRCTImage-tvOS.a";
629 | remoteRef = CCD537531E13DD0200FFCA50 /* PBXContainerItemProxy */;
630 | sourceTree = BUILT_PRODUCTS_DIR;
631 | };
632 | CCD537581E13DD0200FFCA50 /* libRCTLinking-tvOS.a */ = {
633 | isa = PBXReferenceProxy;
634 | fileType = archive.ar;
635 | path = "libRCTLinking-tvOS.a";
636 | remoteRef = CCD537571E13DD0200FFCA50 /* PBXContainerItemProxy */;
637 | sourceTree = BUILT_PRODUCTS_DIR;
638 | };
639 | CCD5375C1E13DD0200FFCA50 /* libRCTNetwork-tvOS.a */ = {
640 | isa = PBXReferenceProxy;
641 | fileType = archive.ar;
642 | path = "libRCTNetwork-tvOS.a";
643 | remoteRef = CCD5375B1E13DD0200FFCA50 /* PBXContainerItemProxy */;
644 | sourceTree = BUILT_PRODUCTS_DIR;
645 | };
646 | CCD537601E13DD0200FFCA50 /* libRCTSettings-tvOS.a */ = {
647 | isa = PBXReferenceProxy;
648 | fileType = archive.ar;
649 | path = "libRCTSettings-tvOS.a";
650 | remoteRef = CCD5375F1E13DD0200FFCA50 /* PBXContainerItemProxy */;
651 | sourceTree = BUILT_PRODUCTS_DIR;
652 | };
653 | CCD537641E13DD0200FFCA50 /* libRCTText-tvOS.a */ = {
654 | isa = PBXReferenceProxy;
655 | fileType = archive.ar;
656 | path = "libRCTText-tvOS.a";
657 | remoteRef = CCD537631E13DD0200FFCA50 /* PBXContainerItemProxy */;
658 | sourceTree = BUILT_PRODUCTS_DIR;
659 | };
660 | CCD537691E13DD0200FFCA50 /* libRCTWebSocket-tvOS.a */ = {
661 | isa = PBXReferenceProxy;
662 | fileType = archive.ar;
663 | path = "libRCTWebSocket-tvOS.a";
664 | remoteRef = CCD537681E13DD0200FFCA50 /* PBXContainerItemProxy */;
665 | sourceTree = BUILT_PRODUCTS_DIR;
666 | };
667 | CCD5376D1E13DD0200FFCA50 /* libReact-tvOS.a */ = {
668 | isa = PBXReferenceProxy;
669 | fileType = archive.ar;
670 | path = "libReact-tvOS.a";
671 | remoteRef = CCD5376C1E13DD0200FFCA50 /* PBXContainerItemProxy */;
672 | sourceTree = BUILT_PRODUCTS_DIR;
673 | };
674 | CCD537701E13DD0200FFCA50 /* libRNSVG.a */ = {
675 | isa = PBXReferenceProxy;
676 | fileType = archive.ar;
677 | path = libRNSVG.a;
678 | remoteRef = CCD5376F1E13DD0200FFCA50 /* PBXContainerItemProxy */;
679 | sourceTree = BUILT_PRODUCTS_DIR;
680 | };
681 | /* End PBXReferenceProxy section */
682 |
683 | /* Begin PBXResourcesBuildPhase section */
684 | 00E356EC1AD99517003FC87E /* Resources */ = {
685 | isa = PBXResourcesBuildPhase;
686 | buildActionMask = 2147483647;
687 | files = (
688 | );
689 | runOnlyForDeploymentPostprocessing = 0;
690 | };
691 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
692 | isa = PBXResourcesBuildPhase;
693 | buildActionMask = 2147483647;
694 | files = (
695 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
696 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
697 | );
698 | runOnlyForDeploymentPostprocessing = 0;
699 | };
700 | /* End PBXResourcesBuildPhase section */
701 |
702 | /* Begin PBXShellScriptBuildPhase section */
703 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
704 | isa = PBXShellScriptBuildPhase;
705 | buildActionMask = 2147483647;
706 | files = (
707 | );
708 | inputPaths = (
709 | );
710 | name = "Bundle React Native code and images";
711 | outputPaths = (
712 | );
713 | runOnlyForDeploymentPostprocessing = 0;
714 | shellPath = /bin/sh;
715 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
716 | };
717 | /* End PBXShellScriptBuildPhase section */
718 |
719 | /* Begin PBXSourcesBuildPhase section */
720 | 00E356EA1AD99517003FC87E /* Sources */ = {
721 | isa = PBXSourcesBuildPhase;
722 | buildActionMask = 2147483647;
723 | files = (
724 | 00E356F31AD99517003FC87E /* BedtimeTests.m in Sources */,
725 | );
726 | runOnlyForDeploymentPostprocessing = 0;
727 | };
728 | 13B07F871A680F5B00A75B9A /* Sources */ = {
729 | isa = PBXSourcesBuildPhase;
730 | buildActionMask = 2147483647;
731 | files = (
732 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
733 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
734 | );
735 | runOnlyForDeploymentPostprocessing = 0;
736 | };
737 | /* End PBXSourcesBuildPhase section */
738 |
739 | /* Begin PBXTargetDependency section */
740 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
741 | isa = PBXTargetDependency;
742 | target = 13B07F861A680F5B00A75B9A /* Bedtime */;
743 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
744 | };
745 | /* End PBXTargetDependency section */
746 |
747 | /* Begin PBXVariantGroup section */
748 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
749 | isa = PBXVariantGroup;
750 | children = (
751 | 13B07FB21A68108700A75B9A /* Base */,
752 | );
753 | name = LaunchScreen.xib;
754 | path = Bedtime;
755 | sourceTree = "";
756 | };
757 | /* End PBXVariantGroup section */
758 |
759 | /* Begin XCBuildConfiguration section */
760 | 00E356F61AD99517003FC87E /* Debug */ = {
761 | isa = XCBuildConfiguration;
762 | buildSettings = {
763 | BUNDLE_LOADER = "$(TEST_HOST)";
764 | DEVELOPMENT_TEAM = M4EP6H27EK;
765 | GCC_PREPROCESSOR_DEFINITIONS = (
766 | "DEBUG=1",
767 | "$(inherited)",
768 | );
769 | INFOPLIST_FILE = BedtimeTests/Info.plist;
770 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
771 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
772 | LIBRARY_SEARCH_PATHS = (
773 | "$(inherited)",
774 | "\"$(SRCROOT)/$(TARGET_NAME)\"",
775 | );
776 | PRODUCT_NAME = "$(TARGET_NAME)";
777 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Bedtime.app/Bedtime";
778 | };
779 | name = Debug;
780 | };
781 | 00E356F71AD99517003FC87E /* Release */ = {
782 | isa = XCBuildConfiguration;
783 | buildSettings = {
784 | BUNDLE_LOADER = "$(TEST_HOST)";
785 | COPY_PHASE_STRIP = NO;
786 | DEVELOPMENT_TEAM = M4EP6H27EK;
787 | INFOPLIST_FILE = BedtimeTests/Info.plist;
788 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
789 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
790 | LIBRARY_SEARCH_PATHS = (
791 | "$(inherited)",
792 | "\"$(SRCROOT)/$(TARGET_NAME)\"",
793 | );
794 | PRODUCT_NAME = "$(TARGET_NAME)";
795 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Bedtime.app/Bedtime";
796 | };
797 | name = Release;
798 | };
799 | 13B07F941A680F5B00A75B9A /* Debug */ = {
800 | isa = XCBuildConfiguration;
801 | buildSettings = {
802 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
803 | CURRENT_PROJECT_VERSION = 1;
804 | DEAD_CODE_STRIPPING = NO;
805 | DEVELOPMENT_TEAM = M4EP6H27EK;
806 | INFOPLIST_FILE = Bedtime/Info.plist;
807 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
808 | OTHER_LDFLAGS = (
809 | "$(inherited)",
810 | "-ObjC",
811 | "-lc++",
812 | );
813 | PRODUCT_NAME = Bedtime;
814 | VERSIONING_SYSTEM = "apple-generic";
815 | };
816 | name = Debug;
817 | };
818 | 13B07F951A680F5B00A75B9A /* Release */ = {
819 | isa = XCBuildConfiguration;
820 | buildSettings = {
821 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
822 | CURRENT_PROJECT_VERSION = 1;
823 | DEVELOPMENT_TEAM = M4EP6H27EK;
824 | INFOPLIST_FILE = Bedtime/Info.plist;
825 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
826 | OTHER_LDFLAGS = (
827 | "$(inherited)",
828 | "-ObjC",
829 | "-lc++",
830 | );
831 | PRODUCT_NAME = Bedtime;
832 | VERSIONING_SYSTEM = "apple-generic";
833 | };
834 | name = Release;
835 | };
836 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
837 | isa = XCBuildConfiguration;
838 | buildSettings = {
839 | ALWAYS_SEARCH_USER_PATHS = NO;
840 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
841 | CLANG_CXX_LIBRARY = "libc++";
842 | CLANG_ENABLE_MODULES = YES;
843 | CLANG_ENABLE_OBJC_ARC = YES;
844 | CLANG_WARN_BOOL_CONVERSION = YES;
845 | CLANG_WARN_CONSTANT_CONVERSION = YES;
846 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
847 | CLANG_WARN_EMPTY_BODY = YES;
848 | CLANG_WARN_ENUM_CONVERSION = YES;
849 | CLANG_WARN_INT_CONVERSION = YES;
850 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
851 | CLANG_WARN_UNREACHABLE_CODE = YES;
852 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
853 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
854 | COPY_PHASE_STRIP = NO;
855 | ENABLE_STRICT_OBJC_MSGSEND = YES;
856 | GCC_C_LANGUAGE_STANDARD = gnu99;
857 | GCC_DYNAMIC_NO_PIC = NO;
858 | GCC_OPTIMIZATION_LEVEL = 0;
859 | GCC_PREPROCESSOR_DEFINITIONS = (
860 | "DEBUG=1",
861 | "$(inherited)",
862 | );
863 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
864 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
865 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
866 | GCC_WARN_UNDECLARED_SELECTOR = YES;
867 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
868 | GCC_WARN_UNUSED_FUNCTION = YES;
869 | GCC_WARN_UNUSED_VARIABLE = YES;
870 | HEADER_SEARCH_PATHS = (
871 | "$(inherited)",
872 | "$(SRCROOT)/../node_modules/react-native/React/**",
873 | "$(SRCROOT)/../node_modules/react-native/ReactCommon/**",
874 | "$(SRCROOT)/../node_modules/react-native-svg/ios/**",
875 | );
876 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
877 | MTL_ENABLE_DEBUG_INFO = YES;
878 | ONLY_ACTIVE_ARCH = YES;
879 | SDKROOT = iphoneos;
880 | };
881 | name = Debug;
882 | };
883 | 83CBBA211A601CBA00E9B192 /* Release */ = {
884 | isa = XCBuildConfiguration;
885 | buildSettings = {
886 | ALWAYS_SEARCH_USER_PATHS = NO;
887 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
888 | CLANG_CXX_LIBRARY = "libc++";
889 | CLANG_ENABLE_MODULES = YES;
890 | CLANG_ENABLE_OBJC_ARC = YES;
891 | CLANG_WARN_BOOL_CONVERSION = YES;
892 | CLANG_WARN_CONSTANT_CONVERSION = YES;
893 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
894 | CLANG_WARN_EMPTY_BODY = YES;
895 | CLANG_WARN_ENUM_CONVERSION = YES;
896 | CLANG_WARN_INT_CONVERSION = YES;
897 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
898 | CLANG_WARN_UNREACHABLE_CODE = YES;
899 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
900 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
901 | COPY_PHASE_STRIP = YES;
902 | ENABLE_NS_ASSERTIONS = NO;
903 | ENABLE_STRICT_OBJC_MSGSEND = YES;
904 | GCC_C_LANGUAGE_STANDARD = gnu99;
905 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
906 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
907 | GCC_WARN_UNDECLARED_SELECTOR = YES;
908 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
909 | GCC_WARN_UNUSED_FUNCTION = YES;
910 | GCC_WARN_UNUSED_VARIABLE = YES;
911 | HEADER_SEARCH_PATHS = (
912 | "$(inherited)",
913 | "$(SRCROOT)/../node_modules/react-native/React/**",
914 | "$(SRCROOT)/../node_modules/react-native/ReactCommon/**",
915 | "$(SRCROOT)/../node_modules/react-native-svg/ios/**",
916 | );
917 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
918 | MTL_ENABLE_DEBUG_INFO = NO;
919 | SDKROOT = iphoneos;
920 | VALIDATE_PRODUCT = YES;
921 | };
922 | name = Release;
923 | };
924 | /* End XCBuildConfiguration section */
925 |
926 | /* Begin XCConfigurationList section */
927 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "BedtimeTests" */ = {
928 | isa = XCConfigurationList;
929 | buildConfigurations = (
930 | 00E356F61AD99517003FC87E /* Debug */,
931 | 00E356F71AD99517003FC87E /* Release */,
932 | );
933 | defaultConfigurationIsVisible = 0;
934 | defaultConfigurationName = Release;
935 | };
936 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Bedtime" */ = {
937 | isa = XCConfigurationList;
938 | buildConfigurations = (
939 | 13B07F941A680F5B00A75B9A /* Debug */,
940 | 13B07F951A680F5B00A75B9A /* Release */,
941 | );
942 | defaultConfigurationIsVisible = 0;
943 | defaultConfigurationName = Release;
944 | };
945 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Bedtime" */ = {
946 | isa = XCConfigurationList;
947 | buildConfigurations = (
948 | 83CBBA201A601CBA00E9B192 /* Debug */,
949 | 83CBBA211A601CBA00E9B192 /* Release */,
950 | );
951 | defaultConfigurationIsVisible = 0;
952 | defaultConfigurationName = Release;
953 | };
954 | /* End XCConfigurationList section */
955 | };
956 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
957 | }
958 |
--------------------------------------------------------------------------------