diff --git a/.gitignore b/.gitignore index af2308a..2c351d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,66 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml + +# node.js +# node_modules/ +npm-debug.log +yarn-error.log + +# BUCK +buck-out/ +\.buckd/ +*.keystore +!debug.keystore + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +*/fastlane/report.xml +*/fastlane/Preview.html +*/fastlane/screenshots + +# Bundle artifact +*.jsbundle + +# CocoaPods +/ios/Pods/ + +# Other Files +android/app/google-services.json *.log .vagrant - +android/app/build/* +android/bin diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..07444fe --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "android"] + path = android + url = https://github.com/lbryio/lbry-android diff --git a/LICENSE b/LICENSE index eb958df..a293e51 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2017-2019 LBRY Inc +Copyright (c) 2017-2020 LBRY Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index 08d9f8f..8599854 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# LBRY Android +# LBRY React Native [![pipeline status](https://ci.lbry.tech/lbry/lbry-android/badges/master/pipeline.svg)](https://ci.lbry.tech/lbry/lbry-android/commits/master) -An Android browser and wallet for the [LBRY](https://lbry.com) network. This app bundles [lbrynet-daemon](https://github.com/lbryio/lbry) as a background service with a UI layer built with React Native. The APK is built using buildozer and the Gradle build tool. +A mobile browser and wallet for the [LBRY](https://lbry.com) network. This app bundles [LBRY SDK](https://github.com/lbryio/lbry) as a background service with a UI layer built with React Native. LBRY Android Screenshot @@ -12,10 +12,41 @@ The minimum supported Android version is 5.0 Lollipop. There are two ways to ins 1. Direct APK install available at [http://build.lbry.io/android/latest.apk](http://build.lbry.io/android/latest.apk). You will need to enable installation from third-party sources on your device in order to install from this source. ## Usage -The app can be launched by opening **LBRY Browser** from the device's app drawer or via the shortcut on the home screen if that was created upon installation. +The app can be launched by opening **LBRY** from the device's app drawer or via the shortcut on the home screen if that was created upon installation. ## Running from Source -The app is built from source via [Buildozer](https://github.com/kivy/buildozer). After cloning the repository, copy `buildozer.spec.sample` to `buildozer.spec` and modify this file as necessary for your environment. Please see [BUILD.md](BUILD.md) for detailed build instructions. +### Software Requirements +* Android Studio +* WebStorm (or other IDE for editing React Native / JavaScript code) +* npm +* yarn + +### Android Steps +* Clone the repository using `git clone https://github.com/lbryio/lbry-react-native` +* Initialise the submodules. +``` +cd lbry-react-native +git submodule update --init --recursive +``` +* Install `react-native-cli` globally using `npm install -g react-native-cli`. +* Install the required package modules by running `yarn` in the cloned repository folder. +* Download a `google-services.json` from the Firebase console (https://console.firebase.google.com/) and place it in the `android/app` folder. Alternatively, use the included sample JSON file. +``` +cp android/app/google-services.sample.json android/app/google-services.json +``` +* Open Android Studio and click File > Open... +* Navigate to the cloned repository on your local filesystem and select the `android` subfolder. +* Connect your Android device in USB debugging mode, or create an ARM emulator (slower) to run the app. +* Click Run > Run... and select the corresponding app configuration. Note that it may take a while for the project files to sync before you can run the app +* In order to edit the React Native / JavaScript files, open the cloned repository folder using WebStorm (or your favourite IDE). + +### React Native Fast Refresh +In order to enable fast refresh when updating React Native code +* Connect your Android device in USB debugging mode, or create an ARM emulator +* Run `adb reverse tcp:8081 tcp:8081` (`adb` can be found in the `platform-tools` folder of your Android SDK installation) +* Run `yarn start` +* Press `r` to reload the app. +* Anytime you make an update to the React Native code, the app should automatically refresh. ## Contributing Contributions to this project are welcome, encouraged, and compensated. For more details, see https://lbry.io/faq/contributing diff --git a/__tests__/App-test.js b/__tests__/App-test.js new file mode 100644 index 0000000..1784766 --- /dev/null +++ b/__tests__/App-test.js @@ -0,0 +1,14 @@ +/** + * @format + */ + +import 'react-native'; +import React from 'react'; +import App from '../App'; + +// Note: test renderer must be required after react-native. +import renderer from 'react-test-renderer'; + +it('renders correctly', () => { + renderer.create(); +}); diff --git a/android b/android new file mode 160000 index 0000000..37b8931 --- /dev/null +++ b/android @@ -0,0 +1 @@ +Subproject commit 37b893103da874282f2bdef4a8a1bb543d2c9859 diff --git a/bundle-android.sh b/bundle-android.sh new file mode 100644 index 0000000..49e6ba1 --- /dev/null +++ b/bundle-android.sh @@ -0,0 +1,3 @@ +#!/bin/bash +react-native bundle --platform android --dev false --entry-file src/index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ + diff --git a/index.js b/index.js index 8b9ee54..cdbce82 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ if (__DEV__) { - import('./reactotron').then(() => console.log('Reactotron Configured')); + import('./reactotron').then(() => console.log('Reactotron Configured')); } import LBRYApp from './src/index'; diff --git a/ios/LbryApp-tvOS/Info.plist b/ios/LbryApp-tvOS/Info.plist new file mode 100644 index 0000000..ecbd496 --- /dev/null +++ b/ios/LbryApp-tvOS/Info.plist @@ -0,0 +1,53 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + NSLocationWhenInUseUsageDescription + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/ios/LbryApp-tvOSTests/Info.plist b/ios/LbryApp-tvOSTests/Info.plist new file mode 100644 index 0000000..886825c --- /dev/null +++ b/ios/LbryApp-tvOSTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/ios/LbryApp.xcodeproj/project.pbxproj b/ios/LbryApp.xcodeproj/project.pbxproj new file mode 100644 index 0000000..267742d --- /dev/null +++ b/ios/LbryApp.xcodeproj/project.pbxproj @@ -0,0 +1,782 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 00E356F31AD99517003FC87E /* LbryAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* LbryAppTests.m */; }; + 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; + 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; + 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 2DCD954D1E0B4F2C00145EB5 /* LbryAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* LbryAppTests.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 13B07F861A680F5B00A75B9A; + remoteInfo = LbryApp; + }; + 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; + remoteInfo = "LbryApp-tvOS"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; + 00E356EE1AD99517003FC87E /* LbryAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LbryAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 00E356F21AD99517003FC87E /* LbryAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LbryAppTests.m; sourceTree = ""; }; + 13B07F961A680F5B00A75B9A /* LbryApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LbryApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = LbryApp/AppDelegate.h; sourceTree = ""; }; + 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = LbryApp/AppDelegate.m; sourceTree = ""; }; + 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = LbryApp/Images.xcassets; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = LbryApp/Info.plist; sourceTree = ""; }; + 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = LbryApp/main.m; sourceTree = ""; }; + 2D02E47B1E0B4A5D006451C7 /* LbryApp-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "LbryApp-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D02E4901E0B4A5D006451C7 /* LbryApp-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "LbryApp-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; + ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 00E356EB1AD99517003FC87E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00E356EF1AD99517003FC87E /* LbryAppTests */ = { + isa = PBXGroup; + children = ( + 00E356F21AD99517003FC87E /* LbryAppTests.m */, + 00E356F01AD99517003FC87E /* Supporting Files */, + ); + path = LbryAppTests; + sourceTree = ""; + }; + 00E356F01AD99517003FC87E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 00E356F11AD99517003FC87E /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 13B07FAE1A68108700A75B9A /* LbryApp */ = { + isa = PBXGroup; + children = ( + 008F07F21AC5B25A0029DE68 /* main.jsbundle */, + 13B07FAF1A68108700A75B9A /* AppDelegate.h */, + 13B07FB01A68108700A75B9A /* AppDelegate.m */, + 13B07FB51A68108700A75B9A /* Images.xcassets */, + 13B07FB61A68108700A75B9A /* Info.plist */, + 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, + 13B07FB71A68108700A75B9A /* main.m */, + ); + name = LbryApp; + sourceTree = ""; + }; + 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { + isa = PBXGroup; + children = ( + ED297162215061F000B7C4FE /* JavaScriptCore.framework */, + ED2971642150620600B7C4FE /* JavaScriptCore.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + isa = PBXGroup; + children = ( + ); + name = Libraries; + sourceTree = ""; + }; + 83CBB9F61A601CBA00E9B192 = { + isa = PBXGroup; + children = ( + 13B07FAE1A68108700A75B9A /* LbryApp */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, + 00E356EF1AD99517003FC87E /* LbryAppTests */, + 83CBBA001A601CBA00E9B192 /* Products */, + 2D16E6871FA4F8E400B85C8A /* Frameworks */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + usesTabs = 0; + }; + 83CBBA001A601CBA00E9B192 /* Products */ = { + isa = PBXGroup; + children = ( + 13B07F961A680F5B00A75B9A /* LbryApp.app */, + 00E356EE1AD99517003FC87E /* LbryAppTests.xctest */, + 2D02E47B1E0B4A5D006451C7 /* LbryApp-tvOS.app */, + 2D02E4901E0B4A5D006451C7 /* LbryApp-tvOSTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 00E356ED1AD99517003FC87E /* LbryAppTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "LbryAppTests" */; + buildPhases = ( + 00E356EA1AD99517003FC87E /* Sources */, + 00E356EB1AD99517003FC87E /* Frameworks */, + 00E356EC1AD99517003FC87E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 00E356F51AD99517003FC87E /* PBXTargetDependency */, + ); + name = LbryAppTests; + productName = LbryAppTests; + productReference = 00E356EE1AD99517003FC87E /* LbryAppTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 13B07F861A680F5B00A75B9A /* LbryApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "LbryApp" */; + buildPhases = ( + FD10A7F022414F080027D42C /* Start Packager */, + 13B07F871A680F5B00A75B9A /* Sources */, + 13B07F8C1A680F5B00A75B9A /* Frameworks */, + 13B07F8E1A680F5B00A75B9A /* Resources */, + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = LbryApp; + productName = "LbryApp"; + productReference = 13B07F961A680F5B00A75B9A /* LbryApp.app */; + productType = "com.apple.product-type.application"; + }; + 2D02E47A1E0B4A5D006451C7 /* LbryApp-tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "LbryApp-tvOS" */; + buildPhases = ( + FD10A7F122414F3F0027D42C /* Start Packager */, + 2D02E4771E0B4A5D006451C7 /* Sources */, + 2D02E4781E0B4A5D006451C7 /* Frameworks */, + 2D02E4791E0B4A5D006451C7 /* Resources */, + 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "LbryApp-tvOS"; + productName = "LbryApp-tvOS"; + productReference = 2D02E47B1E0B4A5D006451C7 /* LbryApp-tvOS.app */; + productType = "com.apple.product-type.application"; + }; + 2D02E48F1E0B4A5D006451C7 /* LbryApp-tvOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "LbryApp-tvOSTests" */; + buildPhases = ( + 2D02E48C1E0B4A5D006451C7 /* Sources */, + 2D02E48D1E0B4A5D006451C7 /* Frameworks */, + 2D02E48E1E0B4A5D006451C7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, + ); + name = "LbryApp-tvOSTests"; + productName = "LbryApp-tvOSTests"; + productReference = 2D02E4901E0B4A5D006451C7 /* LbryApp-tvOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83CBB9F71A601CBA00E9B192 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0940; + ORGANIZATIONNAME = Facebook; + TargetAttributes = { + 00E356ED1AD99517003FC87E = { + CreatedOnToolsVersion = 6.2; + TestTargetID = 13B07F861A680F5B00A75B9A; + }; + 2D02E47A1E0B4A5D006451C7 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + }; + 2D02E48F1E0B4A5D006451C7 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + TestTargetID = 2D02E47A1E0B4A5D006451C7; + }; + }; + }; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "LbryApp" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83CBB9F61A601CBA00E9B192; + productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 13B07F861A680F5B00A75B9A /* LbryApp */, + 00E356ED1AD99517003FC87E /* LbryAppTests */, + 2D02E47A1E0B4A5D006451C7 /* LbryApp-tvOS */, + 2D02E48F1E0B4A5D006451C7 /* LbryApp-tvOSTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 00E356EC1AD99517003FC87E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8E1A680F5B00A75B9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4791E0B4A5D006451C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48E1E0B4A5D006451C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Bundle React Native code and images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + }; + 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Bundle React Native Code And Images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + }; + FD10A7F022414F080027D42C /* Start Packager */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Start Packager"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; + showEnvVarsInLog = 0; + }; + FD10A7F122414F3F0027D42C /* Start Packager */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Start Packager"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 00E356EA1AD99517003FC87E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00E356F31AD99517003FC87E /* LbryAppTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F871A680F5B00A75B9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, + 13B07FC11A68108700A75B9A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4771E0B4A5D006451C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, + 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48C1E0B4A5D006451C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2DCD954D1E0B4F2C00145EB5 /* LbryAppTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 13B07F861A680F5B00A75B9A /* LbryApp */; + targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; + }; + 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2D02E47A1E0B4A5D006451C7 /* LbryApp-tvOS */; + targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 13B07FB21A68108700A75B9A /* Base */, + ); + name = LaunchScreen.xib; + path = LbryApp; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 00E356F61AD99517003FC87E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = LbryAppTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LbryApp.app/LbryApp"; + }; + name = Debug; + }; + 00E356F71AD99517003FC87E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COPY_PHASE_STRIP = NO; + INFOPLIST_FILE = LbryAppTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = ( + "-ObjC", + "-lc++", + "$(inherited)", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LbryApp.app/LbryApp"; + }; + name = Release; + }; + 13B07F941A680F5B00A75B9A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = NO; + INFOPLIST_FILE = LbryApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = LbryApp; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 13B07F951A680F5B00A75B9A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CURRENT_PROJECT_VERSION = 1; + INFOPLIST_FILE = LbryApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = LbryApp; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + 2D02E4971E0B4A5E006451C7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "LbryApp-tvOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.LbryApp-tvOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.2; + }; + name = Debug; + }; + 2D02E4981E0B4A5E006451C7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "LbryApp-tvOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.LbryApp-tvOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.2; + }; + name = Release; + }; + 2D02E4991E0B4A5E006451C7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "LbryApp-tvOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.LbryApp-tvOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LbryApp-tvOS.app/LbryApp-tvOS"; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Debug; + }; + 2D02E49A1E0B4A5E006451C7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "LbryApp-tvOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.LbryApp-tvOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LbryApp-tvOS.app/LbryApp-tvOS"; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Release; + }; + 83CBBA201A601CBA00E9B192 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 83CBBA211A601CBA00E9B192 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "LbryAppTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00E356F61AD99517003FC87E /* Debug */, + 00E356F71AD99517003FC87E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "LbryApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13B07F941A680F5B00A75B9A /* Debug */, + 13B07F951A680F5B00A75B9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "LbryApp-tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D02E4971E0B4A5E006451C7 /* Debug */, + 2D02E4981E0B4A5E006451C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "LbryApp-tvOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D02E4991E0B4A5E006451C7 /* Debug */, + 2D02E49A1E0B4A5E006451C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "LbryApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83CBBA201A601CBA00E9B192 /* Debug */, + 83CBBA211A601CBA00E9B192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; +} diff --git a/ios/LbryApp.xcodeproj/xcshareddata/xcschemes/LbryApp-tvOS.xcscheme b/ios/LbryApp.xcodeproj/xcshareddata/xcschemes/LbryApp-tvOS.xcscheme new file mode 100644 index 0000000..c322e95 --- /dev/null +++ b/ios/LbryApp.xcodeproj/xcshareddata/xcschemes/LbryApp-tvOS.xcscheme @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/LbryApp.xcodeproj/xcshareddata/xcschemes/LbryApp.xcscheme b/ios/LbryApp.xcodeproj/xcshareddata/xcschemes/LbryApp.xcscheme new file mode 100644 index 0000000..d3785d0 --- /dev/null +++ b/ios/LbryApp.xcodeproj/xcshareddata/xcschemes/LbryApp.xcscheme @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/LbryApp/AppDelegate.h b/ios/LbryApp/AppDelegate.h new file mode 100644 index 0000000..2726d5e --- /dev/null +++ b/ios/LbryApp/AppDelegate.h @@ -0,0 +1,15 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import +#import + +@interface AppDelegate : UIResponder + +@property (nonatomic, strong) UIWindow *window; + +@end diff --git a/ios/LbryApp/AppDelegate.m b/ios/LbryApp/AppDelegate.m new file mode 100644 index 0000000..030d148 --- /dev/null +++ b/ios/LbryApp/AppDelegate.m @@ -0,0 +1,42 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import "AppDelegate.h" + +#import +#import +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; + RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge + moduleName:@"LbryApp" + initialProperties:nil]; + + rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; + + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + UIViewController *rootViewController = [UIViewController new]; + rootViewController.view = rootView; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; + return YES; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +@end diff --git a/ios/LbryApp/Base.lproj/LaunchScreen.xib b/ios/LbryApp/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..ef5e981 --- /dev/null +++ b/ios/LbryApp/Base.lproj/LaunchScreen.xib @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/LbryApp/Images.xcassets/AppIcon.appiconset/Contents.json b/ios/LbryApp/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..118c98f --- /dev/null +++ b/ios/LbryApp/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/LbryApp/Images.xcassets/Contents.json b/ios/LbryApp/Images.xcassets/Contents.json new file mode 100644 index 0000000..2d92bd5 --- /dev/null +++ b/ios/LbryApp/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/LbryApp/Info.plist b/ios/LbryApp/Info.plist new file mode 100644 index 0000000..80128ad --- /dev/null +++ b/ios/LbryApp/Info.plist @@ -0,0 +1,57 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + LbryApp + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + NSLocationWhenInUseUsageDescription + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/ios/LbryApp/main.m b/ios/LbryApp/main.m new file mode 100644 index 0000000..c316cf8 --- /dev/null +++ b/ios/LbryApp/main.m @@ -0,0 +1,16 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/ios/LbryAppTests/Info.plist b/ios/LbryAppTests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/ios/LbryAppTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/ios/LbryAppTests/LbryAppTests.m b/ios/LbryAppTests/LbryAppTests.m new file mode 100644 index 0000000..cecbde9 --- /dev/null +++ b/ios/LbryAppTests/LbryAppTests.m @@ -0,0 +1,72 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import +#import + +#import +#import + +#define TIMEOUT_SECONDS 600 +#define TEXT_TO_LOOK_FOR @"Welcome to React" + +@interface LbryAppTests : XCTestCase + +@end + +@implementation LbryAppTests + +- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test +{ + if (test(view)) { + return YES; + } + for (UIView *subview in [view subviews]) { + if ([self findSubviewInView:subview matching:test]) { + return YES; + } + } + return NO; +} + +- (void)testRendersWelcomeScreen +{ + UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; + NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; + BOOL foundElement = NO; + + __block NSString *redboxError = nil; +#ifdef DEBUG + RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { + if (level >= RCTLogLevelError) { + redboxError = message; + } + }); +#endif + + while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { + [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + + foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { + if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { + return YES; + } + return NO; + }]; + } + +#ifdef DEBUG + RCTSetLogFunction(RCTDefaultLogFunction); +#endif + + XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); + XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); +} + + +@end diff --git a/ios/Podfile b/ios/Podfile new file mode 100644 index 0000000..fda3e9b --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,53 @@ +platform :ios, '9.0' +require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' + +target 'LbryApp' do + # Pods for LbryAndroid + pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" + pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" + pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" + pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" + pod 'React', :path => '../node_modules/react-native/' + pod 'React-Core', :path => '../node_modules/react-native/' + pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' + pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' + pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' + pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' + pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' + pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' + pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' + pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' + pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' + pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' + pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' + pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/' + + pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' + pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' + pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' + pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' + pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon" + pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" + pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga' + + pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' + pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' + pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' + + target 'LbryAndroidTests' do + inherit! :search_paths + # Pods for testing + end + + use_native_modules! +end + +target 'LbryAndroid-tvOS' do + # Pods for LbryAndroid-tvOS + + target 'LbryAndroid-tvOSTests' do + inherit! :search_paths + # Pods for testing + end + +end diff --git a/package-lock.json b/package-lock.json index 98d19a1..b8c3872 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7067,8 +7067,8 @@ } }, "lbry-redux": { - "version": "github:lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8", - "from": "github:lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8", + "version": "github:lbryio/lbry-redux#5c874e921769093428966fa7ecdf723719cb9067", + "from": "github:lbryio/lbry-redux#5c874e921769093428966fa7ecdf723719cb9067", "requires": { "proxy-polyfill": "0.1.6", "reselect": "^3.0.0", @@ -7076,8 +7076,8 @@ } }, "lbryinc": { - "version": "github:lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c", - "from": "github:lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c", + "version": "github:lbryio/lbryinc#0dc8829a319a708f45a855765f70a193ccb72676", + "from": "github:lbryio/lbryinc#0dc8829a319a708f45a855765f70a193ccb72676", "requires": { "reselect": "^3.0.0" } diff --git a/package.json b/package.json index 02b1403..36a313e 100644 --- a/package.json +++ b/package.json @@ -1,83 +1,90 @@ { - "name": "LBRYApp", - "version": "0.0.1", - "private": "true", - "scripts": { - "start": "node node_modules/react-native/local-cli/cli.js start", - "devtools": "react-devtools", - "format": "prettier 'src/**/*.{js,json}' --write", - "precommit": "lint-staged" - }, - "dependencies": { - "base-64": "^0.1.0", - "@expo/vector-icons": "^8.1.0", - "gfycat-style-urls": "^1.0.3", - "lbry-redux": "lbryio/lbry-redux#c910cd2b80b165843a81fdf6ce96094429b94ec8", - "lbryinc": "lbryio/lbryinc#138a053754ec8e3da8e9bf153d32f527c962f25c", - "lodash": ">=4.17.11", - "merge": ">=1.2.1", - "moment": "^2.22.1", - "react": "16.9.0", - "react-native": "0.61.5", - "@react-native-community/async-storage": "^1.5.1", - "@react-native-community/masked-view": "^0.1.5", - "react-native-camera": "^3.15.0", - "react-native-country-picker-modal": "^1.10.0", - "react-native-exception-handler": "2.10.8", - "react-native-fast-image": "^7.0.2", - "react-native-fs": "^2.13.3", - "react-native-gesture-handler": "1.5.2", - "react-native-image-zoom-viewer": "^2.2.5", - "react-native-password-strength-meter": "^0.0.2", - "react-native-phone-input": "lbryio/react-native-phone-input", - "react-native-progress-circle": "2.1.0", - "react-native-reanimated": "1.4.0", - "react-native-safe-area-context": "^0.6.2", - "react-native-snackbar": "2.0.4", - "react-native-super-grid": "^3.0.4", - "react-native-vector-icons": "^6.6.0", - "react-native-video": "lbryio/react-native-video#7992ff945872f9bd00a3736d9ff1318f343abf47", - "react-native-webview": "^8.0.2", - "react-navigation": "^4.0.10", - "react-navigation-drawer": "^2.3.3", - "react-navigation-redux-helpers": "^3.0.2", - "react-navigation-tabs": "^2.7.0", - "react-navigation-stack": "^1.10.3", - "react-redux": "^5.0.3", - "redux": "^4.0.4", - "redux-persist": "^6.0.0", - "redux-persist-filesystem-storage": "^2.1.0", - "redux-persist-transform-compress": "^4.2.0", - "redux-persist-transform-filter": "0.0.18", - "redux-thunk": "^2.3.0", - "rn-fetch-blob": "0.12.0", - "seedrandom": "3.0.3", - "showdown": "1.9.1" - }, - "devDependencies": { - "@babel/core": "^7.6.2", - "babel-eslint": "10.0.2", - "@babel/plugin-proposal-object-rest-spread": "^7.5.4", - "babel-preset-env": "^1.6.1", - "babel-preset-stage-2": "^6.18.0", - "babel-plugin-module-resolver": "^3.1.1", - "eslint": "^6.5.1", - "eslint-config-standard": "^12.0.0", - "eslint-config-standard-jsx": "^6.0.2", - "eslint-plugin-flowtype": "^2.46.1", - "eslint-plugin-import": "^2.17.2", - "eslint-plugin-node": "^8.0.1", - "eslint-plugin-promise": "^4.1.1", - "eslint-plugin-react": "^7.12.4", - "eslint-plugin-standard": "^4.0.0", - "flow-babel-webpack-plugin": "^1.1.1", - "husky": "^0.14.3", - "lint-staged": "^7.0.4", - "metro-react-native-babel-preset": "^0.56.0", - "prettier": "^1.11.1", - "@react-native-community/eslint-config": "^0.0.5", - "react-devtools": "^3.6.3", - "reactotron-react-native": "4.0.2", - "reactotron-redux": "3.1.2" - } + "name": "LBRYApp", + "version": "0.0.1", + "private": true, + "scripts": { + "android": "react-native run-android", + "ios": "react-native run-ios", + "start": "react-native start", + "test": "jest", + "lint": "eslint .", + "format": "prettier 'src/**/*.{js,json}' --write", + "precommit": "lint-staged" + }, + "dependencies": { + "base-64": "^0.1.0", + "@expo/vector-icons": "^8.1.0", + "gfycat-style-urls": "^1.0.3", + "lbry-redux": "lbryio/lbry-redux#9c48cce570ee8e057068c86cb6507e1b441841ee", + "lbryinc": "lbryio/lbryinc#0dc8829a319a708f45a855765f70a193ccb72676", + "lodash": ">=4.17.11", + "merge": ">=1.2.1", + "moment": "^2.22.1", + "react": "16.9.0", + "react-native": "0.61.5", + "@react-native-community/async-storage": "^1.5.1", + "@react-native-community/masked-view": "^0.1.5", + "react-native-camera": "^3.15.0", + "react-native-country-picker-modal": "^1.10.0", + "react-native-exception-handler": "2.10.8", + "react-native-fast-image": "^7.0.2", + "react-native-fs": "^2.16.6", + "react-native-gesture-handler": "1.5.2", + "react-native-image-zoom-viewer": "^2.2.5", + "react-native-password-strength-meter": "^0.0.2", + "react-native-phone-input": "lbryio/react-native-phone-input", + "react-native-progress-circle": "2.1.0", + "react-native-reanimated": "1.4.0", + "react-native-safe-area-context": "^0.6.2", + "react-native-screens": "^2.0.0", + "react-native-snackbar": "2.0.4", + "react-native-super-grid": "^3.0.4", + "react-native-vector-icons": "^6.6.0", + "react-native-video": "lbryio/react-native-video#7992ff945872f9bd00a3736d9ff1318f343abf47", + "react-native-webview": "^8.0.2", + "react-navigation": "^4.0.10", + "react-navigation-drawer": "2.3.3", + "react-navigation-redux-helpers": "^3.0.2", + "react-navigation-tabs": "^2.7.0", + "react-navigation-stack": "^1.10.3", + "react-redux": "^5.0.3", + "redux": "^4.0.4", + "redux-persist": "^6.0.0", + "redux-persist-filesystem-storage": "^2.1.0", + "redux-persist-transform-compress": "^4.2.0", + "redux-persist-transform-filter": "0.0.18", + "redux-thunk": "^2.3.0", + "rn-fetch-blob": "0.12.0", + "seedrandom": "3.0.3", + "showdown": "1.9.1" + }, + "devDependencies": { + "@babel/core": "^7.6.2", + "babel-eslint": "10.0.2", + "@babel/plugin-proposal-object-rest-spread": "^7.5.4", + "babel-preset-env": "^1.6.1", + "babel-preset-stage-2": "^6.18.0", + "babel-plugin-module-resolver": "^3.1.1", + "eslint": "^6.5.1", + "eslint-config-standard": "^12.0.0", + "eslint-config-standard-jsx": "^6.0.2", + "eslint-plugin-flowtype": "^2.46.1", + "eslint-plugin-import": "^2.17.2", + "eslint-plugin-node": "^8.0.1", + "eslint-plugin-promise": "^4.1.1", + "eslint-plugin-react": "^7.12.4", + "eslint-plugin-standard": "^4.0.0", + "flow-babel-webpack-plugin": "^1.1.1", + "husky": "^0.14.3", + "lint-staged": "^7.0.4", + "metro-react-native-babel-preset": "^0.58.0", + "prettier": "^1.11.1", + "@react-native-community/eslint-config": "^0.0.5", + "react-devtools": "^3.6.3", + "reactotron-react-native": "4.0.2", + "reactotron-redux": "3.1.2" + }, + "jest": { + "preset": "react-native" + } } diff --git a/src/component/AppNavigator.js b/src/component/AppNavigator.js index 80266be..e3a1fb3 100644 --- a/src/component/AppNavigator.js +++ b/src/component/AppNavigator.js @@ -89,12 +89,13 @@ const menuNavigationButton = navigation => ( const discoverStack = createStackNavigator( { - Discover: { - screen: DiscoverPage, - navigationOptions: ({ navigation }) => ({ - title: 'Explore', + Subscriptions: { + screen: SubscriptionsPage, + navigationOptions: { + title: 'Following', header: null, - }), + drawerIcon: ({ tintColor }) => , + }, }, File: { screen: FilePage, @@ -161,10 +162,17 @@ const drawer = createDrawerNavigator( DiscoverStack: { screen: discoverStack, navigationOptions: { - title: 'Explore', + title: 'Following', drawerIcon: ({ tintColor }) => , }, }, + Discover: { + screen: DiscoverPage, + navigationOptions: ({ navigation }) => ({ + title: 'Your Tags', + header: null, + }), + }, Trending: { screen: TrendingPage, navigationOptions: { @@ -172,13 +180,6 @@ const drawer = createDrawerNavigator( drawerIcon: ({ tintColor }) => , }, }, - Subscriptions: { - screen: SubscriptionsPage, - navigationOptions: { - title: 'Subscriptions', - drawerIcon: ({ tintColor }) => , - }, - }, WalletStack: { screen: walletStack, navigationOptions: { diff --git a/src/component/channelSelector/index.js b/src/component/channelSelector/index.js index 29c4fe5..5bbb154 100644 --- a/src/component/channelSelector/index.js +++ b/src/component/channelSelector/index.js @@ -19,11 +19,11 @@ const select = state => ({ const perform = dispatch => ({ notify: data => dispatch(doToast(data)), createChannel: (name, amount) => dispatch(doCreateChannel(name, amount)), - fetchChannelListMine: () => dispatch(doFetchChannelListMine()), + fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)), getSync: (password, callback) => dispatch(doGetSync(password, callback)), }); export default connect( select, - perform + perform, )(ChannelSelector); diff --git a/src/component/claimList/index.js b/src/component/claimList/index.js index 6406a46..fb4d5e9 100644 --- a/src/component/claimList/index.js +++ b/src/component/claimList/index.js @@ -12,11 +12,11 @@ import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api import ClaimList from './view'; const select = state => ({ - showNsfwContent: selectShowNsfw(state), claimSearchByQuery: selectClaimSearchByQuery(state), lastPageReached: selectClaimSearchByQueryLastPageReached(state), loadingByQuery: selectFetchingClaimSearchByQuery(state), loading: selectFetchingClaimSearch(state), + showNsfwContent: selectShowNsfw(state), }); const perform = dispatch => ({ @@ -25,5 +25,5 @@ const perform = dispatch => ({ export default connect( select, - perform + perform, )(ClaimList); diff --git a/src/component/drawerContent/index.js b/src/component/drawerContent/index.js index 48c9cc6..f1c92ef 100644 --- a/src/component/drawerContent/index.js +++ b/src/component/drawerContent/index.js @@ -9,10 +9,10 @@ const select = state => ({ }); const perform = dispatch => ({ - fetchChannelListMine: () => dispatch(doFetchChannelListMine()), + fetchChannelListMine: () => dispatch(doFetchChannelListMine(1, 99999, true)), }); export default connect( select, - perform + perform, )(DrawerContent); diff --git a/src/component/drawerContent/view.js b/src/component/drawerContent/view.js index cdc2815..b8fa70d 100644 --- a/src/component/drawerContent/view.js +++ b/src/component/drawerContent/view.js @@ -9,8 +9,8 @@ import discoverStyle from 'styles/discover'; const groupedMenuItems = { 'Find content': [ - { icon: 'hashtag', label: 'Your Tags', route: Constants.DRAWER_ROUTE_DISCOVER }, { icon: 'heart', solid: true, label: 'Following', route: Constants.DRAWER_ROUTE_SUBSCRIPTIONS }, + { icon: 'hashtag', label: 'Your Tags', route: Constants.DRAWER_ROUTE_DISCOVER }, { icon: 'globe-americas', label: 'All Content', route: Constants.DRAWER_ROUTE_TRENDING }, ], 'Your content': [ @@ -145,7 +145,7 @@ class DrawerContent extends React.PureComponent { const focused = activeItemKey === item.route || (activeItemKey === Constants.FULL_ROUTE_NAME_DISCOVER && - item.route === Constants.DRAWER_ROUTE_DISCOVER) || + item.route === Constants.DRAWER_ROUTE_SUBSCRIPTIONS) || (activeItemKey === Constants.FULL_ROUTE_NAME_WALLET && item.route === Constants.DRAWER_ROUTE_WALLET); return ( diff --git a/src/component/fileListItem/view.js b/src/component/fileListItem/view.js index 7a6f75b..e6e08f7 100644 --- a/src/component/fileListItem/view.js +++ b/src/component/fileListItem/view.js @@ -99,9 +99,12 @@ class FileListItem extends React.PureComponent { isRewardContent, channelClaimId, fullChannelUri, + repostChannel, + repostChannelUrl, shortChannelUri, shouldHide, - signingChannel; + signingChannel, + isRepost; if (claim) { name = claim.name; signingChannel = claim.signing_channel; @@ -111,6 +114,12 @@ class FileListItem extends React.PureComponent { channelClaimId = signingChannel ? signingChannel.claim_id : null; fullChannelUri = channelClaimId ? `${channel}#${channelClaimId}` : channel; shortChannelUri = signingChannel ? signingChannel.short_url : null; + repostChannelUrl = claim.repost_channel_url; + if (repostChannelUrl) { + const { claimName: repostChannelName } = parseURI(repostChannelUrl); + repostChannel = repostChannelName; + } + isRepost = !!repostChannelUrl; if (blackListedOutpoints || filteredOutpoints) { const outpointsToHide = !blackListedOutpoints @@ -127,11 +136,20 @@ class FileListItem extends React.PureComponent { return null; } + const actualHideChannel = !isRepost && hideChannel; const isChannel = name && name.startsWith('@'); const hasThumbnail = !!thumbnail; - return ( - + + {isRepost && ( + + + + navigateToUri(navigation, normalizeURI(repostChannelUrl), null, false, null, false)} /> reposted + + )} + {title || name} @@ -226,7 +244,7 @@ class FileListItem extends React.PureComponent { )} - {(channel || isChannel) && !hideChannel && ( + {(channel || isChannel) && !actualHideChannel && ( { this.showPlayerControls(); - this.setState({ paused: !this.state.paused }, this.handlePausedState); + this.setState({ paused: !this.state.paused }, this.updateBackgroundMediaNotification); }; handlePausedState = () => { @@ -188,7 +188,7 @@ class MediaPlayer extends React.PureComponent { }; onEnd = () => { - this.setState({ paused: true }); + this.setState({ paused: true }, this.updateBackgroundMediaNotification); if (this.props.onPlaybackFinished) { this.props.onPlaybackFinished(); } @@ -327,6 +327,10 @@ class MediaPlayer extends React.PureComponent { } }; + onFocusChanged = evt => { + this.setState({ paused: !(this.state.paused && evt.hasAudioFocus) }, this.updateBackgroundMediaNotification); + }; + onBuffer = () => { if (!this.state.paused) { this.setState({ buffering: true }, () => this.manualHidePlayerControls()); @@ -469,6 +473,7 @@ class MediaPlayer extends React.PureComponent { onEnd={this.onEnd} onError={this.onError} minLoadRetryCount={999} + onAudioFocusChanged={this.onFocusChanged} /> {this.state.firstPlay && thumbnail && ( diff --git a/src/component/modalSuggestedSubscriptions/index.js b/src/component/modalSuggestedSubscriptions/index.js index 6eef7f4..72f9c24 100644 --- a/src/component/modalSuggestedSubscriptions/index.js +++ b/src/component/modalSuggestedSubscriptions/index.js @@ -1,4 +1,9 @@ import { connect } from 'react-redux'; +import { selectFetchingClaimSearch } from 'lbry-redux'; import ModalSuggestedSubscriptions from './view'; -export default connect()(ModalSuggestedSubscriptions); +const select = state => ({ + loadingSuggested: selectFetchingClaimSearch(state), +}); + +export default connect(select)(ModalSuggestedSubscriptions); diff --git a/src/component/modalSuggestedSubscriptions/view.js b/src/component/modalSuggestedSubscriptions/view.js index d12e269..96f773e 100644 --- a/src/component/modalSuggestedSubscriptions/view.js +++ b/src/component/modalSuggestedSubscriptions/view.js @@ -1,23 +1,26 @@ import React from 'react'; -import { ScrollView, Text, TouchableOpacity, View } from 'react-native'; +import { ActivityIndicator, ScrollView, Text, TouchableOpacity, View } from 'react-native'; import modalStyle from 'styles/modal'; import subscriptionsStyle from 'styles/subscriptions'; import Button from 'component/button'; import Colors from 'styles/colors'; -import SuggestedSubscriptions from 'component/suggestedSubscriptions'; +import SuggestedSubscriptionsGrid from 'component/suggestedSubscriptionsGrid'; import Constants from 'constants'; // eslint-disable-line node/no-deprecated-api import Icon from 'react-native-vector-icons/FontAwesome5'; export default class ModalSuggestedSubcriptions extends React.PureComponent { render() { - const { navigation, onDonePress, onOverlayPress } = this.props; + const { loadingSuggested, navigation, onDonePress, onOverlayPress } = this.props; return ( - - -