├── App Screen Shot.png ├── BuddyBuildSDK.framework ├── BuddyBuildSDK ├── Headers │ └── BuddyBuildSDK.h └── build.num ├── README.md ├── WeatherApp.xcodeproj ├── project.pbxproj └── xcshareddata │ └── xcschemes │ └── WeatherApp.xcscheme ├── WeatherAppTests ├── Info.plist └── WeatherAppTests.m ├── common └── common.js ├── components ├── Chart.js ├── LoadingOverlay.js └── WeekView.js ├── iOS ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ └── LaunchScreen.xib ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── main.jsbundle └── main.m ├── index.ios.js ├── package.json └── weathericons-regular-webfont.ttf /App Screen Shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shevawen/react-native-weather-app/db21b8b807cc27e2d8552f78ef622ea48099d172/App Screen Shot.png -------------------------------------------------------------------------------- /BuddyBuildSDK.framework/BuddyBuildSDK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shevawen/react-native-weather-app/db21b8b807cc27e2d8552f78ef622ea48099d172/BuddyBuildSDK.framework/BuddyBuildSDK -------------------------------------------------------------------------------- /BuddyBuildSDK.framework/Headers/BuddyBuildSDK.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Doe Pics Hit, Inc. All rights reserved. 2 | 3 | #import 4 | #import 5 | 6 | typedef NSString*(^BBReturnNSStringCallback)(); 7 | typedef BOOL (^BBReturnBooleanCallback)(); 8 | typedef void (^BBCallback)(); 9 | 10 | @interface BuddyBuildSDK : NSObject 11 | 12 | // Deprecated 13 | + (void)setup:(id)bbAppDelegate; 14 | 15 | /** 16 | * Initialize the SDK 17 | * 18 | * This should be called at (or near) the start of the appdelegate 19 | */ 20 | + (void)setup; 21 | 22 | /* 23 | * If you distribute a build to someone with their email address, buddybuild can 24 | * figure out who they are and attach their info to feedback and crash reports. 25 | * 26 | * However, if you send out a build to a mailing list, or through TestFlight or 27 | * the App Store we are unable to infer who they are. If you see 'Unknown User' 28 | * this is likely the cause. 29 | 30 | * Often you'll know the identity of your user, for example, after they've 31 | * logged in. You can provide buddybuild a callback to identify the current user. 32 | */ 33 | + (void)setUserDisplayNameCallback:(BBReturnNSStringCallback)bbCallback; 34 | 35 | /* 36 | * You might have API keys and other secrets that your app needs to consume. 37 | * However, you may not want to check these secrets into the source code. 38 | * 39 | * You can provide your secrets to buddybuild. Buddybuild can then expose them 40 | * to you at build time through environment variables. These secrets can also be 41 | * configured to be included into built app. We obfuscate the device keys to 42 | * prevent unauthorized access. 43 | */ 44 | + (NSString*)valueForDeviceKey:(NSString*)bbKey; 45 | 46 | /* 47 | * To temporarily disable screenshot interception you can provide a callback 48 | * here. 49 | * 50 | * When screenshotting is turned on through a buddybuild setting, and no 51 | * callback is provided then screenshotting is by default on. 52 | * 53 | * If screenshotting is disabled through the buddybuild setting, then this 54 | * callback has no effect 55 | * 56 | */ 57 | + (void)setScreenshotAllowedCallback:(BBReturnBooleanCallback)bbCallback; 58 | 59 | /* 60 | * Once a piece of feedback is sent this callback will be called 61 | * so you can take additional actions if necessary 62 | */ 63 | + (void)setScreenshotFeedbackSentCallback:(BBCallback)bbCallback; 64 | 65 | /* 66 | * Once a crash report is sent this callback will be called 67 | * so you can take additional actions if necessary 68 | */ 69 | + (void)setCrashReportSentCallback:(BBCallback)bbCallback; 70 | @end 71 | -------------------------------------------------------------------------------- /BuddyBuildSDK.framework/build.num: -------------------------------------------------------------------------------- 1 | 64bb2c9 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## react natvie weather app 2 | 3 | Weaher App build with react native fork from sofish's Weather App(https://github.com/sofish/weather) 4 | 5 | Work in progress. 6 | 7 | ### Run it 8 | 9 | 1. Clone it. `git clone https://github.com/shevawen/react-native-weather-app` 10 | 2. Go to the project folder and install dependencies by npm. `npm install` 11 | 3. Open the project in XCode, just build and run it. 12 | 13 | ### Preview 14 | 15 | ![ScreenShot](/App Screen Shot.png) 16 | 17 | ### Thanks 18 | 19 | 1. [brentvatne/react-native-svg](https://github.com/brentvatne/react-native-svg) 20 | 2. [brentvatne/react-native-overlay](https://github.com/brentvatne/react-native-overlay) 21 | -------------------------------------------------------------------------------- /WeatherApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; }; 11 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 12 | 00C302E61ABCBA2D00DB3ED1 /* libRCTAdSupport.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302B41ABCB8E700DB3ED1 /* libRCTAdSupport.a */; }; 13 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 14 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 15 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 16 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 17 | 00E356F31AD99517003FC87E /* WeatherAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* WeatherAppTests.m */; }; 18 | 12B5F2902D0085BB3FF4D7F5 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 759C2A32F0D07775BAC34C6D /* SystemConfiguration.framework */; }; 19 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 20 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 21 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 22 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 23 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 24 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 25 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 26 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 27 | 1E842EC2B2A2ACCBF54358FA /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F429ECCBE5F8618AFE4F860 /* AssetsLibrary.framework */; }; 28 | 2D7E14481B12C94A00BB752C /* weathericons-regular-webfont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2D7E14471B12C94A00BB752C /* weathericons-regular-webfont.ttf */; }; 29 | 2D7E14491B12C94A00BB752C /* weathericons-regular-webfont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2D7E14471B12C94A00BB752C /* weathericons-regular-webfont.ttf */; }; 30 | 2DEE34A51B15692200F1FF1F /* libRNSvg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DEE34A41B15685600F1FF1F /* libRNSvg.a */; }; 31 | 2DEE36061B15BFB700F1FF1F /* libRNSvg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DEE34A41B15685600F1FF1F /* libRNSvg.a */; }; 32 | 2DEE361A1B15CC6A00F1FF1F /* libxml2.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DEE36191B15CC6A00F1FF1F /* libxml2.2.dylib */; }; 33 | 2DEE362D1B176DFA00F1FF1F /* libRNOverlay.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DEE362C1B176DD700F1FF1F /* libRNOverlay.a */; }; 34 | 62508C5961B53F15A072F70C /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 417C5434FB4B7364376AA15B /* CoreText.framework */; }; 35 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 36 | D78AA16D3C34FA265A0EC0E7 /* BuddyBuildSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD8864AE45AABCAE308FA9A9 /* BuddyBuildSDK.framework */; }; 37 | DB095F12532BEB8848A3741B /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3DD2C49FDC6AE5E2DB4E027 /* CoreTelephony.framework */; }; 38 | /* End PBXBuildFile section */ 39 | 40 | /* Begin PBXContainerItemProxy section */ 41 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 42 | isa = PBXContainerItemProxy; 43 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 44 | proxyType = 2; 45 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 46 | remoteInfo = RCTActionSheet; 47 | }; 48 | 00C302B31ABCB8E700DB3ED1 /* PBXContainerItemProxy */ = { 49 | isa = PBXContainerItemProxy; 50 | containerPortal = 00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */; 51 | proxyType = 2; 52 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 53 | remoteInfo = RCTAdSupport; 54 | }; 55 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 56 | isa = PBXContainerItemProxy; 57 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 58 | proxyType = 2; 59 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 60 | remoteInfo = RCTGeolocation; 61 | }; 62 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 63 | isa = PBXContainerItemProxy; 64 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 65 | proxyType = 2; 66 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 67 | remoteInfo = RCTImage; 68 | }; 69 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 70 | isa = PBXContainerItemProxy; 71 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 72 | proxyType = 2; 73 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 74 | remoteInfo = RCTNetwork; 75 | }; 76 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 77 | isa = PBXContainerItemProxy; 78 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 79 | proxyType = 2; 80 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 81 | remoteInfo = RCTVibration; 82 | }; 83 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 84 | isa = PBXContainerItemProxy; 85 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 86 | proxyType = 1; 87 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 88 | remoteInfo = WeatherApp; 89 | }; 90 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 91 | isa = PBXContainerItemProxy; 92 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 93 | proxyType = 2; 94 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 95 | remoteInfo = RCTSettings; 96 | }; 97 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 98 | isa = PBXContainerItemProxy; 99 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 100 | proxyType = 2; 101 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 102 | remoteInfo = RCTWebSocket; 103 | }; 104 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 105 | isa = PBXContainerItemProxy; 106 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 107 | proxyType = 2; 108 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 109 | remoteInfo = React; 110 | }; 111 | 2DEE34A31B15685600F1FF1F /* PBXContainerItemProxy */ = { 112 | isa = PBXContainerItemProxy; 113 | containerPortal = 2DEE349D1B15685600F1FF1F /* RNSvg.xcodeproj */; 114 | proxyType = 2; 115 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 116 | remoteInfo = RNSvg; 117 | }; 118 | 2DEE362B1B176DD700F1FF1F /* PBXContainerItemProxy */ = { 119 | isa = PBXContainerItemProxy; 120 | containerPortal = 2DEE36271B176DD700F1FF1F /* RNOverlay.xcodeproj */; 121 | proxyType = 2; 122 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 123 | remoteInfo = RNOverlay; 124 | }; 125 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 126 | isa = PBXContainerItemProxy; 127 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 128 | proxyType = 2; 129 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 130 | remoteInfo = RCTLinking; 131 | }; 132 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 133 | isa = PBXContainerItemProxy; 134 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 135 | proxyType = 2; 136 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 137 | remoteInfo = RCTText; 138 | }; 139 | /* End PBXContainerItemProxy section */ 140 | 141 | /* Begin PBXFileReference section */ 142 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = iOS/main.jsbundle; sourceTree = ""; }; 143 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 144 | 00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAdSupport.xcodeproj; path = "node_modules/react-native/Libraries/AdSupport/RCTAdSupport.xcodeproj"; sourceTree = ""; }; 145 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 146 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 147 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 148 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 149 | 00E356EE1AD99517003FC87E /* WeatherAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WeatherAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 150 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 151 | 00E356F21AD99517003FC87E /* WeatherAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WeatherAppTests.m; sourceTree = ""; }; 152 | 0F429ECCBE5F8618AFE4F860 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; 153 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 154 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 155 | 13B07F961A680F5B00A75B9A /* WeatherApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WeatherApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 156 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = iOS/AppDelegate.h; sourceTree = ""; }; 157 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = iOS/AppDelegate.m; sourceTree = ""; }; 158 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 159 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = iOS/Images.xcassets; sourceTree = ""; }; 160 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = iOS/Info.plist; sourceTree = ""; }; 161 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iOS/main.m; sourceTree = ""; }; 162 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 163 | 2D7E14471B12C94A00BB752C /* weathericons-regular-webfont.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "weathericons-regular-webfont.ttf"; sourceTree = ""; }; 164 | 2DEE349D1B15685600F1FF1F /* RNSvg.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNSvg.xcodeproj; path = "node_modules/react-native-svg/Libraries/RNSvg.xcodeproj"; sourceTree = ""; }; 165 | 2DEE36191B15CC6A00F1FF1F /* libxml2.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.2.dylib; path = usr/lib/libxml2.2.dylib; sourceTree = SDKROOT; }; 166 | 2DEE36271B176DD700F1FF1F /* RNOverlay.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNOverlay.xcodeproj; path = "node_modules/react-native-overlay/RNOverlay.xcodeproj"; sourceTree = ""; }; 167 | 417C5434FB4B7364376AA15B /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; 168 | 759C2A32F0D07775BAC34C6D /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 169 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 170 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 171 | B3DD2C49FDC6AE5E2DB4E027 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; 172 | CD8864AE45AABCAE308FA9A9 /* BuddyBuildSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = BuddyBuildSDK.framework; sourceTree = ""; }; 173 | /* End PBXFileReference section */ 174 | 175 | /* Begin PBXFrameworksBuildPhase section */ 176 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 177 | isa = PBXFrameworksBuildPhase; 178 | buildActionMask = 2147483647; 179 | files = ( 180 | 2DEE34A51B15692200F1FF1F /* libRNSvg.a in Frameworks */, 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | }; 184 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 185 | isa = PBXFrameworksBuildPhase; 186 | buildActionMask = 2147483647; 187 | files = ( 188 | 2DEE362D1B176DFA00F1FF1F /* libRNOverlay.a in Frameworks */, 189 | 2DEE361A1B15CC6A00F1FF1F /* libxml2.2.dylib in Frameworks */, 190 | 2DEE36061B15BFB700F1FF1F /* libRNSvg.a in Frameworks */, 191 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 192 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 193 | 00C302E61ABCBA2D00DB3ED1 /* libRCTAdSupport.a in Frameworks */, 194 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 195 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 196 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 197 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 198 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 199 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 200 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 201 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 202 | D78AA16D3C34FA265A0EC0E7 /* BuddyBuildSDK.framework in Frameworks */, 203 | 1E842EC2B2A2ACCBF54358FA /* AssetsLibrary.framework in Frameworks */, 204 | 62508C5961B53F15A072F70C /* CoreText.framework in Frameworks */, 205 | DB095F12532BEB8848A3741B /* CoreTelephony.framework in Frameworks */, 206 | 12B5F2902D0085BB3FF4D7F5 /* SystemConfiguration.framework in Frameworks */, 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | }; 210 | /* End PBXFrameworksBuildPhase section */ 211 | 212 | /* Begin PBXGroup section */ 213 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 214 | isa = PBXGroup; 215 | children = ( 216 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 217 | ); 218 | name = Products; 219 | sourceTree = ""; 220 | }; 221 | 00C302B01ABCB8E700DB3ED1 /* Products */ = { 222 | isa = PBXGroup; 223 | children = ( 224 | 00C302B41ABCB8E700DB3ED1 /* libRCTAdSupport.a */, 225 | ); 226 | name = Products; 227 | sourceTree = ""; 228 | }; 229 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 230 | isa = PBXGroup; 231 | children = ( 232 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 233 | ); 234 | name = Products; 235 | sourceTree = ""; 236 | }; 237 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 238 | isa = PBXGroup; 239 | children = ( 240 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 241 | ); 242 | name = Products; 243 | sourceTree = ""; 244 | }; 245 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 246 | isa = PBXGroup; 247 | children = ( 248 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 249 | ); 250 | name = Products; 251 | sourceTree = ""; 252 | }; 253 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 254 | isa = PBXGroup; 255 | children = ( 256 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 257 | ); 258 | name = Products; 259 | sourceTree = ""; 260 | }; 261 | 00E356EF1AD99517003FC87E /* WeatherAppTests */ = { 262 | isa = PBXGroup; 263 | children = ( 264 | 00E356F21AD99517003FC87E /* WeatherAppTests.m */, 265 | 00E356F01AD99517003FC87E /* Supporting Files */, 266 | ); 267 | path = WeatherAppTests; 268 | sourceTree = ""; 269 | }; 270 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 271 | isa = PBXGroup; 272 | children = ( 273 | 00E356F11AD99517003FC87E /* Info.plist */, 274 | ); 275 | name = "Supporting Files"; 276 | sourceTree = ""; 277 | }; 278 | 139105B71AF99BAD00B5F7CC /* Products */ = { 279 | isa = PBXGroup; 280 | children = ( 281 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 282 | ); 283 | name = Products; 284 | sourceTree = ""; 285 | }; 286 | 139FDEE71B06529A00C62182 /* Products */ = { 287 | isa = PBXGroup; 288 | children = ( 289 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 290 | ); 291 | name = Products; 292 | sourceTree = ""; 293 | }; 294 | 13B07FAE1A68108700A75B9A /* WeatherApp */ = { 295 | isa = PBXGroup; 296 | children = ( 297 | 2D7E14471B12C94A00BB752C /* weathericons-regular-webfont.ttf */, 298 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 299 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 300 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 301 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 302 | 13B07FB61A68108700A75B9A /* Info.plist */, 303 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 304 | 13B07FB71A68108700A75B9A /* main.m */, 305 | ); 306 | name = WeatherApp; 307 | sourceTree = ""; 308 | }; 309 | 146834001AC3E56700842450 /* Products */ = { 310 | isa = PBXGroup; 311 | children = ( 312 | 146834041AC3E56700842450 /* libReact.a */, 313 | ); 314 | name = Products; 315 | sourceTree = ""; 316 | }; 317 | 2DEE349E1B15685600F1FF1F /* Products */ = { 318 | isa = PBXGroup; 319 | children = ( 320 | 2DEE34A41B15685600F1FF1F /* libRNSvg.a */, 321 | ); 322 | name = Products; 323 | sourceTree = ""; 324 | }; 325 | 2DEE36281B176DD700F1FF1F /* Products */ = { 326 | isa = PBXGroup; 327 | children = ( 328 | 2DEE362C1B176DD700F1FF1F /* libRNOverlay.a */, 329 | ); 330 | name = Products; 331 | sourceTree = ""; 332 | }; 333 | 78C398B11ACF4ADC00677621 /* Products */ = { 334 | isa = PBXGroup; 335 | children = ( 336 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 337 | ); 338 | name = Products; 339 | sourceTree = ""; 340 | }; 341 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 342 | isa = PBXGroup; 343 | children = ( 344 | 2DEE36271B176DD700F1FF1F /* RNOverlay.xcodeproj */, 345 | 2DEE349D1B15685600F1FF1F /* RNSvg.xcodeproj */, 346 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 347 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 348 | 00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */, 349 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 350 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 351 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 352 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 353 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 354 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 355 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 356 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 357 | ); 358 | name = Libraries; 359 | sourceTree = ""; 360 | }; 361 | 832341B11AAA6A8300B99B32 /* Products */ = { 362 | isa = PBXGroup; 363 | children = ( 364 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 365 | ); 366 | name = Products; 367 | sourceTree = ""; 368 | }; 369 | 83CBB9F61A601CBA00E9B192 = { 370 | isa = PBXGroup; 371 | children = ( 372 | 2DEE36191B15CC6A00F1FF1F /* libxml2.2.dylib */, 373 | 13B07FAE1A68108700A75B9A /* WeatherApp */, 374 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 375 | 00E356EF1AD99517003FC87E /* WeatherAppTests */, 376 | 83CBBA001A601CBA00E9B192 /* Products */, 377 | F5736B4D742CB69762911C2C /* Frameworks */, 378 | ); 379 | indentWidth = 2; 380 | sourceTree = ""; 381 | tabWidth = 2; 382 | }; 383 | 83CBBA001A601CBA00E9B192 /* Products */ = { 384 | isa = PBXGroup; 385 | children = ( 386 | 13B07F961A680F5B00A75B9A /* WeatherApp.app */, 387 | 00E356EE1AD99517003FC87E /* WeatherAppTests.xctest */, 388 | ); 389 | name = Products; 390 | sourceTree = ""; 391 | }; 392 | F5736B4D742CB69762911C2C /* Frameworks */ = { 393 | isa = PBXGroup; 394 | children = ( 395 | CD8864AE45AABCAE308FA9A9 /* BuddyBuildSDK.framework */, 396 | 0F429ECCBE5F8618AFE4F860 /* AssetsLibrary.framework */, 397 | 417C5434FB4B7364376AA15B /* CoreText.framework */, 398 | B3DD2C49FDC6AE5E2DB4E027 /* CoreTelephony.framework */, 399 | 759C2A32F0D07775BAC34C6D /* SystemConfiguration.framework */, 400 | ); 401 | name = Frameworks; 402 | sourceTree = ""; 403 | }; 404 | /* End PBXGroup section */ 405 | 406 | /* Begin PBXNativeTarget section */ 407 | 00E356ED1AD99517003FC87E /* WeatherAppTests */ = { 408 | isa = PBXNativeTarget; 409 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "WeatherAppTests" */; 410 | buildPhases = ( 411 | 00E356EA1AD99517003FC87E /* Sources */, 412 | 00E356EB1AD99517003FC87E /* Frameworks */, 413 | 00E356EC1AD99517003FC87E /* Resources */, 414 | ); 415 | buildRules = ( 416 | ); 417 | dependencies = ( 418 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 419 | ); 420 | name = WeatherAppTests; 421 | productName = WeatherAppTests; 422 | productReference = 00E356EE1AD99517003FC87E /* WeatherAppTests.xctest */; 423 | productType = "com.apple.product-type.bundle.unit-test"; 424 | }; 425 | 13B07F861A680F5B00A75B9A /* WeatherApp */ = { 426 | isa = PBXNativeTarget; 427 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "WeatherApp" */; 428 | buildPhases = ( 429 | 13B07F871A680F5B00A75B9A /* Sources */, 430 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 431 | 13B07F8E1A680F5B00A75B9A /* Resources */, 432 | ); 433 | buildRules = ( 434 | ); 435 | dependencies = ( 436 | ); 437 | name = WeatherApp; 438 | productName = "Hello World"; 439 | productReference = 13B07F961A680F5B00A75B9A /* WeatherApp.app */; 440 | productType = "com.apple.product-type.application"; 441 | }; 442 | /* End PBXNativeTarget section */ 443 | 444 | /* Begin PBXProject section */ 445 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 446 | isa = PBXProject; 447 | attributes = { 448 | LastUpgradeCheck = 0610; 449 | ORGANIZATIONNAME = Facebook; 450 | TargetAttributes = { 451 | 00E356ED1AD99517003FC87E = { 452 | CreatedOnToolsVersion = 6.2; 453 | TestTargetID = 13B07F861A680F5B00A75B9A; 454 | }; 455 | }; 456 | }; 457 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "WeatherApp" */; 458 | compatibilityVersion = "Xcode 3.2"; 459 | developmentRegion = English; 460 | hasScannedForEncodings = 0; 461 | knownRegions = ( 462 | en, 463 | Base, 464 | ); 465 | mainGroup = 83CBB9F61A601CBA00E9B192; 466 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 467 | projectDirPath = ""; 468 | projectReferences = ( 469 | { 470 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 471 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 472 | }, 473 | { 474 | ProductGroup = 00C302B01ABCB8E700DB3ED1 /* Products */; 475 | ProjectRef = 00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */; 476 | }, 477 | { 478 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 479 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 480 | }, 481 | { 482 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 483 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 484 | }, 485 | { 486 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 487 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 488 | }, 489 | { 490 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 491 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 492 | }, 493 | { 494 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 495 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 496 | }, 497 | { 498 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 499 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 500 | }, 501 | { 502 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 503 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 504 | }, 505 | { 506 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 507 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 508 | }, 509 | { 510 | ProductGroup = 146834001AC3E56700842450 /* Products */; 511 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 512 | }, 513 | { 514 | ProductGroup = 2DEE36281B176DD700F1FF1F /* Products */; 515 | ProjectRef = 2DEE36271B176DD700F1FF1F /* RNOverlay.xcodeproj */; 516 | }, 517 | { 518 | ProductGroup = 2DEE349E1B15685600F1FF1F /* Products */; 519 | ProjectRef = 2DEE349D1B15685600F1FF1F /* RNSvg.xcodeproj */; 520 | }, 521 | ); 522 | projectRoot = ""; 523 | targets = ( 524 | 13B07F861A680F5B00A75B9A /* WeatherApp */, 525 | 00E356ED1AD99517003FC87E /* WeatherAppTests */, 526 | ); 527 | }; 528 | /* End PBXProject section */ 529 | 530 | /* Begin PBXReferenceProxy section */ 531 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 532 | isa = PBXReferenceProxy; 533 | fileType = archive.ar; 534 | path = libRCTActionSheet.a; 535 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 536 | sourceTree = BUILT_PRODUCTS_DIR; 537 | }; 538 | 00C302B41ABCB8E700DB3ED1 /* libRCTAdSupport.a */ = { 539 | isa = PBXReferenceProxy; 540 | fileType = archive.ar; 541 | path = libRCTAdSupport.a; 542 | remoteRef = 00C302B31ABCB8E700DB3ED1 /* PBXContainerItemProxy */; 543 | sourceTree = BUILT_PRODUCTS_DIR; 544 | }; 545 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 546 | isa = PBXReferenceProxy; 547 | fileType = archive.ar; 548 | path = libRCTGeolocation.a; 549 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 550 | sourceTree = BUILT_PRODUCTS_DIR; 551 | }; 552 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 553 | isa = PBXReferenceProxy; 554 | fileType = archive.ar; 555 | path = libRCTImage.a; 556 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 557 | sourceTree = BUILT_PRODUCTS_DIR; 558 | }; 559 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 560 | isa = PBXReferenceProxy; 561 | fileType = archive.ar; 562 | path = libRCTNetwork.a; 563 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 564 | sourceTree = BUILT_PRODUCTS_DIR; 565 | }; 566 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 567 | isa = PBXReferenceProxy; 568 | fileType = archive.ar; 569 | path = libRCTVibration.a; 570 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 571 | sourceTree = BUILT_PRODUCTS_DIR; 572 | }; 573 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 574 | isa = PBXReferenceProxy; 575 | fileType = archive.ar; 576 | path = libRCTSettings.a; 577 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 578 | sourceTree = BUILT_PRODUCTS_DIR; 579 | }; 580 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 581 | isa = PBXReferenceProxy; 582 | fileType = archive.ar; 583 | path = libRCTWebSocket.a; 584 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 585 | sourceTree = BUILT_PRODUCTS_DIR; 586 | }; 587 | 146834041AC3E56700842450 /* libReact.a */ = { 588 | isa = PBXReferenceProxy; 589 | fileType = archive.ar; 590 | path = libReact.a; 591 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 592 | sourceTree = BUILT_PRODUCTS_DIR; 593 | }; 594 | 2DEE34A41B15685600F1FF1F /* libRNSvg.a */ = { 595 | isa = PBXReferenceProxy; 596 | fileType = archive.ar; 597 | path = libRNSvg.a; 598 | remoteRef = 2DEE34A31B15685600F1FF1F /* PBXContainerItemProxy */; 599 | sourceTree = BUILT_PRODUCTS_DIR; 600 | }; 601 | 2DEE362C1B176DD700F1FF1F /* libRNOverlay.a */ = { 602 | isa = PBXReferenceProxy; 603 | fileType = archive.ar; 604 | path = libRNOverlay.a; 605 | remoteRef = 2DEE362B1B176DD700F1FF1F /* PBXContainerItemProxy */; 606 | sourceTree = BUILT_PRODUCTS_DIR; 607 | }; 608 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 609 | isa = PBXReferenceProxy; 610 | fileType = archive.ar; 611 | path = libRCTLinking.a; 612 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 613 | sourceTree = BUILT_PRODUCTS_DIR; 614 | }; 615 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 616 | isa = PBXReferenceProxy; 617 | fileType = archive.ar; 618 | path = libRCTText.a; 619 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 620 | sourceTree = BUILT_PRODUCTS_DIR; 621 | }; 622 | /* End PBXReferenceProxy section */ 623 | 624 | /* Begin PBXResourcesBuildPhase section */ 625 | 00E356EC1AD99517003FC87E /* Resources */ = { 626 | isa = PBXResourcesBuildPhase; 627 | buildActionMask = 2147483647; 628 | files = ( 629 | 2D7E14491B12C94A00BB752C /* weathericons-regular-webfont.ttf in Resources */, 630 | ); 631 | runOnlyForDeploymentPostprocessing = 0; 632 | }; 633 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 634 | isa = PBXResourcesBuildPhase; 635 | buildActionMask = 2147483647; 636 | files = ( 637 | 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */, 638 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 639 | 2D7E14481B12C94A00BB752C /* weathericons-regular-webfont.ttf in Resources */, 640 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 641 | ); 642 | runOnlyForDeploymentPostprocessing = 0; 643 | }; 644 | /* End PBXResourcesBuildPhase section */ 645 | 646 | /* Begin PBXSourcesBuildPhase section */ 647 | 00E356EA1AD99517003FC87E /* Sources */ = { 648 | isa = PBXSourcesBuildPhase; 649 | buildActionMask = 2147483647; 650 | files = ( 651 | 00E356F31AD99517003FC87E /* WeatherAppTests.m in Sources */, 652 | ); 653 | runOnlyForDeploymentPostprocessing = 0; 654 | }; 655 | 13B07F871A680F5B00A75B9A /* Sources */ = { 656 | isa = PBXSourcesBuildPhase; 657 | buildActionMask = 2147483647; 658 | files = ( 659 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 660 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 661 | ); 662 | runOnlyForDeploymentPostprocessing = 0; 663 | }; 664 | /* End PBXSourcesBuildPhase section */ 665 | 666 | /* Begin PBXTargetDependency section */ 667 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 668 | isa = PBXTargetDependency; 669 | target = 13B07F861A680F5B00A75B9A /* WeatherApp */; 670 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 671 | }; 672 | /* End PBXTargetDependency section */ 673 | 674 | /* Begin PBXVariantGroup section */ 675 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 676 | isa = PBXVariantGroup; 677 | children = ( 678 | 13B07FB21A68108700A75B9A /* Base */, 679 | ); 680 | name = LaunchScreen.xib; 681 | path = iOS; 682 | sourceTree = ""; 683 | }; 684 | /* End PBXVariantGroup section */ 685 | 686 | /* Begin XCBuildConfiguration section */ 687 | 00E356F61AD99517003FC87E /* Debug */ = { 688 | isa = XCBuildConfiguration; 689 | buildSettings = { 690 | BUNDLE_LOADER = "$(TEST_HOST)"; 691 | FRAMEWORK_SEARCH_PATHS = ( 692 | "$(SDKROOT)/Developer/Library/Frameworks", 693 | "$(inherited)", 694 | ); 695 | GCC_PREPROCESSOR_DEFINITIONS = ( 696 | "DEBUG=1", 697 | "$(inherited)", 698 | ); 699 | INFOPLIST_FILE = WeatherAppTests/Info.plist; 700 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 701 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 702 | LIBRARY_SEARCH_PATHS = ( 703 | "$(inherited)", 704 | "$(PROJECT_DIR)/node_modules/react-native-svg/Libraries/build/Debug-iphoneos", 705 | ); 706 | PRODUCT_NAME = "$(TARGET_NAME)"; 707 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WeatherApp.app/WeatherApp"; 708 | }; 709 | name = Debug; 710 | }; 711 | 00E356F71AD99517003FC87E /* Release */ = { 712 | isa = XCBuildConfiguration; 713 | buildSettings = { 714 | BUNDLE_LOADER = "$(TEST_HOST)"; 715 | COPY_PHASE_STRIP = NO; 716 | FRAMEWORK_SEARCH_PATHS = ( 717 | "$(SDKROOT)/Developer/Library/Frameworks", 718 | "$(inherited)", 719 | ); 720 | INFOPLIST_FILE = WeatherAppTests/Info.plist; 721 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 722 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 723 | LIBRARY_SEARCH_PATHS = ( 724 | "$(inherited)", 725 | "$(PROJECT_DIR)/node_modules/react-native-svg/Libraries/build/Debug-iphoneos", 726 | ); 727 | PRODUCT_NAME = "$(TARGET_NAME)"; 728 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WeatherApp.app/WeatherApp"; 729 | }; 730 | name = Release; 731 | }; 732 | 13B07F941A680F5B00A75B9A /* Debug */ = { 733 | isa = XCBuildConfiguration; 734 | buildSettings = { 735 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 736 | FRAMEWORK_SEARCH_PATHS = ( 737 | "$(inherited)", 738 | "$(PROJECT_DIR)", 739 | ); 740 | HEADER_SEARCH_PATHS = ( 741 | "$(inherited)", 742 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 743 | "$(SRCROOT)/node_modules/react-native/React/**", 744 | ); 745 | INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist"; 746 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 747 | LIBRARY_SEARCH_PATHS = ( 748 | "$(inherited)", 749 | "$(PROJECT_DIR)/node_modules/react-native-svg/Libraries/build/Debug-iphoneos", 750 | ); 751 | OTHER_LDFLAGS = "-ObjC"; 752 | PRODUCT_NAME = WeatherApp; 753 | }; 754 | name = Debug; 755 | }; 756 | 13B07F951A680F5B00A75B9A /* Release */ = { 757 | isa = XCBuildConfiguration; 758 | buildSettings = { 759 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 760 | FRAMEWORK_SEARCH_PATHS = ( 761 | "$(inherited)", 762 | "$(PROJECT_DIR)", 763 | ); 764 | HEADER_SEARCH_PATHS = ( 765 | "$(inherited)", 766 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 767 | "$(SRCROOT)/node_modules/react-native/React/**", 768 | ); 769 | INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist"; 770 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 771 | LIBRARY_SEARCH_PATHS = ( 772 | "$(inherited)", 773 | "$(PROJECT_DIR)/node_modules/react-native-svg/Libraries/build/Debug-iphoneos", 774 | ); 775 | OTHER_LDFLAGS = "-ObjC"; 776 | PRODUCT_NAME = WeatherApp; 777 | }; 778 | name = Release; 779 | }; 780 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 781 | isa = XCBuildConfiguration; 782 | buildSettings = { 783 | ALWAYS_SEARCH_USER_PATHS = NO; 784 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 785 | CLANG_CXX_LIBRARY = "libc++"; 786 | CLANG_ENABLE_MODULES = YES; 787 | CLANG_ENABLE_OBJC_ARC = YES; 788 | CLANG_WARN_BOOL_CONVERSION = YES; 789 | CLANG_WARN_CONSTANT_CONVERSION = YES; 790 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 791 | CLANG_WARN_EMPTY_BODY = YES; 792 | CLANG_WARN_ENUM_CONVERSION = YES; 793 | CLANG_WARN_INT_CONVERSION = YES; 794 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 795 | CLANG_WARN_UNREACHABLE_CODE = YES; 796 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 797 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 798 | COPY_PHASE_STRIP = NO; 799 | ENABLE_STRICT_OBJC_MSGSEND = YES; 800 | GCC_C_LANGUAGE_STANDARD = gnu99; 801 | GCC_DYNAMIC_NO_PIC = NO; 802 | GCC_OPTIMIZATION_LEVEL = 0; 803 | GCC_PREPROCESSOR_DEFINITIONS = ( 804 | "DEBUG=1", 805 | "$(inherited)", 806 | ); 807 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 808 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 809 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 810 | GCC_WARN_UNDECLARED_SELECTOR = YES; 811 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 812 | GCC_WARN_UNUSED_FUNCTION = YES; 813 | GCC_WARN_UNUSED_VARIABLE = YES; 814 | HEADER_SEARCH_PATHS = ( 815 | "$(inherited)", 816 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 817 | "$(SRCROOT)/node_modules/react-native/React/**", 818 | ); 819 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 820 | MTL_ENABLE_DEBUG_INFO = YES; 821 | ONLY_ACTIVE_ARCH = YES; 822 | SDKROOT = iphoneos; 823 | }; 824 | name = Debug; 825 | }; 826 | 83CBBA211A601CBA00E9B192 /* Release */ = { 827 | isa = XCBuildConfiguration; 828 | buildSettings = { 829 | ALWAYS_SEARCH_USER_PATHS = NO; 830 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 831 | CLANG_CXX_LIBRARY = "libc++"; 832 | CLANG_ENABLE_MODULES = YES; 833 | CLANG_ENABLE_OBJC_ARC = YES; 834 | CLANG_WARN_BOOL_CONVERSION = YES; 835 | CLANG_WARN_CONSTANT_CONVERSION = YES; 836 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 837 | CLANG_WARN_EMPTY_BODY = YES; 838 | CLANG_WARN_ENUM_CONVERSION = YES; 839 | CLANG_WARN_INT_CONVERSION = YES; 840 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 841 | CLANG_WARN_UNREACHABLE_CODE = YES; 842 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 843 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 844 | COPY_PHASE_STRIP = YES; 845 | ENABLE_NS_ASSERTIONS = NO; 846 | ENABLE_STRICT_OBJC_MSGSEND = YES; 847 | GCC_C_LANGUAGE_STANDARD = gnu99; 848 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 849 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 850 | GCC_WARN_UNDECLARED_SELECTOR = YES; 851 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 852 | GCC_WARN_UNUSED_FUNCTION = YES; 853 | GCC_WARN_UNUSED_VARIABLE = YES; 854 | HEADER_SEARCH_PATHS = ( 855 | "$(inherited)", 856 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 857 | "$(SRCROOT)/node_modules/react-native/React/**", 858 | ); 859 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 860 | MTL_ENABLE_DEBUG_INFO = NO; 861 | SDKROOT = iphoneos; 862 | VALIDATE_PRODUCT = YES; 863 | }; 864 | name = Release; 865 | }; 866 | /* End XCBuildConfiguration section */ 867 | 868 | /* Begin XCConfigurationList section */ 869 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "WeatherAppTests" */ = { 870 | isa = XCConfigurationList; 871 | buildConfigurations = ( 872 | 00E356F61AD99517003FC87E /* Debug */, 873 | 00E356F71AD99517003FC87E /* Release */, 874 | ); 875 | defaultConfigurationIsVisible = 0; 876 | defaultConfigurationName = Release; 877 | }; 878 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "WeatherApp" */ = { 879 | isa = XCConfigurationList; 880 | buildConfigurations = ( 881 | 13B07F941A680F5B00A75B9A /* Debug */, 882 | 13B07F951A680F5B00A75B9A /* Release */, 883 | ); 884 | defaultConfigurationIsVisible = 0; 885 | defaultConfigurationName = Release; 886 | }; 887 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "WeatherApp" */ = { 888 | isa = XCConfigurationList; 889 | buildConfigurations = ( 890 | 83CBBA201A601CBA00E9B192 /* Debug */, 891 | 83CBBA211A601CBA00E9B192 /* Release */, 892 | ); 893 | defaultConfigurationIsVisible = 0; 894 | defaultConfigurationName = Release; 895 | }; 896 | /* End XCConfigurationList section */ 897 | }; 898 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 899 | } 900 | -------------------------------------------------------------------------------- /WeatherApp.xcodeproj/xcshareddata/xcschemes/WeatherApp.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /WeatherAppTests/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 | -------------------------------------------------------------------------------- /WeatherAppTests/WeatherAppTests.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 "RCTAssert.h" 14 | #import "RCTRedBox.h" 15 | #import "RCTRootView.h" 16 | 17 | #define TIMEOUT_SECONDS 240 18 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 19 | 20 | @interface WeatherAppTests : XCTestCase 21 | 22 | @end 23 | 24 | @implementation WeatherAppTests 25 | 26 | 27 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 28 | { 29 | if (test(view)) { 30 | return YES; 31 | } 32 | for (UIView *subview in [view subviews]) { 33 | if ([self findSubviewInView:subview matching:test]) { 34 | return YES; 35 | } 36 | } 37 | return NO; 38 | } 39 | 40 | - (void)testRendersWelcomeScreen { 41 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 42 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 43 | BOOL foundElement = NO; 44 | NSString *redboxError = nil; 45 | 46 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 47 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 48 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 49 | 50 | redboxError = [[RCTRedBox sharedInstance] currentErrorMessage]; 51 | 52 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 53 | if ([view respondsToSelector:@selector(attributedText)]) { 54 | NSString *text = [(id)view attributedText].string; 55 | if ([text isEqualToString:TEXT_TO_LOOK_FOR]) { 56 | return YES; 57 | } 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 64 | XCTAssertTrue(foundElement, @"Cound't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 65 | } 66 | 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /common/common.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // find a right icon 3 | icon : (function(code) { 4 | var map = { 5 | '01d': '\uf00d', // clear sky 6 | '02d': '\uf002', // few clouds 7 | '03d': '\uf041', // scattered clouds 8 | '04d': '\uf013', // broken clouds 9 | '09d': '\uf019', // shower rain 10 | '10d': '\uf008', // rain 11 | '11d': '\uf016', // thunderstorm 12 | '13d': '\uf064', // snow 13 | '50d': '\uf014', // mist 14 | '01n': '\uf077', 15 | '02n': '\uf086', 16 | '03n': '\uf041', 17 | '04n': '\uf031', 18 | '09n': '\uf028', 19 | '10n': '\uf028', 20 | '11n': '\uf016', 21 | '13n': '\uf016', 22 | '50n': '\uf014' 23 | }; 24 | 25 | return function weatherIcon(code) { 26 | return map[code] || '\uf03e'; 27 | }; 28 | })(), 29 | // map week 30 | day : (function() { 31 | var map = ['Sun', 'Mon', 'Tue', 'Wen', 'Thu', 'Fri', 'Sat']; 32 | return function(index) { 33 | return map[index]; 34 | }; 35 | })(), 36 | 37 | week : function(list) { 38 | var arr = [] 39 | var obj = {}; 40 | var that = this; 41 | list.forEach(function (current) { 42 | var t = that.today(current.dt * 1000); 43 | var id = t[2]; 44 | 45 | if (!obj[id]) return obj[id] = { 46 | min: that.f2c(current.main.temp_min), 47 | max: that.f2c(current.main.temp_max), 48 | iconUp: that.icon(current.weather[0].icon), 49 | iconDown: that.icon(current.weather[0].icon), 50 | week: that.day(t[3]), 51 | date: t[1] + '/' + t[2] 52 | }; 53 | 54 | obj[id].min = Math.min(that.f2c(current.main.temp_min), obj[id].min); 55 | obj[id].max = Math.max(that.f2c(current.main.temp_max), obj[id].max); 56 | obj[id].iconDown = that.icon(current.weather[0].icon); 57 | }); 58 | 59 | Object.keys(obj).sort(function (a, b) { 60 | return a - b; 61 | }).forEach(function (id) { 62 | arr.push(obj[id]); 63 | }); 64 | 65 | return arr; 66 | }, 67 | // to C 68 | f2c: function(temp) { 69 | return parseInt(temp - 273.15); 70 | }, 71 | today: function(str) { 72 | var d = new Date(str); 73 | return [d.getFullYear(), d.getMonth() + 1, d.getDate(), d.getDay()] 74 | } 75 | } -------------------------------------------------------------------------------- /components/Chart.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var React = require('react-native'); 4 | var d3 = require('d3'); 5 | var Svg = require('react-native-svg'); 6 | var Common = require('../common/common'); 7 | 8 | var Path = Svg.Path; 9 | 10 | var { 11 | View, 12 | StyleSheet, 13 | PropTypes, 14 | } = React; 15 | 16 | var Chart = React.createClass({ 17 | propTypes: { 18 | data : React.PropTypes.array, 19 | width: React.PropTypes.number, 20 | height: React.PropTypes.number, 21 | top: React.PropTypes.number, 22 | pointFillColors: React.PropTypes.array, 23 | pointStrokeColors: React.PropTypes.array, 24 | lineColors: React.PropTypes.array, 25 | }, 26 | getValueDomain: function(){ 27 | var _max = []; 28 | var _min = []; 29 | this.props.data.map((item, index) => { 30 | _max.push(d3.max(item)); 31 | _min.push(d3.min(item)); 32 | }); 33 | return [d3.max(_max), d3.min(_min)]; 34 | }, 35 | getPathD: function(data){ 36 | var x = d3.scale.linear().domain([0, data.length - 1]).range([6, this.props.width - 6]); 37 | var y = d3.scale.linear().domain(this.getValueDomain()).range([6, this.props.height - 6]); 38 | var line = d3.svg.line().x(function(d,i) { 39 | return x(i); 40 | }).y(function(d) { 41 | return y(d); 42 | }) 43 | .interpolate("cardinal"); 44 | return line(data); 45 | }, 46 | paths: function(){ 47 | var that = this; 48 | return this.props.data.map((item, index) => { 49 | return ( 50 | ); 52 | }); 53 | }, 54 | points : function(){ 55 | var that = this; 56 | if(this.props.data.length > 1){ 57 | var x = d3.scale.linear().domain([0, this.props.data[0].length - 1]).range([6, this.props.width - 6]); 58 | var y = d3.scale.linear().domain(this.getValueDomain()).range([6, this.props.height - 6]); 59 | var paths = []; 60 | this.props.data.map((item, index) => { 61 | item.map((point, _index) => { 62 | var cx = x(_index); 63 | var cy = y(point); 64 | var d = "M " + cx + " " + cy + " m -3,0 a 3,3 0 1,0 6,0 a 3,3 0 1,0 -6,0"; 65 | paths.push(); 69 | }); 70 | }); 71 | return paths; 72 | } 73 | }, 74 | svg: function(){ 75 | return ( 79 | {this.paths()} 80 | {this.points()} 81 | ); 82 | }, 83 | render: function() { 84 | if(this.props.data){ 85 | return( 86 | 91 | {this.svg()} 92 | ); 93 | }else{ 94 | return( 95 | 100 | ); 101 | } 102 | } 103 | }); 104 | 105 | module.exports = Chart; -------------------------------------------------------------------------------- /components/LoadingOverlay.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var React = require('react-native'); 4 | var Overlay = require('react-native-overlay'); 5 | 6 | var { 7 | View, 8 | ActivityIndicatorIOS, 9 | StyleSheet, 10 | } = React; 11 | 12 | type Props = { 13 | isVisible: boolean; 14 | } 15 | 16 | var LoadingOverlay = React.createClass({ 17 | getDefaultProps(): Props { 18 | return { 19 | isVisible: false 20 | } 21 | }, 22 | 23 | render(): ReactElement { 24 | return ( 25 | 26 | 27 | 31 | 32 | 33 | ); 34 | } 35 | }); 36 | 37 | var styles = StyleSheet.create({ 38 | background: { 39 | backgroundColor: "#3d566e", 40 | flex: 1, 41 | justifyContent: 'center', 42 | }, 43 | }) 44 | 45 | module.exports = LoadingOverlay; -------------------------------------------------------------------------------- /components/WeekView.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var React = require('react-native'); 4 | var Common = require('../common/common'); 5 | 6 | var { 7 | View, 8 | StyleSheet, 9 | PropTypes, 10 | Text, 11 | } = React; 12 | 13 | 14 | var WeekView = React.createClass({ 15 | propTypes: { 16 | data : React.PropTypes.array, 17 | }, 18 | componentDidMount: function () { 19 | }, 20 | days: function(){ 21 | if(this.props.data) 22 | return Common.week(this.props.data).map((item, index) => { 23 | var day = 24 | 25 | { item.week } 26 | 27 | var iconUp = 28 | 29 | { item.iconUp } 30 | 31 | var iconDown = 32 | 33 | { item.iconDown } 34 | 35 | var date = 36 | 37 | { item.date } 38 | 39 | return ( 40 | 41 | {day} 42 | {iconUp} 43 | 44 | {iconDown} 45 | {date} 46 | 47 | ); 48 | }); 49 | else 50 | return 51 | }, 52 | render: function(){ 53 | if(this.props.data){ 54 | return ( 55 | 56 | 57 | 58 | { this.days() } 59 | 60 | 61 | 62 | ); 63 | }else{ 64 | return( 65 | 66 | ); 67 | } 68 | } 69 | }); 70 | 71 | var styles = StyleSheet.create({ 72 | dayCol: { 73 | borderRightColor: '#4d667e', 74 | borderRightWidth: 1, 75 | alignItems: 'center', 76 | justifyContent: 'center', 77 | flex: 1, 78 | flexDirection: 'column', 79 | }, 80 | weather_icon: { 81 | fontFamily: 'WeatherIcons-Regular', 82 | }, 83 | week_panel: { 84 | flex: 1, 85 | flexDirection: 'row', 86 | alignItems: 'stretch', 87 | }, 88 | week: { 89 | alignItems: 'stretch', 90 | flex: 6, 91 | }, 92 | day_icon: { 93 | fontSize: 20, 94 | color: '#ffffff', 95 | flex: 1, 96 | }, 97 | day: { 98 | fontSize: 12, 99 | color: '#ffffff', 100 | flex: 1, 101 | }, 102 | date: { 103 | fontSize: 12, 104 | color: '#ffffff', 105 | flex: 1, 106 | } 107 | }); 108 | module.exports = WeekView; 109 | -------------------------------------------------------------------------------- /iOS/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/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 "RCTRootView.h" 13 | #import 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | [BuddyBuildSDK setup]; 20 | 21 | NSURL *jsCodeLocation; 22 | 23 | /** 24 | * Loading JavaScript code - uncomment the one you want. 25 | * 26 | * OPTION 1 27 | * Load from development server. Start the server from the repository root: 28 | * 29 | * $ npm start 30 | * 31 | * To run on device, change `localhost` to the IP address of your computer 32 | * (you can get this by typing `ifconfig` into the terminal and selecting the 33 | * `inet` value under `en0:`) and make sure your computer and iOS device are 34 | * on the same Wi-Fi network. 35 | */ 36 | 37 | jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"]; 38 | 39 | /** 40 | * OPTION 2 41 | * Load from pre-bundled file on disk. To re-generate the static bundle 42 | * from the root of your project directory, run 43 | * 44 | * $ react-native bundle --minify 45 | * 46 | * see http://facebook.github.io/react-native/docs/runningondevice.html 47 | */ 48 | 49 | // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 50 | 51 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 52 | moduleName:@"WeatherApp" 53 | launchOptions:launchOptions]; 54 | 55 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 56 | UIViewController *rootViewController = [[UIViewController alloc] init]; 57 | rootViewController.view = rootView; 58 | self.window.rootViewController = rootViewController; 59 | [self.window makeKeyAndVisible]; 60 | return YES; 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /iOS/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 | -------------------------------------------------------------------------------- /iOS/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /iOS/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 | UIAppFonts 40 | 41 | weathericons-regular-webfont.ttf 42 | 43 | NSLocationWhenInUseUsageDescription 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /iOS/main.jsbundle: -------------------------------------------------------------------------------- 1 | // Offline JS 2 | // To re-generate the offline bundle, run this from the root of your project: 3 | // 4 | // $ react-native bundle --minify 5 | // 6 | // See http://facebook.github.io/react-native/docs/runningondevice.html for more details. 7 | 8 | throw new Error('Offline JS file is empty. See iOS/main.jsbundle for instructions'); 9 | -------------------------------------------------------------------------------- /iOS/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 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var React = require('react-native'); 4 | var Dimensions = require('Dimensions'); 5 | var Common = require('./common/common'); 6 | var WeekView = require('./components/WeekView'); 7 | var Chart = require('./components/Chart'); 8 | var LoadingOverlay = require('./components/LoadingOverlay'); 9 | 10 | 11 | var { 12 | AppRegistry, 13 | StyleSheet, 14 | Text, 15 | View, 16 | } = React; 17 | 18 | var WeatherApp = React.createClass({ 19 | statics: { 20 | flex : [2,1,6,6] 21 | }, 22 | getInitialState: function() { 23 | var windowSize = Dimensions.get('window'); 24 | var flexItemHeight = windowSize.height / WeatherApp.flex.reduce(function(a, b){return a+b;}); 25 | return { 26 | current: { 27 | city: "", 28 | weather: "", 29 | temp: "", 30 | date: "", 31 | icon: "" 32 | }, 33 | weekViewData: [], 34 | chartWidth: windowSize.width, 35 | chartHeight: flexItemHeight * 2, 36 | chartTop: flexItemHeight * 11, 37 | //chartData: [[],[]], TODO: can not fire binding,why? 38 | chartData: null, 39 | chartLineColors : ["#d35400","#a0dcdc"], 40 | chartPointFillColors : ["#e67e22","#a0dcdc"], 41 | chartPointStrokeColors : ["#d35400","#ffffff"], 42 | isOverlayVisible: true, 43 | } 44 | }, 45 | getCurrent: function(data){ 46 | var now = Date.now(); 47 | var current = data.list.filter(function(item) { 48 | return Math.abs(item.dt * 1000 - now) < (3 * 60 * 60 * 1000); // less than 3 hrs 49 | })[0]; 50 | var _today = Common.today(now); 51 | return { 52 | city: data.city.name + ',' + data.city.country, 53 | weather: current.weather[0].description, 54 | temp: Common.f2c(current.main.temp), 55 | date: _today[1] + '.' + _today[2] + ' ' + _today[0], 56 | icon: Common.icon(current.weather[0].icon) 57 | } 58 | }, 59 | componentDidMount: function () { 60 | var that = this; 61 | fetch("http://api.openweathermap.org/data/2.5/forecast?q=Shanghai,cn&lang=zh_cn") 62 | .then((response) => response.json()) 63 | .then(function(data) { 64 | var current = that.getCurrent(data); 65 | 66 | var chartData = []; 67 | var temp_max_arr = []; 68 | var temp_min_arr = []; 69 | Common.week(data.list).map((item, index) => { 70 | temp_max_arr.push(item.max); 71 | temp_min_arr.push(item.min); 72 | }); 73 | chartData.push(temp_max_arr); 74 | chartData.push(temp_min_arr); 75 | 76 | chartData.map((item, index) => { 77 | item.push(item[0]); 78 | item.unshift(item[0]); 79 | }); 80 | 81 | that.setState({ 82 | current: current, 83 | chartData: chartData, 84 | weekViewData: data.list, 85 | isOverlayVisible: false, 86 | }); 87 | }) 88 | .catch((error) => { 89 | //errorFunc && errorFunc(error); 90 | }) 91 | .done(); 92 | }, 93 | render: function() { 94 | return ( 95 | 96 | 97 | 98 | { this.state.current.city } / { this.state.current.date } 99 | 100 | 101 | 102 | { this.state.current.weather } { this.state.current.temp }° 103 | 104 | 105 | { this.state.current.icon } 106 | 107 | 108 | 117 | 118 | 119 | ); 120 | } 121 | }); 122 | 123 | var styles = StyleSheet.create({ 124 | container: { 125 | flex: 1, 126 | backgroundColor: '#3d566e', 127 | flexDirection: 'column' 128 | }, 129 | city_day: { 130 | flex: WeatherApp.flex[0], 131 | alignItems: 'center', 132 | flexDirection: 'row', 133 | }, 134 | city_day_text: { 135 | justifyContent: 'center', 136 | alignSelf: 'auto', 137 | flex: 1, 138 | fontSize: 20, 139 | textAlign: 'center', 140 | color: '#95a5a6', 141 | }, 142 | status: { 143 | flex: WeatherApp.flex[1], 144 | fontSize: 20, 145 | textAlign: 'center', 146 | color: '#f1c40f', 147 | fontWeight: 'bold', 148 | }, 149 | current: { 150 | textAlign: 'center', 151 | fontSize: 130, 152 | color: '#ffffff', 153 | flex: WeatherApp.flex[2] 154 | }, 155 | weather_icon: { 156 | fontFamily: 'WeatherIcons-Regular', 157 | }, 158 | }); 159 | 160 | AppRegistry.registerComponent('WeatherApp', () => WeatherApp); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "WeatherApp", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node_modules/react-native/packager/packager.sh" 7 | }, 8 | "dependencies": { 9 | "react-native": "^0.4.4", 10 | "react-native-overlay": "^0.2.2", 11 | "react-native-svg": "^0.1.5" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /weathericons-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shevawen/react-native-weather-app/db21b8b807cc27e2d8552f78ef622ea48099d172/weathericons-regular-webfont.ttf --------------------------------------------------------------------------------