diff --git a/.gitignore b/.gitignore index 3196e9b2..9b25b931 100755 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ npm-debug.log src/testKey.js *.keystore main.jsbundle +ios/noder/build diff --git a/README.md b/README.md index 0ca514f0..7acefd09 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ > A new [cnodejs.org](http://cnodejs.org) mobile app powered by [React-Native](http://facebook.github.io/react-native/) and [Redux](https://github.com/gaearon/redux). -***Now it support android and ios, but it have many bugs.*** ## Install +* iOS: https://itunes.apple.com/cn/app/noder/id1106775857 * android(v1.0.0-alpha2): https://www.pgyer.com/pEFf ## Develop @@ -17,8 +17,6 @@ git clone https://github.com/soliury/noder-react-native.git npm install ``` -Before you start run app, you should create a clone of the `/src/testKey_example.js`, and rename to `/src/testKey.js` to put your secret key. You can go to http://cnodejs.org/setting to get your secret key. - Click the run button in Xcode, if something went wrong, you need to rebuild all packages that be used in this project with Xcode (Just select the package and press **command+B** to run compile). @@ -59,12 +57,10 @@ This project is heavily influenced by the above modules. ## ToDo List * Push Notification -* Refactor the code * Fix the below bugs * In ListView, sometime items on the bottom can't be refreshed * ListView **take too much memory** * HTML to native View render take too much **memory and CPU time** -* Submit to App Store * Add Unit testing ## Change log diff --git a/ios/noder.xcodeproj/project.pbxproj b/ios/noder.xcodeproj/project.pbxproj index 78846021..13ce9906 100644 --- a/ios/noder.xcodeproj/project.pbxproj +++ b/ios/noder.xcodeproj/project.pbxproj @@ -32,7 +32,6 @@ 95F7C17B9DE042F8ACF316EF /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 415C9DD3E4DA4D4F8EA6930A /* MaterialIcons.ttf */; }; 9E459D6D1CC751AA00F6C61D /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E459D6C1CC751AA00F6C61D /* libz.tbd */; }; 9E93228A6688474BA6948F29 /* libCodePush.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 51408331D0894403A3207186 /* libCodePush.a */; }; - 9ED256491CBCE19000C524D9 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 9ED256481CBCE19000C524D9 /* main.jsbundle */; }; BE7FCBED6AF945FA87EB4FA9 /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 53F483A02108469FB6D758C8 /* Octicons.ttf */; }; D3B2D6F8393B4EA9AB57CAFF /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1DDEF6DB42F647D28EBF87BC /* Zocial.ttf */; }; F5DDCEAF1E6B40C98D7EF640 /* libRCTCamera.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E381C2EF86A4AEFB656769E /* libRCTCamera.a */; }; @@ -180,7 +179,6 @@ 9365FA91633D4242A938BBBD /* RNBlur.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNBlur.xcodeproj; path = "../node_modules/react-native-blur/ios/RNBlur.xcodeproj"; sourceTree = ""; }; 939C2E9550714D478EE17736 /* libRNVectorIcons.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNVectorIcons.a; sourceTree = ""; }; 9E459D6C1CC751AA00F6C61D /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; - 9ED256481CBCE19000C524D9 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = noder/main.jsbundle; sourceTree = ""; }; AC8A1E4B2B2349F59F02BD96 /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = ""; }; C886CD7B69BF47E1A5022F45 /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = ""; }; E5438F2DD1224DC69F235A90 /* CodePush.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = CodePush.xcodeproj; path = "../node_modules/react-native-code-push/ios/CodePush.xcodeproj"; sourceTree = ""; }; @@ -296,7 +294,6 @@ 13B07FAE1A68108700A75B9A /* noder */ = { isa = PBXGroup; children = ( - 9ED256481CBCE19000C524D9 /* main.jsbundle */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 13B07FB01A68108700A75B9A /* AppDelegate.m */, 13B07FB51A68108700A75B9A /* Images.xcassets */, @@ -677,7 +674,6 @@ 0DFA4E087D2C4407BE495FF5 /* Foundation.ttf in Resources */, 09BB28342A2E4D7A9B8DAC2A /* Ionicons.ttf in Resources */, 95F7C17B9DE042F8ACF316EF /* MaterialIcons.ttf in Resources */, - 9ED256491CBCE19000C524D9 /* main.jsbundle in Resources */, BE7FCBED6AF945FA87EB4FA9 /* Octicons.ttf in Resources */, D3B2D6F8393B4EA9AB57CAFF /* Zocial.ttf in Resources */, ); @@ -798,7 +794,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEAD_CODE_STRIPPING = NO; @@ -812,11 +808,13 @@ "$(SRCROOT)/../node_modules/react-native-code-push/ios/CodePush/**", ); INFOPLIST_FILE = noder/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = com.lingyong.me.noder; PRODUCT_NAME = noder; PROVISIONING_PROFILE = ""; + TARGETED_DEVICE_FAMILY = 1; }; name = Debug; }; @@ -824,7 +822,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; HEADER_SEARCH_PATHS = ( @@ -837,11 +835,13 @@ "$(SRCROOT)/../node_modules/react-native-code-push/ios/CodePush/**", ); INFOPLIST_FILE = noder/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = com.lingyong.me.noder; PRODUCT_NAME = noder; PROVISIONING_PROFILE = ""; + TARGETED_DEVICE_FAMILY = 1; }; name = Release; }; diff --git a/ios/noder.xcodeproj/xcshareddata/xcschemes/noder.xcscheme b/ios/noder.xcodeproj/xcshareddata/xcschemes/noder.xcscheme index 1190e678..25ee1dc2 100644 --- a/ios/noder.xcodeproj/xcshareddata/xcschemes/noder.xcscheme +++ b/ios/noder.xcodeproj/xcshareddata/xcschemes/noder.xcscheme @@ -56,7 +56,7 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight UIViewControllerBasedStatusBarAppearance diff --git a/package.json b/package.json index ea9e1bfe..1a003cc1 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,11 @@ "build-android": "cd android && ./gradlew assembleRelease && cd ..", "checkversion": "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json", "postinstall": "npm run checkversion", - "push-android": "code-push release-react Noder android --deploymentName Staging", - "push-ios": "code-push release-react Noder ios --deploymentName Staging", - "push-android-prod": "code-push release-react Noder android --deploymentName Production", - "push-ios-prod": "code-push release-react Noder ios --deploymentName Production", - "push-key": "code-push deployment ls Noder -k" + "push-android": "code-push release-react Noder android --deploymentName Staging", + "push-ios": "code-push release-react Noder ios --deploymentName Staging", + "push-android-prod": "code-push release-react Noder android --deploymentName Production", + "push-ios-prod": "code-push release-react Noder ios --deploymentName Production", + "push-key": "code-push deployment ls Noder -k" }, "dependencies": { "flux-standard-action": "^0.6.1", @@ -41,6 +41,7 @@ "redux-thunk": "^2.0.1" }, "devDependencies": { + "babel-eslint": "^6.0.4", "coffee-script": "^1.9.2", "dev-ip": "^1.0.1", "eslint": "^2.7.0", diff --git a/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 1.jpg b/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 1.jpg new file mode 100644 index 00000000..c0e8129c Binary files /dev/null and b/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 1.jpg differ diff --git a/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 2.jpg b/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 2.jpg new file mode 100644 index 00000000..e7dbe4e2 Binary files /dev/null and b/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 2.jpg differ diff --git a/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 3.jpg b/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 3.jpg new file mode 100644 index 00000000..342855a4 Binary files /dev/null and b/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 3.jpg differ diff --git a/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 4.jpg b/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 4.jpg new file mode 100644 index 00000000..f52b63fd Binary files /dev/null and b/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 4.jpg differ diff --git a/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 5.jpg b/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 5.jpg new file mode 100644 index 00000000..c79b40f1 Binary files /dev/null and b/source/Screenshot_1.0_iOS/5.5-inch (iPhone 6+) - Screenshot 5.jpg differ diff --git a/source/logo/IOS/Brand Assets.png b/source/logo/IOS/Brand Assets.png new file mode 100644 index 00000000..d8eeb944 Binary files /dev/null and b/source/logo/IOS/Brand Assets.png differ diff --git a/source/logo/IOS/Default.png b/source/logo/IOS/Default.png new file mode 100644 index 00000000..9e1c11fa Binary files /dev/null and b/source/logo/IOS/Default.png differ diff --git a/source/logo/IOS/launchScreen.psd b/source/logo/IOS/launchScreen.psd new file mode 100644 index 00000000..ce5f9351 Binary files /dev/null and b/source/logo/IOS/launchScreen.psd differ diff --git a/source/logo/IOS/noder-Icon.png b/source/logo/IOS/noder-Icon.png index fb12b90d..f66c3eaa 100644 Binary files a/source/logo/IOS/noder-Icon.png and b/source/logo/IOS/noder-Icon.png differ diff --git a/source/logo/IOS/noder-Icon.psd b/source/logo/IOS/noder-Icon.psd index 19ca961a..5c30a6fc 100644 Binary files a/source/logo/IOS/noder-Icon.psd and b/source/logo/IOS/noder-Icon.psd differ diff --git a/src/layouts/Utils.js b/src/layouts/Utils.js index a8a767ec..c8989ae5 100644 --- a/src/layouts/Utils.js +++ b/src/layouts/Utils.js @@ -7,7 +7,6 @@ import React, { } from 'react-native'; import Toast from '../components/base/Toast'; import * as codePushUtils from '../utils/codePushSync'; -import secretKey from '../testKey'; class Utils extends Component { @@ -15,7 +14,7 @@ class Utils extends Component { const {actions} = this.props; actions.getReducerFromAsyncStorage(); // if (__DEV__) { - // actions.checkToken(secretKey, ()=> { + // actions.checkToken('your secretKey', ()=> { // actions.toast('登陆成功'); // }); // } diff --git a/src/services/messageService.js b/src/services/messageService.js index cdd01eaf..cb21d67e 100644 --- a/src/services/messageService.js +++ b/src/services/messageService.js @@ -9,11 +9,6 @@ export const storage = { }, - save: function (value) { - return storageService.setItem('messages', value); - }, - - clear: function () { return storageService.removeItem('messages'); } diff --git a/src/services/userService.js b/src/services/userService.js index 896d4429..35469ef2 100644 --- a/src/services/userService.js +++ b/src/services/userService.js @@ -4,18 +4,6 @@ import { getToken, setToken } from './token'; export const storage = { - saveUser: function (user) { - return storageService.setItem('user', user) - .then(()=>user); - }, - - - clearUser: function () { - return storageService.removeItem('user') - .then(()=> setToken()); - }, - - getUser: function () { return storageService.getItem('user') .then(user=> { diff --git a/src/store/configureStore.js b/src/store/configureStore.js index 58348758..39d03e54 100644 --- a/src/store/configureStore.js +++ b/src/store/configureStore.js @@ -16,17 +16,21 @@ const logger = createLogger({ duration: true }); -const middlewares = [ +let middlewares = [ thunkMiddleware, promiseMiddleware, asyncActionCallbackMiddleware, minPendingTimeMiddleware, utilsMiddleware, - syncReducerToAsyncStorage, - logger + syncReducerToAsyncStorage ]; +if (isDebuggingInChrome) { + middlewares.push(logger); +} + + export default function configureStore(initialState) { const store = applyMiddleware( ...middlewares diff --git a/src/testKey_example.js b/src/testKey_example.js deleted file mode 100644 index 7edec4b9..00000000 --- a/src/testKey_example.js +++ /dev/null @@ -1 +0,0 @@ -export default 'your key';