├── .watchmanconfig
├── .gitattributes
├── .babelrc
├── android
├── settings.gradle
├── 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
│ │ │ │ └── ycool
│ │ │ │ ├── MainActivity.java
│ │ │ │ └── MainApplication.java
│ │ │ └── AndroidManifest.xml
│ ├── BUCK
│ ├── proguard-rules.pro
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── keystores
│ ├── debug.keystore.properties
│ └── BUCK
├── build.gradle
├── gradle.properties
├── gradlew.bat
└── gradlew
├── app
├── imgs
│ ├── 2.png
│ ├── up.png
│ ├── back.png
│ ├── clock.png
│ ├── down.png
│ ├── test.jpg
│ ├── person.png
│ ├── search.png
│ ├── search_1.png
│ ├── tabbar1.png
│ └── directory.png
├── styles.js
├── reducers
│ ├── bookshelves.js
│ ├── alert.js
│ ├── index.js
│ ├── search.js
│ ├── reader.js
│ └── navigation.js
├── lib
│ ├── setAuthorizationToken.js
│ ├── createReducer.js
│ ├── api.js
│ └── request.js
├── actions
│ ├── alert.js
│ ├── index.js
│ ├── authActions.js
│ ├── types.js
│ ├── navigation.js
│ ├── search.js
│ ├── bookshelves.js
│ └── reader.js
├── containers
│ ├── ApplicationTabs
│ │ └── index.ios.js
│ ├── About.js
│ ├── AppContainer.js
│ ├── Alert.js
│ ├── Directory.js
│ ├── Detail.js
│ ├── Novel.js
│ ├── Search.js
│ └── Reader.js
└── util.js
├── ios
├── bundle
│ ├── assets
│ │ └── app
│ │ │ └── imgs
│ │ │ ├── up.png
│ │ │ ├── back.png
│ │ │ ├── clock.png
│ │ │ ├── down.png
│ │ │ ├── person.png
│ │ │ ├── search.png
│ │ │ ├── tabbar1.png
│ │ │ ├── directory.png
│ │ │ └── search_1.png
│ └── index.ios.jsbundle.meta
├── YCool
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── AppDelegate.m
│ ├── Info.plist
│ └── Base.lproj
│ │ └── LaunchScreen.xib
├── YCoolTests
│ ├── Info.plist
│ └── YCoolTests.m
├── YCool-tvOSTests
│ └── Info.plist
├── YCool-tvOS
│ └── Info.plist
└── YCool.xcodeproj
│ ├── xcshareddata
│ └── xcschemes
│ │ ├── YCool.xcscheme
│ │ └── YCool-tvOS.xcscheme
│ └── project.pbxproj
├── .buckconfig
├── __tests__
├── index.ios.js
└── index.android.js
├── package.json
├── .gitignore
├── index.ios.js
├── index.android.js
├── .flowconfig
└── README.md
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react-native"]
3 | }
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'YCool'
2 |
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/app/imgs/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/app/imgs/2.png
--------------------------------------------------------------------------------
/app/imgs/up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/app/imgs/up.png
--------------------------------------------------------------------------------
/app/imgs/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/app/imgs/back.png
--------------------------------------------------------------------------------
/app/imgs/clock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/app/imgs/clock.png
--------------------------------------------------------------------------------
/app/imgs/down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/app/imgs/down.png
--------------------------------------------------------------------------------
/app/imgs/test.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/app/imgs/test.jpg
--------------------------------------------------------------------------------
/app/imgs/person.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/app/imgs/person.png
--------------------------------------------------------------------------------
/app/imgs/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/app/imgs/search.png
--------------------------------------------------------------------------------
/app/imgs/search_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/app/imgs/search_1.png
--------------------------------------------------------------------------------
/app/imgs/tabbar1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/app/imgs/tabbar1.png
--------------------------------------------------------------------------------
/app/imgs/directory.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/app/imgs/directory.png
--------------------------------------------------------------------------------
/ios/bundle/assets/app/imgs/up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/ios/bundle/assets/app/imgs/up.png
--------------------------------------------------------------------------------
/ios/bundle/assets/app/imgs/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/ios/bundle/assets/app/imgs/back.png
--------------------------------------------------------------------------------
/ios/bundle/assets/app/imgs/clock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/ios/bundle/assets/app/imgs/clock.png
--------------------------------------------------------------------------------
/ios/bundle/assets/app/imgs/down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/ios/bundle/assets/app/imgs/down.png
--------------------------------------------------------------------------------
/ios/bundle/index.ios.jsbundle.meta:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/ios/bundle/index.ios.jsbundle.meta
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | YCool
3 |
4 |
--------------------------------------------------------------------------------
/ios/bundle/assets/app/imgs/person.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/ios/bundle/assets/app/imgs/person.png
--------------------------------------------------------------------------------
/ios/bundle/assets/app/imgs/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/ios/bundle/assets/app/imgs/search.png
--------------------------------------------------------------------------------
/ios/bundle/assets/app/imgs/tabbar1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/ios/bundle/assets/app/imgs/tabbar1.png
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/ios/bundle/assets/app/imgs/directory.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/ios/bundle/assets/app/imgs/directory.png
--------------------------------------------------------------------------------
/ios/bundle/assets/app/imgs/search_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/ios/bundle/assets/app/imgs/search_1.png
--------------------------------------------------------------------------------
/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dlyt/YCool/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = 'debug',
3 | store = 'debug.keystore',
4 | properties = 'debug.keystore.properties',
5 | visibility = [
6 | 'PUBLIC',
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/app/styles.js:
--------------------------------------------------------------------------------
1 | export const appStyle = {
2 | resultText: {
3 | backgroundColor: '#000',
4 | color: '#FFF',
5 | height: 20,
6 | },
7 | resultImage: {
8 | height: 150,
9 | }
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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.14.1-all.zip
6 |
--------------------------------------------------------------------------------
/app/reducers/bookshelves.js:
--------------------------------------------------------------------------------
1 | import createReducer from '../lib/createReducer'
2 | import * as types from '../actions/types'
3 |
4 | export const searchedBookshelves = createReducer({}, {
5 | [types.SET_SEARCHED_BOOKSHELVES](state, action) {
6 | return action.bookshelf
7 | },
8 | })
9 |
--------------------------------------------------------------------------------
/app/reducers/alert.js:
--------------------------------------------------------------------------------
1 | import createReducer from '../lib/createReducer'
2 | import * as types from '../actions/types'
3 |
4 | export const showAlertNovelOptions = createReducer({}, {
5 | [types.SET_ALERT_READER_OPTIONS](state, action) {
6 | return action.show
7 | },
8 |
9 | });
10 |
--------------------------------------------------------------------------------
/app/lib/setAuthorizationToken.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | export default function setAuthorizationToken(token) {
4 | if (token) {
5 | axios.defaults.headers.common['Authorization'] = `Bearer ${token}`
6 | } else {
7 | delete axios.defaults.headers.common['Authorization']
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/app/lib/createReducer.js:
--------------------------------------------------------------------------------
1 | export default function createReducer(initialState, handlers) {
2 | return function reducer(state = initialState, action) {
3 | if (handlers.hasOwnProperty(action.type)) {
4 | return handlers[action.type](state, action)
5 | } else {
6 | return state
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/__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 |
--------------------------------------------------------------------------------
/__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 |
--------------------------------------------------------------------------------
/app/actions/alert.js:
--------------------------------------------------------------------------------
1 | import { AsyncStorage } from 'react-native';
2 | import * as types from './types'
3 |
4 |
5 | export function alertReaderOptions() {
6 |
7 | return (dispatch, getState) => {
8 | dispatch(setAlertReaderOptions({show: true}));
9 | }
10 | }
11 |
12 | export function setAlertReaderOptions({ show }) {
13 | return {
14 | type: types.SET_ALERT_READER_OPTIONS,
15 | show,
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux'
2 | import * as bookshelvesReducer from './bookshelves'
3 | import * as NavigationReducer from './navigation'
4 | import * as ReaderReducer from './reader'
5 | import * as SearchReducer from './search'
6 |
7 | export default combineReducers(Object.assign(
8 | bookshelvesReducer,
9 | NavigationReducer,
10 | ReaderReducer,
11 | SearchReducer,
12 | ))
13 |
--------------------------------------------------------------------------------
/app/actions/index.js:
--------------------------------------------------------------------------------
1 | import * as BookshelfActions from './bookshelves'
2 | import * as NavigationActions from './navigation'
3 | import * as ReaderActions from './reader'
4 | import * as SearchActions from './search'
5 | import * as AuthActions from './authActions'
6 |
7 | export const ActionCreators = Object.assign({},
8 | AuthActions,
9 | ReaderActions,
10 | SearchActions,
11 | BookshelfActions,
12 | NavigationActions,
13 | )
14 |
15 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/ycool/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.ycool;
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 "YCool";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ios/YCool/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 |
--------------------------------------------------------------------------------
/ios/YCool/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 |
--------------------------------------------------------------------------------
/app/reducers/search.js:
--------------------------------------------------------------------------------
1 | import createReducer from '../lib/createReducer'
2 | import * as types from '../actions/types'
3 |
4 | export const searchedNovelName = createReducer({}, {
5 | [types.SET_SEARCH_NOVEL_WORDS](state, action) {
6 | return action.novelName
7 | },
8 | });
9 |
10 | export const searchedNovelInfo = createReducer({}, {
11 | [types.SET_SEARCH_NOVEL_INFO](state, action) {
12 | return action.novelInfo
13 | },
14 | });
15 |
16 | export const searchedNovelList = createReducer({}, {
17 | [types.SET_SEARCH_NOVEL_LIST](state, action) {
18 | return action.name
19 | },
20 | });
21 |
22 | export const searchedImg = createReducer({}, {
23 | [types.SEND_IMG](state, action) {
24 | return action.imgUrl
25 | },
26 | });
27 |
--------------------------------------------------------------------------------
/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:2.2.3'
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 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "YCool",
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 | "axios": "^0.16.1",
11 | "react": "^15.4.2",
12 | "react-native": "^0.42.0",
13 | "react-native-device-info": "^0.10.1",
14 | "react-native-swipeout": "^2.0.12",
15 | "react-redux": "^5.0.3",
16 | "redux": "^3.6.0",
17 | "redux-logger": "^2.8.2",
18 | "redux-thunk": "^2.2.0"
19 | },
20 | "devDependencies": {
21 | "babel-jest": "19.0.0",
22 | "babel-preset-react-native": "1.9.1",
23 | "jest": "19.0.2",
24 | "react-test-renderer": "~15.4.1"
25 | },
26 | "jest": {
27 | "preset": "react-native"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/reducers/reader.js:
--------------------------------------------------------------------------------
1 | import createReducer from '../lib/createReducer'
2 | import * as types from '../actions/types'
3 |
4 | export const chapterInfo = createReducer({}, {
5 | [types.SET_CHAPTER_DETAIL](state, action) {
6 | return action.data.response
7 | },
8 | [types.SET_NEXT_CHAPTER_DETAIL](state, action) {
9 | return action.chapterContent
10 | },
11 | [types.SET_LAST_CHAPTER_DETAIL](state, action) {
12 | return action.chapterContent
13 | },
14 | });
15 |
16 | export const directory = createReducer({}, {
17 | [types.SET_DIRECTORY](state, action) {
18 | return action.results
19 | },
20 | });
21 |
22 | export const firstRenderChapters = createReducer({}, {
23 | [types.GET_FIRST_RENDER_CHAPTER](state, action) {
24 | return action.firstRenderChapters
25 | },
26 | });
27 |
--------------------------------------------------------------------------------
/ios/YCoolTests/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 |
--------------------------------------------------------------------------------
/ios/YCool-tvOSTests/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 |
--------------------------------------------------------------------------------
/app/actions/authActions.js:
--------------------------------------------------------------------------------
1 | // import axios from 'axios'
2 | // import * as types from './types'
3 | // import { AsyncStorage } from 'react-native'
4 | // import DeviceInfo from 'react-native-device-info'
5 | // import setAuthorizationToken from '../lib/setAuthorizationToken'
6 |
7 | // export function getToken() {
8 | // const uuid = DeviceInfo.getUniqueID()
9 | // const json = { user: { uuid: uuid } }
10 | // return dispatch => {
11 | // AsyncStorage.getItem(`userToken`).then(
12 | // (res) => {
13 | // if (!res) {
14 | // axios.post('/users/tourists', json)
15 | // .then((res) => {
16 | // setAuthorizationToken(res.token)
17 | // AsyncStorage.setItem(`userToken`, res.token)
18 | // })
19 | // }
20 | // else{
21 | // setAuthorizationToken(res)
22 | // }
23 | // }
24 | // )
25 | // }
26 | // }
27 |
28 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/YCool/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | }
43 | ],
44 | "info" : {
45 | "version" : 1,
46 | "author" : "xcode"
47 | }
48 | }
--------------------------------------------------------------------------------
/.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 | yarn-error.log
38 |
39 | # BUCK
40 | buck-out/
41 | \.buckd/
42 | *.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
50 |
51 | fastlane/report.xml
52 | fastlane/Preview.html
53 | fastlane/screenshots
54 |
--------------------------------------------------------------------------------
/app/actions/types.js:
--------------------------------------------------------------------------------
1 | // Bookshelf
2 | export const SET_SEARCHED_BOOKSHELVES = 'SET_SEARCHED_BOOKSHELVES'
3 |
4 | // Navigation
5 | export const SET_TAB = 'SET_TAB'
6 | export const NAV_RESET = 'NAV_RESET'
7 |
8 | export const NAVIGATION_FORWARD = 'NAVIGATION_FORWARD'
9 | export const NAV_JUMP_TO_KEY = 'NAV_JUMP_TO_KEY'
10 | export const NAVIGATION_BACK = 'NAVIGATION_BACK'
11 |
12 | //Alert
13 | export const SET_ALERT_READER_OPTIONS = 'SET_ALERT_READER_OPTIONS'
14 |
15 | //Reader
16 | export const SET_DIRECTORY = 'SET_DIRECTORY'
17 | export const SET_CHAPTER_DETAIL = 'SET_CHAPTER_DETAIL'
18 | export const SET_NEXT_CHAPTER_DETAIL = 'SET_NEXT_CHAPTER_DETAIL'
19 | export const SET_LAST_CHAPTER_DETAIL = 'SET_LAST_CHAPTER_DETAIL'
20 | export const GET_FIRST_RENDER_CHAPTER = 'GET_FIRST_RENDER_CHAPTER'
21 |
22 | //Search
23 | export const SET_SEARCH_NOVEL_LIST = 'SET_SEARCH_NOVEL_LIST'
24 | export const SET_SEARCH_NOVEL_WORDS = 'SET_SEARCH_NOVEL_WORDS'
25 | export const SET_SEARCH_NOVEL_INFO = 'SET_SEARCH_NOVEL_INFO'
26 | export const SEND_IMG = 'SEND_IMG'
27 |
--------------------------------------------------------------------------------
/index.ios.js:
--------------------------------------------------------------------------------
1 | import reducer from './app/reducers'
2 | import axios from 'axios'
3 | import { Provider } from 'react-redux'
4 | import createLogger from 'redux-logger'
5 | import React, { Component } from 'react'
6 | import thunkMiddleware from 'redux-thunk'
7 | import { AppRegistry, AsyncStorage } from 'react-native'
8 | import AppContainer from './app/containers/AppContainer'
9 | import setAuthorizationToken from './app/lib/setAuthorizationToken'
10 | import { createStore, applyMiddleware, combineReducers, compose} from 'redux'
11 |
12 | const loggerMiddleware = createLogger()
13 | function configureStore(initialState) {
14 | const enhancer = compose(
15 | applyMiddleware(
16 | thunkMiddleware,
17 | loggerMiddleware
18 | ),
19 | )
20 | return createStore(reducer, initialState, enhancer)
21 | }
22 |
23 | const store = configureStore({})
24 |
25 | axios.defaults.baseURL = 'http://localhost:5000'
26 |
27 | const App = () => (
28 |
29 |
30 |
31 | )
32 |
33 | AppRegistry.registerComponent('YCool', () => App)
34 |
--------------------------------------------------------------------------------
/app/lib/api.js:
--------------------------------------------------------------------------------
1 | class Api {
2 | static headers() {
3 | return {
4 | 'Accept': 'application/json',
5 | 'Content-Type': 'application/json',
6 | 'dataType': 'json',
7 | }
8 | }
9 |
10 | static get(route) {
11 | return this.xhr(route, null, 'GET');
12 | }
13 |
14 | static put(route, params) {
15 | return this.xhr(route, params, 'PUT')
16 | }
17 |
18 | static post(route, params) {
19 | return this.xhr(route, params, 'POST')
20 | }
21 |
22 | static delete(route, params) {
23 | return this.xhr(route, params, 'DELETE')
24 | }
25 |
26 | static xhr(route, params, verb) {
27 | const host = 'http://www.recipepuppy.com'
28 | const url = `${host}${route}`
29 | let options = Object.assign({ method: verb }, params ? { body: JSON.stringify(params) } : null );
30 | options.headers = Api.headers()
31 | return fetch(url, options).then( resp => {
32 | let json = resp.json();
33 | if (resp.ok) {
34 | return json
35 | }
36 | return json.then(err => {throw err});
37 | }).then( json => json.results );
38 | }
39 | }
40 | export default Api
41 |
--------------------------------------------------------------------------------
/app/actions/navigation.js:
--------------------------------------------------------------------------------
1 | import * as types from './types'
2 | import ReactNative from 'react-native'
3 | const { NavigationExperimental } = ReactNative
4 | const { jumpToIndex } = NavigationExperimental.StateUtils;
5 |
6 | export function setTab(tabIndex) {
7 | return (dispatch, getState) => {
8 | const { tabs } = getState()
9 | dispatch(Object.assign({ type: types.SET_TAB }, jumpToIndex(tabs, tabIndex)));
10 | }
11 | }
12 |
13 | export function navigate(action) {
14 | return (dispatch, getState) => {
15 | dispatch(navigateForward(action))
16 | }
17 | }
18 |
19 | export function navigateJumpToKey(key) {
20 | return {
21 | type: types.NAV_JUMP_TO_KEY,
22 | key
23 | }
24 | }
25 |
26 | function navigateForward(state) {
27 | return {
28 | type: types.NAVIGATION_FORWARD,
29 | state
30 | }
31 | }
32 |
33 | export function navigateBack(state) {
34 | return (dispatch, getState) => {
35 | dispatch({
36 | type: types.NAVIGATION_BACK,
37 | state
38 | })
39 | }
40 | }
41 |
42 | export function navigateReset(routes, index) {
43 | return {
44 | type: types.NAV_RESET,
45 | index,
46 | routes
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/ycool/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.ycool;
2 |
3 | import android.app.Application;
4 |
5 | import com.facebook.react.ReactApplication;
6 | import com.facebook.react.ReactNativeHost;
7 | import com.facebook.react.ReactPackage;
8 | import com.facebook.react.shell.MainReactPackage;
9 | import com.facebook.soloader.SoLoader;
10 |
11 | import java.util.Arrays;
12 | import java.util.List;
13 |
14 | public class MainApplication extends Application implements ReactApplication {
15 |
16 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
17 | @Override
18 | public boolean getUseDeveloperSupport() {
19 | return BuildConfig.DEBUG;
20 | }
21 |
22 | @Override
23 | protected List getPackages() {
24 | return Arrays.asList(
25 | new MainReactPackage()
26 | );
27 | }
28 | };
29 |
30 | @Override
31 | public ReactNativeHost getReactNativeHost() {
32 | return mReactNativeHost;
33 | }
34 |
35 | @Override
36 | public void onCreate() {
37 | super.onCreate();
38 | SoLoader.init(this, /* native exopackage */ false);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
19 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/index.android.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | * @flow
5 | */
6 |
7 | import React, { Component } from 'react';
8 | import {
9 | AppRegistry,
10 | StyleSheet,
11 | Text,
12 | View
13 | } from 'react-native';
14 |
15 | export default class YCool extends Component {
16 | render() {
17 | return (
18 |
19 |
20 | Welcome to React Native!
21 |
22 |
23 | To get started, edit index.android.js
24 |
25 |
26 | Double tap R on your keyboard to reload,{'\n'}
27 | Shake or press menu button for dev menu
28 |
29 |
30 | );
31 | }
32 | }
33 |
34 | const styles = StyleSheet.create({
35 | container: {
36 | flex: 1,
37 | justifyContent: 'center',
38 | alignItems: 'center',
39 | backgroundColor: '#F5FCFF',
40 | },
41 | welcome: {
42 | fontSize: 20,
43 | textAlign: 'center',
44 | margin: 10,
45 | },
46 | instructions: {
47 | textAlign: 'center',
48 | color: '#333333',
49 | marginBottom: 5,
50 | },
51 | });
52 |
53 | AppRegistry.registerComponent('YCool', () => YCool);
54 |
--------------------------------------------------------------------------------
/.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 | emoji=true
26 |
27 | module.system=haste
28 |
29 | experimental.strict_type_args=true
30 |
31 | munge_underscores=true
32 |
33 | 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'
34 |
35 | suppress_type=$FlowIssue
36 | suppress_type=$FlowFixMe
37 | suppress_type=$FixMe
38 |
39 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-8]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-8]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
41 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
42 |
43 | unsafe.enable_getters_and_setters=true
44 |
45 | [version]
46 | ^0.38.0
47 |
--------------------------------------------------------------------------------
/ios/YCool/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
13 | #import
14 |
15 | @implementation AppDelegate
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
18 | {
19 | NSURL *jsCodeLocation;
20 | // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"index.ios" withExtension:@"jsbundle"];
21 |
22 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
23 |
24 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
25 | moduleName:@"YCool"
26 | initialProperties:nil
27 | launchOptions:launchOptions];
28 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
29 |
30 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
31 | UIViewController *rootViewController = [UIViewController new];
32 | rootViewController.view = rootView;
33 | self.window.rootViewController = rootViewController;
34 | [self.window makeKeyAndVisible];
35 | return YES;
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/app/reducers/navigation.js:
--------------------------------------------------------------------------------
1 | import ReactNative from 'react-native';
2 | const { NavigationExperimental, StatusBar} = ReactNative;
3 | import * as types from '../actions/types'
4 | import createReducer from '../lib/createReducer'
5 | import ApplicationTabs from '../containers/ApplicationTabs'
6 | import Reader from '../containers/Reader'
7 | import Search from '../containers/Search'
8 | import Directory from '../containers/Directory'
9 |
10 | const {
11 | CardStack: NavigationCardStack,
12 | StateUtils: NavigationStateUtils
13 | } = NavigationExperimental
14 |
15 | const allTabs = [
16 | (lastRoute) => lastRoute || Object.assign({ key: 'home', index: 0 }),
17 | (lastRoute) => lastRoute || Object.assign({ key: 'about', index: 1 }),
18 | ];
19 |
20 | export const tabs = createReducer({ index: 0, key: 'home', routes: allTabs }, {
21 | [types.SET_TAB](state, action) {
22 | return Object.assign({}, state, allTabs[action.index]());
23 | }
24 | });
25 |
26 | export const navigationState = createReducer({ index: 0,
27 | routes: [
28 | { key: 'ApplicationTabs' },
29 | ],
30 | }, {
31 |
32 | [types.NAVIGATION_FORWARD](state, action) {
33 | // if (state.routes[state.index].key === (action.state && action.state.key)) return state
34 | return NavigationStateUtils.push(state, action.state);
35 | },
36 |
37 |
38 | [types.NAVIGATION_BACK](state, action) {
39 | return NavigationStateUtils.pop(state,action);
40 | },
41 |
42 | [types.NAV_RESET](state, action) {
43 | return action
44 | },
45 |
46 | });
47 |
48 | export const navigationParams = createReducer({ }, {
49 | [types.NAVIGATION_FORWARD](state, action) {
50 | return action.state;
51 | },
52 | [types.NAVIGATION_BACK](state, action) {
53 | return action.state;
54 | },
55 | });
56 |
--------------------------------------------------------------------------------
/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.ycool',
50 | )
51 |
52 | android_resource(
53 | name = 'res',
54 | res = 'src/main/res',
55 | package = 'com.ycool',
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 |
--------------------------------------------------------------------------------
/ios/YCool/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 | NSAppTransportSecurity
26 |
27 | NSAllowsArbitraryLoads
28 |
29 | NSExceptionDomains
30 |
31 | 121.41.83.126
32 |
33 | NSExceptionAllowsInsecureHTTPLoads
34 |
35 |
36 |
37 |
38 | NSLocationWhenInUseUsageDescription
39 |
40 | UILaunchStoryboardName
41 | LaunchScreen
42 | UIRequiredDeviceCapabilities
43 |
44 | armv7
45 |
46 | UISupportedInterfaceOrientations
47 |
48 | UIInterfaceOrientationPortrait
49 | UIInterfaceOrientationLandscapeLeft
50 | UIInterfaceOrientationLandscapeRight
51 |
52 | UIViewControllerBasedStatusBarAppearance
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/app/actions/search.js:
--------------------------------------------------------------------------------
1 | import { AsyncStorage } from 'react-native'
2 | import * as types from './types'
3 | import axios from 'axios'
4 |
5 | export function searchNovelWords(text) {
6 | return (dispatch, getState) => {
7 | axios.get(`/novels/search/zh?keyword=${text}`)
8 | .then(
9 | (res) => dispatch(setSearchNovelWords({novelName: res.data.response.r}))
10 | )
11 | }
12 | }
13 |
14 | export function setSearchNovelWords({ novelName }) {
15 | return {
16 | type: types.SET_SEARCH_NOVEL_WORDS,
17 | novelName,
18 | }
19 | }
20 |
21 | export function searchNovelList(name) {
22 | return (dispatch, getState) => {
23 | axios.get(`/novels/search/bqk?name=${name}`)
24 | .then(
25 | (res) => dispatch(setSearchNovelList({name: res.data.response}))
26 | )
27 | }
28 | }
29 |
30 | export function setSearchNovelList({ name }) {
31 | return {
32 | type: types.SET_SEARCH_NOVEL_LIST,
33 | name,
34 | }
35 | }
36 |
37 | export function searchNovelInfo(name, url) {
38 | const json = {
39 | novel: {
40 | name: name,
41 | url: url
42 | }
43 | }
44 | return (dispatch, getState) => {
45 | axios.post('/novels/acquire', json).then(
46 | (res) => dispatch(setSearchNovelInfo({novelInfo: res.data.novelInfo}))
47 | )
48 | }
49 | }
50 |
51 | export function setSearchNovelInfo({ novelInfo }) {
52 | return {
53 | type: types.SET_SEARCH_NOVEL_INFO,
54 | novelInfo,
55 | }
56 | }
57 |
58 | export function searchImg(type) {
59 | return (dispatch, getState) => {
60 | axios.get('/test/img', {type: type})
61 | .then((data) => {
62 | dispatch(getImg({imgUrl: data.url}))
63 | })
64 | }
65 | }
66 |
67 | export function getImg({ imgUrl }) {
68 | return {
69 | type: types.SEND_IMG,
70 | imgUrl,
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/ios/YCool-tvOS/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 |
--------------------------------------------------------------------------------
/app/lib/request.js:
--------------------------------------------------------------------------------
1 | const request = {};
2 |
3 | const prefix = 'http://146.185.157.84:5000'
4 |
5 | request.get = (url, params, token = '') => {
6 | const options = {
7 | method: 'GET',
8 | headers: {
9 | 'Content-Type': 'application/json',
10 | authorization: `Bearer ${token}`
11 | }
12 | };
13 | url = `${prefix}${url}`;
14 | if (params) {
15 | const paramsArray = [];
16 | Object.keys(params).forEach(key => paramsArray.push(`${key}=${params[key]}`));
17 | if (url.search(/\?/) === -1) {
18 | url += `?${paramsArray.join('&')}`;
19 | } else {
20 | url += `&${paramsArray.join('&')}`;
21 | }
22 | }
23 | url = encodeURI(url);
24 |
25 | return new Promise((resolve, reject) => {
26 | fetch(url, options)
27 | .then(
28 | (response) => {
29 | if (response.ok) {
30 | return response.json();
31 | }
32 | return reject({ status: response.status });
33 | }).then((response) => {
34 | resolve(response);
35 | }).catch((err) => {
36 | reject({ status: -1, msg: err.message });
37 | });
38 | });
39 | };
40 |
41 | request.post = (url, data, token = '') => {
42 | const options = {
43 | method: 'POST',
44 | headers: {
45 | 'Content-Type': 'application/json',
46 | authorization: `Bearer ${token}`
47 | },
48 | body: JSON.stringify(data)
49 | };
50 | url = `${prefix}${url}`;
51 | url = encodeURI(url);
52 | return new Promise((resolve, reject) => {
53 | fetch(url, options).then((response) => {
54 | if (response.ok) {
55 | return response.json();
56 | }
57 | return reject({ status: response.status });
58 | }).then((response) => {
59 | resolve(response);
60 | }).catch((err) => {
61 | reject({ status: -1, msg: err.message });
62 | });
63 | });
64 | };
65 |
66 | export default request;
67 |
--------------------------------------------------------------------------------
/app/actions/bookshelves.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 | import * as types from './types'
3 | import { AsyncStorage } from 'react-native'
4 | import DeviceInfo from 'react-native-device-info'
5 | import setAuthorizationToken from '../lib/setAuthorizationToken'
6 |
7 | export function getBookshelfFirst() {
8 | return (dispatch, getState) => {
9 | AsyncStorage.getItem(`userToken`).then(
10 | (res) => {
11 | if (!res) {
12 | const uuid = DeviceInfo.getUniqueID()
13 | const json = { user: { uuid: uuid } }
14 | axios.post('/users/tourists', json)
15 | .then((res) => {
16 | setAuthorizationToken(res.data.token)
17 | AsyncStorage.setItem(`userToken`, res.data.token)
18 | })
19 | }
20 | else{
21 | setAuthorizationToken(res)
22 | axios.get('/bookshelfs')
23 | .then(
24 | (res) => {
25 | dispatch(setSearchedBookshelves({ bookshelf: res.data.list }));
26 | },
27 | (err) => console.log(err)
28 | )
29 | }
30 | }
31 | )
32 | }
33 | }
34 |
35 | export function getBookshelf() {
36 | return (dispatch) => {
37 | axios.get('/bookshelfs').then(
38 | (res) => {
39 | dispatch(setSearchedBookshelves({ bookshelf: res.data.list }));
40 | },
41 | (err) => console.log(err)
42 | )
43 | }
44 | }
45 |
46 | export function setSearchedBookshelves({ bookshelf }) {
47 | return {
48 | type: types.SET_SEARCHED_BOOKSHELVES,
49 | bookshelf,
50 | }
51 | }
52 |
53 | export function orderNovel(id) {
54 | return (dispatch, getState) => {
55 | return axios.post('/bookshelfs/order', {id: id})
56 | }
57 | }
58 |
59 | export function delect(id) {
60 | return (dispatch, getState) => {
61 | return axios.post('/bookshelfs/delect', {id: id})
62 | }
63 | }
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/app/containers/ApplicationTabs/index.ios.js:
--------------------------------------------------------------------------------
1 | import About from '../About'
2 | import Novel from '../Novel'
3 | import { connect } from 'react-redux'
4 | import React, { Component } from 'react'
5 | import { bindActionCreators } from 'redux'
6 | import { ActionCreators } from '../../actions'
7 | import { View, TabBarIOS, TabBarItemIOS } from 'react-native'
8 | import { AsyncStorage } from 'react-native'
9 |
10 | class ApplicationTabs extends Component {
11 |
12 | constructor(props) {
13 | super(props)
14 | this.state = { index: 0 }
15 | }
16 |
17 | componentWillMount() {
18 |
19 | }
20 |
21 | onPress(index) {
22 | this.props.setTab(index);
23 | }
24 |
25 | renderScene(component) {
26 | return (
27 |
28 | { React.createElement(component, this.props) }
29 |
30 | )
31 | }
32 |
33 | render() {
34 | return (
35 |
36 | { return this.onPress(0) } }
41 | selectedIconName="sfd"
42 | selected={this.props.tabs.index === 0}>
43 | { this.renderScene(Novel) }
44 |
45 | { return this.onPress(1) } }
49 | selectedIconName="more"
50 | selected={this.props.tabs.index === 1}>
51 | { this.renderScene(About) }
52 |
53 |
54 | );
55 | }
56 | }
57 |
58 | function mapStateToProps(state) {
59 | return {
60 | tabs: state.tabs
61 | };
62 | }
63 |
64 | function mapDispatchToProps(dispatch) {
65 | return bindActionCreators(ActionCreators, dispatch)
66 | }
67 |
68 | export default connect(mapStateToProps, mapDispatchToProps)(ApplicationTabs)
69 |
--------------------------------------------------------------------------------
/app/actions/reader.js:
--------------------------------------------------------------------------------
1 | import { AsyncStorage } from 'react-native'
2 | import * as types from './types'
3 | import axios from 'axios'
4 |
5 | export function getFirstRenderChapters(id) {
6 | return (dispatch, getState) => {
7 | axios.get(`/chapters/firstRender/${id}`).then(
8 | (res) => {
9 | dispatch({
10 | type: types.GET_FIRST_RENDER_CHAPTER,
11 | firstRenderChapters: res.data.response
12 | })
13 | }
14 | )
15 | }
16 | }
17 |
18 | export function getChapter(id, num) {
19 | const json = {
20 | novelId: id,
21 | num: num
22 | }
23 | return (dispatch, getState) => {
24 | return axios.post(`/chapters`, json)
25 | .then((data) => {
26 | dispatch({
27 | type: types.SET_CHAPTER_DETAIL,
28 | data
29 | })
30 | })
31 | }
32 | }
33 |
34 | export function setChapterDetail({ chapterContent }) {
35 | return
36 | }
37 |
38 | export function getNextChatperDetail(id) {
39 | return (dispatch, getState) => {
40 | return axios.get(`/chapters/next/${id}`)
41 | .then( (res) => {
42 | dispatch(setNextChatperDetail({chapterContent: res.data.detail}));
43 | })
44 | }
45 | }
46 |
47 | export function setNextChatperDetail({ chapterContent }) {
48 | return {
49 | type: types.SET_NEXT_CHAPTER_DETAIL,
50 | chapterContent,
51 | }
52 | }
53 |
54 | export function getLastChapterDetail(id) {
55 | return (dispatch, getState) => {
56 | return axios.get(`/chapters/last/${id}`)
57 | .then( (res) => {
58 | dispatch(setLastChatperDetail({chapterContent: res.data.detail}));
59 | })
60 | }
61 | }
62 |
63 | export function setLastChatperDetail({ chapterContent }) {
64 | return {
65 | type: types.SET_LAST_CHAPTER_DETAIL,
66 | chapterContent,
67 | }
68 | }
69 |
70 | export function getDirectory(id, order = 1) {
71 | return (dispatch, getState) => {
72 | axios.get(`/novels/directory/${id}?order=${order}`)
73 | .then( (res) => {
74 | dispatch(setDirectory({results: res.data.results}));
75 | })
76 | }
77 | }
78 |
79 | export function setDirectory({ results }) {
80 | return {
81 | type: types.SET_DIRECTORY,
82 | results,
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/ios/YCoolTests/YCoolTests.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
14 | #import
15 |
16 | #define TIMEOUT_SECONDS 600
17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
18 |
19 | @interface YCoolTests : XCTestCase
20 |
21 | @end
22 |
23 | @implementation YCoolTests
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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/app/containers/About.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { connect } from 'react-redux'
3 | import {
4 | PixelRatio,
5 | ScrollView,
6 | View,
7 | TextInput,
8 | Image,
9 | Text,
10 | ListView,
11 | TouchableHighlight,
12 | TouchableOpacity,
13 | StyleSheet,
14 | RefreshControl,
15 | } from 'react-native';
16 | import { appStyle } from '../styles'
17 |
18 | class About extends Component {
19 | constructor(props) {
20 | super(props)
21 | this.state = {
22 | show: false
23 | }
24 | }
25 |
26 | getImg({type}) {
27 | var that = this
28 | this.props.searchImg()
29 |
30 | setTimeout(function () {
31 | that.setState({
32 | show: true
33 | })
34 | }, 1000);
35 |
36 |
37 | setTimeout(function () {
38 | that.setState({
39 | show: false
40 | })
41 | }, 4000);
42 |
43 | }
44 |
45 | isEmpty(obj) {
46 | for (var name in obj)
47 | {
48 | return false;
49 | }
50 | return true;
51 | }
52 |
53 | showImg() {
54 | let url = this.props.searchedImg
55 | if (this.isEmpty(url)) {
56 | url = "http://i.meizitu.net/2016/03/15a16.jpg"
57 | }
58 |
59 | return(
60 |
61 | )
62 | }
63 |
64 | render() {
65 | return (
66 |
67 |
68 |
69 | 未完待续
70 |
71 |
72 |
73 | )
74 | }
75 | }
76 |
77 |
78 |
79 | const styles = StyleSheet.create({
80 | scene: {
81 | flex: 1,
82 | },
83 | scrollSection: {
84 | flex: 1,
85 |
86 | },
87 | nav: {
88 | backgroundColor: '#DD3F42',
89 | flexDirection: 'row',
90 | alignItems: 'center',
91 | zIndex: 99
92 | },
93 | title: {
94 | flex: 1,
95 | height: 66,
96 | justifyContent: 'center',
97 | },
98 | titleText: {
99 | marginTop: 25,
100 | fontSize: 18,
101 | textAlign: 'center',
102 | color: '#ffffff',
103 | },
104 | button: {
105 | height: 50,
106 | width: 200,
107 | backgroundColor: '#DD3F42',
108 | marginLeft: 80,
109 | marginTop: 30,
110 | borderRadius: 5,
111 | },
112 | text:{
113 | textAlign: 'center',
114 | marginTop: 15,
115 | color: '#ffffff',
116 | fontSize: 18
117 | },
118 | });
119 |
120 | function mapStateToProps(state) {
121 | return {
122 | searchedImg: state.searchedImg
123 | };
124 | }
125 |
126 | export default connect(mapStateToProps)(About);
127 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/app/containers/AppContainer.js:
--------------------------------------------------------------------------------
1 | import React, { Component, PropTypes } from 'react';
2 | import { connect } from 'react-redux';
3 | import { bindActionCreators } from 'redux'
4 | import { ActionCreators } from '../actions'
5 |
6 | import {
7 | Animated,
8 | StyleSheet,
9 | View,
10 | NavigationExperimental
11 | } from 'react-native';
12 | import Novel from './Novel';
13 | import Reader from './Reader';
14 | import Detail from './Detail';
15 | import Directory from './Directory';
16 | import Search from './Search';
17 | import ApplicationTabs from './ApplicationTabs';
18 |
19 | const {
20 | PropTypes: NavigationPropTypes,
21 | StateUtils: NavigationStateUtils,
22 | Card: NavigationCard,
23 | Transitioner: NavigationTransitioner,
24 | } = NavigationExperimental;
25 |
26 | const {
27 | PagerStyleInterpolator: NavigationPagerStyleInterpolator,
28 | } = NavigationCard;
29 |
30 | class AppContainer extends Component {
31 |
32 | constructor(props: any, context: any) {
33 | super(props, context);
34 | this._render = this._render.bind(this);
35 | this._renderScene = this._renderScene.bind(this);
36 | }
37 |
38 | render() {
39 | return (
40 |
44 | );
45 | }
46 |
47 | _render(transitionProps) {
48 | const scenes = transitionProps.scenes.map((scene) => {
49 | const sceneProps = {
50 | ...transitionProps,
51 | scene,
52 | };
53 | return this._renderScene(sceneProps);
54 | });
55 |
56 | return (
57 |
58 | {scenes}
59 |
60 | );
61 | }
62 |
63 | _renderScene(sceneProps) {
64 | return (
65 |
69 | )
70 | }
71 | }
72 |
73 | class SceneContainer extends Component {
74 |
75 | render() {
76 | const style = [
77 | styles.scene,
78 | NavigationPagerStyleInterpolator.forHorizontal(this.props),
79 | ];
80 | let Scene = null;
81 | if (this.props.scene.route.key === 'ApplicationTabs') { Scene = ApplicationTabs }
82 | if (this.props.scene.route.key === 'Reader') { Scene = Reader }
83 | if (this.props.scene.route.key === 'Directory') { Scene = Directory }
84 | if (this.props.scene.route.key === 'Search') { Scene = Search }
85 | if (this.props.scene.route.key === 'Detail') { Scene = Detail }
86 | return (
87 |
88 |
89 |
90 | )
91 | }
92 | }
93 |
94 | const styles = StyleSheet.create({
95 | scene: {
96 | flex: 1,
97 | bottom: 0,
98 | left: 0,
99 | position: 'absolute',
100 | right: 0,
101 | top: 0,
102 | },
103 | });
104 |
105 |
106 | function mapDispatchToProps(dispatch) {
107 | return bindActionCreators(ActionCreators, dispatch);
108 | }
109 |
110 | function mapStateToProps(state) {
111 | return {
112 | navigationState: state.navigationState
113 | };
114 | }
115 |
116 |
117 | export default connect(mapStateToProps, mapDispatchToProps)(AppContainer);
118 |
--------------------------------------------------------------------------------
/ios/YCool/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 |
--------------------------------------------------------------------------------
/app/util.js:
--------------------------------------------------------------------------------
1 | /*!
2 | *
3 | * Util模块 React Native module
4 | * 主要提供工具方法
5 | *
6 | */
7 | import Dimensions from 'Dimensions';
8 | import React, { Component } from 'react';
9 | import {
10 | PixelRatio,
11 | ActivityIndicatorIOS
12 | } from 'react-native';
13 |
14 |
15 | module.exports = {
16 | navigationHeight: 44,
17 | navigationBarBGColor:'#3497FF',
18 | statusBarHeight: 20,
19 | /*最小线宽*/
20 | pixel: 1 / PixelRatio.get(),
21 |
22 | /*屏幕尺寸*/
23 | size: {
24 | width: Dimensions.get('window').width,
25 | height: Dimensions.get('window').height
26 | },
27 | handleContent: function(content) {
28 | const length = content.length
29 | var array = []
30 | let x = 0,y,m = 0
31 | while (x < length) {
32 | let _array = []
33 | for (let i = 0; i <= 16; i++) {
34 | let str_spa = content.substring(x, x + 1)
35 | let str_sto = content.substring(x, x + 18)
36 | const re = /^\s+$/
37 | if (str_sto.indexOf('”') != -1) {
38 | y = x + str_sto.indexOf('”') + 1
39 | _array[i] = content.substring(x, y)
40 | x = y
41 | continue
42 | }
43 | else if (str_sto.indexOf('。') != -1 ) {
44 | y = x + str_sto.indexOf('。') + 1
45 | if (re.exec(content.substring(y, y + 1))) {
46 | y = x + str_sto.indexOf('。') + 1
47 | _array[i] = content.substring(x, y)
48 | x = y
49 | continue
50 | }
51 | else {
52 | if (str_sto.indexOf('!') != -1) {
53 | y = x + str_sto.indexOf('!') + 1
54 | _array[i] = content.substring(x, y)
55 | x = y
56 | continue
57 | }
58 | else {
59 | y = x + 18
60 | _array[i] = content.substring(x, y)
61 | x = y
62 | continue
63 | }
64 | }
65 | }
66 | else if (str_sto.indexOf('!') != -1) {
67 | y = x + str_sto.indexOf('!') + 1
68 | if (re.exec(content.substring(y, y + 1))) {
69 | y = x + str_sto.indexOf('!') + 1
70 | _array[i] = content.substring(x, y)
71 | x = y
72 | continue
73 | }
74 | else {
75 | y = x + 18
76 | _array[i] = content.substring(x, y)
77 | x = y
78 | continue
79 | }
80 | }
81 | else if (str_sto.indexOf('?') != -1){
82 | y = x + str_sto.indexOf('?') + 1
83 | if (re.exec(content.substring(y, y + 1))) {
84 | y = x + str_sto.indexOf('?') + 1
85 | _array[i] = content.substring(x, y)
86 | x = y
87 | continue
88 | }
89 | else {
90 | y = x + 18
91 | _array[i] = content.substring(x, y)
92 | x = y
93 | continue
94 | }
95 | }
96 | else if (re.exec(str_spa)) {
97 | y = x + 24
98 | if (content.substring(x,y).indexOf('。') != -1) {
99 | y = x + content.substring(x,y).indexOf('。') + 1
100 | _array[i] = content.substring(x, y)
101 | x = y
102 | continue
103 | }
104 | _array[i] = content.substring(x, y)
105 | x = y
106 | continue
107 | }
108 | else {
109 | y = x + 18
110 | _array[i] = content.substring(x, y)
111 | x = y
112 | }
113 | }
114 | array[m] = _array
115 | m++
116 | }
117 | // console.log((m - 1) * 375);
118 | return array
119 | },
120 | /**
121 | * 基于fetch的get方法
122 | * @method post
123 | * @param {string} url
124 | * @param {function} callback 请求成功回调
125 | */
126 | get: function(url, successCallback, failCallback){
127 | fetch(url)
128 | .then((response) => response.text())
129 | .then((responseText) => {
130 | successCallback(JSON.parse(responseText));
131 | })
132 | .catch(function(err){
133 | failCallback(err);
134 | });
135 | },
136 | /*loading效果*/
137 | loading:
138 | };
139 |
--------------------------------------------------------------------------------
/app/containers/Alert.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import {
3 | StyleSheet,
4 | View,
5 | Image,
6 | Text,
7 | TouchableOpacity,
8 | TouchableHighlight,
9 | Animated,
10 | Easing,
11 | Dimensions,
12 | StatusBar
13 | } from 'react-native';
14 |
15 | import Util from '../util'
16 | // import Directory from './directory'
17 |
18 | export default class Alert extends Component {
19 | constructor(props) {
20 | super(props);
21 | this.state = {
22 | offset: new Animated.Value(0),
23 | opacity: new Animated.Value(0),
24 | hide: true,
25 | };
26 | }
27 |
28 | _pressButton() {
29 | // this.props.navigator.popToTop();
30 | }
31 |
32 | _showDirectory() {
33 | this.props.navigator.push({
34 | component: Directory,
35 |
36 | });
37 | }
38 |
39 | render() {
40 | if(this.state.hide){
41 | return ()
42 | } else {
43 | return (
44 |
45 |
46 |
53 |
54 | { console.log(this) } }
57 | >
58 |
59 |
60 |
61 |
65 |
66 |
67 |
74 |
75 |
76 |
77 | 目录
78 |
79 |
80 |
81 |
82 |
83 |
84 | );
85 | }
86 | }
87 | //
94 | //
95 | //
96 | //
97 | //
98 |
99 | //显示动画
100 | in() {
101 | Animated.parallel([
102 |
103 | Animated.timing(
104 | this.state.offset,
105 | {
106 | easing: Easing.linear,
107 | duration: 200,
108 | toValue: 1,
109 | }
110 | )
111 | ]).start();
112 | }
113 |
114 | //隐藏动画
115 | out(){
116 | Animated.parallel([
117 | Animated.timing(
118 | this.state.offset,
119 | {
120 | easing: Easing.linear,
121 | duration: 200,
122 | toValue: 0,
123 | }
124 | )
125 | ]).start((finished) => this.setState({hide: true}));
126 | }
127 |
128 | //取消
129 | iknow(event) {
130 | // StatusBar.setHidden(true);
131 | if(!this.state.hide){
132 | this.out();
133 | }
134 | }
135 |
136 | show() {
137 | // StatusBar.setHidden(false);
138 | if(this.state.hide){
139 | this.setState({hide: false}, this.in);
140 | }
141 | }
142 | }
143 |
144 | const styles = StyleSheet.create({
145 | container: {
146 | position:"absolute",
147 | width:Util.size.width,
148 | height:Util.size.height,
149 | },
150 | alertTop: {
151 | height: 70,
152 | backgroundColor: '#3B3A38',
153 | flexDirection: 'row'
154 | },
155 | alertMiddle: {
156 | height: Util.size.height - 140,
157 | },
158 | alertFoot: {
159 | height: 70,
160 | backgroundColor: '#3B3A38',
161 | },
162 | backImg: {
163 | marginTop: 30,
164 | marginLeft: 10,
165 | },
166 | directoryImg: {
167 | marginLeft: 10,
168 | marginTop: 10,
169 | },
170 | directoryText: {
171 | marginLeft: 12,
172 | color: '#9D9C9B'
173 | }
174 | });
175 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 简介
2 | 这是一个用React Native写的小说APP,支持搜索小说、订阅小说、在线阅读。
3 |
4 | 后台API服务器代码地址:https://github.com/dlyt/YCool_Server.git
5 | ## 效果图
6 | 
7 | ## 目录结构
8 | ```
9 | .
10 | ├── app # 程序源文件
11 | │ ├── actions # actions
12 | │ ├── containers # 容器
13 | │ ├── imgs # 图片
14 | │ ├── lib # 工具文件夹
15 | │ └── reducers # reducers
16 | └── index.ios.js # 程序入口文件
17 | ```
18 | ## 技术栈
19 | 1.导航系统 NavigationExperimental
20 | - NavigationRootContainer允许导航的各个状态(屏幕)保存在app的最顶层。
21 | - 使用reducer在导航状态中声明设置转换过渡
22 | - 可以将state永久保存存到硬盘,这样刷新和app更新后,还能获得之前的导航状态
23 | - 监听打开中的url链接,BackAndroid便于支持返回按纽
24 | - NavigationReducers 包含了预置的reducers, 用来管理导航状态之间的转换过渡。
25 | - Reducers可以彼此之前进行组合,设置更高级的导航逻辑
26 | - 导航逻辑可以用于任何的视图
27 | - NavigationAnimatedView 是一个用来管理不同场景动画的组件,也可以用于Navigator和NavigatorIOS组件
28 | - 每一个scene可以完全自定义,并且管理它自己的动画和手势
29 | - 可以有一个Overlay/header, 用于跟场景的动画同步
30 | - NavigationCard 和NavigationHeader可以作为预编译的scenes和overlays. 然后跟NavigationAnimatedView一起使用
31 |
32 | 2.数据管理 redux
33 |
34 | 应用中所有的 state 都以一个对象树的形式储存在一个单一的 store 中。惟一改变 state 的办法是触发 action,一个描述发生什么的对象。为了描述 action 如何改变 state 树,你需要编写 reducers。
35 |
36 | action和reducers的代码写在相应文件夹里,可以到项目中去看,下面是注册store的代码。
37 |
38 | index.ios.js
39 | ```js
40 | const App = () => (
41 |
42 |
43 |
44 | )
45 |
46 | AppRegistry.registerComponent('YCool', () => App)
47 | ```
48 |
49 | 3.数据请求
50 |
51 | `axios`
52 |
53 | 统一设置token验证信息:
54 |
55 | app/lib/setAuthorizationToken.js
56 | ```js
57 | import axios from 'axios'
58 |
59 | export default function setAuthorizationToken(token) {
60 | if (token) {
61 | axios.defaults.headers.common['Authorization'] = `Bearer ${token}`
62 | } else {
63 | delete axios.defaults.headers.common['Authorization']
64 | }
65 | }
66 | ```
67 |
68 | 4.中间件 redux-thunk, redux-logger
69 |
70 | 下面是一段登录的action,来说明`redux-thunk`的用处
71 | ```js
72 | export function login(user) {
73 | return dispatch => {
74 | return axios.post('/api/auth', user).then(res => {
75 | const token = res.data.token
76 | localStorage.setItem('jwtToken', token)
77 | setAuthorizationToken(token)
78 | dispatch(setCurrentUser(jwtDecode(token)))
79 | })
80 | }
81 | }
82 | ```
83 | 如果不添加 redux-thunk 这个中间件这段代码是会保错的,提示如下:
84 | ```js
85 | Actions must be plain objects. Use custom middleware for async actions.
86 | ```
87 | 这里,要先知道:
88 |
89 | 通过使用指定的 middleware,action 创建函数除了返回 action 对象外还可以返回函数。这时,这个 action 创建函数就成为了 thunk。
90 |
91 | 下面的代码更容易我们理解
92 | ```js
93 | const foo = () => {
94 | let bar = 'before'
95 | setTimeout(() => {
96 | bar = 'after'
97 | }, 3000)
98 | return {
99 | bar
100 | }
101 | }
102 |
103 | document.getElementById('demo').innerHTML = foo().bar
104 | ```
105 | 由于 foo 中回传的 bar 在 return 之时是为 'before' ,并不会等到 setTimeout 结束后在被 assign 的 'after'。
106 |
107 | 如果不引入 thunk 它只有同步操作。每当 dispatch action 时,state 会被立即更新。这时候使用异步操作就会报错。
108 |
109 | 我们解决这个问题就可以使用 redux-thunk ,它是通过中间件(middleware)的形式被引用。
110 |
111 | 这句话有助于你理解 middleware: `它提供的是位于 action 被发起之后,到达 reducer 之前的扩展点。`
112 |
113 | middleware 改造了你的 dispatch ,让它有能力判断送进去的东西是一个 pure object 还是 function 。
114 |
115 | 我们先看一下 redux-thunk 是如何使用的。
116 | ```js
117 | import thunkMiddleware from 'redux-thunk'
118 | const store = createStore(
119 | reducers,
120 | compose(
121 | applyMiddleware(
122 | thunkMiddleware, // 允许我们 dispatch() 函数
123 | loggerMiddleware // 一个很便捷的 middleware,用来打印 action 日志
124 | ),
125 | )
126 | )
127 | ```
128 | redux-thunk 的源码中,首先判断是否是 function :
129 | ```js
130 | if (typeof action === 'function'){}
131 | ```
132 | 如果不是 function ,那自然就是一个 pure object ,利用 next 送出,什么也不需要做;若是 function ,则把这个 thunk 需要的 dispatch , getState 和其他 arguement 传给 thunk ,让它做你所指定它做的事情。
133 |
134 | redux-logger 这个中间件会在控制台打印出 action 如图,有助于开发。
135 | 
136 |
137 | ## 功能列表
138 | - [x] 下拉刷新
139 | - [x] 左滑删除
140 | ## 安装
141 | ```bash
142 | git clone https://github.com/dlyt/YCool.git
143 | npm install
144 | ```
145 | 注意导入的2个包
146 |
147 | react-native-device-info 需要配置
148 |
149 | 1. 右击选择项目名称 选择Add Files to '你的项目名'
150 | 2. 进入node_modules/react-native-device-info
151 | 3. 添加 .xcodeproj文件
152 | 4. 在Xcode中点击你的工程名字——>Build Phases——>Link Binary With Libraries——>点击 '+'号按钮,添加libRNDeviceInfo.a文件
153 |
154 | react-native-swipeout 需要替换一下这个包里的index.js文件
155 |
156 | [index.js.zip](https://github.com/dancormier/react-native-swipeout/files/340703/index.js.zip)
157 | ## 开发环境
158 | IOS 6S
159 | ## License
160 | 仅供学习使用
161 |
--------------------------------------------------------------------------------
/app/containers/Directory.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { connect } from 'react-redux'
3 | import { ActionCreators } from '../actions'
4 | import { bindActionCreators } from 'redux'
5 | import Request from '../lib/request'
6 | import {
7 | StyleSheet,
8 | Text,
9 | View,
10 | ScrollView,
11 | NavigatorIOS,
12 | Image,
13 | TouchableOpacity,
14 | ListView,
15 | AsyncStorage
16 | } from 'react-native';
17 |
18 | import Util from '../util'
19 |
20 | class Directory extends Component{
21 | constructor(props){
22 | super(props);
23 | this.state = {
24 | dataSource: new ListView.DataSource({
25 | rowHasChanged: (row1, row2) => row1 !== row2
26 | }),
27 | order: -1
28 | }
29 | }
30 |
31 | componentWillMount() {
32 | this.props.getDirectory(this.props.navigationParams.id)
33 | }
34 |
35 | directoryList() {
36 | return Object.keys(this.props.directory).map(key => this.props.directory[key])
37 | }
38 |
39 | goReader(num) {
40 | const id = this.props.navigationParams.id
41 | const json = {
42 | novel: {
43 | id: id,
44 | num: num,
45 | x: 0
46 | }
47 | }
48 |
49 | AsyncStorage.getItem('userToken')
50 | .then((token) => {
51 | Request.post(`/bookshelfs/change`, json, token)
52 | })
53 | .catch( (e) => {
54 | console.log(e);
55 | })
56 | this.props.navigateBack({id: id, first: true})
57 | }
58 |
59 | changeOrder() {
60 | if (this.state.order === 1) {
61 | this.setState({order: -1})
62 | }
63 | else {
64 | this.setState({order: 1})
65 | }
66 | this.props.getDirectory(this.props.navigationParams.id, this.state.order)
67 | }
68 |
69 | renderRow(item) {
70 | return(
71 | {this.goReader(item.number)} }>
75 |
76 |
77 | {item.number + 1}.
78 |
79 |
80 |
81 |
82 | {item.title}
83 |
84 |
85 |
86 | )
87 | }
88 |
89 | renderList(lists) {
90 | return(
91 |
96 | )
97 | }
98 |
99 | render(){
100 | const lists = this.directoryList()
101 | return(
102 |
103 |
104 |
105 | { this.props.navigateBack({key: 'Reader'}) } }
107 | style={styles.button}>
108 |
111 |
112 |
113 |
114 | {this.props.navigationParams.name}
115 |
116 |
117 | {this.changeOrder()}}>
120 | {this.state.order === -1 ? : }
123 |
124 |
125 |
126 | {this.renderList(lists)}
127 |
128 | );
129 | }
130 |
131 | }
132 |
133 | const styles = StyleSheet.create({
134 | scene: {
135 | flex: 1,
136 | },
137 | nav: {
138 | backgroundColor: '#DD3F42',
139 | flexDirection: 'row',
140 | alignItems: 'center',
141 | zIndex: 99
142 | },
143 | button: {
144 | width: 44,
145 | height: 44,
146 | justifyContent: 'center',
147 | alignItems: 'center',
148 | },
149 | title: {
150 | flex: 1,
151 | height: 66,
152 | justifyContent: 'center',
153 | },
154 | titleText: {
155 | marginTop: 25,
156 | fontSize: 18,
157 | textAlign: 'center',
158 | color: '#ffffff',
159 | },
160 | leftButton: {
161 | marginTop: 25,
162 | marginRight: 5,
163 | },
164 | item: {
165 | height: 60,
166 | borderBottomWidth: Util.pixel,
167 | borderColor: '#A5A5A5',
168 | },
169 | row:{
170 | flexDirection: 'row',
171 | },
172 | rightImg: {
173 | marginTop: 20
174 | }
175 | })
176 |
177 |
178 | function mapStateToProps(state) {
179 | return {
180 | directory: state.directory,
181 | navigationParams: state.navigationParams,
182 | };
183 | }
184 |
185 | function mapDispatchToProps(dispatch) {
186 | return bindActionCreators(ActionCreators, dispatch);
187 | }
188 |
189 | export default connect(mapStateToProps, mapDispatchToProps)(Directory);
190 |
--------------------------------------------------------------------------------
/ios/YCool.xcodeproj/xcshareddata/xcschemes/YCool.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
43 |
49 |
50 |
51 |
52 |
53 |
58 |
59 |
61 |
67 |
68 |
69 |
70 |
71 |
77 |
78 |
79 |
80 |
81 |
82 |
92 |
94 |
100 |
101 |
102 |
103 |
104 |
105 |
111 |
113 |
119 |
120 |
121 |
122 |
124 |
125 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/ios/YCool.xcodeproj/xcshareddata/xcschemes/YCool-tvOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
43 |
49 |
50 |
51 |
52 |
53 |
58 |
59 |
61 |
67 |
68 |
69 |
70 |
71 |
77 |
78 |
79 |
80 |
81 |
82 |
92 |
94 |
100 |
101 |
102 |
103 |
104 |
105 |
111 |
113 |
119 |
120 |
121 |
122 |
124 |
125 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/app/containers/Detail.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { connect } from 'react-redux';
3 | import { ActionCreators } from '../actions';
4 | import { bindActionCreators } from 'redux';
5 | import {
6 | StyleSheet,
7 | Text,
8 | View,
9 | ScrollView,
10 | NavigatorIOS,
11 | Image,
12 | TouchableOpacity,
13 | TouchableHighlight,
14 | ListView
15 | } from 'react-native';
16 |
17 | import Util from '../util'
18 | import DeviceInfo from 'react-native-device-info'
19 |
20 | class Detail extends Component{
21 | constructor(props){
22 | super(props);
23 | }
24 |
25 | componentWillMount() {
26 | this.props.searchNovelInfo(this.props.navigationParams.name, this.props.navigationParams.url)
27 | }
28 |
29 | orderNovel(id, join) {
30 | if (!join) {
31 | this.props.orderNovel(id)
32 | .then(
33 | (res) => {
34 | this.props.getBookshelf()
35 | this.props.navigateReset([{key: 'ApplicationTabs'}], 0)
36 | },
37 | (err) => { console.log(err) }
38 | )
39 | }
40 | }
41 |
42 | getNovelInfo() {
43 | return this.props.searchedNovelInfo
44 | }
45 |
46 | render(){
47 | const novelInfo = this.getNovelInfo()
48 | return(
49 |
50 |
51 |
52 | { this.props.navigateBack({key: 'Reader'}) } }
54 | style={styles.button}>
55 |
58 |
59 |
60 |
61 | 作品详情
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | {novelInfo.name}
74 |
75 |
76 | 作者:{novelInfo.author}
77 |
78 |
79 | 更新时间:{novelInfo.updateTime}
80 |
81 |
82 |
83 |
84 | this.orderNovel(novelInfo._id,novelInfo.join)}>
86 |
87 | {novelInfo.join ? '已加入书架' : '加入书架'}
88 |
89 |
90 |
91 |
92 |
93 | {novelInfo.introduction}
94 |
95 |
96 |
97 |
98 | );
99 | }
100 |
101 | }
102 |
103 | const styles = StyleSheet.create({
104 | scene: {
105 | flex: 1,
106 | },
107 | nav: {
108 | backgroundColor: '#A49B93',
109 | flexDirection: 'row',
110 | alignItems: 'center',
111 | zIndex: 99
112 | },
113 | button: {
114 | width: 44,
115 | height: 44,
116 | justifyContent: 'center',
117 | alignItems: 'center',
118 | },
119 | title: {
120 | flex: 1,
121 | height: 66,
122 | justifyContent: 'center',
123 | },
124 | titleText: {
125 | marginTop: 25,
126 | fontSize: 18,
127 | textAlign: 'center',
128 | color: '#ffffff',
129 | },
130 | leftButton: {
131 | marginTop: 25,
132 | marginRight: 5,
133 | },
134 | detailSection: {
135 | flex: 1,
136 | },
137 | novelInfo: {
138 | flex: 0.2,
139 | flexDirection: 'row',
140 | backgroundColor: '#7C6958',
141 | },
142 | middle: {
143 | flex: 0.1,
144 | borderBottomLeftRadius: 20,
145 | borderBottomWidth: Util.pixel,
146 | borderColor: '#A5A5A5',
147 | },
148 | bigButton: {
149 | borderRadius: 5,
150 | marginTop: 20,
151 | marginLeft: 42,
152 | height: 40,
153 | width: 280,
154 | backgroundColor: '#DD3F42',
155 | },
156 | bigText: {
157 | fontSize: 18,
158 | color: '#FEFBFB',
159 | marginTop: 10,
160 | textAlign:'center',
161 | },
162 | introduction: {
163 | flex: 0.4
164 | },
165 | infoLeft: {
166 | flex: 0.3,
167 |
168 | },
169 | img: {
170 | marginTop: 20,
171 | marginLeft: 20,
172 | height: 110,
173 | width: 80,
174 | // backgroundColor: '#A49B93',
175 | },
176 | infoRight: {
177 | flex: 0.6,
178 | },
179 | novelTitle: {
180 | marginTop: 25,
181 | fontSize: 18,
182 | color: '#E5E3DF',
183 | },
184 | text: {
185 | marginTop: 15,
186 | color: '#E5E3DF',
187 | },
188 | introductionText: {
189 | marginTop: 10,
190 | marginLeft: 20
191 | }
192 | })
193 |
194 |
195 |
196 | function mapStateToProps(state) {
197 | return {
198 | searchedNovelInfo: state.searchedNovelInfo,
199 | navigationParams: state.navigationParams,
200 | };
201 | }
202 |
203 | function mapDispatchToProps(dispatch) {
204 | return bindActionCreators(ActionCreators, dispatch);
205 | }
206 |
207 | export default connect(mapStateToProps, mapDispatchToProps)(Detail);
208 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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.ycool"
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 fileTree(dir: "libs", include: ["*.jar"])
130 | compile "com.android.support:appcompat-v7:23.0.1"
131 | compile "com.facebook.react:react-native:+" // From node_modules
132 | }
133 |
134 | // Run this once to be able to run the application with BUCK
135 | // puts all compile dependencies into folder libs for BUCK to use
136 | task copyDownloadableDepsToLibs(type: Copy) {
137 | from configurations.compile
138 | into 'libs'
139 | }
140 |
--------------------------------------------------------------------------------
/app/containers/Novel.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { connect } from 'react-redux'
3 | import {
4 | PixelRatio,
5 | ScrollView,
6 | View,
7 | Image,
8 | Text,
9 | ListView,
10 | TouchableOpacity,
11 | StyleSheet,
12 | RefreshControl,
13 | TouchableWithoutFeedback
14 | } from 'react-native'
15 |
16 | import Swipeout from 'react-native-swipeout'
17 |
18 | class Novel extends Component {
19 | constructor(props) {
20 | super(props)
21 | this.state = {
22 | isRefreshing: false,
23 | loaded: 0,
24 | dataSource: new ListView.DataSource({
25 | rowHasChanged: (row1, row2) => row1 !== row2
26 | })
27 | }
28 | this.closeSwipeout = this.closeSwipeout.bind(this)
29 | }
30 |
31 | componentWillMount() {
32 | this.props.getBookshelfFirst()
33 | }
34 |
35 | bookshelfLists() {
36 | return Object.keys(this.props.searchedBookshelves).map(key => this.props.searchedBookshelves[key])
37 | }
38 |
39 | closeSwipeout() {
40 | // console.log(this);
41 | }
42 |
43 | delectNovel(id) {
44 | this.props.delect(id).then(
45 | (res) => this.props.getBookshelf()
46 | )
47 | }
48 |
49 | renderRow(list) {
50 | const that = this
51 | var swipeoutBtns = [
52 | {
53 | text: '删除',
54 | onPress: () => {that.delectNovel(list._id)}
55 | }
56 | ]
57 | return (
58 |
64 | this.props.navigate({ key: 'Reader', id: list.novel._id, name: list.novel.name}) }
66 | style={[styles.item, styles.row]}>
67 |
68 |
69 |
70 |
71 | {list.novel.name}
72 | 最新: {list.novel.lastChapterTitle}
73 |
74 |
75 | {list.novel.updateTime}
76 |
77 |
78 |
79 |
80 | )
81 | }
82 |
83 | renderBookshelfLists(lists) {
84 | return (
85 |
97 | }>
98 |
101 |
105 |
106 |
107 | );
108 | }
109 |
110 | _onRefresh() {
111 | this.setState({isRefreshing: true});
112 | this.props.getBookshelfFirst()
113 | this.setState({
114 | loaded: this.state.loaded + 10,
115 | isRefreshing: false,
116 | dataSource: new ListView.DataSource({
117 | rowHasChanged: (row1, row2) => row1 !== row2
118 | })
119 | });
120 | }
121 |
122 | render() {
123 | const lists = this.bookshelfLists()
124 | return (
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 | Y酷小说
133 |
134 |
135 | this.props.navigate({ key: 'Search'}) }>
138 |
139 |
140 |
141 |
142 | {this.renderBookshelfLists(lists)}
143 |
144 | )
145 | }
146 | }
147 |
148 | const styles = StyleSheet.create({
149 | scene: {
150 | flex: 1,
151 | },
152 | scrollSection: {
153 | flex: 1,
154 | marginTop: -20
155 | },
156 | rightButton: {
157 | marginTop: 25,
158 | marginRight: 5,
159 | },
160 | button: {
161 | width: 44,
162 | height: 44,
163 | justifyContent: 'center',
164 | alignItems: 'center',
165 | },
166 | nav: {
167 | backgroundColor: '#DD3F42',
168 | flexDirection: 'row',
169 | alignItems: 'center',
170 | zIndex: 99
171 | },
172 | title: {
173 | flex: 1,
174 | height: 66,
175 | justifyContent: 'center',
176 | },
177 | titleText: {
178 | marginTop: 25,
179 | fontSize: 18,
180 | textAlign: 'center',
181 | color: '#ffffff',
182 | },
183 | btnText: {
184 | fontSize: 16,
185 | marginRight: 10,
186 | color: '#ffffff',
187 | },
188 | item: {
189 | height: 92,
190 | borderBottomLeftRadius: 20,
191 | borderBottomWidth: 1 / PixelRatio.get(),
192 | borderColor: '#A5A5A5',
193 | },
194 | row:{
195 | flexDirection: 'row',
196 | },
197 | left: {
198 | marginTop: 10
199 | },
200 | img:{
201 | height: 70,
202 | width:90,
203 | },
204 | text:{
205 | color: '#A5A5A5',
206 | marginTop: 6,
207 | fontSize: 12,
208 | },
209 | clock: {
210 | marginTop: 8,
211 | },
212 | duration: {
213 | marginLeft: 4,
214 | color: '#A5A5A5',
215 | marginTop: 9 ,
216 | fontSize: 12,
217 | },
218 | novelTitle:{
219 | fontSize:16,
220 | marginTop: 10,
221 | },
222 | });
223 |
224 | function mapStateToProps(state) {
225 | return {
226 | searchedBookshelves: state.searchedBookshelves
227 | };
228 | }
229 |
230 | export default connect(mapStateToProps)(Novel);
231 |
--------------------------------------------------------------------------------
/app/containers/Search.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { connect } from 'react-redux';
3 | import { ActionCreators } from '../actions';
4 | import { bindActionCreators } from 'redux';
5 | import Util from '../util';
6 | import {
7 | Animated,
8 | Easing,
9 | View,
10 | Image,
11 | TouchableHighlight,
12 | Text,
13 | StyleSheet,
14 | ScrollView,
15 | TouchableOpacity,
16 | TextInput,
17 | PanResponder,
18 | } from 'react-native'
19 |
20 |
21 | class Search extends Component {
22 |
23 | constructor(props) {
24 | super(props);
25 | this.state={
26 | list : false
27 | }
28 | }
29 |
30 | goDetail(name, url) {
31 | this.props.navigate({
32 | key: 'Detail',
33 | name: name,
34 | url: url,
35 | })
36 | }
37 |
38 | goBack() {
39 | this.props.navigateBack({ key: 'ApplicationTabs'})
40 | }
41 |
42 | novelNames() {
43 | return Object.keys(this.props.searchedNovelName).map(key => this.props.searchedNovelName[key])
44 | }
45 |
46 | novelList() {
47 | return Object.keys(this.props.searchedNovelList).map(key => this.props.searchedNovelList[key])
48 | }
49 |
50 | getNovelList(name) {
51 | this.state.list = true
52 | this.props.searchNovelList(name)
53 | }
54 |
55 | searchNovelList(ingredientsInput) {
56 | this.state.list = false
57 | this.props.searchNovelWords(ingredientsInput)
58 | }
59 |
60 | render() {
61 | return(
62 |
63 |
64 |
65 | { this.goBack() } }>
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | this.searchNovelList(ingredientsInput) }
78 | />
79 |
80 |
81 |
82 |
83 |
84 |
85 | {this.state.list ? this.novelList().map( (item,index) => {
86 | return (
87 | { this.goDetail(item.title, item.url) } }>
91 |
92 |
93 |
94 |
95 |
96 | {item.title}
97 |
98 |
99 | {item.introduction}
100 |
101 |
102 |
103 | {item.author}
104 | {item.type}
105 |
106 |
107 |
108 | )
109 | }) : this.novelNames().map( (item,index) => {
110 | return (
111 | { this.getNovelList(item.word) } }>
115 |
116 |
117 |
118 |
119 |
120 | {item.word}
121 |
122 |
123 |
124 | )
125 | })}
126 |
127 |
128 |
129 | );
130 | }
131 | }
132 |
133 |
134 |
135 | const styles = StyleSheet.create({
136 | container: {
137 | flex: 1,
138 | },
139 | nav: {
140 | flex: 0.1,
141 | backgroundColor: '#DD3F42'
142 | },
143 | topBox: {
144 | height: 40,
145 | marginTop: 20,
146 | flexDirection: 'row',
147 | },
148 | topBack: {
149 | flex: 0.1,
150 |
151 | },
152 | backImg: {
153 | marginLeft: 5,
154 | marginTop: 3,
155 | },
156 | topSearch: {
157 | flex: 0.9
158 | },
159 | searchSection: {
160 | flex: 1,
161 | marginRight: 20,
162 | borderRadius: 5,
163 | flexDirection: 'row',
164 | backgroundColor: '#FFFFFF',
165 | },
166 | searchImgBox: {
167 | flex: 0.15,
168 | },
169 | searchImg: {
170 | marginTop: 10,
171 | marginLeft: 20,
172 | },
173 | searchInput: {
174 | flex: 0.85,
175 | },
176 | content: {
177 | flex: 0.9,
178 | },
179 | selectSection: {
180 | height: 50,
181 | borderBottomLeftRadius: 20,
182 | borderBottomWidth: Util.pixel,
183 | borderColor: '#999999',
184 | flexDirection: 'row'
185 | },
186 | selectedLeft: {
187 | flex: 0.1,
188 | },
189 | selectedImg: {
190 | marginTop: 15,
191 | marginLeft: 30,
192 | },
193 | selectedRight: {
194 | flex: 0.6,
195 | },
196 | novelName: {
197 | marginTop: 13,
198 | fontSize: 18,
199 | color: '#A9A9A9'
200 | },
201 | listSection: {
202 | height: 120,
203 | borderBottomLeftRadius: 20,
204 | borderBottomWidth: Util.pixel,
205 | borderColor: '#999999',
206 | flexDirection: 'row'
207 | },
208 | listLeft: {
209 | flex: 0.3,
210 | },
211 | listImg: {
212 | height: 100,
213 | width: 100,
214 | marginLeft: 8,
215 | marginTop: 10,
216 | marginBottom: 10,
217 | },
218 | listRight: {
219 | flex: 0.7,
220 | },
221 | title: {
222 | marginTop: 10,
223 | fontSize: 18,
224 | },
225 | introduction: {
226 | marginTop: 10,
227 | marginRight: 10,
228 | color: '#A1A1A1'
229 | }
230 | });
231 |
232 | function mapStateToProps(state) {
233 | return {
234 | searchedNovelName: state.searchedNovelName,
235 | searchedNovelList: state.searchedNovelList,
236 | };
237 | }
238 |
239 | function mapDispatchToProps(dispatch) {
240 | return bindActionCreators(ActionCreators, dispatch);
241 | }
242 |
243 | export default connect(mapStateToProps, mapDispatchToProps)(Search);
244 |
--------------------------------------------------------------------------------
/app/containers/Reader.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { connect } from 'react-redux';
3 | import { ActionCreators } from '../actions';
4 | import { bindActionCreators } from 'redux';
5 | import Util from '../util';
6 | import Request from '../lib/request'
7 | import {
8 | Animated,
9 | Easing,
10 | View,
11 | Image,
12 | Text,
13 | StyleSheet,
14 | ScrollView,
15 | ListView,
16 | TouchableOpacity,
17 | AsyncStorage,
18 | } from 'react-native'
19 | import Dimensions from 'Dimensions'
20 |
21 | const tabWidth = Dimensions.get('window').width;
22 |
23 | class Reader extends Component {
24 | constructor(props) {
25 | super(props)
26 | this.state={
27 | dataSource: new ListView.DataSource({
28 | rowHasChanged: (row1, row2) => row1 !== row2
29 | }),
30 | offset: new Animated.Value(0),
31 | opacity: new Animated.Value(0),
32 | hide: true,
33 | searching: false,
34 | first: true,
35 | }
36 | this.uuid = this.props.navigationParams.id
37 | this._data= []
38 | this.count = 0
39 | this.currentChapter = ''
40 | this.nextChapter = ''
41 | this.number = 0
42 | this.x = 0
43 | this.a = 0
44 | this.i = 0
45 | }
46 |
47 | componentWillMount() {
48 | this.props.getFirstRenderChapters(this.uuid)
49 | }
50 |
51 |
52 | // componentWillReceiveProps(nextProps) {
53 | // console.log(nextProps);
54 | // console.log(this.props.firstRenderChapters);
55 | // }
56 |
57 | componentDidMount() {
58 | // console.log(this.props.firstRenderChapters);
59 | }
60 |
61 | shouldComponentUpdate(nextProps, nextState) {
62 | return true
63 | }
64 |
65 | goDerictory() {
66 | this.iknow()
67 | this.props.navigate({
68 | key: 'Directory',
69 | id: this.props.navigationParams.id,
70 | name: this.props.navigationParams.name
71 | })
72 | }
73 |
74 | goBack() {
75 | this.iknow()
76 | this.props.navigateBack({ key: 'ApplicationTabs'})
77 | }
78 |
79 | componentWillReceiveProps(nextProps) {
80 | // console.log(nextProps);
81 | }
82 |
83 | _concatData(newData) {
84 | this._data = this._data.concat(newData)
85 | this.setState({
86 | dataSource: this.state.dataSource.cloneWithRows(this._data)
87 | })
88 | }
89 |
90 | _unshiftData(newData) {
91 | const that = this
92 | newData = newData.concat(this._data)
93 | this._data = newData
94 | setTimeout(function () {
95 | that.setState({
96 | dataSource: that.state.dataSource.cloneWithRows(that._data),
97 | searching: false
98 | })
99 | }, 300);
100 | }
101 |
102 | componentWillUpdate(nextProps, nextState) {
103 | const that = this
104 | if (nextProps.navigationParams.first) {
105 | nextProps.navigationParams.first = false
106 | AsyncStorage.getItem('userToken')
107 | .then((token) => {
108 | Request.get(`/chapters/firstRender/${that.uuid}`, '', token)
109 | .then((data) => {
110 | let progress = data.response.progress
111 | this.number = data.response.chapters[0].number
112 | const lists = data.response.chapters
113 | let arr = []
114 | let content = that.nbsp2Space(lists[0].content)
115 | let _arr = Util.handleContent(content)
116 | that.currentChapter = _arr.length
117 | _arr.forEach( function(_item) {
118 | let chapterInfo = {
119 | title: lists[0].title,
120 | num: lists[0].number,
121 | content: _item
122 | }
123 | arr.push(chapterInfo)
124 | })
125 | if (lists.length === 2) {
126 | content = that.nbsp2Space(lists[1].content)
127 | _arr = Util.handleContent(content)
128 | that.nextChapter = _arr.length
129 | _arr.forEach( function(_item) {
130 | let chapterInfo = {
131 | title: lists[1].title,
132 | num: lists[1].number,
133 | content: _item
134 | }
135 | arr.push(chapterInfo)
136 | })
137 | }
138 | that._data = arr
139 | let scrollView = that.refs.scrollView
140 | scrollView.scrollTo({x: progress * 375, y: 0, animated: false})
141 | })
142 | })
143 |
144 | }
145 | if (Object.keys(this.props.firstRenderChapters).length !== 0 && nextState.first) {
146 | this.setState({
147 | first: false
148 | })
149 |
150 | let progress = nextProps.firstRenderChapters.progress
151 | this.number = nextProps.firstRenderChapters.chapters[0].number
152 | const list = Object.keys(nextProps.firstRenderChapters).map(key => nextProps.firstRenderChapters[key])
153 |
154 | let arr = []
155 | if (list.length !== 0) {
156 | let content = that.nbsp2Space(list[0][0].content)
157 | let _arr = Util.handleContent(content)
158 | this.currentChapter = _arr.length
159 | _arr.forEach( function(_item) {
160 | let chapterInfo = {
161 | title: list[0][0].title,
162 | num: list[0][0].number,
163 | content: _item
164 | }
165 | arr.push(chapterInfo)
166 | })
167 | if(list[0].length === 2) {
168 | content = that.nbsp2Space(list[0][1].content)
169 | _arr = Util.handleContent(content)
170 | this.nextChapter = _arr.length
171 | _arr.forEach( function(_item) {
172 | let chapterInfo = {
173 | title: list[0][1].title,
174 | num: list[0][1].number,
175 | content: _item
176 | }
177 | arr.push(chapterInfo)
178 | })
179 | }
180 | }
181 | this._data = arr
182 | let scrollView = this.refs.scrollView
183 | scrollView.scrollTo({x: progress * 375, y: 0, animated: false})
184 | }
185 | }
186 |
187 | getContent(chapterInfo) {
188 | const content = chapterInfo.content
189 | let arr = []
190 | let _content = this.nbsp2Space(content)
191 | let _arr = Util.handleContent(_content)
192 | this.currentChapter = this.nextChapter
193 | this.nextChapter = _arr.length
194 | _arr.forEach( function(_item) {
195 | let _chapterInfo = {
196 | title: chapterInfo.title,
197 | num: chapterInfo.number,
198 | content: _item
199 | }
200 | arr.push(_chapterInfo)
201 | })
202 | return arr
203 | }
204 |
205 | handleScroll(e) {
206 | let arr = []
207 | let chapterInfo
208 | let listView = this.refs.listView
209 | let x = e.nativeEvent.contentOffset.x
210 | const that = this
211 | if (this.count === 0) {
212 | this.count = (this.currentChapter - 1) * 375
213 | }
214 |
215 | this.x = x
216 | if ( x > this.count) {
217 | this.a = this.count
218 | this.count += this.nextChapter * 375
219 | if (this.number + 2 < parseInt(this.props.firstRenderChapters.countChapter)) {
220 | let json = {
221 | novelId: that.uuid,
222 | num: that.number + 2
223 | }
224 | Request.post(`/chapters`, json)
225 | .then((data) => {
226 | chapterInfo = data.response
227 | that.number = that.number + 1
228 | const arr = that.getContent(chapterInfo)
229 | that._concatData(arr)
230 | })
231 | }
232 | else {
233 | this.a = 0
234 | }
235 |
236 | // if (this.number + 2 < parseInt(this.props.firstRenderChapters.countChapter)) {
237 | // console.log(1);
238 | // this.a = this.count
239 | // this.count += this.nextChapter * 375
240 | // let json = {
241 | // novelId: that.uuid,
242 | // num: that.number + 2
243 | // }
244 | // Request.post(`/chapters`, json)
245 | // .then((data) => {
246 | // chapterInfo = data.response
247 | // that.number = that.number + 1
248 | // const arr = that.getContent(chapterInfo.content)
249 | // that._concatData(arr)
250 | // })
251 | // }
252 | // else {
253 | // console.log(2);
254 | // this.a = this.count
255 | // that.number = that.number + 1
256 | // this.count += this.currentChapter * 375
257 | // }
258 |
259 | }
260 |
261 | if (x < 0 && this.number === 0) {
262 | alert('已是第一页')
263 | }
264 |
265 |
266 | if (x < 0) {
267 | this.i = 1
268 | let json = {
269 | novelId: that.uuid,
270 | num: that.number - 1
271 | }
272 | Request.post(`/chapters`, json)
273 | .then((data) => {
274 | chapterInfo = data.response
275 | that.number = that.number - 1
276 | let content = that.nbsp2Space(chapterInfo.content)
277 | let _arr = Util.handleContent(content)
278 | that.currentChapter = _arr.length
279 | that.nextChapter = that.currentChapter
280 | _arr.forEach( function(_item) {
281 | let _chapterInfo = {
282 | title: chapterInfo.title,
283 | num: chapterInfo.number,
284 | content: _item
285 | }
286 | arr.push(_chapterInfo)
287 | })
288 | that.setState({searching: true})
289 | that._unshiftData(arr)
290 | })
291 | }
292 | }
293 |
294 | renderListView () {
295 | return(
296 |
306 | )
307 | }
308 |
309 | // List() {
310 | // return Object.keys(this.props.firstRenderChapters).map(key => this.props.firstRenderChapters[key])
311 | // }
312 |
313 | loading() {
314 | return(
315 |
316 | this.show() }
320 | >
321 | searching...
322 |
323 |
324 | )
325 | }
326 |
327 | renderContent(rowData) {
328 | return(
329 |
330 |
331 |
332 | {rowData.title}
333 |
334 |
335 |
336 | {rowData.content ? rowData.content.map((value, index,chapterContent) => {
337 | return (
338 |
339 | {value}
340 |
341 | )
342 | }) : null }
343 |
344 |
345 |
346 | 本章进度100%
347 |
348 |
349 | {rowData.num}/1022
350 |
351 |
352 |
353 |
354 | )
355 | }
356 |
357 | renderRow (rowData, sectionID, rowID, highlightRow) {
358 | return(
359 |
360 | this.show() }>
364 | {this.renderContent(rowData)}
365 |
366 |
367 | )
368 | }
369 | // {this.state.searching ? this.loading() : this.renderContent(rowData)}
370 | render() {
371 | return(
372 |
373 | this.handleScroll(e)}
378 | showsHorizontalScrollIndicator={false}
379 | showsVerticalScrollIndicator={false}
380 | pagingEnabled={true}
381 | >
382 | {this.state.searching ? this.loading() : this.renderListView()}
383 |
384 | { this.state.hide ? null : this.showReaderOptions() }
385 |
386 | );
387 | }
388 |
389 | componentWillUnmount() {
390 | if (this.a !== 0) {
391 | this.a = this.a + 375
392 | }
393 |
394 | // if (this.i === 1) {
395 | // this.a = this.a + 750
396 | // }
397 |
398 | const json = {
399 | novel: {
400 | id: this.uuid,
401 | num: this.number,
402 | x: this.x - this.a
403 | }
404 | }
405 |
406 | AsyncStorage.getItem('userToken')
407 | .then((token) => {
408 | Request.post(`/bookshelfs/change`, json, token)
409 | .then((res) => {
410 | return true
411 | })
412 | })
413 | .catch( (e) => {
414 | console.log(e);
415 | })
416 | // this.props.firstRenderChapters = {}
417 | }
418 |
419 | // {this.state.searching ? this.loading() : this.renderListView()}
420 | showReaderOptions(){
421 | return (
422 |
423 |
430 | { this.goBack() } }>
433 |
434 |
435 |
436 |
439 |
440 |
447 | { this.goDerictory() } }>
449 |
450 |
451 | 目录
452 |
453 |
454 |
455 |
456 | )
457 | }
458 |
459 | //显示动画
460 | in() {
461 | Animated.parallel([
462 |
463 | Animated.timing(
464 | this.state.offset,
465 | {
466 | easing: Easing.linear,
467 | duration: 200,
468 | toValue: 1,
469 | }
470 | )
471 | ]).start();
472 | }
473 |
474 | //隐藏动画
475 | out(){
476 | Animated.parallel([
477 | Animated.timing(
478 | this.state.offset,
479 | {
480 | easing: Easing.linear,
481 | duration: 200,
482 | toValue: 0,
483 | }
484 | )
485 | ]).start((finished) => this.setState({hide: true}));
486 | }
487 |
488 | //取消
489 | iknow() {
490 | if(!this.state.hide){
491 | this.out();
492 | }
493 | }
494 |
495 | show() {
496 | if(this.state.hide){
497 | this.setState({hide: false}, this.in);
498 | }
499 | }
500 |
501 | nbsp2Space(str) {
502 | if (!str) {
503 | return null
504 | }
505 | return str.replace(/ /g, ' ')
506 | }
507 |
508 | }
509 |
510 | const styles = StyleSheet.create({
511 | container: {
512 | flex: 1,
513 | backgroundColor: '#E9DFC7',
514 | },
515 | top: {
516 | height: 10,
517 | marginTop: 10,
518 | marginLeft: 10,
519 | },
520 | chapterContent: {
521 | // backgroundColor: '#604733',
522 | marginTop: 10,
523 | marginRight: 10,
524 | marginLeft: 10,
525 | height: Util.size.height - 70
526 | },
527 | chapterName: {
528 | fontSize: 10,
529 | color: '#A58F72',
530 | },
531 | bigChapterName: {
532 | fontSize: 22,
533 | },
534 | ficContent: {
535 | color: '#604733',
536 | fontSize: 19,
537 | lineHeight:34,
538 | },
539 | foot: {
540 | height: 12,
541 | marginLeft: 10,
542 | width: Dimensions.get('window').width - 20,
543 | flexDirection: 'row',
544 | },
545 | footLeft: {
546 | flex:1,
547 | width: 70,
548 | },
549 | footRight: {
550 | flex:1,
551 | textAlign: 'right',
552 | },
553 | alertContainer: {
554 | position:"absolute",
555 | width:Util.size.width,
556 | height:Util.size.height,
557 | },
558 | alertTop: {
559 | height: 70,
560 | backgroundColor: '#3B3A38',
561 | flexDirection: 'row'
562 | },
563 | alertMiddle: {
564 | height: Util.size.height - 140,
565 | },
566 | alertFoot: {
567 | height: 70,
568 | backgroundColor: '#3B3A38',
569 | },
570 | backImg: {
571 | marginTop: 30,
572 | marginLeft: 10,
573 | },
574 | directoryImg: {
575 | marginLeft: 10,
576 | marginTop: 10,
577 | },
578 | directoryText: {
579 | marginLeft: 12,
580 | color: '#9D9C9B'
581 | }
582 | });
583 |
584 | function mapStateToProps(state) {
585 | return {
586 | firstRenderChapters: state.firstRenderChapters,
587 | directory: state.directory,
588 | chapterInfo: state.chapterInfo,
589 | navigationParams: state.navigationParams,
590 | };
591 | }
592 |
593 | function mapDispatchToProps(dispatch) {
594 | return bindActionCreators(ActionCreators, dispatch);
595 | }
596 |
597 | export default connect(mapStateToProps, mapDispatchToProps)(Reader);
598 |
--------------------------------------------------------------------------------
/ios/YCool.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 /* YCoolTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* YCoolTests.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 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
26 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
27 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
28 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */; };
29 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; };
30 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; };
31 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; };
32 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; };
33 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; };
34 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; };
35 | 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
36 | 2D62B0F51E6FDC9900C1D2DF /* libRNDeviceInfo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D62B0F41E6FDC7900C1D2DF /* libRNDeviceInfo.a */; };
37 | 2D68871E1E8BB8EC00BF8D34 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D68871D1E8BB8EC00BF8D34 /* assets */; };
38 | 2D68873A1E8BB8F700BF8D34 /* index.ios.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 2D6887391E8BB8F700BF8D34 /* index.ios.jsbundle */; };
39 | 2DCD954D1E0B4F2C00145EB5 /* YCoolTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* YCoolTests.m */; };
40 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
41 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
42 | /* End PBXBuildFile section */
43 |
44 | /* Begin PBXContainerItemProxy section */
45 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
46 | isa = PBXContainerItemProxy;
47 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
48 | proxyType = 2;
49 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
50 | remoteInfo = RCTActionSheet;
51 | };
52 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
53 | isa = PBXContainerItemProxy;
54 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
55 | proxyType = 2;
56 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
57 | remoteInfo = RCTGeolocation;
58 | };
59 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
60 | isa = PBXContainerItemProxy;
61 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
62 | proxyType = 2;
63 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
64 | remoteInfo = RCTImage;
65 | };
66 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
67 | isa = PBXContainerItemProxy;
68 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
69 | proxyType = 2;
70 | remoteGlobalIDString = 58B511DB1A9E6C8500147676;
71 | remoteInfo = RCTNetwork;
72 | };
73 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
74 | isa = PBXContainerItemProxy;
75 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
76 | proxyType = 2;
77 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
78 | remoteInfo = RCTVibration;
79 | };
80 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
81 | isa = PBXContainerItemProxy;
82 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
83 | proxyType = 1;
84 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
85 | remoteInfo = YCool;
86 | };
87 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
88 | isa = PBXContainerItemProxy;
89 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
90 | proxyType = 2;
91 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
92 | remoteInfo = RCTSettings;
93 | };
94 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
95 | isa = PBXContainerItemProxy;
96 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
97 | proxyType = 2;
98 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
99 | remoteInfo = RCTWebSocket;
100 | };
101 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
102 | isa = PBXContainerItemProxy;
103 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
104 | proxyType = 2;
105 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
106 | remoteInfo = React;
107 | };
108 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = {
109 | isa = PBXContainerItemProxy;
110 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
111 | proxyType = 1;
112 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
113 | remoteInfo = "YCool-tvOS";
114 | };
115 | 2D62B0F31E6FDC7900C1D2DF /* PBXContainerItemProxy */ = {
116 | isa = PBXContainerItemProxy;
117 | containerPortal = 2D62B0D61E6FDC7900C1D2DF /* RNDeviceInfo.xcodeproj */;
118 | proxyType = 2;
119 | remoteGlobalIDString = DA5891D81BA9A9FC002B4DB2;
120 | remoteInfo = RNDeviceInfo;
121 | };
122 | 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
123 | isa = PBXContainerItemProxy;
124 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
125 | proxyType = 2;
126 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D;
127 | remoteInfo = "RCTImage-tvOS";
128 | };
129 | 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = {
130 | isa = PBXContainerItemProxy;
131 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
132 | proxyType = 2;
133 | remoteGlobalIDString = 2D2A28471D9B043800D4039D;
134 | remoteInfo = "RCTLinking-tvOS";
135 | };
136 | 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
137 | isa = PBXContainerItemProxy;
138 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
139 | proxyType = 2;
140 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D;
141 | remoteInfo = "RCTNetwork-tvOS";
142 | };
143 | 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
144 | isa = PBXContainerItemProxy;
145 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
146 | proxyType = 2;
147 | remoteGlobalIDString = 2D2A28611D9B046600D4039D;
148 | remoteInfo = "RCTSettings-tvOS";
149 | };
150 | 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = {
151 | isa = PBXContainerItemProxy;
152 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
153 | proxyType = 2;
154 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D;
155 | remoteInfo = "RCTText-tvOS";
156 | };
157 | 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = {
158 | isa = PBXContainerItemProxy;
159 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
160 | proxyType = 2;
161 | remoteGlobalIDString = 2D2A28881D9B049200D4039D;
162 | remoteInfo = "RCTWebSocket-tvOS";
163 | };
164 | 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = {
165 | isa = PBXContainerItemProxy;
166 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
167 | proxyType = 2;
168 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
169 | remoteInfo = "React-tvOS";
170 | };
171 | 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = {
172 | isa = PBXContainerItemProxy;
173 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
174 | proxyType = 2;
175 | remoteGlobalIDString = 3D3C059A1DE3340900C268FA;
176 | remoteInfo = yoga;
177 | };
178 | 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = {
179 | isa = PBXContainerItemProxy;
180 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
181 | proxyType = 2;
182 | remoteGlobalIDString = 3D3C06751DE3340C00C268FA;
183 | remoteInfo = "yoga-tvOS";
184 | };
185 | 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = {
186 | isa = PBXContainerItemProxy;
187 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
188 | proxyType = 2;
189 | remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4;
190 | remoteInfo = cxxreact;
191 | };
192 | 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
193 | isa = PBXContainerItemProxy;
194 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
195 | proxyType = 2;
196 | remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
197 | remoteInfo = "cxxreact-tvOS";
198 | };
199 | 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
200 | isa = PBXContainerItemProxy;
201 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
202 | proxyType = 2;
203 | remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
204 | remoteInfo = jschelpers;
205 | };
206 | 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
207 | isa = PBXContainerItemProxy;
208 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
209 | proxyType = 2;
210 | remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
211 | remoteInfo = "jschelpers-tvOS";
212 | };
213 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
214 | isa = PBXContainerItemProxy;
215 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
216 | proxyType = 2;
217 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
218 | remoteInfo = RCTAnimation;
219 | };
220 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
221 | isa = PBXContainerItemProxy;
222 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
223 | proxyType = 2;
224 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
225 | remoteInfo = "RCTAnimation-tvOS";
226 | };
227 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
228 | isa = PBXContainerItemProxy;
229 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
230 | proxyType = 2;
231 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
232 | remoteInfo = RCTLinking;
233 | };
234 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
235 | isa = PBXContainerItemProxy;
236 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
237 | proxyType = 2;
238 | remoteGlobalIDString = 58B5119B1A9E6C1200147676;
239 | remoteInfo = RCTText;
240 | };
241 | /* End PBXContainerItemProxy section */
242 |
243 | /* Begin PBXFileReference section */
244 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
245 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; };
246 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; };
247 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; };
248 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; };
249 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; };
250 | 00E356EE1AD99517003FC87E /* YCoolTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YCoolTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
251 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
252 | 00E356F21AD99517003FC87E /* YCoolTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YCoolTests.m; sourceTree = ""; };
253 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; };
254 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; };
255 | 13B07F961A680F5B00A75B9A /* YCool.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YCool.app; sourceTree = BUILT_PRODUCTS_DIR; };
256 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = YCool/AppDelegate.h; sourceTree = ""; };
257 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = YCool/AppDelegate.m; sourceTree = ""; };
258 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
259 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = YCool/Images.xcassets; sourceTree = ""; };
260 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = YCool/Info.plist; sourceTree = ""; };
261 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = YCool/main.m; sourceTree = ""; };
262 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
263 | 2D02E47B1E0B4A5D006451C7 /* YCool-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "YCool-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
264 | 2D02E4901E0B4A5D006451C7 /* YCool-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "YCool-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
265 | 2D62B0D61E6FDC7900C1D2DF /* RNDeviceInfo.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNDeviceInfo.xcodeproj; path = "../node_modules/react-native-device-info/RNDeviceInfo.xcodeproj"; sourceTree = ""; };
266 | 2D68871D1E8BB8EC00BF8D34 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = bundle/assets; sourceTree = ""; };
267 | 2D6887391E8BB8F700BF8D34 /* index.ios.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = index.ios.jsbundle; path = bundle/index.ios.jsbundle; sourceTree = ""; };
268 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; };
269 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
270 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
271 | /* End PBXFileReference section */
272 |
273 | /* Begin PBXFrameworksBuildPhase section */
274 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
275 | isa = PBXFrameworksBuildPhase;
276 | buildActionMask = 2147483647;
277 | files = (
278 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
279 | );
280 | runOnlyForDeploymentPostprocessing = 0;
281 | };
282 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
283 | isa = PBXFrameworksBuildPhase;
284 | buildActionMask = 2147483647;
285 | files = (
286 | 2D62B0F51E6FDC9900C1D2DF /* libRNDeviceInfo.a in Frameworks */,
287 | 146834051AC3E58100842450 /* libReact.a in Frameworks */,
288 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
289 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
290 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
291 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
292 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
293 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
294 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
295 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
296 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
297 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
298 | );
299 | runOnlyForDeploymentPostprocessing = 0;
300 | };
301 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
302 | isa = PBXFrameworksBuildPhase;
303 | buildActionMask = 2147483647;
304 | files = (
305 | 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */,
306 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */,
307 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */,
308 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */,
309 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */,
310 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */,
311 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */,
312 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */,
313 | );
314 | runOnlyForDeploymentPostprocessing = 0;
315 | };
316 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
317 | isa = PBXFrameworksBuildPhase;
318 | buildActionMask = 2147483647;
319 | files = (
320 | );
321 | runOnlyForDeploymentPostprocessing = 0;
322 | };
323 | /* End PBXFrameworksBuildPhase section */
324 |
325 | /* Begin PBXGroup section */
326 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = {
327 | isa = PBXGroup;
328 | children = (
329 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
330 | );
331 | name = Products;
332 | sourceTree = "";
333 | };
334 | 00C302B61ABCB90400DB3ED1 /* Products */ = {
335 | isa = PBXGroup;
336 | children = (
337 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
338 | );
339 | name = Products;
340 | sourceTree = "";
341 | };
342 | 00C302BC1ABCB91800DB3ED1 /* Products */ = {
343 | isa = PBXGroup;
344 | children = (
345 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
346 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */,
347 | );
348 | name = Products;
349 | sourceTree = "";
350 | };
351 | 00C302D41ABCB9D200DB3ED1 /* Products */ = {
352 | isa = PBXGroup;
353 | children = (
354 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
355 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */,
356 | );
357 | name = Products;
358 | sourceTree = "";
359 | };
360 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = {
361 | isa = PBXGroup;
362 | children = (
363 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
364 | );
365 | name = Products;
366 | sourceTree = "";
367 | };
368 | 00E356EF1AD99517003FC87E /* YCoolTests */ = {
369 | isa = PBXGroup;
370 | children = (
371 | 00E356F21AD99517003FC87E /* YCoolTests.m */,
372 | 00E356F01AD99517003FC87E /* Supporting Files */,
373 | );
374 | path = YCoolTests;
375 | sourceTree = "";
376 | };
377 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
378 | isa = PBXGroup;
379 | children = (
380 | 00E356F11AD99517003FC87E /* Info.plist */,
381 | );
382 | name = "Supporting Files";
383 | sourceTree = "";
384 | };
385 | 139105B71AF99BAD00B5F7CC /* Products */ = {
386 | isa = PBXGroup;
387 | children = (
388 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
389 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */,
390 | );
391 | name = Products;
392 | sourceTree = "";
393 | };
394 | 139FDEE71B06529A00C62182 /* Products */ = {
395 | isa = PBXGroup;
396 | children = (
397 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
398 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
399 | );
400 | name = Products;
401 | sourceTree = "";
402 | };
403 | 13B07FAE1A68108700A75B9A /* YCool */ = {
404 | isa = PBXGroup;
405 | children = (
406 | 2D6887391E8BB8F700BF8D34 /* index.ios.jsbundle */,
407 | 2D68871D1E8BB8EC00BF8D34 /* assets */,
408 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
409 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
410 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
411 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
412 | 13B07FB61A68108700A75B9A /* Info.plist */,
413 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
414 | 13B07FB71A68108700A75B9A /* main.m */,
415 | );
416 | name = YCool;
417 | sourceTree = "";
418 | };
419 | 146834001AC3E56700842450 /* Products */ = {
420 | isa = PBXGroup;
421 | children = (
422 | 146834041AC3E56700842450 /* libReact.a */,
423 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */,
424 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */,
425 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
426 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
427 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
428 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
429 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
430 | );
431 | name = Products;
432 | sourceTree = "";
433 | };
434 | 2D62B0D71E6FDC7900C1D2DF /* Products */ = {
435 | isa = PBXGroup;
436 | children = (
437 | 2D62B0F41E6FDC7900C1D2DF /* libRNDeviceInfo.a */,
438 | );
439 | name = Products;
440 | sourceTree = "";
441 | };
442 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = {
443 | isa = PBXGroup;
444 | children = (
445 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */,
446 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */,
447 | );
448 | name = Products;
449 | sourceTree = "";
450 | };
451 | 78C398B11ACF4ADC00677621 /* Products */ = {
452 | isa = PBXGroup;
453 | children = (
454 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
455 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */,
456 | );
457 | name = Products;
458 | sourceTree = "";
459 | };
460 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
461 | isa = PBXGroup;
462 | children = (
463 | 2D62B0D61E6FDC7900C1D2DF /* RNDeviceInfo.xcodeproj */,
464 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
465 | 146833FF1AC3E56700842450 /* React.xcodeproj */,
466 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
467 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
468 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
469 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
470 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
471 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
472 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
473 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
474 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
475 | );
476 | name = Libraries;
477 | sourceTree = "";
478 | };
479 | 832341B11AAA6A8300B99B32 /* Products */ = {
480 | isa = PBXGroup;
481 | children = (
482 | 832341B51AAA6A8300B99B32 /* libRCTText.a */,
483 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */,
484 | );
485 | name = Products;
486 | sourceTree = "";
487 | };
488 | 83CBB9F61A601CBA00E9B192 = {
489 | isa = PBXGroup;
490 | children = (
491 | 13B07FAE1A68108700A75B9A /* YCool */,
492 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
493 | 00E356EF1AD99517003FC87E /* YCoolTests */,
494 | 83CBBA001A601CBA00E9B192 /* Products */,
495 | );
496 | indentWidth = 2;
497 | sourceTree = "";
498 | tabWidth = 2;
499 | };
500 | 83CBBA001A601CBA00E9B192 /* Products */ = {
501 | isa = PBXGroup;
502 | children = (
503 | 13B07F961A680F5B00A75B9A /* YCool.app */,
504 | 00E356EE1AD99517003FC87E /* YCoolTests.xctest */,
505 | 2D02E47B1E0B4A5D006451C7 /* YCool-tvOS.app */,
506 | 2D02E4901E0B4A5D006451C7 /* YCool-tvOSTests.xctest */,
507 | );
508 | name = Products;
509 | sourceTree = "";
510 | };
511 | /* End PBXGroup section */
512 |
513 | /* Begin PBXNativeTarget section */
514 | 00E356ED1AD99517003FC87E /* YCoolTests */ = {
515 | isa = PBXNativeTarget;
516 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "YCoolTests" */;
517 | buildPhases = (
518 | 00E356EA1AD99517003FC87E /* Sources */,
519 | 00E356EB1AD99517003FC87E /* Frameworks */,
520 | 00E356EC1AD99517003FC87E /* Resources */,
521 | );
522 | buildRules = (
523 | );
524 | dependencies = (
525 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
526 | );
527 | name = YCoolTests;
528 | productName = YCoolTests;
529 | productReference = 00E356EE1AD99517003FC87E /* YCoolTests.xctest */;
530 | productType = "com.apple.product-type.bundle.unit-test";
531 | };
532 | 13B07F861A680F5B00A75B9A /* YCool */ = {
533 | isa = PBXNativeTarget;
534 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "YCool" */;
535 | buildPhases = (
536 | 13B07F871A680F5B00A75B9A /* Sources */,
537 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
538 | 13B07F8E1A680F5B00A75B9A /* Resources */,
539 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
540 | );
541 | buildRules = (
542 | );
543 | dependencies = (
544 | );
545 | name = YCool;
546 | productName = "Hello World";
547 | productReference = 13B07F961A680F5B00A75B9A /* YCool.app */;
548 | productType = "com.apple.product-type.application";
549 | };
550 | 2D02E47A1E0B4A5D006451C7 /* YCool-tvOS */ = {
551 | isa = PBXNativeTarget;
552 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "YCool-tvOS" */;
553 | buildPhases = (
554 | 2D02E4771E0B4A5D006451C7 /* Sources */,
555 | 2D02E4781E0B4A5D006451C7 /* Frameworks */,
556 | 2D02E4791E0B4A5D006451C7 /* Resources */,
557 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */,
558 | );
559 | buildRules = (
560 | );
561 | dependencies = (
562 | );
563 | name = "YCool-tvOS";
564 | productName = "YCool-tvOS";
565 | productReference = 2D02E47B1E0B4A5D006451C7 /* YCool-tvOS.app */;
566 | productType = "com.apple.product-type.application";
567 | };
568 | 2D02E48F1E0B4A5D006451C7 /* YCool-tvOSTests */ = {
569 | isa = PBXNativeTarget;
570 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "YCool-tvOSTests" */;
571 | buildPhases = (
572 | 2D02E48C1E0B4A5D006451C7 /* Sources */,
573 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */,
574 | 2D02E48E1E0B4A5D006451C7 /* Resources */,
575 | );
576 | buildRules = (
577 | );
578 | dependencies = (
579 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */,
580 | );
581 | name = "YCool-tvOSTests";
582 | productName = "YCool-tvOSTests";
583 | productReference = 2D02E4901E0B4A5D006451C7 /* YCool-tvOSTests.xctest */;
584 | productType = "com.apple.product-type.bundle.unit-test";
585 | };
586 | /* End PBXNativeTarget section */
587 |
588 | /* Begin PBXProject section */
589 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
590 | isa = PBXProject;
591 | attributes = {
592 | LastUpgradeCheck = 0610;
593 | ORGANIZATIONNAME = Facebook;
594 | TargetAttributes = {
595 | 00E356ED1AD99517003FC87E = {
596 | CreatedOnToolsVersion = 6.2;
597 | DevelopmentTeam = 59N9798M8S;
598 | TestTargetID = 13B07F861A680F5B00A75B9A;
599 | };
600 | 13B07F861A680F5B00A75B9A = {
601 | DevelopmentTeam = 59N9798M8S;
602 | ProvisioningStyle = Automatic;
603 | };
604 | 2D02E47A1E0B4A5D006451C7 = {
605 | CreatedOnToolsVersion = 8.2.1;
606 | ProvisioningStyle = Automatic;
607 | };
608 | 2D02E48F1E0B4A5D006451C7 = {
609 | CreatedOnToolsVersion = 8.2.1;
610 | ProvisioningStyle = Automatic;
611 | TestTargetID = 2D02E47A1E0B4A5D006451C7;
612 | };
613 | };
614 | };
615 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "YCool" */;
616 | compatibilityVersion = "Xcode 3.2";
617 | developmentRegion = English;
618 | hasScannedForEncodings = 0;
619 | knownRegions = (
620 | en,
621 | Base,
622 | );
623 | mainGroup = 83CBB9F61A601CBA00E9B192;
624 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
625 | projectDirPath = "";
626 | projectReferences = (
627 | {
628 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
629 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
630 | },
631 | {
632 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */;
633 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
634 | },
635 | {
636 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
637 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
638 | },
639 | {
640 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
641 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
642 | },
643 | {
644 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
645 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
646 | },
647 | {
648 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
649 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
650 | },
651 | {
652 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
653 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
654 | },
655 | {
656 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
657 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
658 | },
659 | {
660 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
661 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
662 | },
663 | {
664 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
665 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
666 | },
667 | {
668 | ProductGroup = 146834001AC3E56700842450 /* Products */;
669 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
670 | },
671 | {
672 | ProductGroup = 2D62B0D71E6FDC7900C1D2DF /* Products */;
673 | ProjectRef = 2D62B0D61E6FDC7900C1D2DF /* RNDeviceInfo.xcodeproj */;
674 | },
675 | );
676 | projectRoot = "";
677 | targets = (
678 | 13B07F861A680F5B00A75B9A /* YCool */,
679 | 00E356ED1AD99517003FC87E /* YCoolTests */,
680 | 2D02E47A1E0B4A5D006451C7 /* YCool-tvOS */,
681 | 2D02E48F1E0B4A5D006451C7 /* YCool-tvOSTests */,
682 | );
683 | };
684 | /* End PBXProject section */
685 |
686 | /* Begin PBXReferenceProxy section */
687 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
688 | isa = PBXReferenceProxy;
689 | fileType = archive.ar;
690 | path = libRCTActionSheet.a;
691 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
692 | sourceTree = BUILT_PRODUCTS_DIR;
693 | };
694 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
695 | isa = PBXReferenceProxy;
696 | fileType = archive.ar;
697 | path = libRCTGeolocation.a;
698 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
699 | sourceTree = BUILT_PRODUCTS_DIR;
700 | };
701 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
702 | isa = PBXReferenceProxy;
703 | fileType = archive.ar;
704 | path = libRCTImage.a;
705 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
706 | sourceTree = BUILT_PRODUCTS_DIR;
707 | };
708 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
709 | isa = PBXReferenceProxy;
710 | fileType = archive.ar;
711 | path = libRCTNetwork.a;
712 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
713 | sourceTree = BUILT_PRODUCTS_DIR;
714 | };
715 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
716 | isa = PBXReferenceProxy;
717 | fileType = archive.ar;
718 | path = libRCTVibration.a;
719 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
720 | sourceTree = BUILT_PRODUCTS_DIR;
721 | };
722 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
723 | isa = PBXReferenceProxy;
724 | fileType = archive.ar;
725 | path = libRCTSettings.a;
726 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
727 | sourceTree = BUILT_PRODUCTS_DIR;
728 | };
729 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
730 | isa = PBXReferenceProxy;
731 | fileType = archive.ar;
732 | path = libRCTWebSocket.a;
733 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
734 | sourceTree = BUILT_PRODUCTS_DIR;
735 | };
736 | 146834041AC3E56700842450 /* libReact.a */ = {
737 | isa = PBXReferenceProxy;
738 | fileType = archive.ar;
739 | path = libReact.a;
740 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
741 | sourceTree = BUILT_PRODUCTS_DIR;
742 | };
743 | 2D62B0F41E6FDC7900C1D2DF /* libRNDeviceInfo.a */ = {
744 | isa = PBXReferenceProxy;
745 | fileType = archive.ar;
746 | path = libRNDeviceInfo.a;
747 | remoteRef = 2D62B0F31E6FDC7900C1D2DF /* PBXContainerItemProxy */;
748 | sourceTree = BUILT_PRODUCTS_DIR;
749 | };
750 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
751 | isa = PBXReferenceProxy;
752 | fileType = archive.ar;
753 | path = "libRCTImage-tvOS.a";
754 | remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */;
755 | sourceTree = BUILT_PRODUCTS_DIR;
756 | };
757 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = {
758 | isa = PBXReferenceProxy;
759 | fileType = archive.ar;
760 | path = "libRCTLinking-tvOS.a";
761 | remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */;
762 | sourceTree = BUILT_PRODUCTS_DIR;
763 | };
764 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = {
765 | isa = PBXReferenceProxy;
766 | fileType = archive.ar;
767 | path = "libRCTNetwork-tvOS.a";
768 | remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */;
769 | sourceTree = BUILT_PRODUCTS_DIR;
770 | };
771 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = {
772 | isa = PBXReferenceProxy;
773 | fileType = archive.ar;
774 | path = "libRCTSettings-tvOS.a";
775 | remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */;
776 | sourceTree = BUILT_PRODUCTS_DIR;
777 | };
778 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = {
779 | isa = PBXReferenceProxy;
780 | fileType = archive.ar;
781 | path = "libRCTText-tvOS.a";
782 | remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */;
783 | sourceTree = BUILT_PRODUCTS_DIR;
784 | };
785 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = {
786 | isa = PBXReferenceProxy;
787 | fileType = archive.ar;
788 | path = "libRCTWebSocket-tvOS.a";
789 | remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */;
790 | sourceTree = BUILT_PRODUCTS_DIR;
791 | };
792 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = {
793 | isa = PBXReferenceProxy;
794 | fileType = archive.ar;
795 | path = libReact.a;
796 | remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */;
797 | sourceTree = BUILT_PRODUCTS_DIR;
798 | };
799 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = {
800 | isa = PBXReferenceProxy;
801 | fileType = archive.ar;
802 | path = libyoga.a;
803 | remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */;
804 | sourceTree = BUILT_PRODUCTS_DIR;
805 | };
806 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = {
807 | isa = PBXReferenceProxy;
808 | fileType = archive.ar;
809 | path = libyoga.a;
810 | remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */;
811 | sourceTree = BUILT_PRODUCTS_DIR;
812 | };
813 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = {
814 | isa = PBXReferenceProxy;
815 | fileType = archive.ar;
816 | path = libcxxreact.a;
817 | remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */;
818 | sourceTree = BUILT_PRODUCTS_DIR;
819 | };
820 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = {
821 | isa = PBXReferenceProxy;
822 | fileType = archive.ar;
823 | path = libcxxreact.a;
824 | remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */;
825 | sourceTree = BUILT_PRODUCTS_DIR;
826 | };
827 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = {
828 | isa = PBXReferenceProxy;
829 | fileType = archive.ar;
830 | path = libjschelpers.a;
831 | remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */;
832 | sourceTree = BUILT_PRODUCTS_DIR;
833 | };
834 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = {
835 | isa = PBXReferenceProxy;
836 | fileType = archive.ar;
837 | path = libjschelpers.a;
838 | remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
839 | sourceTree = BUILT_PRODUCTS_DIR;
840 | };
841 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
842 | isa = PBXReferenceProxy;
843 | fileType = archive.ar;
844 | path = libRCTAnimation.a;
845 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
846 | sourceTree = BUILT_PRODUCTS_DIR;
847 | };
848 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = {
849 | isa = PBXReferenceProxy;
850 | fileType = archive.ar;
851 | path = "libRCTAnimation-tvOS.a";
852 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
853 | sourceTree = BUILT_PRODUCTS_DIR;
854 | };
855 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
856 | isa = PBXReferenceProxy;
857 | fileType = archive.ar;
858 | path = libRCTLinking.a;
859 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
860 | sourceTree = BUILT_PRODUCTS_DIR;
861 | };
862 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
863 | isa = PBXReferenceProxy;
864 | fileType = archive.ar;
865 | path = libRCTText.a;
866 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
867 | sourceTree = BUILT_PRODUCTS_DIR;
868 | };
869 | /* End PBXReferenceProxy section */
870 |
871 | /* Begin PBXResourcesBuildPhase section */
872 | 00E356EC1AD99517003FC87E /* Resources */ = {
873 | isa = PBXResourcesBuildPhase;
874 | buildActionMask = 2147483647;
875 | files = (
876 | );
877 | runOnlyForDeploymentPostprocessing = 0;
878 | };
879 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
880 | isa = PBXResourcesBuildPhase;
881 | buildActionMask = 2147483647;
882 | files = (
883 | 2D68873A1E8BB8F700BF8D34 /* index.ios.jsbundle in Resources */,
884 | 2D68871E1E8BB8EC00BF8D34 /* assets in Resources */,
885 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
886 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
887 | );
888 | runOnlyForDeploymentPostprocessing = 0;
889 | };
890 | 2D02E4791E0B4A5D006451C7 /* Resources */ = {
891 | isa = PBXResourcesBuildPhase;
892 | buildActionMask = 2147483647;
893 | files = (
894 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
895 | );
896 | runOnlyForDeploymentPostprocessing = 0;
897 | };
898 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = {
899 | isa = PBXResourcesBuildPhase;
900 | buildActionMask = 2147483647;
901 | files = (
902 | );
903 | runOnlyForDeploymentPostprocessing = 0;
904 | };
905 | /* End PBXResourcesBuildPhase section */
906 |
907 | /* Begin PBXShellScriptBuildPhase section */
908 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
909 | isa = PBXShellScriptBuildPhase;
910 | buildActionMask = 2147483647;
911 | files = (
912 | );
913 | inputPaths = (
914 | );
915 | name = "Bundle React Native code and images";
916 | outputPaths = (
917 | );
918 | runOnlyForDeploymentPostprocessing = 0;
919 | shellPath = /bin/sh;
920 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
921 | };
922 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
923 | isa = PBXShellScriptBuildPhase;
924 | buildActionMask = 2147483647;
925 | files = (
926 | );
927 | inputPaths = (
928 | );
929 | name = "Bundle React Native Code And Images";
930 | outputPaths = (
931 | );
932 | runOnlyForDeploymentPostprocessing = 0;
933 | shellPath = /bin/sh;
934 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
935 | };
936 | /* End PBXShellScriptBuildPhase section */
937 |
938 | /* Begin PBXSourcesBuildPhase section */
939 | 00E356EA1AD99517003FC87E /* Sources */ = {
940 | isa = PBXSourcesBuildPhase;
941 | buildActionMask = 2147483647;
942 | files = (
943 | 00E356F31AD99517003FC87E /* YCoolTests.m in Sources */,
944 | );
945 | runOnlyForDeploymentPostprocessing = 0;
946 | };
947 | 13B07F871A680F5B00A75B9A /* Sources */ = {
948 | isa = PBXSourcesBuildPhase;
949 | buildActionMask = 2147483647;
950 | files = (
951 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
952 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
953 | );
954 | runOnlyForDeploymentPostprocessing = 0;
955 | };
956 | 2D02E4771E0B4A5D006451C7 /* Sources */ = {
957 | isa = PBXSourcesBuildPhase;
958 | buildActionMask = 2147483647;
959 | files = (
960 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */,
961 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */,
962 | );
963 | runOnlyForDeploymentPostprocessing = 0;
964 | };
965 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = {
966 | isa = PBXSourcesBuildPhase;
967 | buildActionMask = 2147483647;
968 | files = (
969 | 2DCD954D1E0B4F2C00145EB5 /* YCoolTests.m in Sources */,
970 | );
971 | runOnlyForDeploymentPostprocessing = 0;
972 | };
973 | /* End PBXSourcesBuildPhase section */
974 |
975 | /* Begin PBXTargetDependency section */
976 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
977 | isa = PBXTargetDependency;
978 | target = 13B07F861A680F5B00A75B9A /* YCool */;
979 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
980 | };
981 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = {
982 | isa = PBXTargetDependency;
983 | target = 2D02E47A1E0B4A5D006451C7 /* YCool-tvOS */;
984 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */;
985 | };
986 | /* End PBXTargetDependency section */
987 |
988 | /* Begin PBXVariantGroup section */
989 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
990 | isa = PBXVariantGroup;
991 | children = (
992 | 13B07FB21A68108700A75B9A /* Base */,
993 | );
994 | name = LaunchScreen.xib;
995 | path = YCool;
996 | sourceTree = "";
997 | };
998 | /* End PBXVariantGroup section */
999 |
1000 | /* Begin XCBuildConfiguration section */
1001 | 00E356F61AD99517003FC87E /* Debug */ = {
1002 | isa = XCBuildConfiguration;
1003 | buildSettings = {
1004 | BUNDLE_LOADER = "$(TEST_HOST)";
1005 | DEVELOPMENT_TEAM = 59N9798M8S;
1006 | GCC_PREPROCESSOR_DEFINITIONS = (
1007 | "DEBUG=1",
1008 | "$(inherited)",
1009 | );
1010 | INFOPLIST_FILE = YCoolTests/Info.plist;
1011 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1012 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1013 | OTHER_LDFLAGS = (
1014 | "-ObjC",
1015 | "-lc++",
1016 | );
1017 | PRODUCT_NAME = "$(TARGET_NAME)";
1018 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YCool.app/YCool";
1019 | };
1020 | name = Debug;
1021 | };
1022 | 00E356F71AD99517003FC87E /* Release */ = {
1023 | isa = XCBuildConfiguration;
1024 | buildSettings = {
1025 | BUNDLE_LOADER = "$(TEST_HOST)";
1026 | COPY_PHASE_STRIP = NO;
1027 | DEVELOPMENT_TEAM = 59N9798M8S;
1028 | INFOPLIST_FILE = YCoolTests/Info.plist;
1029 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1030 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1031 | OTHER_LDFLAGS = (
1032 | "-ObjC",
1033 | "-lc++",
1034 | );
1035 | PRODUCT_NAME = "$(TARGET_NAME)";
1036 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YCool.app/YCool";
1037 | };
1038 | name = Release;
1039 | };
1040 | 13B07F941A680F5B00A75B9A /* Debug */ = {
1041 | isa = XCBuildConfiguration;
1042 | buildSettings = {
1043 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1044 | CODE_SIGN_IDENTITY = "iPhone Developer";
1045 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1046 | CURRENT_PROJECT_VERSION = 1;
1047 | DEAD_CODE_STRIPPING = NO;
1048 | DEVELOPMENT_TEAM = 59N9798M8S;
1049 | INFOPLIST_FILE = YCool/Info.plist;
1050 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1051 | NEW_SETTING = "";
1052 | NEW_SETTING1 = "";
1053 | OTHER_LDFLAGS = (
1054 | "$(inherited)",
1055 | "-ObjC",
1056 | "-lc++",
1057 | );
1058 | PRODUCT_NAME = YCool;
1059 | Signing = "";
1060 | VERSIONING_SYSTEM = "apple-generic";
1061 | };
1062 | name = Debug;
1063 | };
1064 | 13B07F951A680F5B00A75B9A /* Release */ = {
1065 | isa = XCBuildConfiguration;
1066 | buildSettings = {
1067 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1068 | CODE_SIGN_IDENTITY = "iPhone Developer";
1069 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1070 | CURRENT_PROJECT_VERSION = 1;
1071 | DEVELOPMENT_TEAM = 59N9798M8S;
1072 | INFOPLIST_FILE = YCool/Info.plist;
1073 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1074 | NEW_SETTING = "";
1075 | NEW_SETTING1 = "";
1076 | OTHER_LDFLAGS = (
1077 | "$(inherited)",
1078 | "-ObjC",
1079 | "-lc++",
1080 | );
1081 | PRODUCT_NAME = YCool;
1082 | Signing = "";
1083 | VERSIONING_SYSTEM = "apple-generic";
1084 | };
1085 | name = Release;
1086 | };
1087 | 2D02E4971E0B4A5E006451C7 /* Debug */ = {
1088 | isa = XCBuildConfiguration;
1089 | buildSettings = {
1090 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1091 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1092 | CLANG_ANALYZER_NONNULL = YES;
1093 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1094 | CLANG_WARN_INFINITE_RECURSION = YES;
1095 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1096 | DEBUG_INFORMATION_FORMAT = dwarf;
1097 | ENABLE_TESTABILITY = YES;
1098 | GCC_NO_COMMON_BLOCKS = YES;
1099 | INFOPLIST_FILE = "YCool-tvOS/Info.plist";
1100 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1101 | OTHER_LDFLAGS = (
1102 | "-ObjC",
1103 | "-lc++",
1104 | );
1105 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.YCool-tvOS";
1106 | PRODUCT_NAME = "$(TARGET_NAME)";
1107 | SDKROOT = appletvos;
1108 | TARGETED_DEVICE_FAMILY = 3;
1109 | TVOS_DEPLOYMENT_TARGET = 9.2;
1110 | };
1111 | name = Debug;
1112 | };
1113 | 2D02E4981E0B4A5E006451C7 /* Release */ = {
1114 | isa = XCBuildConfiguration;
1115 | buildSettings = {
1116 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1117 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1118 | CLANG_ANALYZER_NONNULL = YES;
1119 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1120 | CLANG_WARN_INFINITE_RECURSION = YES;
1121 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1122 | COPY_PHASE_STRIP = NO;
1123 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1124 | GCC_NO_COMMON_BLOCKS = YES;
1125 | INFOPLIST_FILE = "YCool-tvOS/Info.plist";
1126 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1127 | OTHER_LDFLAGS = (
1128 | "-ObjC",
1129 | "-lc++",
1130 | );
1131 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.YCool-tvOS";
1132 | PRODUCT_NAME = "$(TARGET_NAME)";
1133 | SDKROOT = appletvos;
1134 | TARGETED_DEVICE_FAMILY = 3;
1135 | TVOS_DEPLOYMENT_TARGET = 9.2;
1136 | };
1137 | name = Release;
1138 | };
1139 | 2D02E4991E0B4A5E006451C7 /* Debug */ = {
1140 | isa = XCBuildConfiguration;
1141 | buildSettings = {
1142 | BUNDLE_LOADER = "$(TEST_HOST)";
1143 | CLANG_ANALYZER_NONNULL = YES;
1144 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1145 | CLANG_WARN_INFINITE_RECURSION = YES;
1146 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1147 | DEBUG_INFORMATION_FORMAT = dwarf;
1148 | ENABLE_TESTABILITY = YES;
1149 | GCC_NO_COMMON_BLOCKS = YES;
1150 | INFOPLIST_FILE = "YCool-tvOSTests/Info.plist";
1151 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1152 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.YCool-tvOSTests";
1153 | PRODUCT_NAME = "$(TARGET_NAME)";
1154 | SDKROOT = appletvos;
1155 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YCool-tvOS.app/YCool-tvOS";
1156 | TVOS_DEPLOYMENT_TARGET = 10.1;
1157 | };
1158 | name = Debug;
1159 | };
1160 | 2D02E49A1E0B4A5E006451C7 /* Release */ = {
1161 | isa = XCBuildConfiguration;
1162 | buildSettings = {
1163 | BUNDLE_LOADER = "$(TEST_HOST)";
1164 | CLANG_ANALYZER_NONNULL = YES;
1165 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1166 | CLANG_WARN_INFINITE_RECURSION = YES;
1167 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1168 | COPY_PHASE_STRIP = NO;
1169 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1170 | GCC_NO_COMMON_BLOCKS = YES;
1171 | INFOPLIST_FILE = "YCool-tvOSTests/Info.plist";
1172 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1173 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.YCool-tvOSTests";
1174 | PRODUCT_NAME = "$(TARGET_NAME)";
1175 | SDKROOT = appletvos;
1176 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YCool-tvOS.app/YCool-tvOS";
1177 | TVOS_DEPLOYMENT_TARGET = 10.1;
1178 | };
1179 | name = Release;
1180 | };
1181 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
1182 | isa = XCBuildConfiguration;
1183 | buildSettings = {
1184 | ALWAYS_SEARCH_USER_PATHS = NO;
1185 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
1186 | CLANG_CXX_LIBRARY = "libc++";
1187 | CLANG_ENABLE_MODULES = YES;
1188 | CLANG_ENABLE_OBJC_ARC = YES;
1189 | CLANG_WARN_BOOL_CONVERSION = YES;
1190 | CLANG_WARN_CONSTANT_CONVERSION = YES;
1191 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
1192 | CLANG_WARN_EMPTY_BODY = YES;
1193 | CLANG_WARN_ENUM_CONVERSION = YES;
1194 | CLANG_WARN_INT_CONVERSION = YES;
1195 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1196 | CLANG_WARN_UNREACHABLE_CODE = YES;
1197 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1198 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1199 | COPY_PHASE_STRIP = NO;
1200 | ENABLE_STRICT_OBJC_MSGSEND = YES;
1201 | GCC_C_LANGUAGE_STANDARD = gnu99;
1202 | GCC_DYNAMIC_NO_PIC = NO;
1203 | GCC_OPTIMIZATION_LEVEL = 0;
1204 | GCC_PREPROCESSOR_DEFINITIONS = (
1205 | "DEBUG=1",
1206 | "$(inherited)",
1207 | );
1208 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
1209 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
1210 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
1211 | GCC_WARN_UNDECLARED_SELECTOR = YES;
1212 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
1213 | GCC_WARN_UNUSED_FUNCTION = YES;
1214 | GCC_WARN_UNUSED_VARIABLE = YES;
1215 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1216 | MTL_ENABLE_DEBUG_INFO = YES;
1217 | ONLY_ACTIVE_ARCH = YES;
1218 | SDKROOT = iphoneos;
1219 | };
1220 | name = Debug;
1221 | };
1222 | 83CBBA211A601CBA00E9B192 /* Release */ = {
1223 | isa = XCBuildConfiguration;
1224 | buildSettings = {
1225 | ALWAYS_SEARCH_USER_PATHS = NO;
1226 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
1227 | CLANG_CXX_LIBRARY = "libc++";
1228 | CLANG_ENABLE_MODULES = YES;
1229 | CLANG_ENABLE_OBJC_ARC = YES;
1230 | CLANG_WARN_BOOL_CONVERSION = YES;
1231 | CLANG_WARN_CONSTANT_CONVERSION = YES;
1232 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
1233 | CLANG_WARN_EMPTY_BODY = YES;
1234 | CLANG_WARN_ENUM_CONVERSION = YES;
1235 | CLANG_WARN_INT_CONVERSION = YES;
1236 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1237 | CLANG_WARN_UNREACHABLE_CODE = YES;
1238 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1239 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1240 | COPY_PHASE_STRIP = YES;
1241 | ENABLE_NS_ASSERTIONS = NO;
1242 | ENABLE_STRICT_OBJC_MSGSEND = YES;
1243 | GCC_C_LANGUAGE_STANDARD = gnu99;
1244 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
1245 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
1246 | GCC_WARN_UNDECLARED_SELECTOR = YES;
1247 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
1248 | GCC_WARN_UNUSED_FUNCTION = YES;
1249 | GCC_WARN_UNUSED_VARIABLE = YES;
1250 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1251 | MTL_ENABLE_DEBUG_INFO = NO;
1252 | SDKROOT = iphoneos;
1253 | VALIDATE_PRODUCT = YES;
1254 | };
1255 | name = Release;
1256 | };
1257 | /* End XCBuildConfiguration section */
1258 |
1259 | /* Begin XCConfigurationList section */
1260 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "YCoolTests" */ = {
1261 | isa = XCConfigurationList;
1262 | buildConfigurations = (
1263 | 00E356F61AD99517003FC87E /* Debug */,
1264 | 00E356F71AD99517003FC87E /* Release */,
1265 | );
1266 | defaultConfigurationIsVisible = 0;
1267 | defaultConfigurationName = Release;
1268 | };
1269 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "YCool" */ = {
1270 | isa = XCConfigurationList;
1271 | buildConfigurations = (
1272 | 13B07F941A680F5B00A75B9A /* Debug */,
1273 | 13B07F951A680F5B00A75B9A /* Release */,
1274 | );
1275 | defaultConfigurationIsVisible = 0;
1276 | defaultConfigurationName = Release;
1277 | };
1278 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "YCool-tvOS" */ = {
1279 | isa = XCConfigurationList;
1280 | buildConfigurations = (
1281 | 2D02E4971E0B4A5E006451C7 /* Debug */,
1282 | 2D02E4981E0B4A5E006451C7 /* Release */,
1283 | );
1284 | defaultConfigurationIsVisible = 0;
1285 | defaultConfigurationName = Release;
1286 | };
1287 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "YCool-tvOSTests" */ = {
1288 | isa = XCConfigurationList;
1289 | buildConfigurations = (
1290 | 2D02E4991E0B4A5E006451C7 /* Debug */,
1291 | 2D02E49A1E0B4A5E006451C7 /* Release */,
1292 | );
1293 | defaultConfigurationIsVisible = 0;
1294 | defaultConfigurationName = Release;
1295 | };
1296 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "YCool" */ = {
1297 | isa = XCConfigurationList;
1298 | buildConfigurations = (
1299 | 83CBBA201A601CBA00E9B192 /* Debug */,
1300 | 83CBBA211A601CBA00E9B192 /* Release */,
1301 | );
1302 | defaultConfigurationIsVisible = 0;
1303 | defaultConfigurationName = Release;
1304 | };
1305 | /* End XCConfigurationList section */
1306 | };
1307 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
1308 | }
1309 |
--------------------------------------------------------------------------------