diff --git a/.vscode/settings.json b/.vscode/settings.json index fa4fa7d..7477f9a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,6 @@ { "editor.formatOnSave": true, "editor.codeLens": false, - "editor.tabSize": 2, "files.insertFinalNewline": true, "javascript.preferences.importModuleSpecifier": "relative", "typescript.preferences.importModuleSpecifier": "relative", diff --git a/AppInit.tsx b/AppInit.tsx index b76d621..ac664f3 100644 --- a/AppInit.tsx +++ b/AppInit.tsx @@ -4,24 +4,46 @@ import React from 'react'; import { useDispatch } from 'react-redux'; import { Style } from './styles/style'; import { setTheme } from './store/actions/actions'; +import auth from '@react-native-firebase/auth'; interface AppInitProps { children: React.ReactElement; } +const AuthenticateUser = async () => { + try { + const response = await auth().signInAnonymously(); + return response; + } catch (error) { + if (error.code === 'auth/operation-not-allowed') { + console.log('Enable anonymous in your firebase console.'); + } + + console.error(error); + } +}; + const AppInit: React.FC = props => { const [isInitialized, setIsInitialized] = React.useState(false); + const [currentUser, setCurrentUser] = React.useState(''); const dispatch = useDispatch(); React.useEffect(() => { const fetchConfigFromStorage = async () => { await Style.computeCurrentTheme(); dispatch(setTheme(Style.getCurrentTheme())); + + const user = await AuthenticateUser(); + if (user) { + setCurrentUser(user.user.displayName); + console.log(user.user.uid); + } + setIsInitialized(true); }; fetchConfigFromStorage(); - }, [dispatch, setIsInitialized]); + }, [currentUser, dispatch, setIsInitialized]); if (isInitialized) { return props.children; diff --git a/android/app/build.gradle b/android/app/build.gradle index 5e3616c..afba4c5 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,4 +1,5 @@ apply plugin: "com.android.application" +apply plugin: "com.google.gms.google-services" import com.android.build.OutputFile diff --git a/android/app/google-services.json b/android/app/google-services.json new file mode 100644 index 0000000..ee246c8 --- /dev/null +++ b/android/app/google-services.json @@ -0,0 +1,40 @@ +{ + "project_info": { + "project_number": "301938801516", + "firebase_url": "https://rn-fitbook.firebaseio.com", + "project_id": "rn-fitbook", + "storage_bucket": "rn-fitbook.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:301938801516:android:e6786ea7423cd9d93fd149", + "android_client_info": { + "package_name": "com.fitbook" + } + }, + "oauth_client": [ + { + "client_id": "301938801516-klgq32le15hukm6q20mb94lu8k3j6vjt.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyD7_AwC14DOmUicmaqyYPmoJhLZXJ-f4f0" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "301938801516-klgq32le15hukm6q20mb94lu8k3j6vjt.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index e314b9f..3141afc 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -13,6 +13,7 @@ buildscript { } dependencies { classpath("com.android.tools.build:gradle:3.5.3") + classpath("com.google.gms:google-services:4.3.3") // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } diff --git a/commonlib/database/IDatabase.ts b/commonlib/database/IDatabase.ts index fb2f744..f75b4bf 100644 --- a/commonlib/database/IDatabase.ts +++ b/commonlib/database/IDatabase.ts @@ -9,6 +9,19 @@ export default interface IDatabase { params?: Record, query?: Record ) => Promise; - GetListAsync: () => Promise; + GetListAsync: (params?: IQueryParams[]) => Promise; PostAsync: (data: Record) => Promise; } + +export enum Operators { + EQUALS, + GREATERTHANOREQUALTO, + LESSTHANOREQUALTO, + NOTEQUALTO, +} + +export interface IQueryParams { + key: string; + operator: Operators; + value: string | number; +} diff --git a/commonlib/services/resistance.ts b/commonlib/services/resistance.ts index 80f2ba3..9d74012 100644 --- a/commonlib/services/resistance.ts +++ b/commonlib/services/resistance.ts @@ -1,6 +1,6 @@ // Copyright FitBook -import IDatabase from '../database/IDatabase'; +import IDatabase, { IQueryParams, Operators } from '../database/IDatabase'; import { CreateResistanceModel, ResistanceModel } from '../models/ResistanceModel'; import ServiceResponse, { isServiceResponse } from '../models/ServiceResponse'; @@ -22,10 +22,14 @@ export default class ResistanceService { return r; } - public async getResistanceListByUserId(type: string, userId: string): Promise { - const params = { type: type.toLocaleUpperCase() }; + public async getResistanceListByUserId(type: string): Promise { + const param: IQueryParams = { + key: 'type', + value: type.toLocaleUpperCase(), + operator: Operators.EQUALS, + }; - const r: ResistanceModel[] | ServiceResponse = await this.db.GetListByUserId(userId, params); + const r: ResistanceModel[] | ServiceResponse = await this.db.GetListAsync([param]); if (isServiceResponse(r)) { return r; diff --git a/components/CreateResistance.tsx b/components/CreateResistance.tsx index 7e4bef8..6c13483 100644 --- a/components/CreateResistance.tsx +++ b/components/CreateResistance.tsx @@ -69,9 +69,8 @@ const ResistanceInput: React.FC = props => { const addLog = () => { let timestamp = getTimestamp(); - let id = '5dfecbdd39d8760019968d04'; const newResistance: CreateResistanceModel = { - userId: id, + userId: '', type: props.name, createdDate: new Date(timestamp), weight, diff --git a/domainlogic/controllers/resistance.ts b/domainlogic/controllers/resistance.ts index 7c30be0..024f434 100644 --- a/domainlogic/controllers/resistance.ts +++ b/domainlogic/controllers/resistance.ts @@ -1,34 +1,16 @@ // Copyright FitBook import { CreateResistanceModel, ResistanceModel, ResistanceTypes } from '../../commonlib/models/ResistanceModel'; -import AsyncStorage from '@react-native-community/async-storage'; -import Storage from '../../constants/storage'; import ResistanceService from '../../commonlib/services/resistance'; import ServiceResponse from '../../commonlib/models/ServiceResponse'; -import LocalStorageDB from '../database/localStorageDB'; -import MongoDb from '../database/mongoDb'; +import FirebaseDB from '../database/FirebaseDB'; export default class ResistanceController { private resistanceSvc: ResistanceService; - private static readonly TABLE_NAME: string = 'resistance'; - private static readonly ENDPOINT = '/api/resistance'; + private static readonly TABLE_NAME: string = 'Resistances'; constructor() { - this.resistanceSvc = new ResistanceService(new LocalStorageDB(ResistanceController.TABLE_NAME)); - this.initialize(); - } - - public async initialize() { - let allowRemoteStorage = true; - AsyncStorage.getItem(Storage.ALLOW_REMOTE_STORAGE).then(value => { - if (value) { - allowRemoteStorage = !!value; - } - - this.resistanceSvc = allowRemoteStorage - ? new ResistanceService(new MongoDb(ResistanceController.ENDPOINT)) - : new ResistanceService(new LocalStorageDB(ResistanceController.TABLE_NAME)); - }); + this.resistanceSvc = new ResistanceService(new FirebaseDB(ResistanceController.TABLE_NAME)); } public async createResistance(data: CreateResistanceModel): Promise { diff --git a/domainlogic/database/FirebaseDB.ts b/domainlogic/database/FirebaseDB.ts new file mode 100644 index 0000000..28ada2b --- /dev/null +++ b/domainlogic/database/FirebaseDB.ts @@ -0,0 +1,100 @@ +// Copyright FitBook +import firestore from '@react-native-firebase/firestore'; +import auth from '@react-native-firebase/auth'; +import IDatabase, { IQueryParams, Operators } from '../../commonlib/database/IDatabase'; +import ServiceResponse from '../../commonlib/models/ServiceResponse'; + +export default class FirebaseDB implements IDatabase { + private tableName: string; + private currentUserId: string | undefined; + private isOffline: boolean; + + constructor(tableName: string) { + this.tableName = tableName; + this.currentUserId = auth().currentUser?.uid; + this.isOffline = false; + } + public async PostAsync(data: Record) { + if (!this.isOffline) this.setOffline(); + + try { + data.userId = this.currentUserId; + const result = await firestore().collection(this.tableName).add(data); + const value = await result.get(); + return value; + } catch (error) { + return new ServiceResponse(); + } + } + + public async GetAsync(id: string): Promise> { + if (!this.isOffline) this.setOffline(); + + try { + const querySnapshot = await firestore().collection(this.tableName).where('id', '==', id).get(); + return querySnapshot.docs; + } catch (error) { + console.error('Something went wrong', error); + return new ServiceResponse(); + } + } + + public async GetListAsync(params?: IQueryParams[]): Promise { + if (!this.isOffline) this.setOffline(); + + try { + let query = firestore().collection(this.tableName).where('userId', '==', this.currentUserId); + + if (params) { + params.forEach(param => { + query.where(param.key, this.GetOperator(param.operator), param.value); + }); + } + const snapshot = await query.get(); + + let data: any[] = []; + snapshot.forEach(doc => { + data.push(doc.data()); + }); + + return data; + } catch (error) { + console.error('Something went wrong', error); + return new ServiceResponse(); + } + } + + public async GetListByUserId(_userId: string, _params?: Record): Promise { + try { + const snapshot = await firestore().collection(this.tableName).get(); + return snapshot.docs; + } catch (error) { + console.error('Something went wrong', error); + return new ServiceResponse(); + } + } + + private GetOperator(operator: Operators): any { + switch (operator) { + case Operators.EQUALS: + return '=='; + case Operators.GREATERTHANOREQUALTO: + return '>='; + case Operators.LESSTHANOREQUALTO: + return '<='; + case Operators.NOTEQUALTO: + return '!='; + default: + return '=='; + } + } + + private async setOffline() { + try { + await firestore().enableNetwork(); + this.isOffline = true; + } catch (error) { + console.error('Unable to set device offline.', error); + } + } +} diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..a8fb587 --- /dev/null +++ b/firebase.json @@ -0,0 +1,5 @@ +{ + "react-native": { + "database_persistence_enabled": true + } +} diff --git a/ios/GoogleService-Info.plist b/ios/GoogleService-Info.plist new file mode 100644 index 0000000..4a654f6 --- /dev/null +++ b/ios/GoogleService-Info.plist @@ -0,0 +1,36 @@ + + + + + CLIENT_ID + 301938801516-m0h0in8b7jdngt9j0ucupvsfa5h48vqb.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.301938801516-m0h0in8b7jdngt9j0ucupvsfa5h48vqb + API_KEY + AIzaSyAuhEOM76Zd5fz50w037TQXulReJu9p22Y + GCM_SENDER_ID + 301938801516 + PLIST_VERSION + 1 + BUNDLE_ID + org.fitbook.fitbook + PROJECT_ID + rn-fitbook + STORAGE_BUCKET + rn-fitbook.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:301938801516:ios:55c56b3359ba92563fd149 + DATABASE_URL + https://rn-fitbook.firebaseio.com + + \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 71ab25b..b438349 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,5 +1,224 @@ PODS: + - abseil/algorithm (0.20200225.0): + - abseil/algorithm/algorithm (= 0.20200225.0) + - abseil/algorithm/container (= 0.20200225.0) + - abseil/algorithm/algorithm (0.20200225.0): + - abseil/base/config + - abseil/algorithm/container (0.20200225.0): + - abseil/algorithm/algorithm + - abseil/base/core_headers + - abseil/meta/type_traits + - abseil/base (0.20200225.0): + - abseil/base/atomic_hook (= 0.20200225.0) + - abseil/base/base (= 0.20200225.0) + - abseil/base/base_internal (= 0.20200225.0) + - abseil/base/bits (= 0.20200225.0) + - abseil/base/config (= 0.20200225.0) + - abseil/base/core_headers (= 0.20200225.0) + - abseil/base/dynamic_annotations (= 0.20200225.0) + - abseil/base/endian (= 0.20200225.0) + - abseil/base/errno_saver (= 0.20200225.0) + - abseil/base/exponential_biased (= 0.20200225.0) + - abseil/base/log_severity (= 0.20200225.0) + - abseil/base/malloc_internal (= 0.20200225.0) + - abseil/base/periodic_sampler (= 0.20200225.0) + - abseil/base/pretty_function (= 0.20200225.0) + - abseil/base/raw_logging_internal (= 0.20200225.0) + - abseil/base/spinlock_wait (= 0.20200225.0) + - abseil/base/throw_delegate (= 0.20200225.0) + - abseil/base/atomic_hook (0.20200225.0): + - abseil/base/config + - abseil/base/core_headers + - abseil/base/base (0.20200225.0): + - abseil/base/atomic_hook + - abseil/base/base_internal + - abseil/base/config + - abseil/base/core_headers + - abseil/base/dynamic_annotations + - abseil/base/log_severity + - abseil/base/raw_logging_internal + - abseil/base/spinlock_wait + - abseil/meta/type_traits + - abseil/base/base_internal (0.20200225.0): + - abseil/base/config + - abseil/meta/type_traits + - abseil/base/bits (0.20200225.0): + - abseil/base/config + - abseil/base/core_headers + - abseil/base/config (0.20200225.0) + - abseil/base/core_headers (0.20200225.0): + - abseil/base/config + - abseil/base/dynamic_annotations (0.20200225.0) + - abseil/base/endian (0.20200225.0): + - abseil/base/config + - abseil/base/core_headers + - abseil/base/errno_saver (0.20200225.0): + - abseil/base/config + - abseil/base/exponential_biased (0.20200225.0): + - abseil/base/config + - abseil/base/core_headers + - abseil/base/log_severity (0.20200225.0): + - abseil/base/config + - abseil/base/core_headers + - abseil/base/malloc_internal (0.20200225.0): + - abseil/base/base + - abseil/base/base_internal + - abseil/base/config + - abseil/base/core_headers + - abseil/base/dynamic_annotations + - abseil/base/raw_logging_internal + - abseil/base/periodic_sampler (0.20200225.0): + - abseil/base/core_headers + - abseil/base/exponential_biased + - abseil/base/pretty_function (0.20200225.0) + - abseil/base/raw_logging_internal (0.20200225.0): + - abseil/base/atomic_hook + - abseil/base/config + - abseil/base/core_headers + - abseil/base/log_severity + - abseil/base/spinlock_wait (0.20200225.0): + - abseil/base/base_internal + - abseil/base/core_headers + - abseil/base/errno_saver + - abseil/base/throw_delegate (0.20200225.0): + - abseil/base/config + - abseil/base/raw_logging_internal + - abseil/container/compressed_tuple (0.20200225.0): + - abseil/utility/utility + - abseil/container/inlined_vector (0.20200225.0): + - abseil/algorithm/algorithm + - abseil/base/core_headers + - abseil/base/throw_delegate + - abseil/container/inlined_vector_internal + - abseil/memory/memory + - abseil/container/inlined_vector_internal (0.20200225.0): + - abseil/base/core_headers + - abseil/container/compressed_tuple + - abseil/memory/memory + - abseil/meta/type_traits + - abseil/types/span + - abseil/memory (0.20200225.0): + - abseil/memory/memory (= 0.20200225.0) + - abseil/memory/memory (0.20200225.0): + - abseil/base/core_headers + - abseil/meta/type_traits + - abseil/meta (0.20200225.0): + - abseil/meta/type_traits (= 0.20200225.0) + - abseil/meta/type_traits (0.20200225.0): + - abseil/base/config + - abseil/numeric/int128 (0.20200225.0): + - abseil/base/config + - abseil/base/core_headers + - abseil/strings/internal (0.20200225.0): + - abseil/base/config + - abseil/base/core_headers + - abseil/base/endian + - abseil/base/raw_logging_internal + - abseil/meta/type_traits + - abseil/strings/str_format (0.20200225.0): + - abseil/strings/str_format_internal + - abseil/strings/str_format_internal (0.20200225.0): + - abseil/base/config + - abseil/base/core_headers + - abseil/meta/type_traits + - abseil/numeric/int128 + - abseil/strings/strings + - abseil/types/span + - abseil/strings/strings (0.20200225.0): + - abseil/base/base + - abseil/base/bits + - abseil/base/config + - abseil/base/core_headers + - abseil/base/endian + - abseil/base/raw_logging_internal + - abseil/base/throw_delegate + - abseil/memory/memory + - abseil/meta/type_traits + - abseil/numeric/int128 + - abseil/strings/internal + - abseil/time (0.20200225.0): + - abseil/time/internal (= 0.20200225.0) + - abseil/time/time (= 0.20200225.0) + - abseil/time/internal (0.20200225.0): + - abseil/time/internal/cctz (= 0.20200225.0) + - abseil/time/internal/cctz (0.20200225.0): + - abseil/time/internal/cctz/civil_time (= 0.20200225.0) + - abseil/time/internal/cctz/time_zone (= 0.20200225.0) + - abseil/time/internal/cctz/civil_time (0.20200225.0): + - abseil/base/config + - abseil/time/internal/cctz/time_zone (0.20200225.0): + - abseil/base/config + - abseil/time/internal/cctz/civil_time + - abseil/time/time (0.20200225.0): + - abseil/base/base + - abseil/base/core_headers + - abseil/base/raw_logging_internal + - abseil/numeric/int128 + - abseil/strings/strings + - abseil/time/internal/cctz/civil_time + - abseil/time/internal/cctz/time_zone + - abseil/types (0.20200225.0): + - abseil/types/any (= 0.20200225.0) + - abseil/types/bad_any_cast (= 0.20200225.0) + - abseil/types/bad_any_cast_impl (= 0.20200225.0) + - abseil/types/bad_optional_access (= 0.20200225.0) + - abseil/types/bad_variant_access (= 0.20200225.0) + - abseil/types/compare (= 0.20200225.0) + - abseil/types/optional (= 0.20200225.0) + - abseil/types/span (= 0.20200225.0) + - abseil/types/variant (= 0.20200225.0) + - abseil/types/any (0.20200225.0): + - abseil/base/config + - abseil/base/core_headers + - abseil/meta/type_traits + - abseil/types/bad_any_cast + - abseil/utility/utility + - abseil/types/bad_any_cast (0.20200225.0): + - abseil/base/config + - abseil/types/bad_any_cast_impl + - abseil/types/bad_any_cast_impl (0.20200225.0): + - abseil/base/config + - abseil/base/raw_logging_internal + - abseil/types/bad_optional_access (0.20200225.0): + - abseil/base/config + - abseil/base/raw_logging_internal + - abseil/types/bad_variant_access (0.20200225.0): + - abseil/base/config + - abseil/base/raw_logging_internal + - abseil/types/compare (0.20200225.0): + - abseil/base/core_headers + - abseil/meta/type_traits + - abseil/types/optional (0.20200225.0): + - abseil/base/base_internal + - abseil/base/config + - abseil/base/core_headers + - abseil/memory/memory + - abseil/meta/type_traits + - abseil/types/bad_optional_access + - abseil/utility/utility + - abseil/types/span (0.20200225.0): + - abseil/algorithm/algorithm + - abseil/base/core_headers + - abseil/base/throw_delegate + - abseil/meta/type_traits + - abseil/types/variant (0.20200225.0): + - abseil/base/base_internal + - abseil/base/config + - abseil/base/core_headers + - abseil/meta/type_traits + - abseil/types/bad_variant_access + - abseil/utility/utility + - abseil/utility/utility (0.20200225.0): + - abseil/base/base_internal + - abseil/base/config + - abseil/meta/type_traits - boost-for-react-native (1.63.0) + - BoringSSL-GRPC (0.0.7): + - BoringSSL-GRPC/Implementation (= 0.0.7) + - BoringSSL-GRPC/Interface (= 0.0.7) + - BoringSSL-GRPC/Implementation (0.0.7): + - BoringSSL-GRPC/Interface (= 0.0.7) + - BoringSSL-GRPC/Interface (0.0.7) - CocoaAsyncSocket (7.6.4) - CocoaLibEvent (1.0.0) - DoubleConversion (1.1.6) @@ -11,6 +230,40 @@ PODS: - React-Core (= 0.63.2) - React-jsi (= 0.63.2) - ReactCommon/turbomodule/core (= 0.63.2) + - Firebase/Auth (6.34.0): + - Firebase/CoreOnly + - FirebaseAuth (~> 6.9.2) + - Firebase/CoreOnly (6.34.0): + - FirebaseCore (= 6.10.4) + - Firebase/Firestore (6.34.0): + - Firebase/CoreOnly + - FirebaseFirestore (~> 1.19.0) + - FirebaseAuth (6.9.2): + - FirebaseCore (~> 6.10) + - GoogleUtilities/AppDelegateSwizzler (~> 6.7) + - GoogleUtilities/Environment (~> 6.7) + - GTMSessionFetcher/Core (~> 1.1) + - FirebaseCore (6.10.4): + - FirebaseCoreDiagnostics (~> 1.6) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/Logger (~> 6.7) + - FirebaseCoreDiagnostics (1.7.0): + - GoogleDataTransport (~> 7.4) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/Logger (~> 6.7) + - nanopb (~> 1.30906.0) + - FirebaseFirestore (1.19.0): + - abseil/algorithm (= 0.20200225.0) + - abseil/base (= 0.20200225.0) + - abseil/memory (= 0.20200225.0) + - abseil/meta (= 0.20200225.0) + - abseil/strings/strings (= 0.20200225.0) + - abseil/time (= 0.20200225.0) + - abseil/types (= 0.20200225.0) + - FirebaseCore (~> 6.10) + - "gRPC-C++ (~> 1.28.0)" + - leveldb-library (~> 1.22) + - nanopb (~> 1.30906.0) - Flipper (0.41.5): - Flipper-Folly (~> 2.2) - Flipper-RSocket (~> 1.1) @@ -67,9 +320,58 @@ PODS: - DoubleConversion - glog - glog (0.3.5) + - GoogleDataTransport (7.5.0): + - nanopb (~> 1.30906.0) + - GoogleUtilities/AppDelegateSwizzler (6.7.2): + - GoogleUtilities/Environment + - GoogleUtilities/Logger + - GoogleUtilities/Network + - GoogleUtilities/Environment (6.7.2): + - PromisesObjC (~> 1.2) + - GoogleUtilities/Logger (6.7.2): + - GoogleUtilities/Environment + - GoogleUtilities/Network (6.7.2): + - GoogleUtilities/Logger + - "GoogleUtilities/NSData+zlib" + - GoogleUtilities/Reachability + - "GoogleUtilities/NSData+zlib (6.7.2)" + - GoogleUtilities/Reachability (6.7.2): + - GoogleUtilities/Logger + - "gRPC-C++ (1.28.2)": + - "gRPC-C++/Implementation (= 1.28.2)" + - "gRPC-C++/Interface (= 1.28.2)" + - "gRPC-C++/Implementation (1.28.2)": + - abseil/container/inlined_vector (= 0.20200225.0) + - abseil/memory/memory (= 0.20200225.0) + - abseil/strings/str_format (= 0.20200225.0) + - abseil/strings/strings (= 0.20200225.0) + - abseil/types/optional (= 0.20200225.0) + - "gRPC-C++/Interface (= 1.28.2)" + - gRPC-Core (= 1.28.2) + - "gRPC-C++/Interface (1.28.2)" + - gRPC-Core (1.28.2): + - gRPC-Core/Implementation (= 1.28.2) + - gRPC-Core/Interface (= 1.28.2) + - gRPC-Core/Implementation (1.28.2): + - abseil/container/inlined_vector (= 0.20200225.0) + - abseil/memory/memory (= 0.20200225.0) + - abseil/strings/str_format (= 0.20200225.0) + - abseil/strings/strings (= 0.20200225.0) + - abseil/types/optional (= 0.20200225.0) + - BoringSSL-GRPC (= 0.0.7) + - gRPC-Core/Interface (= 1.28.2) + - gRPC-Core/Interface (1.28.2) + - GTMSessionFetcher/Core (1.5.0) + - leveldb-library (1.22) + - nanopb (1.30906.0): + - nanopb/decode (= 1.30906.0) + - nanopb/encode (= 1.30906.0) + - nanopb/decode (1.30906.0) + - nanopb/encode (1.30906.0) - OpenSSL-Universal (1.0.2.19): - OpenSSL-Universal/Static (= 1.0.2.19) - OpenSSL-Universal/Static (1.0.2.19) + - PromisesObjC (1.2.11) - RCTRequired (0.63.2) - RCTTypeSafety (0.63.2): - FBLazyVector (= 0.63.2) @@ -306,6 +608,17 @@ PODS: - React - RNDeviceInfo (6.0.2): - React + - RNFBApp (8.4.7): + - Firebase/CoreOnly (~> 6.34.0) + - React-Core + - RNFBAuth (9.3.2): + - Firebase/Auth (~> 6.34.0) + - React-Core + - RNFBApp + - RNFBFirestore (7.9.1): + - Firebase/Firestore (~> 6.34.0) + - React-Core + - RNFBApp - RNGestureHandler (1.8.0): - React - RNReanimated (1.13.0): @@ -372,6 +685,9 @@ DEPENDENCIES: - "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)" - "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)" - RNDeviceInfo (from `../node_modules/react-native-device-info`) + - "RNFBApp (from `../node_modules/@react-native-firebase/app`)" + - "RNFBAuth (from `../node_modules/@react-native-firebase/auth`)" + - "RNFBFirestore (from `../node_modules/@react-native-firebase/firestore`)" - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) - RNReanimated (from `../node_modules/react-native-reanimated`) - RNScreens (from `../node_modules/react-native-screens`) @@ -381,9 +697,16 @@ DEPENDENCIES: SPEC REPOS: trunk: + - abseil - boost-for-react-native + - BoringSSL-GRPC - CocoaAsyncSocket - CocoaLibEvent + - Firebase + - FirebaseAuth + - FirebaseCore + - FirebaseCoreDiagnostics + - FirebaseFirestore - Flipper - Flipper-DoubleConversion - Flipper-Folly @@ -391,7 +714,15 @@ SPEC REPOS: - Flipper-PeerTalk - Flipper-RSocket - FlipperKit + - GoogleDataTransport + - GoogleUtilities + - "gRPC-C++" + - gRPC-Core + - GTMSessionFetcher + - leveldb-library + - nanopb - OpenSSL-Universal + - PromisesObjC - YogaKit EXTERNAL SOURCES: @@ -455,6 +786,12 @@ EXTERNAL SOURCES: :path: "../node_modules/@react-native-community/masked-view" RNDeviceInfo: :path: "../node_modules/react-native-device-info" + RNFBApp: + :path: "../node_modules/@react-native-firebase/app" + RNFBAuth: + :path: "../node_modules/@react-native-firebase/auth" + RNFBFirestore: + :path: "../node_modules/@react-native-firebase/firestore" RNGestureHandler: :path: "../node_modules/react-native-gesture-handler" RNReanimated: @@ -469,12 +806,19 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: + abseil: 6c8eb7892aefa08d929b39f9bb108e5367e3228f boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c + BoringSSL-GRPC: 8edf627ee524575e2f8d19d56f068b448eea3879 CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f DoubleConversion: cde416483dac037923206447da6e1454df403714 FBLazyVector: 3ef4a7f62e7db01092f9d517d2ebc0d0677c4a37 FBReactNativeSpec: dc7fa9088f0f2a998503a352b0554d69a4391c5a + Firebase: c23a36d9e4cdf7877dfcba8dd0c58add66358999 + FirebaseAuth: c92d49ada7948d1a23466e3db17bc4c2039dddc3 + FirebaseCore: d3a978a3cfa3240bf7e4ba7d137fdf5b22b628ec + FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1 + FirebaseFirestore: 9b2f1b9b9a6f2f0b6fb7484b9e32ab7e39243554 Flipper: 33585e2d9810fe5528346be33bcf71b37bb7ae13 Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3 @@ -484,7 +828,15 @@ SPEC CHECKSUMS: FlipperKit: bc68102cd4952a258a23c9c1b316c7bec1fecf83 Folly: b73c3869541e86821df3c387eb0af5f65addfab4 glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 + GoogleDataTransport: 445302b7da4216da63071a4c29e7023f47192e5a + GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3 + "gRPC-C++": 13d8ccef97d5c3c441b7e3c529ef28ebee86fad2 + gRPC-Core: 4afa11bfbedf7cdecd04de535a9e046893404ed5 + GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52 + leveldb-library: 55d93ee664b4007aac644a782d11da33fba316f7 + nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355 + PromisesObjC: 8c196f5a328c2cba3e74624585467a557dcb482f RCTRequired: f13f25e7b12f925f1f6a6a8c69d929a03c0129fe RCTTypeSafety: 44982c5c8e43ff4141eb519a8ddc88059acd1f3a React: e1c65dd41cb9db13b99f24608e47dd595f28ca9a @@ -510,6 +862,9 @@ SPEC CHECKSUMS: RNCAsyncStorage: 2a692bcb9b69b76a2f1a95f33db057129700af64 RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f RNDeviceInfo: bdd61e8b070d13a1dd9d022091981075ed4cde16 + RNFBApp: 804b98033f45c3a3e35b56de8c894f85ef5e4388 + RNFBAuth: 4cfe4dabd91775346ee41f0bde60262e827033c5 + RNFBFirestore: 3fe90c352fdbbff5a822c43f571cf8d9fdf38029 RNGestureHandler: 7a5833d0f788dbd107fbb913e09aa0c1ff333c39 RNReanimated: 89f5e0a04d1dd52fbf27e7e7030d8f80a646a3fc RNScreens: b748efec66e095134c7166ca333b628cd7e6f3e2 diff --git a/ios/fitbook.xcodeproj/project.pbxproj b/ios/fitbook.xcodeproj/project.pbxproj index 89758be..cbade48 100644 --- a/ios/fitbook.xcodeproj/project.pbxproj +++ b/ios/fitbook.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 2DCD954D1E0B4F2C00145EB5 /* fitbookTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* fitbookTests.m */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; + 9C8AD7092549282F004D80B9 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9C8AD7082549282F004D80B9 /* GoogleService-Info.plist */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -54,6 +55,7 @@ 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = fitbook/LaunchScreen.storyboard; sourceTree = ""; }; 9700C360FE21A70E314ADDE8 /* Pods-fitbook-fitbookTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fitbook-fitbookTests.release.xcconfig"; path = "Target Support Files/Pods-fitbook-fitbookTests/Pods-fitbook-fitbookTests.release.xcconfig"; sourceTree = ""; }; 99A126B4B8AD0779872D0144 /* libPods-fitbook-fitbookTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-fitbook-fitbookTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 9C8AD7082549282F004D80B9 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; A363723B2C8704B28C741121 /* Pods-fitbook.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fitbook.debug.xcconfig"; path = "Target Support Files/Pods-fitbook/Pods-fitbook.debug.xcconfig"; sourceTree = ""; }; AB5161BBA50363A8EDA26343 /* Pods-fitbook.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-fitbook.release.xcconfig"; path = "Target Support Files/Pods-fitbook/Pods-fitbook.release.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; @@ -147,6 +149,7 @@ 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( + 9C8AD7082549282F004D80B9 /* GoogleService-Info.plist */, 13B07FAE1A68108700A75B9A /* fitbook */, 832341AE1AAA6A7D00B99B32 /* Libraries */, 00E356EF1AD99517003FC87E /* fitbookTests */, @@ -215,6 +218,7 @@ 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 293B10BE3390E81A380A2440 /* [CP] Copy Pods Resources */, + 4C0B3E3C7CBD01E30755528E /* [CP-User] [RNFB] Core Configuration */, ); buildRules = ( ); @@ -323,6 +327,7 @@ files = ( 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + 9C8AD7092549282F004D80B9 /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -382,6 +387,7 @@ "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-C++/gRPCCertificates-Cpp.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( @@ -402,6 +408,7 @@ "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates-Cpp.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -444,6 +451,16 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 4C0B3E3C7CBD01E30755528E /* [CP-User] [RNFB] Core Configuration */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + name = "[CP-User] [RNFB] Core Configuration"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> RNFB build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n _RN_ROOT_EXISTS=$(ruby -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n _JSON_OUTPUT_BASE64=$(python -c 'import json,sys,base64;print(base64.b64encode(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"').read())['${_JSON_ROOT}'])))' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\n\n # config.admob_delay_app_measurement_init\n _ADMOB_DELAY_APP_MEASUREMENT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"admob_delay_app_measurement_init\")\n if [[ $_ADMOB_DELAY_APP_MEASUREMENT == \"true\" ]]; then\n _PLIST_ENTRY_KEYS+=(\"GADDelayAppMeasurementInit\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"YES\")\n fi\n\n # config.admob_ios_app_id\n _ADMOB_IOS_APP_ID=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"admob_ios_app_id\")\n if [[ $_ADMOB_IOS_APP_ID ]]; then\n _PLIST_ENTRY_KEYS+=(\"GADApplicationIdentifier\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_ADMOB_IOS_APP_ID\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- RNFB build script finished\"\n"; + }; 500F906A19FD7DA71D74A804 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -468,6 +485,7 @@ "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-C++/gRPCCertificates-Cpp.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( @@ -488,6 +506,7 @@ "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates-Cpp.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; diff --git a/ios/fitbook.xcworkspace/xcuserdata/v-manair.xcuserdatad/UserInterfaceState.xcuserstate b/ios/fitbook.xcworkspace/xcuserdata/v-manair.xcuserdatad/UserInterfaceState.xcuserstate index 84d973c..aa9667d 100644 Binary files a/ios/fitbook.xcworkspace/xcuserdata/v-manair.xcuserdatad/UserInterfaceState.xcuserstate and b/ios/fitbook.xcworkspace/xcuserdata/v-manair.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ios/fitbook/AppDelegate.m b/ios/fitbook/AppDelegate.m index a9a5580..a9686c3 100644 --- a/ios/fitbook/AppDelegate.m +++ b/ios/fitbook/AppDelegate.m @@ -11,6 +11,7 @@ #import #import #import +#import static void InitializeFlipper(UIApplication *application) { FlipperClient *client = [FlipperClient sharedClient]; @@ -34,6 +35,9 @@ - (BOOL)application:(UIApplication *)application #ifdef FB_SONARKIT_ENABLED InitializeFlipper(application); #endif + if ([FIRApp defaultApp] == nil) { + [FIRApp configure]; + } RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; diff --git a/package.json b/package.json index 84de9c2..38f2ffe 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,9 @@ "dependencies": { "@react-native-community/async-storage": "^1.12.0", "@react-native-community/masked-view": "^0.1.10", - "@react-native-firebase/app": "^8.4.6", + "@react-native-firebase/app": "^8.4.7", + "@react-native-firebase/auth": "^9.3.2", + "@react-native-firebase/firestore": "^7.9.1", "@react-navigation/bottom-tabs": "^5.8.0", "@react-navigation/material-top-tabs": "^5.2.16", "@react-navigation/native": "^5.7.3", @@ -52,6 +54,7 @@ "devDependencies": { "@babel/core": "^7.8.4", "@babel/runtime": "^7.8.4", + "@firebase/firestore-types": "^2.0.0", "@react-native-community/eslint-config": "^1.1.0", "@types/jest": "^25.2.3", "@types/react-native": "^0.63.2", diff --git a/screens/resistance/ResistancelogScreen.tsx b/screens/resistance/ResistancelogScreen.tsx index 7ed2778..80dbbbe 100644 --- a/screens/resistance/ResistancelogScreen.tsx +++ b/screens/resistance/ResistancelogScreen.tsx @@ -56,8 +56,8 @@ const ResistancelogScreen = () => { ? { backgroundColor: 'rgba(0, 0, 0, 0.2)' } : styles.lightContainer : notesModalVisible || logInputModalVisible - ? { backgroundColor: 'rgba(0, 0, 0, 0.2)' } - : styles.darkContainer; + ? { backgroundColor: 'rgba(0, 0, 0, 0.2)' } + : styles.darkContainer; const themeButtonStyle = mode === 'light' ? '#343a40' : 'bisque'; const resistanceReduxState = useSelector(state => { diff --git a/yarn.lock b/yarn.lock index fa32951..57df0f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -740,6 +740,11 @@ dependencies: "@types/hammerjs" "^2.0.36" +"@firebase/firestore-types@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-2.0.0.tgz#1f6212553b240f1a8905bb8dcf1f87769138c5c0" + integrity sha512-ZGb7p1SSQJP0Z+kc9GAUi+Fx5rJatFddBrS1ikkayW+QHfSIz0omU23OgSHcBGTxe8dJCeKiKA2Yf+tkDKO/LA== + "@hapi/address@2.x.x": version "2.1.4" resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" @@ -1144,14 +1149,24 @@ resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.10.tgz#5dda643e19e587793bc2034dd9bf7398ad43d401" integrity sha512-rk4sWFsmtOw8oyx8SD3KSvawwaK7gRBSEIy2TAwURyGt+3TizssXP1r8nx3zY+R7v2vYYHXZ+k2/GULAT/bcaQ== -"@react-native-firebase/app@^8.4.6": - version "8.4.6" - resolved "https://registry.yarnpkg.com/@react-native-firebase/app/-/app-8.4.6.tgz#05b4a48f2cd452acc88dd7b816a4ca934140927f" - integrity sha512-4eZR133QuScvGs4IQQd6qMvQ5E1mtydVTy3DtuBCeiIqtvN8ZxBYoSMgcUmYGS4VafbS2nPh85g4e3BlaIJ2XA== +"@react-native-firebase/app@^8.4.7": + version "8.4.7" + resolved "https://registry.yarnpkg.com/@react-native-firebase/app/-/app-8.4.7.tgz#7393ba7af36bd815bd5af7c64a20b0dd8a7e3341" + integrity sha512-jN788Q17aMOHc49wKc74RC3iZNhFoS+yTZhMBHFVyytf64uK3ofYAk3hjvukkylUTKF0Ni/L+04M0IDv8kStKg== dependencies: opencollective-postinstall "^2.0.1" superstruct "^0.6.2" +"@react-native-firebase/auth@^9.3.2": + version "9.3.2" + resolved "https://registry.yarnpkg.com/@react-native-firebase/auth/-/auth-9.3.2.tgz#96cb120a0628b18599e640977bdecfdf9fdfff0f" + integrity sha512-FowUGTCDpzcGUaXEDzwH1GcPtxTFXZLdo5DXu3wft+ojJCxkNJ8M1CHUv6Q9PQHAsLTpf19qTHb20Tad4daGuA== + +"@react-native-firebase/firestore@^7.9.1": + version "7.9.1" + resolved "https://registry.yarnpkg.com/@react-native-firebase/firestore/-/firestore-7.9.1.tgz#8b2013d77b4272b2bd9542f72ce7376d5e7f55c8" + integrity sha512-uibVaDa8v7fX5Jw59+FPt9auXrB96LGu3csfS5ybMtq52gkRWDvHbK8OMNLDwoyh8klACzioe+3O+WXY5z7m3Q== + "@react-navigation/bottom-tabs@^5.8.0": version "5.8.0" resolved "https://registry.yarnpkg.com/@react-navigation/bottom-tabs/-/bottom-tabs-5.8.0.tgz#d7386809bceeead0adcaacf61b6563be9cefd5cb"