diff --git a/android/app/build.gradle b/android/app/build.gradle index 8bf5d0f9..ebdbc26c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -171,12 +171,12 @@ android { } } - packagingOptions { - pickFirst '**/armeabi-v7a/libc++_shared.so' - pickFirst '**/x86/libc++_shared.so' - pickFirst '**/arm64-v8a/libc++_shared.so' - pickFirst '**/x86_64/libc++_shared.so' - } + // packagingOptions { + // pickFirst '**/armeabi-v7a/libc++_shared.so' + // pickFirst '**/x86/libc++_shared.so' + // pickFirst '**/arm64-v8a/libc++_shared.so' + // pickFirst '**/x86_64/libc++_shared.so' + // } // applicationVariants are e.g. debug, release applicationVariants.all { variant -> diff --git a/android/build.gradle b/android/build.gradle index f1e95820..afbb16f3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,10 +1,10 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { - buildToolsVersion = "28.0.3" + buildToolsVersion = "29.0.2" minSdkVersion = 21 - compileSdkVersion = 28 - targetSdkVersion = 28 + compileSdkVersion = 29 + targetSdkVersion = 29 glideVersion = "4.9.0" kotlin_version = "1.3.50" supportLibVersion = "28.0.0" @@ -18,7 +18,7 @@ buildscript { } } dependencies { - classpath 'com.android.tools.build:gradle:3.5.2' + classpath 'com.android.tools.build:gradle:3.5.3' classpath 'com.google.gms:google-services:4.2.0' classpath 'io.fabric.tools:gradle:1.28.1' classpath 'com.google.firebase:perf-plugin:1.2.1' diff --git a/android/gradle.properties b/android/gradle.properties index a7df7159..6a47b0e2 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -27,7 +27,7 @@ android.useAndroidX=true android.enableJetifier=true # Version of flipper SDK to use with React Native -FLIPPER_VERSION=0.33.1 +FLIPPER_VERSION=0.37.0 # App properties VERSIONCODE=999999999 diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index e8758b6d..e603f2a5 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists \ No newline at end of file diff --git a/android/gradlew b/android/gradlew index 77564ddb..645f6ca3 100755 --- a/android/gradlew +++ b/android/gradlew @@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then else eval `echo args$i`="\"$arg\"" fi - i=$((i+1)) + i=`expr $i + 1` done case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -175,14 +175,9 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=$(save "$@") +APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - exec "$JAVACMD" "$@" \ No newline at end of file diff --git a/android/gradlew.bat b/android/gradlew.bat index 7d3e0e47..8d8accd7 100644 --- a/android/gradlew.bat +++ b/android/gradlew.bat @@ -5,7 +5,7 @@ @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem -@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem https://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" diff --git a/app/containers/MessageBox/index.js b/app/containers/MessageBox/index.js index 813d7d64..92f74e5d 100644 --- a/app/containers/MessageBox/index.js +++ b/app/containers/MessageBox/index.js @@ -122,6 +122,7 @@ class MessageBox extends Component { command: {} }; this.text = ''; + this.selection = { start: 0, end: 0 }; this.focused = false; // MessageBox Actions @@ -331,6 +332,10 @@ class MessageBox extends Component { this.setInput(text); } + onSelectionChange = (e) => { + this.selection = e.nativeEvent.selection; + } + // eslint-disable-next-line react/sort-comp debouncedOnChangeText = debounce(async(text) => { const { sharing } = this.props; @@ -358,9 +363,9 @@ class MessageBox extends Component { if (!isTextEmpty) { try { - const { start, end } = this.component?.lastNativeSelection; + const { start, end } = this.selection; const cursor = Math.max(start, end); - const lastNativeText = this.component?.lastNativeText || ''; + const lastNativeText = this.text; // matches if text either starts with '/' or have (@,#,:) then it groups whatever comes next of mention type let regexp = /(#|@|:|^\/)([a-z0-9._-]+)$/im; @@ -399,7 +404,7 @@ class MessageBox extends Component { } const { trackingType } = this.state; const msg = this.text; - const { start, end } = this.component?.lastNativeSelection; + const { start, end } = this.selection; const cursor = Math.max(start, end); const regexp = /([a-z0-9._-]+)$/im; const result = msg.substr(0, cursor).replace(regexp, ''); @@ -410,7 +415,8 @@ class MessageBox extends Component { if ((trackingType === MENTIONS_TRACKING_TYPE_COMMANDS) && item.providesPreview) { this.setState({ showCommandPreview: true }); } - this.setInput(text); + const newCursor = cursor + mentionName.length; + this.setInput(text, { start: newCursor, end: newCursor }); this.focus(); requestAnimationFrame(() => this.stopTrackingMention()); } @@ -443,15 +449,11 @@ class MessageBox extends Component { let newText = ''; // if messagebox has an active cursor - if (this.component?.lastNativeSelection) { - const { start, end } = this.component.lastNativeSelection; - const cursor = Math.max(start, end); - newText = `${ text.substr(0, cursor) }${ emoji }${ text.substr(cursor) }`; - } else { - // if messagebox doesn't have a cursor, just append selected emoji - newText = `${ text }${ emoji }`; - } - this.setInput(newText); + const { start, end } = this.selection; + const cursor = Math.max(start, end); + newText = `${ text.substr(0, cursor) }${ emoji }${ text.substr(cursor) }`; + const newCursor = cursor + emoji.length; + this.setInput(newText, { start: newCursor, end: newCursor }); this.setShowSend(true); } @@ -551,11 +553,12 @@ class MessageBox extends Component { this.setState({ commandPreview: [], showCommandPreview: true, command: {} }); } - setInput = (text) => { + setInput = (text, selection) => { this.text = text; - if (this.component && this.component.setNativeProps) { - this.component.setNativeProps({ text }); + if (selection) { + return this.component.setTextAndSelection(text, selection); } + this.component.setNativeProps({ text }); } setShowSend = (showSend) => { @@ -888,6 +891,7 @@ class MessageBox extends Component { blurOnSubmit={false} placeholder={I18n.t('New_Message')} onChangeText={this.onChangeText} + onSelectionChange={this.onSelectionChange} underlineColorAndroid='transparent' defaultValue='' multiline diff --git a/app/presentation/KeyboardView.js b/app/presentation/KeyboardView.js index 9bd25191..62821382 100644 --- a/app/presentation/KeyboardView.js +++ b/app/presentation/KeyboardView.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; +import { KeyboardAwareScrollView } from '@codler/react-native-keyboard-aware-scroll-view'; import scrollPersistTaps from '../utils/scrollPersistTaps'; export default class KeyboardView extends React.PureComponent { diff --git a/app/views/ModalBlockView.js b/app/views/ModalBlockView.js index 57b415fd..e88d3088 100644 --- a/app/views/ModalBlockView.js +++ b/app/views/ModalBlockView.js @@ -3,7 +3,7 @@ import { StyleSheet, View } from 'react-native'; import PropTypes from 'prop-types'; import isEqual from 'lodash/isEqual'; import { connect } from 'react-redux'; -import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; +import { KeyboardAwareScrollView } from '@codler/react-native-keyboard-aware-scroll-view'; import { withTheme } from '../theme'; import EventEmitter from '../utils/events'; diff --git a/app/views/NewServerView.js b/app/views/NewServerView.js index b9429c05..cd443781 100644 --- a/app/views/NewServerView.js +++ b/app/views/NewServerView.js @@ -7,7 +7,7 @@ import { connect } from 'react-redux'; import * as FileSystem from 'expo-file-system'; import DocumentPicker from 'react-native-document-picker'; import RNUserDefaults from 'rn-user-defaults'; -import { encode } from 'base-64'; +import { Base64 } from 'js-base64'; import parse from 'url-parse'; import EventEmitter from '../utils/events'; @@ -161,7 +161,7 @@ class NewServerView extends React.Component { try { const parsedUrl = parse(text, true); if (parsedUrl.auth.length) { - const credentials = encode(parsedUrl.auth); + const credentials = Base64.encode(parsedUrl.auth); await RNUserDefaults.set(`${ BASIC_AUTH_KEY }-${ server }`, credentials); setBasicAuth(credentials); } diff --git a/ios/Podfile b/ios/Podfile index 35f65a77..c1eca515 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,143 +1,23 @@ platform :ios, '11.0' +require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' require_relative '../node_modules/react-native-unimodules/cocoapods.rb' -def add_flipper_pods!(versions = {}) - versions['Flipper'] ||= '~> 0.33.1' - versions['DoubleConversion'] ||= '1.1.7' - versions['Flipper-Folly'] ||= '~> 2.1' - versions['Flipper-Glog'] ||= '0.3.6' - versions['Flipper-PeerTalk'] ||= '~> 0.0.4' - versions['Flipper-RSocket'] ||= '~> 1.0' - - pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug' - - # List all transitive dependencies for FlipperKit pods - # to avoid them being linked in Release builds - pod 'Flipper', versions['Flipper'], :configuration => 'Debug' - pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug' - pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug' - pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug' - pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug' - pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug' - pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug' - pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug' -end - -# Post Install processing for Flipper -def flipper_post_install(installer) - installer.pods_project.targets.each do |target| - if target.name == 'YogaKit' - target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = '4.1' - end - end - end - file_name = Dir.glob("*.xcodeproj")[0] - app_project = Xcodeproj::Project.open(file_name) - app_project.native_targets.each do |target| - target.build_configurations.each do |config| - cflags = config.build_settings['OTHER_CFLAGS'] || '$(inherited) ' - unless cflags.include? '-DFB_SONARKIT_ENABLED=1' - puts 'Adding -DFB_SONARKIT_ENABLED=1 in OTHER_CFLAGS...' - cflags << '-DFB_SONARKIT_ENABLED=1' - end - config.build_settings['OTHER_CFLAGS'] = cflags - end - app_project.save - end - installer.pods_project.save +def all_pods + config = use_native_modules! + use_unimodules! + use_react_native!(:path => config["reactNativePath"]) + use_flipper! end target 'RocketChatRN' do - 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/callinvoker', :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', :modular_headers => true - - 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' - - use_native_modules! - use_unimodules! + all_pods end target 'ShareRocketChatRN' do - 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/callinvoker', :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', :modular_headers => true - - pod 'JitsiMeetSDK', :git => 'https://github.com/RocketChat/jitsi-meet-ios-sdk-releases.git' - - 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' - - use_native_modules! - use_unimodules! + all_pods end -# Enables Flipper. -# -# Note that if you have use_frameworks! enabled, Flipper will not work and -# you should disable these next few lines. -add_flipper_pods! post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| @@ -145,4 +25,4 @@ post_install do |installer| end end flipper_post_install(installer) -end +end \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0355ffe4..c84b6447 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,9 +1,9 @@ PODS: - boost-for-react-native (1.63.0) - - BugsnagReactNative (2.23.7): - - BugsnagReactNative/Core (= 2.23.7) + - BugsnagReactNative (2.23.10): + - BugsnagReactNative/Core (= 2.23.10) - React - - BugsnagReactNative/Core (2.23.7): + - BugsnagReactNative/Core (2.23.10): - React - CocoaAsyncSocket (7.6.4) - CocoaLibEvent (1.0.0) @@ -12,78 +12,75 @@ PODS: - DoubleConversion (1.1.6) - EXAppleAuthentication (2.2.1): - UMCore - - EXAV (8.1.0): + - EXAV (8.2.1): - UMCore - UMFileSystemInterface - UMPermissionsInterface - - EXConstants (9.0.0): + - EXConstants (9.1.1): - UMConstantsInterface - UMCore - - EXFileSystem (8.1.0): + - EXFileSystem (9.0.1): - UMCore - UMFileSystemInterface - - EXHaptics (8.1.0): + - EXHaptics (8.2.1): - UMCore - - EXImageLoader (1.0.1): + - EXImageLoader (1.1.1): - React-Core - UMCore - UMImageLoaderInterface - - EXKeepAwake (8.1.0): + - EXKeepAwake (8.2.1): - UMCore - - EXLocalAuthentication (9.0.0): + - EXLocalAuthentication (9.2.0): - UMConstantsInterface - UMCore - - EXPermissions (8.1.0): + - EXPermissions (9.0.1): - UMCore - UMPermissionsInterface - - EXVideoThumbnails (4.1.1): + - EXVideoThumbnails (4.2.1): - UMCore - UMFileSystemInterface - - EXWebBrowser (8.2.1): + - EXWebBrowser (8.3.1): - UMCore - Fabric (1.10.2) - - FBLazyVector (0.62.2) - - FBReactNativeSpec (0.62.2): - - Folly (= 2018.10.22.00) - - RCTRequired (= 0.62.2) - - RCTTypeSafety (= 0.62.2) - - React-Core (= 0.62.2) - - React-jsi (= 0.62.2) - - ReactCommon/turbomodule/core (= 0.62.2) - - Firebase/Core (6.24.0): + - FBLazyVector (0.63.1) + - FBReactNativeSpec (0.63.1): + - Folly (= 2020.01.13.00) + - RCTRequired (= 0.63.1) + - RCTTypeSafety (= 0.63.1) + - React-Core (= 0.63.1) + - React-jsi (= 0.63.1) + - ReactCommon/turbomodule/core (= 0.63.1) + - Firebase/Core (6.28.1): - Firebase/CoreOnly - - FirebaseAnalytics (= 6.5.0) - - Firebase/CoreOnly (6.24.0): - - FirebaseCore (= 6.7.0) - - FirebaseAnalytics (6.5.0): - - FirebaseCore (~> 6.7) - - FirebaseInstallations (~> 1.2) - - GoogleAppMeasurement (= 6.5.0) + - FirebaseAnalytics (= 6.6.2) + - Firebase/CoreOnly (6.28.1): + - FirebaseCore (= 6.9.1) + - FirebaseAnalytics (6.6.2): + - FirebaseCore (~> 6.8) + - FirebaseInstallations (~> 1.4) + - GoogleAppMeasurement (= 6.6.2) - GoogleUtilities/AppDelegateSwizzler (~> 6.0) - GoogleUtilities/MethodSwizzler (~> 6.0) - GoogleUtilities/Network (~> 6.0) - "GoogleUtilities/NSData+zlib (~> 6.0)" - nanopb (~> 1.30905.0) - - FirebaseCore (6.7.0): + - FirebaseCore (6.9.1): - FirebaseCoreDiagnostics (~> 1.3) - - FirebaseCoreDiagnosticsInterop (~> 1.2) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/Logger (~> 6.5) - - FirebaseCoreDiagnostics (1.3.0): - - FirebaseCoreDiagnosticsInterop (~> 1.2) - - GoogleDataTransportCCTSupport (~> 3.1) - - GoogleUtilities/Environment (~> 6.5) - - GoogleUtilities/Logger (~> 6.5) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/Logger (~> 6.7) + - FirebaseCoreDiagnostics (1.5.0): + - GoogleDataTransport (~> 7.0) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/Logger (~> 6.7) - nanopb (~> 1.30905.0) - - FirebaseCoreDiagnosticsInterop (1.2.0) - - FirebaseInstallations (1.2.0): - - FirebaseCore (~> 6.6) - - GoogleUtilities/Environment (~> 6.6) - - GoogleUtilities/UserDefaults (~> 6.6) + - FirebaseInstallations (1.5.0): + - FirebaseCore (~> 6.8) + - GoogleUtilities/Environment (~> 6.7) + - GoogleUtilities/UserDefaults (~> 6.7) - PromisesObjC (~> 1.2) - - Flipper (0.33.1): - - Flipper-Folly (~> 2.1) - - Flipper-RSocket (~> 1.0) + - Flipper (0.41.5): + - Flipper-Folly (~> 2.2) + - Flipper-RSocket (~> 1.1) - Flipper-DoubleConversion (1.1.7) - Flipper-Folly (2.2.0): - boost-for-react-native @@ -95,76 +92,74 @@ PODS: - Flipper-PeerTalk (0.0.4) - Flipper-RSocket (1.1.0): - Flipper-Folly (~> 2.2) - - FlipperKit (0.33.1): - - FlipperKit/Core (= 0.33.1) - - FlipperKit/Core (0.33.1): - - Flipper (~> 0.33.1) + - FlipperKit (0.41.5): + - FlipperKit/Core (= 0.41.5) + - FlipperKit/Core (0.41.5): + - Flipper (~> 0.41.5) - FlipperKit/CppBridge - FlipperKit/FBCxxFollyDynamicConvert - FlipperKit/FBDefines - FlipperKit/FKPortForwarding - - FlipperKit/CppBridge (0.33.1): - - Flipper (~> 0.33.1) - - FlipperKit/FBCxxFollyDynamicConvert (0.33.1): - - Flipper-Folly (~> 2.1) - - FlipperKit/FBDefines (0.33.1) - - FlipperKit/FKPortForwarding (0.33.1): + - FlipperKit/CppBridge (0.41.5): + - Flipper (~> 0.41.5) + - FlipperKit/FBCxxFollyDynamicConvert (0.41.5): + - Flipper-Folly (~> 2.2) + - FlipperKit/FBDefines (0.41.5) + - FlipperKit/FKPortForwarding (0.41.5): - CocoaAsyncSocket (~> 7.6) - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.33.1) - - FlipperKit/FlipperKitLayoutPlugin (0.33.1): + - FlipperKit/FlipperKitHighlightOverlay (0.41.5) + - FlipperKit/FlipperKitLayoutPlugin (0.41.5): - FlipperKit/Core - FlipperKit/FlipperKitHighlightOverlay - FlipperKit/FlipperKitLayoutTextSearchable - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutTextSearchable (0.33.1) - - FlipperKit/FlipperKitNetworkPlugin (0.33.1): + - FlipperKit/FlipperKitLayoutTextSearchable (0.41.5) + - FlipperKit/FlipperKitNetworkPlugin (0.41.5): - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.33.1): + - FlipperKit/FlipperKitReactPlugin (0.41.5): - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.33.1): + - FlipperKit/FlipperKitUserDefaultsPlugin (0.41.5): - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.33.1): + - FlipperKit/SKIOSNetworkPlugin (0.41.5): - FlipperKit/Core - FlipperKit/FlipperKitNetworkPlugin - - Folly (2018.10.22.00): + - Folly (2020.01.13.00): - boost-for-react-native - DoubleConversion - - Folly/Default (= 2018.10.22.00) + - Folly/Default (= 2020.01.13.00) - glog - - Folly/Default (2018.10.22.00): + - Folly/Default (2020.01.13.00): - boost-for-react-native - DoubleConversion - glog - glog (0.3.5) - - GoogleAppMeasurement (6.5.0): + - GoogleAppMeasurement (6.6.2): - GoogleUtilities/AppDelegateSwizzler (~> 6.0) - GoogleUtilities/MethodSwizzler (~> 6.0) - GoogleUtilities/Network (~> 6.0) - "GoogleUtilities/NSData+zlib (~> 6.0)" - nanopb (~> 1.30905.0) - - GoogleDataTransport (6.1.0) - - GoogleDataTransportCCTSupport (3.1.0): - - GoogleDataTransport (~> 6.1) + - GoogleDataTransport (7.0.0): - nanopb (~> 1.30905.0) - - GoogleUtilities/AppDelegateSwizzler (6.6.0): + - GoogleUtilities/AppDelegateSwizzler (6.7.1): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - - GoogleUtilities/Environment (6.6.0): + - GoogleUtilities/Environment (6.7.1): - PromisesObjC (~> 1.2) - - GoogleUtilities/Logger (6.6.0): + - GoogleUtilities/Logger (6.7.1): - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (6.6.0): + - GoogleUtilities/MethodSwizzler (6.7.1): - GoogleUtilities/Logger - - GoogleUtilities/Network (6.6.0): + - GoogleUtilities/Network (6.7.1): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (6.6.0)" - - GoogleUtilities/Reachability (6.6.0): + - "GoogleUtilities/NSData+zlib (6.7.1)" + - GoogleUtilities/Reachability (6.7.1): - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (6.6.0): + - GoogleUtilities/UserDefaults (6.7.1): - GoogleUtilities/Logger - JitsiMeetSDK (2.8.1) - KeyCommands (2.0.3): @@ -186,177 +181,180 @@ PODS: - OpenSSL-Universal (1.0.2.19): - OpenSSL-Universal/Static (= 1.0.2.19) - OpenSSL-Universal/Static (1.0.2.19) - - PromisesObjC (1.2.8) - - RCTRequired (0.62.2) - - RCTTypeSafety (0.62.2): - - FBLazyVector (= 0.62.2) - - Folly (= 2018.10.22.00) - - RCTRequired (= 0.62.2) - - React-Core (= 0.62.2) - - React (0.62.2): - - React-Core (= 0.62.2) - - React-Core/DevSupport (= 0.62.2) - - React-Core/RCTWebSocket (= 0.62.2) - - React-RCTActionSheet (= 0.62.2) - - React-RCTAnimation (= 0.62.2) - - React-RCTBlob (= 0.62.2) - - React-RCTImage (= 0.62.2) - - React-RCTLinking (= 0.62.2) - - React-RCTNetwork (= 0.62.2) - - React-RCTSettings (= 0.62.2) - - React-RCTText (= 0.62.2) - - React-RCTVibration (= 0.62.2) - - React-Core (0.62.2): - - Folly (= 2018.10.22.00) + - PromisesObjC (1.2.9) + - RCTRequired (0.63.1) + - RCTTypeSafety (0.63.1): + - FBLazyVector (= 0.63.1) + - Folly (= 2020.01.13.00) + - RCTRequired (= 0.63.1) + - React-Core (= 0.63.1) + - React (0.63.1): + - React-Core (= 0.63.1) + - React-Core/DevSupport (= 0.63.1) + - React-Core/RCTWebSocket (= 0.63.1) + - React-RCTActionSheet (= 0.63.1) + - React-RCTAnimation (= 0.63.1) + - React-RCTBlob (= 0.63.1) + - React-RCTImage (= 0.63.1) + - React-RCTLinking (= 0.63.1) + - React-RCTNetwork (= 0.63.1) + - React-RCTSettings (= 0.63.1) + - React-RCTText (= 0.63.1) + - React-RCTVibration (= 0.63.1) + - React-callinvoker (0.63.1) + - React-Core (0.63.1): + - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.62.2) - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-Core/Default (= 0.63.1) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-Core/CoreModulesHeaders (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/CoreModulesHeaders (0.63.1): + - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-Core/Default (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/Default (0.63.1): + - Folly (= 2020.01.13.00) - glog - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-Core/DevSupport (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/DevSupport (0.63.1): + - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.62.2) - - React-Core/RCTWebSocket (= 0.62.2) - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) - - React-jsinspector (= 0.62.2) + - React-Core/Default (= 0.63.1) + - React-Core/RCTWebSocket (= 0.63.1) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) + - React-jsinspector (= 0.63.1) - Yoga - - React-Core/RCTActionSheetHeaders (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/RCTActionSheetHeaders (0.63.1): + - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-Core/RCTAnimationHeaders (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/RCTAnimationHeaders (0.63.1): + - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-Core/RCTBlobHeaders (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/RCTBlobHeaders (0.63.1): + - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-Core/RCTImageHeaders (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/RCTImageHeaders (0.63.1): + - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-Core/RCTLinkingHeaders (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/RCTLinkingHeaders (0.63.1): + - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-Core/RCTNetworkHeaders (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/RCTNetworkHeaders (0.63.1): + - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-Core/RCTSettingsHeaders (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/RCTSettingsHeaders (0.63.1): + - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-Core/RCTTextHeaders (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/RCTTextHeaders (0.63.1): + - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-Core/RCTVibrationHeaders (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/RCTVibrationHeaders (0.63.1): + - Folly (= 2020.01.13.00) - glog - React-Core/Default - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-Core/RCTWebSocket (0.62.2): - - Folly (= 2018.10.22.00) + - React-Core/RCTWebSocket (0.63.1): + - Folly (= 2020.01.13.00) - glog - - React-Core/Default (= 0.62.2) - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsiexecutor (= 0.62.2) + - React-Core/Default (= 0.63.1) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsiexecutor (= 0.63.1) - Yoga - - React-CoreModules (0.62.2): - - FBReactNativeSpec (= 0.62.2) - - Folly (= 2018.10.22.00) - - RCTTypeSafety (= 0.62.2) - - React-Core/CoreModulesHeaders (= 0.62.2) - - React-RCTImage (= 0.62.2) - - ReactCommon/turbomodule/core (= 0.62.2) - - React-cxxreact (0.62.2): + - React-CoreModules (0.63.1): + - FBReactNativeSpec (= 0.63.1) + - Folly (= 2020.01.13.00) + - RCTTypeSafety (= 0.63.1) + - React-Core/CoreModulesHeaders (= 0.63.1) + - React-jsi (= 0.63.1) + - React-RCTImage (= 0.63.1) + - ReactCommon/turbomodule/core (= 0.63.1) + - React-cxxreact (0.63.1): - boost-for-react-native (= 1.63.0) - DoubleConversion - - Folly (= 2018.10.22.00) + - Folly (= 2020.01.13.00) - glog - - React-jsinspector (= 0.62.2) - - React-jsi (0.62.2): + - React-callinvoker (= 0.63.1) + - React-jsinspector (= 0.63.1) + - React-jsi (0.63.1): - boost-for-react-native (= 1.63.0) - DoubleConversion - - Folly (= 2018.10.22.00) + - Folly (= 2020.01.13.00) - glog - - React-jsi/Default (= 0.62.2) - - React-jsi/Default (0.62.2): + - React-jsi/Default (= 0.63.1) + - React-jsi/Default (0.63.1): - boost-for-react-native (= 1.63.0) - DoubleConversion - - Folly (= 2018.10.22.00) + - Folly (= 2020.01.13.00) - glog - - React-jsiexecutor (0.62.2): + - React-jsiexecutor (0.63.1): - DoubleConversion - - Folly (= 2018.10.22.00) + - Folly (= 2020.01.13.00) - glog - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - React-jsinspector (0.62.2) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) + - React-jsinspector (0.63.1) - react-native-appearance (0.3.4): - React - react-native-background-timer (2.2.0): - React - - react-native-cameraroll (1.6.0): + - react-native-cameraroll (4.0.0): - React - - react-native-document-picker (3.3.3): + - react-native-document-picker (3.5.3): - React - react-native-jitsi-meet (2.1.1): - JitsiMeetSDK (= 2.8.1) @@ -365,71 +363,72 @@ PODS: - React - react-native-orientation-locker (1.1.8): - React - - react-native-safe-area-context (3.0.2): + - react-native-safe-area-context (3.1.1): - React - - react-native-slider (2.0.9): + - react-native-slider (3.0.2): - React - - react-native-webview (9.4.0): + - react-native-webview (10.3.2): - React - - React-RCTActionSheet (0.62.2): - - React-Core/RCTActionSheetHeaders (= 0.62.2) - - React-RCTAnimation (0.62.2): - - FBReactNativeSpec (= 0.62.2) - - Folly (= 2018.10.22.00) - - RCTTypeSafety (= 0.62.2) - - React-Core/RCTAnimationHeaders (= 0.62.2) - - ReactCommon/turbomodule/core (= 0.62.2) - - React-RCTBlob (0.62.2): - - FBReactNativeSpec (= 0.62.2) - - Folly (= 2018.10.22.00) - - React-Core/RCTBlobHeaders (= 0.62.2) - - React-Core/RCTWebSocket (= 0.62.2) - - React-jsi (= 0.62.2) - - React-RCTNetwork (= 0.62.2) - - ReactCommon/turbomodule/core (= 0.62.2) - - React-RCTImage (0.62.2): - - FBReactNativeSpec (= 0.62.2) - - Folly (= 2018.10.22.00) - - RCTTypeSafety (= 0.62.2) - - React-Core/RCTImageHeaders (= 0.62.2) - - React-RCTNetwork (= 0.62.2) - - ReactCommon/turbomodule/core (= 0.62.2) - - React-RCTLinking (0.62.2): - - FBReactNativeSpec (= 0.62.2) - - React-Core/RCTLinkingHeaders (= 0.62.2) - - ReactCommon/turbomodule/core (= 0.62.2) - - React-RCTNetwork (0.62.2): - - FBReactNativeSpec (= 0.62.2) - - Folly (= 2018.10.22.00) - - RCTTypeSafety (= 0.62.2) - - React-Core/RCTNetworkHeaders (= 0.62.2) - - ReactCommon/turbomodule/core (= 0.62.2) - - React-RCTSettings (0.62.2): - - FBReactNativeSpec (= 0.62.2) - - Folly (= 2018.10.22.00) - - RCTTypeSafety (= 0.62.2) - - React-Core/RCTSettingsHeaders (= 0.62.2) - - ReactCommon/turbomodule/core (= 0.62.2) - - React-RCTText (0.62.2): - - React-Core/RCTTextHeaders (= 0.62.2) - - React-RCTVibration (0.62.2): - - FBReactNativeSpec (= 0.62.2) - - Folly (= 2018.10.22.00) - - React-Core/RCTVibrationHeaders (= 0.62.2) - - ReactCommon/turbomodule/core (= 0.62.2) - - ReactCommon/callinvoker (0.62.2): + - React-RCTActionSheet (0.63.1): + - React-Core/RCTActionSheetHeaders (= 0.63.1) + - React-RCTAnimation (0.63.1): + - FBReactNativeSpec (= 0.63.1) + - Folly (= 2020.01.13.00) + - RCTTypeSafety (= 0.63.1) + - React-Core/RCTAnimationHeaders (= 0.63.1) + - React-jsi (= 0.63.1) + - ReactCommon/turbomodule/core (= 0.63.1) + - React-RCTBlob (0.63.1): + - FBReactNativeSpec (= 0.63.1) + - Folly (= 2020.01.13.00) + - React-Core/RCTBlobHeaders (= 0.63.1) + - React-Core/RCTWebSocket (= 0.63.1) + - React-jsi (= 0.63.1) + - React-RCTNetwork (= 0.63.1) + - ReactCommon/turbomodule/core (= 0.63.1) + - React-RCTImage (0.63.1): + - FBReactNativeSpec (= 0.63.1) + - Folly (= 2020.01.13.00) + - RCTTypeSafety (= 0.63.1) + - React-Core/RCTImageHeaders (= 0.63.1) + - React-jsi (= 0.63.1) + - React-RCTNetwork (= 0.63.1) + - ReactCommon/turbomodule/core (= 0.63.1) + - React-RCTLinking (0.63.1): + - FBReactNativeSpec (= 0.63.1) + - React-Core/RCTLinkingHeaders (= 0.63.1) + - React-jsi (= 0.63.1) + - ReactCommon/turbomodule/core (= 0.63.1) + - React-RCTNetwork (0.63.1): + - FBReactNativeSpec (= 0.63.1) + - Folly (= 2020.01.13.00) + - RCTTypeSafety (= 0.63.1) + - React-Core/RCTNetworkHeaders (= 0.63.1) + - React-jsi (= 0.63.1) + - ReactCommon/turbomodule/core (= 0.63.1) + - React-RCTSettings (0.63.1): + - FBReactNativeSpec (= 0.63.1) + - Folly (= 2020.01.13.00) + - RCTTypeSafety (= 0.63.1) + - React-Core/RCTSettingsHeaders (= 0.63.1) + - React-jsi (= 0.63.1) + - ReactCommon/turbomodule/core (= 0.63.1) + - React-RCTText (0.63.1): + - React-Core/RCTTextHeaders (= 0.63.1) + - React-RCTVibration (0.63.1): + - FBReactNativeSpec (= 0.63.1) + - Folly (= 2020.01.13.00) + - React-Core/RCTVibrationHeaders (= 0.63.1) + - React-jsi (= 0.63.1) + - ReactCommon/turbomodule/core (= 0.63.1) + - ReactCommon/turbomodule/core (0.63.1): - DoubleConversion - - Folly (= 2018.10.22.00) + - Folly (= 2020.01.13.00) - glog - - React-cxxreact (= 0.62.2) - - ReactCommon/turbomodule/core (0.62.2): - - DoubleConversion - - Folly (= 2018.10.22.00) - - glog - - React-Core (= 0.62.2) - - React-cxxreact (= 0.62.2) - - React-jsi (= 0.62.2) - - ReactCommon/callinvoker (= 0.62.2) + - React-callinvoker (= 0.63.1) + - React-Core (= 0.63.1) + - React-cxxreact (= 0.63.1) + - React-jsi (= 0.63.1) - ReactNativeART (1.2.0): - React - ReactNativeKeyboardInput (6.0.0): @@ -442,13 +441,13 @@ PODS: - React-Core - RNBootSplash (2.2.5): - React - - RNCAsyncStorage (1.10.3): + - RNCAsyncStorage (1.11.0): - React - RNCMaskedView (0.1.10): - React - - RNDateTimePicker (2.3.2): + - RNDateTimePicker (2.6.0): - React - - RNDeviceInfo (5.5.7): + - RNDeviceInfo (5.6.2): - React - RNFastImage (8.1.5): - React @@ -476,40 +475,40 @@ PODS: - TOCropViewController - RNLocalize (1.4.0): - React - - RNReanimated (1.8.0): + - RNReanimated (1.9.0): - React - RNRootView (1.0.3): - React - - RNScreens (2.7.0): + - RNScreens (2.9.0): - React - RNUserDefaults (1.8.1): - React - - RNVectorIcons (6.6.0): + - RNVectorIcons (7.0.0): - React - - SDWebImage (5.8.0): - - SDWebImage/Core (= 5.8.0) - - SDWebImage/Core (5.8.0) + - SDWebImage (5.8.4): + - SDWebImage/Core (= 5.8.4) + - SDWebImage/Core (5.8.4) - SDWebImageWebPCoder (0.4.1): - libwebp (~> 1.0) - SDWebImage/Core (~> 5.5) - - TOCropViewController (2.5.2) - - UMAppLoader (1.0.2) - - UMBarCodeScannerInterface (5.1.0) - - UMCameraInterface (5.1.0) - - UMConstantsInterface (5.1.0) - - UMCore (5.1.2) - - UMFaceDetectorInterface (5.1.0) - - UMFileSystemInterface (5.1.0) - - UMFontInterface (5.1.0) - - UMImageLoaderInterface (5.1.0) - - UMPermissionsInterface (5.1.0): + - TOCropViewController (2.5.3) + - UMAppLoader (1.2.0) + - UMBarCodeScannerInterface (5.2.1) + - UMCameraInterface (5.2.1) + - UMConstantsInterface (5.2.1) + - UMCore (5.3.0) + - UMFaceDetectorInterface (5.2.1) + - UMFileSystemInterface (5.2.1) + - UMFontInterface (5.2.1) + - UMImageLoaderInterface (5.2.1) + - UMPermissionsInterface (5.2.1): - UMCore - - UMReactNativeAdapter (5.2.0): + - UMReactNativeAdapter (5.4.0): - React-Core - UMCore - UMFontInterface - - UMSensorsInterface (5.1.0) - - UMTaskManagerInterface (5.1.0) + - UMSensorsInterface (5.2.1) + - UMTaskManagerInterface (5.2.1) - Yoga (1.14.0) - YogaKit (1.18.1): - Yoga (~> 1.14) @@ -530,32 +529,32 @@ DEPENDENCIES: - EXWebBrowser (from `../node_modules/expo-web-browser/ios`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) - - Flipper (~> 0.33.1) + - Flipper (~> 0.41.1) - Flipper-DoubleConversion (= 1.1.7) - - Flipper-Folly (~> 2.1) + - Flipper-Folly (~> 2.2) - Flipper-Glog (= 0.3.6) - Flipper-PeerTalk (~> 0.0.4) - - Flipper-RSocket (~> 1.0) - - FlipperKit (~> 0.33.1) - - FlipperKit/Core (~> 0.33.1) - - FlipperKit/CppBridge (~> 0.33.1) - - FlipperKit/FBCxxFollyDynamicConvert (~> 0.33.1) - - FlipperKit/FBDefines (~> 0.33.1) - - FlipperKit/FKPortForwarding (~> 0.33.1) - - FlipperKit/FlipperKitHighlightOverlay (~> 0.33.1) - - FlipperKit/FlipperKitLayoutPlugin (~> 0.33.1) - - FlipperKit/FlipperKitLayoutTextSearchable (~> 0.33.1) - - FlipperKit/FlipperKitNetworkPlugin (~> 0.33.1) - - FlipperKit/FlipperKitReactPlugin (~> 0.33.1) - - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.33.1) - - FlipperKit/SKIOSNetworkPlugin (~> 0.33.1) + - Flipper-RSocket (~> 1.1) + - FlipperKit (~> 0.41.1) + - FlipperKit/Core (~> 0.41.1) + - FlipperKit/CppBridge (~> 0.41.1) + - FlipperKit/FBCxxFollyDynamicConvert (~> 0.41.1) + - FlipperKit/FBDefines (~> 0.41.1) + - FlipperKit/FKPortForwarding (~> 0.41.1) + - FlipperKit/FlipperKitHighlightOverlay (~> 0.41.1) + - FlipperKit/FlipperKitLayoutPlugin (~> 0.41.1) + - FlipperKit/FlipperKitLayoutTextSearchable (~> 0.41.1) + - FlipperKit/FlipperKitNetworkPlugin (~> 0.41.1) + - FlipperKit/FlipperKitReactPlugin (~> 0.41.1) + - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.41.1) + - FlipperKit/SKIOSNetworkPlugin (~> 0.41.1) - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - - JitsiMeetSDK (from `https://github.com/RocketChat/jitsi-meet-ios-sdk-releases.git`) - KeyCommands (from `../node_modules/react-native-keycommands`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - React (from `../node_modules/react-native/`) + - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) - React-Core (from `../node_modules/react-native/`) - React-Core/DevSupport (from `../node_modules/react-native/`) - React-Core/RCTWebSocket (from `../node_modules/react-native/`) @@ -583,7 +582,6 @@ DEPENDENCIES: - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) - React-RCTText (from `../node_modules/react-native/Libraries/Text`) - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - - ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - "ReactNativeART (from `../node_modules/@react-native-community/art`)" - ReactNativeKeyboardInput (from `../node_modules/react-native-keyboard-input`) @@ -631,7 +629,6 @@ SPEC REPOS: - FirebaseAnalytics - FirebaseCore - FirebaseCoreDiagnostics - - FirebaseCoreDiagnosticsInterop - FirebaseInstallations - Flipper - Flipper-DoubleConversion @@ -642,8 +639,8 @@ SPEC REPOS: - FlipperKit - GoogleAppMeasurement - GoogleDataTransport - - GoogleDataTransportCCTSupport - GoogleUtilities + - JitsiMeetSDK - libwebp - nanopb - OpenSSL-Universal @@ -688,8 +685,6 @@ EXTERNAL SOURCES: :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec" glog: :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" - JitsiMeetSDK: - :git: https://github.com/RocketChat/jitsi-meet-ios-sdk-releases.git KeyCommands: :path: "../node_modules/react-native-keycommands" RCTRequired: @@ -698,6 +693,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/Libraries/TypeSafety" React: :path: "../node_modules/react-native/" + React-callinvoker: + :path: "../node_modules/react-native/ReactCommon/callinvoker" React-Core: :path: "../node_modules/react-native/" React-CoreModules: @@ -819,125 +816,119 @@ EXTERNAL SOURCES: Yoga: :path: "../node_modules/react-native/ReactCommon/yoga" -CHECKOUT OPTIONS: - JitsiMeetSDK: - :commit: 9177aaa3afb379e17cc687887485e91e5cd24a49 - :git: https://github.com/RocketChat/jitsi-meet-ios-sdk-releases.git - SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c - BugsnagReactNative: 14c1b59cfbf34fd5591b734bfec65a277b677ef8 + BugsnagReactNative: 98fb350df4bb0c94cce903023531a1a5cc11fa51 CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f Crashlytics: 540b7e5f5da5a042647227a5e3ac51d85eed06df - DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 + DoubleConversion: cde416483dac037923206447da6e1454df403714 EXAppleAuthentication: 5b3da71bada29e2423d8ea27e5538ef0d75aba62 - EXAV: 2edd9cd30fe98d04b55325303c7ff01db02d1d0f - EXConstants: 5304709b1bea70a4828f48ba4c7fc3ec3b2d9b17 - EXFileSystem: cf4232ba7c62dc49b78c2d36005f97b6fddf0b01 - EXHaptics: 013b5065946d4dd7b46ea547b58072d45a206dbd - EXImageLoader: 5ad6896fa1ef2ee814b551873cbf7a7baccc694a - EXKeepAwake: d045bc2cf1ad5a04f0323cc7c894b95b414042e0 - EXLocalAuthentication: bbf1026cc289d729da4f29240dd7a8f6a14e4b20 - EXPermissions: 24b97f734ce9172d245a5be38ad9ccfcb6135964 - EXVideoThumbnails: be6984a3cda1e44c45b5c6278244e99855f99a0a - EXWebBrowser: 5902f99ac5ac551e5c82ff46f13a337b323aa9ea + EXAV: 86344030966e0da7e00556fbb97269d9ad16071d + EXConstants: f907b3b6ce16e20d1750f22af1e095e924574bcb + EXFileSystem: 76875135b61708b9afa7e6a89b72a60ba0fdfa20 + EXHaptics: 5428b344a216ca5d9df6ca8f65720b2a1ad9f109 + EXImageLoader: 02ca02c9cd5cc8a97b423207a73a791e0a86bea5 + EXKeepAwake: 8b0f68242f036b971f9f8976341823cbe6f50812 + EXLocalAuthentication: 985c65e08a6eb84f8f98b51f7435df138b18b9e8 + EXPermissions: 80ac3acbdb145930079810fe5b08c022b3428aa8 + EXVideoThumbnails: f70bdc5511749f3181028f5000bcb7be203c631d + EXWebBrowser: d37a5ffdea1b65947352bc001dd9f732463725d4 Fabric: 706c8b8098fff96c33c0db69cbf81f9c551d0d74 - FBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245 - FBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e - Firebase: b28e55c60efd98963cd9011fe2fac5a10c2ba124 - FirebaseAnalytics: 7386fc2176e3f93ad8ef34b5b1f2b33a891e4962 - FirebaseCore: e610482f64097b0e9f056cd97bc6b33dfabcbb6a - FirebaseCoreDiagnostics: 4a773a47bd83bbd5a9b1ccf1ce7caa8b2d535e67 - FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850 - FirebaseInstallations: 2119fb3e46b0a88bfdbf12562f855ee3252462fa - Flipper: 6c1f484f9a88d30ab3e272800d53688439e50f69 + FBLazyVector: a50434c875bd42f2b1c99c712bda892a1dc659c7 + FBReactNativeSpec: 393853a536428e05a9da00b6290042f09809b15b + Firebase: ed042590caa0029392257529a8003c25ee82bc18 + FirebaseAnalytics: 5fa308e1b13f838d0f6dc74719ac2a72e8c5afc4 + FirebaseCore: 687b8e6a0a4337b898a6326d68254c2f80c143af + FirebaseCoreDiagnostics: 7535fe695737f8c5b350584292a70b7f8ff0357b + FirebaseInstallations: 3c520c951305cbf9ca54eb891ff9e6d1fd384881 + Flipper: 33585e2d9810fe5528346be33bcf71b37bb7ae13 Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3 Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7 - FlipperKit: 6dc9b8f4ef60d9e5ded7f0264db299c91f18832e - Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51 - glog: 1f3da668190260b06b429bb211bfbee5cd790c28 - GoogleAppMeasurement: 4c644d86835d827bab30ab6aabb9ecaf1f500735 - GoogleDataTransport: f6f8eba931df03ebd2232ff4645aa85f8f47b5ab - GoogleDataTransportCCTSupport: d70a561f7d236af529fee598835caad5e25f6d3d - GoogleUtilities: 39530bc0ad980530298e9c4af8549e991fd033b1 + FlipperKit: bc68102cd4952a258a23c9c1b316c7bec1fecf83 + Folly: b73c3869541e86821df3c387eb0af5f65addfab4 + glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 + GoogleAppMeasurement: 8cd1f289d60e629cf16ab03363b9e89c776b9651 + GoogleDataTransport: 8a40cb194ad242b6f6dfe72c14fe40fc67c4dcd7 + GoogleUtilities: e121a3867449ce16b0e35ddf1797ea7a389ffdf2 JitsiMeetSDK: 2984eac1343690bf1c0c72bde75b48b0148d0f79 KeyCommands: f66c535f698ed14b3d3a4e58859d79a827ea907e libwebp: 946cb3063cea9236285f7e9a8505d806d30e07f3 nanopb: c43f40fadfe79e8b8db116583945847910cbabc9 OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355 - PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6 - RCTRequired: cec6a34b3ac8a9915c37e7e4ad3aa74726ce4035 - RCTTypeSafety: 93006131180074cffa227a1075802c89a49dd4ce - React: 29a8b1a02bd764fb7644ef04019270849b9a7ac3 - React-Core: b12bffb3f567fdf99510acb716ef1abd426e0e05 - React-CoreModules: 4a9b87bbe669d6c3173c0132c3328e3b000783d0 - React-cxxreact: e65f9c2ba0ac5be946f53548c1aaaee5873a8103 - React-jsi: b6dc94a6a12ff98e8877287a0b7620d365201161 - React-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da - React-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493 + PromisesObjC: b48e0338dbbac2207e611750777895f7a5811b75 + RCTRequired: d9b1a9e6fa097744ca3ede59f86a35096df7202b + RCTTypeSafety: c227cd061983e9e964115afbc4e8730d6a6f1395 + React: 86e972a20967ee4137aa19dc48319405927c2e94 + React-callinvoker: 87ee376c25277d74e164ff036b27084e343f3e69 + React-Core: f5ec03baf7ed58d9f3ee04a8f84e4c97ee8bf4c9 + React-CoreModules: 958898aa8c069280e866e35a2f29480a81fcf335 + React-cxxreact: 90de76b9b51575668ad7fd4e33a5a8c143beecc2 + React-jsi: b32a31da32e030f30bbf9a8d3a9c8325df9e793f + React-jsiexecutor: 7ab9cdcdd18d57652fb041f8a147fe9658d4e00a + React-jsinspector: 2e28bb487e42dda6c94dbfa0c648d1343767a0fb react-native-appearance: 0f0e5fc2fcef70e03d48c8fe6b00b9158c2ba8aa react-native-background-timer: 1f7d560647b40e6a60b01c452ba29c54bf581fc4 - react-native-cameraroll: 02e60e9af9273a3cc3b641632bf651189830aaf8 - react-native-document-picker: dd96ce05bf1453b110d7a3912097bf6d298d2cb6 + react-native-cameraroll: ae0a7c0cc8462508855707ff623b1e789b692865 + react-native-document-picker: 825552b827012282baf4b7cbf119d3b37a280c90 react-native-jitsi-meet: f89bcb2cfbd5b15403b9c40738036c4f1af45d05 react-native-notifications: ee8fd739853e72694f3af8b374c8ccb106b7b227 react-native-orientation-locker: f0ca1a8e5031dab6b74bfb4ab33a17ed2c2fcb0d - react-native-safe-area-context: b11a34881faac509cad5578726c98161ad4d275c - react-native-slider: e51492f1264d882a8815b71c5870f8978e52887d - react-native-webview: cf5527893252b3b036eea024a1da6996f7344c74 - React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c - React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0 - React-RCTBlob: a332773f0ebc413a0ce85942a55b064471587a71 - React-RCTImage: e70be9b9c74fe4e42d0005f42cace7981c994ac3 - React-RCTLinking: c1b9739a88d56ecbec23b7f63650e44672ab2ad2 - React-RCTNetwork: 73138b6f45e5a2768ad93f3d57873c2a18d14b44 - React-RCTSettings: 6e3738a87e21b39a8cb08d627e68c44acf1e325a - React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d - React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256 - ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3 + react-native-safe-area-context: 344b969c45af3d8464d36e8dea264942992ef033 + react-native-slider: 0221b417686c5957f6e77cd9ac22c1478a165355 + react-native-webview: 679b6f400176e2ea8a785acf7ae16cf282e7d1eb + React-RCTActionSheet: 1702a1a85e550b5c36e2e03cb2bd3adea053de95 + React-RCTAnimation: ddda576010a878865a4eab83a78acd92176ef6a1 + React-RCTBlob: 34334384284c81577409d5205bd2b9ff594d8ab6 + React-RCTImage: e2a661266dca295cffb33909cc64675a2efedb26 + React-RCTLinking: cd39b9b5e9cbb9e827854e30dfa92d7db074cea8 + React-RCTNetwork: 16939b7e4058d6f662b304a1f61689e249a2bfcc + React-RCTSettings: 24726a62de0c326f9ebfc3838898a501b87ce711 + React-RCTText: 4f95d322b7e6da72817284abf8a2cdcec18b9cd8 + React-RCTVibration: f3a9123c244f35c40d3c9f3ec3f0b9e5717bb292 + ReactCommon: 2905859f84a94a381bb0d8dd3921ccb1a0047cb8 ReactNativeART: 78edc68dd4a1e675338cd0cd113319cf3a65f2ab ReactNativeKeyboardInput: c37e26821519869993b3b61844350feb9177ff37 ReactNativeKeyboardTrackingView: 02137fac3b2ebd330d74fa54ead48b14750a2306 rn-extensions-share: 8db79372089567cbc5aefe8444869bbc808578d3 rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba RNBootSplash: b3836aa90c5bec690c6cd3c9ab355fcf98d0fe1d - RNCAsyncStorage: cd7234ff15c010723ed7c499ae4eedc605eac1fd + RNCAsyncStorage: d059c3ee71738c39834a627476322a5a8cd5bf36 RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f - RNDateTimePicker: 4bd49e09f91ca73d69119a9e1173b0d43b82f5e5 - RNDeviceInfo: e2102056bde3ad5d137fd029d8d431510a00486a + RNDateTimePicker: e386ff4ef3300964ed0cad97ce6f206e0effbfdb + RNDeviceInfo: ed8557a8bd6443cbc0ab5d375e6808a38a279744 RNFastImage: 35ae972d6727c84ee3f5c6897e07f84d0a3445e9 RNFirebase: 37daa9a346d070f9f6ee1f3b4aaf4c8e3b1d5d1c RNGestureHandler: 8f09cd560f8d533eb36da5a6c5a843af9f056b38 RNImageCropPicker: 38865ab4af1b0b2146ad66061196bc0184946855 RNLocalize: b6df30cc25ae736d37874f9bce13351db2f56796 - RNReanimated: 955cf4068714003d2f1a6e2bae3fb1118f359aff + RNReanimated: b5ccb50650ba06f6e749c7c329a1bc3ae0c88b43 RNRootView: 895a4813dedeaca82db2fa868ca1c333d790e494 - RNScreens: cf198f915f8a2bf163de94ca9f5bfc8d326c3706 + RNScreens: c526239bbe0e957b988dacc8d75ac94ec9cb19da RNUserDefaults: c421fd97ad06b35c16608c5d0fe675db353f632d - RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4 - SDWebImage: 84000f962cbfa70c07f19d2234cbfcf5d779b5dc + RNVectorIcons: da6fe858f5a65d7bbc3379540a889b0b12aa5976 + SDWebImage: cf6922231e95550934da2ada0f20f2becf2ceba9 SDWebImageWebPCoder: 36f8f47bd9879a8aea6044765c1351120fd8e3a8 - TOCropViewController: e9da34f484aedd4e5d5a8ab230ba217cfe16c729 - UMAppLoader: ee77a072f9e15128f777ccd6d2d00f52ab4387e6 - UMBarCodeScannerInterface: 9dc692b87e5f20fe277fa57aa47f45d418c3cc6c - UMCameraInterface: 625878bbf2ba188a8548675e1d1d2e438a653e6d - UMConstantsInterface: 64060cf86587bcd90b1dbd804cceb6d377a308c1 - UMCore: eb200e882eadafcd31ead290770835fd648c0945 - UMFaceDetectorInterface: d6677d6ddc9ab95a0ca857aa7f8ba76656cc770f - UMFileSystemInterface: c70ea7147198b9807080f3597f26236be49b0165 - UMFontInterface: d9d3b27af698c5389ae9e20b99ef56a083f491fb - UMImageLoaderInterface: 14dd2c46c67167491effc9e91250e9510f12709e - UMPermissionsInterface: 5e83a9167c177e4a0f0a3539345983cc749efb3e - UMReactNativeAdapter: 126da3486c1a1f11945b649d557d6c2ebb9407b2 - UMSensorsInterface: 48941f70175e2975af1a9386c6d6cb16d8126805 - UMTaskManagerInterface: cb890c79c63885504ddc0efd7a7d01481760aca2 - Yoga: 3ebccbdd559724312790e7742142d062476b698e + TOCropViewController: 20a14b6a7a098308bf369e7c8d700dc983a974e6 + UMAppLoader: 61049c8d55590b74e9ae1d5429bf68d96b4a2528 + UMBarCodeScannerInterface: e5e4c87797d3d01214e25cd1618866caf5d4f17f + UMCameraInterface: 415ac060034edecacdbbaa739c223e3f276e0056 + UMConstantsInterface: 1a52f2d884c95e8829439da13e36b7669a1a8fb4 + UMCore: d98083b522b08c0a8ba3992bc263c624ae5d887c + UMFaceDetectorInterface: 67c6c82451338da01a4bc00ec46365a2a8ea9057 + UMFileSystemInterface: 303d696ede28102a7e11d111808bd2ed2c5eb62f + UMFontInterface: 6edf1ee8bc55d2030766f8cf0a7b20a5d5a913b0 + UMImageLoaderInterface: 9cdbf3bab6a513bddd88505cb2340fe02d6a11c0 + UMPermissionsInterface: 019170ad655f464e3f8d23d2a8bcbda2e645cde4 + UMReactNativeAdapter: 538efe92e781b5d7678cf95b34c46f2d0989a557 + UMSensorsInterface: cb5bf31d52c4349f0ff9e3c049bbe4df0d80d383 + UMTaskManagerInterface: 80653f25c55d9e6d79d6a0a65589fa213feaee11 + Yoga: d5bd05a2b6b94c52323745c2c2b64557c8c66f64 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 35d9478dd32cf502959b8efc14411ecf09c66c95 +PODFILE CHECKSUM: 55c04243097892160d63f79f3a23157165b7ac68 COCOAPODS: 1.8.4 diff --git a/ios/Pods/Firebase/CoreOnly/Sources/Firebase.h b/ios/Pods/Firebase/CoreOnly/Sources/Firebase.h index e5049ca4..0c84691d 100755 --- a/ios/Pods/Firebase/CoreOnly/Sources/Firebase.h +++ b/ios/Pods/Firebase/CoreOnly/Sources/Firebase.h @@ -12,26 +12,39 @@ // See the License for the specific language governing permissions and // limitations under the License. -#import +// The module qualified imports are for CocoaPods and the simple file names +// for Swift Package Manager. #if !defined(__has_include) #error "Firebase.h won't import anything if your compiler doesn't support __has_include. Please \ import the headers individually." #else + #if __has_include() + #import + #elif __has_include("FirebaseCore.h") + #import "FirebaseCore.h" + #endif + #if __has_include() #import #endif #if __has_include() #import + #elif __has_include("FirebaseAuth.h") + #import "FirebaseAuth.h" #endif #if __has_include() #import + #elif __has_include("FirebaseCrashlytics.h") + #import "FirebaseCrashlytics.h" #endif #if __has_include() #import + #elif __has_include("FirebaseDatabase.h") + #import "FirebaseDatabase.h" #endif #if __has_include() @@ -43,14 +56,20 @@ Firebase Dynamic Links works as intended." #endif // #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING #endif + #elif __has_include("FirebaseDynamicLinks.h") + #import "FirebaseDynamicLinks.h" #endif #if __has_include() #import + #elif __has_include("FirebaseFirestore.h") + #import "FirebaseFirestore.h" #endif #if __has_include() #import + #elif __has_include("FirebaseFunctions.h") + #import "FirebaseFunctions.h" #endif #if __has_include() @@ -62,6 +81,8 @@ Firebase Dynamic Links works as intended." Firebase In App Messaging works as intended." #endif // #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING #endif + #elif __has_include("FirebaseInAppMessaging.h") + #import "FirebaseInAppMessaging.h" #endif #if __has_include() @@ -77,7 +98,9 @@ Firebase In App Messaging works as intended." Firebase Messaging works as intended." #endif // #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING #endif -#endif + #elif __has_include("FirebaseMessaging.h") + #import "FirebaseMessaging.h" + #endif #if __has_include() #import @@ -151,10 +174,14 @@ Firebase Performance works as intended." Firebase Remote Config works as intended." #endif // #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING #endif + #elif __has_include("FirebaseRemoteConfig.h") + #import "FirebaseRemoteConfig.h" #endif #if __has_include() #import + #elif __has_include("FirebaseStorage.h") + #import "FirebaseStorage.h" #endif #if __has_include() diff --git a/ios/Pods/Firebase/README.md b/ios/Pods/Firebase/README.md index 1747cca7..1d9f0f67 100644 --- a/ios/Pods/Firebase/README.md +++ b/ios/Pods/Firebase/README.md @@ -2,14 +2,20 @@ [![License](https://img.shields.io/cocoapods/l/Firebase.svg?style=flat)](https://cocoapods.org/pods/Firebase) [![Platform](https://img.shields.io/cocoapods/p/Firebase.svg?style=flat)](https://cocoapods.org/pods/Firebase) +[![Actions Status][gh-abtesting-badge]][gh-actions] [![Actions Status][gh-auth-badge]][gh-actions] [![Actions Status][gh-core-badge]][gh-actions] +[![Actions Status][gh-crashlytics-badge]][gh-actions] +[![Actions Status][gh-database-badge]][gh-actions] [![Actions Status][gh-datatransport-badge]][gh-actions] [![Actions Status][gh-dynamiclinks-badge]][gh-actions] [![Actions Status][gh-firebasepod-badge]][gh-actions] [![Actions Status][gh-firestore-badge]][gh-actions] +[![Actions Status][gh-functions-badge]][gh-actions] +[![Actions Status][gh-inappmessaging-badge]][gh-actions] [![Actions Status][gh-interop-badge]][gh-actions] [![Actions Status][gh-messaging-badge]][gh-actions] +[![Actions Status][gh-remoteconfig-badge]][gh-actions] [![Actions Status][gh-storage-badge]][gh-actions] [![Actions Status][gh-symbolcollision-badge]][gh-actions] [![Actions Status][gh-zip-badge]][gh-actions] @@ -92,7 +98,7 @@ Instructions for installing binary frameworks via To develop Firebase software in this repository, ensure that you have at least the following software: - * Xcode 10.1 (or later) + * Xcode 10.3 (or later) * CocoaPods 1.7.2 (or later) * [CocoaPods generate](https://github.com/square/cocoapods-generate) @@ -123,6 +129,10 @@ Firestore has a self contained Xcode project. See See [AddNewPod.md](AddNewPod.md). +### Managing Headers and Imports + +See [HeadersImports.md](HeadersImports.md). + ### Code Formatting To ensure that the code is formatted consistently, run the script @@ -130,21 +140,13 @@ To ensure that the code is formatted consistently, run the script before creating a PR. Travis will verify that any code changes are done in a style compliant way. Install -`clang-format` and `swiftformat`. -These commands will get the right versions: +`clang-format` and `swiftformat`: ``` -brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/c6f1cbd/Formula/clang-format.rb -brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/c13eda8/Formula/swiftformat.rb +brew install clang-format +brew install swiftformat ``` -Note: if you already have a newer version of these installed you may need to -`brew switch` to this version. - -To update this section, find the versions of clang-format and swiftformat.rb to -match the versions in the CI failure logs -[here](https://github.com/Homebrew/homebrew-core/tree/master/Formula). - ### Running Unit Tests Select a scheme and press Command-u to build a component and run its unit tests. @@ -167,12 +169,7 @@ files without real values, but can be replaced with real plist files. To get you 2. Create a new Firebase project, if you don't already have one 3. For each sample app you want to test, create a new Firebase app with the sample app's bundle identifier (e.g. `com.google.Database-Example`) -4. Download the resulting `GoogleService-Info.plist` and replace the appropriate dummy plist file -(e.g. in [Example/Database/App/](Example/Database/App/)); - -Some sample apps like Firebase Messaging ([Example/Messaging/App](Example/Messaging/App)) require -special Apple capabilities, and you will have to change the sample app to use a unique bundle -identifier that you can control in your own Apple Developer account. +4. Download the resulting `GoogleService-Info.plist` and add it to the Xcode project. ## Specific Component Instructions See the sections below for any special instructions for those components. @@ -185,8 +182,16 @@ building and running the FirebaseAuth pod along with various samples and tests. ### Firebase Database -To run the Database Integration tests, make your database authentication rules -[public](https://firebase.google.com/docs/database/security/quickstart). +The Firebase Database Integration tests can be run against a locally running Database Emulator +or against a production instance. + +To run against a local emulator instance, invoke `./scripts/run_database_emulator.sh start` before +running the integration test. + +To run against a production instance, provide a valid GoogleServices-Info.plist and copy it to +`FirebaseDatabase/Tests/Resources/GoogleService-Info.plist`. Your Security Rule must be set to +[public](https://firebase.google.com/docs/database/security/quickstart) while your tests are +running. ### Firebase Storage @@ -274,14 +279,20 @@ Your use of Firebase is governed by the [Terms of Service for Firebase Services](https://firebase.google.com/terms/). [gh-actions]: https://github.com/firebase/firebase-ios-sdk/actions +[gh-abtesting-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/abtesting/badge.svg [gh-auth-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/auth/badge.svg [gh-core-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/core/badge.svg +[gh-crashlytics-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/crashlytics/badge.svg +[gh-database-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/database/badge.svg [gh-datatransport-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/datatransport/badge.svg [gh-dynamiclinks-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/dynamiclinks/badge.svg [gh-firebasepod-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/firebasepod/badge.svg [gh-firestore-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/firestore/badge.svg +[gh-functions-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/functions/badge.svg +[gh-inappmessaging-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/inappmessaging/badge.svg [gh-interop-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/interop/badge.svg [gh-messaging-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/messaging/badge.svg +[gh-remoteconfig-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/remoteconfig/badge.svg [gh-storage-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/storage/badge.svg [gh-symbolcollision-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/symbolcollision/badge.svg [gh-zip-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/zip/badge.svg diff --git a/ios/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector b/ios/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector index bb3a7cae..8746d38f 100755 Binary files a/ios/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector and b/ios/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector differ diff --git a/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics b/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics index 46030f0c..e00c279a 100755 Binary files a/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics and b/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics differ diff --git a/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h b/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h index be0b1fae..15b693c9 100755 --- a/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h +++ b/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIRAnalytics.h @@ -90,12 +90,10 @@ NS_SWIFT_NAME(Analytics) /// Must be called on the main thread. /// /// Note that screen reporting is enabled automatically and records the class name of the current -/// UIViewController for you without requiring you to call this method. If you implement -/// viewDidAppear in your UIViewController but do not call [super viewDidAppear:], that screen class -/// will not be automatically tracked. The class name can optionally be overridden by calling this -/// method in the viewDidAppear callback of your UIViewController and specifying the -/// screenClassOverride parameter. setScreenName:screenClass: must be called after -/// [super viewDidAppear:]. +/// UIViewController for you without requiring you to call this method. The class name can +/// optionally be overridden by calling this method in the viewDidAppear callback of your +/// UIViewController and specifying the screenClassOverride parameter. +/// `setScreenName:screenClass:` must be called after `[super viewDidAppear:]`. /// /// If your app does not use a distinct UIViewController for each screen, you should call this /// method and specify a distinct screenName each time a new screen is presented to the user. @@ -103,6 +101,9 @@ NS_SWIFT_NAME(Analytics) /// The screen name and screen class remain in effect until the current UIViewController changes or /// a new call to setScreenName:screenClass: is made. /// +/// @warning If you override `viewDidAppear:` in your UIViewController but do not call +/// `[super viewDidAppear:]`, that screen class will not be tracked. +/// /// @param screenName The name of the current screen. Should contain 1 to 100 characters. Set to nil /// to clear the current screen name. /// @param screenClassOverride The name of the screen class. Should contain 1 to 100 characters. By diff --git a/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h b/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h index 674f8b12..807b6159 100755 --- a/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h +++ b/ios/Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/Headers/FIREventNames.h @@ -366,7 +366,6 @@ static NSString *const kFIREventViewItemList NS_SWIFT_NAME(AnalyticsEventViewIte ///
    ///
  • @c kFIRParameterSearchTerm (NSString)
  • ///
-/// This constant has been deprecated. static NSString *const kFIREventViewSearchResults NS_SWIFT_NAME(AnalyticsEventViewSearchResults) = @"view_search_results"; diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRAnalyticsConfiguration.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRAnalyticsConfiguration.h similarity index 100% rename from ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRAnalyticsConfiguration.h rename to ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRAnalyticsConfiguration.h diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRAnalyticsConfiguration.m b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRAnalyticsConfiguration.m index 3a7d6de0..07c786cb 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRAnalyticsConfiguration.m +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRAnalyticsConfiguration.m @@ -14,7 +14,7 @@ #import -#import "FirebaseCore/Sources/Private/FIRAnalyticsConfiguration.h" +#import "FirebaseCore/Sources/FIRAnalyticsConfiguration.h" #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-implementations" diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRApp.m b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRApp.m index 002f93c5..3fbfd01c 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRApp.m +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRApp.m @@ -22,20 +22,20 @@ #import #endif -#import +#import "FirebaseCore/Sources/Public/FIRApp.h" +#import "FirebaseCore/Sources/FIRAnalyticsConfiguration.h" #import "FirebaseCore/Sources/FIRBundleUtil.h" +#import "FirebaseCore/Sources/FIRComponentContainerInternal.h" +#import "FirebaseCore/Sources/FIRConfigurationInternal.h" #import "FirebaseCore/Sources/FIRVersion.h" -#import "FirebaseCore/Sources/Private/FIRAnalyticsConfiguration.h" #import "FirebaseCore/Sources/Private/FIRAppInternal.h" -#import "FirebaseCore/Sources/Private/FIRComponentContainerInternal.h" -#import "FirebaseCore/Sources/Private/FIRConfigurationInternal.h" #import "FirebaseCore/Sources/Private/FIRCoreDiagnosticsConnector.h" #import "FirebaseCore/Sources/Private/FIRLibrary.h" #import "FirebaseCore/Sources/Private/FIRLogger.h" #import "FirebaseCore/Sources/Private/FIROptionsInternal.h" -#import +#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h" #import @@ -166,7 +166,7 @@ static dispatch_once_t sFirebaseUserAgentOnceToken; if ([name isEqualToString:kFIRDefaultAppName]) { if (sDefaultApp) { - // The default app already exixts. Handle duplicate `configure` calls and return. + // The default app already exists. Handle duplicate `configure` calls and return. [self appWasConfiguredTwice:sDefaultApp usingOptions:options]; return; } diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRAppAssociationRegistration.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRAppAssociationRegistration.h similarity index 100% rename from ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRAppAssociationRegistration.h rename to ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRAppAssociationRegistration.h diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRAppAssociationRegistration.m b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRAppAssociationRegistration.m index e4125cd2..f3f812c7 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRAppAssociationRegistration.m +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRAppAssociationRegistration.m @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#import "FirebaseCore/Sources/Private/FIRAppAssociationRegistration.h" +#import "FirebaseCore/Sources/FIRAppAssociationRegistration.h" #import diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRBundleUtil.m b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRBundleUtil.m index b858f14c..d4b32cf1 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRBundleUtil.m +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRBundleUtil.m @@ -14,7 +14,7 @@ #import "FirebaseCore/Sources/FIRBundleUtil.h" -#import +#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h" @implementation FIRBundleUtil @@ -49,15 +49,19 @@ + (BOOL)hasBundleIdentifierPrefix:(NSString *)bundleIdentifier inBundles:(NSArray *)bundles { for (NSBundle *bundle in bundles) { - // This allows app extensions that have the app's bundle as their prefix to pass this test. - NSString *applicationBundleIdentifier = - [GULAppEnvironmentUtil isAppExtension] - ? [self bundleIdentifierByRemovingLastPartFrom:bundle.bundleIdentifier] - : bundle.bundleIdentifier; - - if ([applicationBundleIdentifier isEqualToString:bundleIdentifier]) { + if ([bundle.bundleIdentifier isEqualToString:bundleIdentifier]) { return YES; } + + if ([GULAppEnvironmentUtil isAppExtension]) { + // A developer could be using the same `FIROptions` for both their app and extension. Since + // extensions have a suffix added to the bundleID, we consider a matching prefix as valid. + NSString *appBundleIDFromExtension = + [self bundleIdentifierByRemovingLastPartFrom:bundle.bundleIdentifier]; + if ([appBundleIDFromExtension isEqualToString:bundleIdentifier]) { + return YES; + } + } } return NO; } diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRComponentContainerInternal.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRComponentContainerInternal.h similarity index 93% rename from ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRComponentContainerInternal.h rename to ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRComponentContainerInternal.h index bf39bc6c..82356060 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRComponentContainerInternal.h +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRComponentContainerInternal.h @@ -15,8 +15,8 @@ */ #import -#import -#import +#import "FirebaseCore/Sources/Private/FIRComponent.h" +#import "FirebaseCore/Sources/Private/FIRComponentContainer.h" @class FIRApp; diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRComponentType.m b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRComponentType.m index 6410f2ea..9051336a 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRComponentType.m +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRComponentType.m @@ -16,7 +16,7 @@ #import "FirebaseCore/Sources/Private/FIRComponentType.h" -#import "FirebaseCore/Sources/Private/FIRComponentContainerInternal.h" +#import "FirebaseCore/Sources/FIRComponentContainerInternal.h" @implementation FIRComponentType diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRConfiguration.m b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRConfiguration.m index a1c9f4a2..83b3248c 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRConfiguration.m +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRConfiguration.m @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#import "FirebaseCore/Sources/Private/FIRConfigurationInternal.h" +#import "FirebaseCore/Sources/FIRConfigurationInternal.h" -#import "FirebaseCore/Sources/Private/FIRAnalyticsConfiguration.h" +#import "FirebaseCore/Sources/FIRAnalyticsConfiguration.h" extern void FIRSetLoggerLevel(FIRLoggerLevel loggerLevel); diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRConfigurationInternal.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRConfigurationInternal.h similarity index 94% rename from ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRConfigurationInternal.h rename to ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRConfigurationInternal.h index 0d1a36f6..af379aca 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRConfigurationInternal.h +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRConfigurationInternal.h @@ -14,7 +14,7 @@ * limitations under the License. */ -#import +#import "FirebaseCore/Sources/Public/FIRConfiguration.h" @class FIRAnalyticsConfiguration; diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRCoreDiagnosticsConnector.m b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRCoreDiagnosticsConnector.m index 4981ca1b..730dd6ef 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRCoreDiagnosticsConnector.m +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRCoreDiagnosticsConnector.m @@ -16,12 +16,12 @@ #import "FirebaseCore/Sources/Private/FIRCoreDiagnosticsConnector.h" -#import +#import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h" -#import +#import "FirebaseCore/Sources/Public/FIROptions.h" +#import "FirebaseCore/Sources/FIRDiagnosticsData.h" #import "FirebaseCore/Sources/Private/FIRAppInternal.h" -#import "FirebaseCore/Sources/Private/FIRDiagnosticsData.h" #import "FirebaseCore/Sources/Private/FIROptionsInternal.h" // Define the interop class symbol declared as an extern in FIRCoreDiagnosticsInterop. diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRDiagnosticsData.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRDiagnosticsData.h similarity index 94% rename from ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRDiagnosticsData.h rename to ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRDiagnosticsData.h index ac5ef2c4..5b5ff8ad 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRDiagnosticsData.h +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRDiagnosticsData.h @@ -16,7 +16,7 @@ #import -#import +#import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h" NS_ASSUME_NONNULL_BEGIN diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRDiagnosticsData.m b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRDiagnosticsData.m index bbe0561d..da9489d9 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRDiagnosticsData.m +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRDiagnosticsData.m @@ -14,9 +14,9 @@ * limitations under the License. */ -#import "FirebaseCore/Sources/Private/FIRDiagnosticsData.h" +#import "FirebaseCore/Sources/FIRDiagnosticsData.h" -#import +#import "FirebaseCore/Sources/Public/FIRApp.h" #import "FirebaseCore/Sources/Private/FIRAppInternal.h" #import "FirebaseCore/Sources/Private/FIROptionsInternal.h" diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRHeartbeatInfo.m b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRHeartbeatInfo.m index 277b0f71..be8b0513 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRHeartbeatInfo.m +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRHeartbeatInfo.m @@ -13,8 +13,8 @@ // limitations under the License. #import "FirebaseCore/Sources/Private/FIRHeartbeatInfo.h" -#import -#import +#import "GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h" +#import "GoogleUtilities/Logger/Private/GULLogger.h" const static long secondsInDay = 86400; @implementation FIRHeartbeatInfo : NSObject diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRLogger.m b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRLogger.m index ba2ee1f5..cf210ba8 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRLogger.m +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIRLogger.m @@ -14,9 +14,9 @@ #import "FirebaseCore/Sources/Private/FIRLogger.h" -#import -#import -#import +#import "FirebaseCore/Sources/Public/FIRLoggerLevel.h" +#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h" +#import "GoogleUtilities/Logger/Private/GULLogger.h" #import "FirebaseCore/Sources/FIRVersion.h" diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIROptions.m b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIROptions.m index d1853309..3f35c763 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIROptions.m +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/FIROptions.m @@ -90,40 +90,40 @@ NSString *const kFIRExceptionBadModification = static FIROptions *sDefaultOptions = nil; static NSDictionary *sDefaultOptionsDictionary = nil; +static dispatch_once_t sDefaultOptionsOnceToken; +static dispatch_once_t sDefaultOptionsDictionaryOnceToken; #pragma mark - Public only for internal class methods + (FIROptions *)defaultOptions { - if (sDefaultOptions != nil) { - return sDefaultOptions; - } + dispatch_once(&sDefaultOptionsOnceToken, ^{ + NSDictionary *defaultOptionsDictionary = [self defaultOptionsDictionary]; + if (defaultOptionsDictionary != nil) { + sDefaultOptions = + [[FIROptions alloc] initInternalWithOptionsDictionary:defaultOptionsDictionary]; + } + }); - NSDictionary *defaultOptionsDictionary = [self defaultOptionsDictionary]; - if (defaultOptionsDictionary == nil) { - return nil; - } - - sDefaultOptions = [[FIROptions alloc] initInternalWithOptionsDictionary:defaultOptionsDictionary]; return sDefaultOptions; } #pragma mark - Private class methods + (NSDictionary *)defaultOptionsDictionary { - if (sDefaultOptionsDictionary != nil) { - return sDefaultOptionsDictionary; - } - NSString *plistFilePath = [FIROptions plistFilePathWithName:kServiceInfoFileName]; - if (plistFilePath == nil) { - return nil; - } - sDefaultOptionsDictionary = [NSDictionary dictionaryWithContentsOfFile:plistFilePath]; - if (sDefaultOptionsDictionary == nil) { - FIRLogError(kFIRLoggerCore, @"I-COR000011", - @"The configuration file is not a dictionary: " - @"'%@.%@'.", - kServiceInfoFileName, kServiceInfoFileType); - } + dispatch_once(&sDefaultOptionsDictionaryOnceToken, ^{ + NSString *plistFilePath = [FIROptions plistFilePathWithName:kServiceInfoFileName]; + if (plistFilePath == nil) { + return; + } + sDefaultOptionsDictionary = [NSDictionary dictionaryWithContentsOfFile:plistFilePath]; + if (sDefaultOptionsDictionary == nil) { + FIRLogError(kFIRLoggerCore, @"I-COR000011", + @"The configuration file is not a dictionary: " + @"'%@.%@'.", + kServiceInfoFileName, kServiceInfoFileType); + } + }); + return sDefaultOptionsDictionary; } @@ -144,6 +144,8 @@ static NSDictionary *sDefaultOptionsDictionary = nil; + (void)resetDefaultOptions { sDefaultOptions = nil; sDefaultOptionsDictionary = nil; + sDefaultOptionsOnceToken = 0; + sDefaultOptionsDictionaryOnceToken = 0; } #pragma mark - Private instance methods diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRAppInternal.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRAppInternal.h index ad1a186b..9a0c943d 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRAppInternal.h +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRAppInternal.h @@ -14,8 +14,19 @@ * limitations under the License. */ +#if SWIFT_PACKAGE +// TODO(paulb777): Investigate if there's a common strategy for both Cocoapods and Swift PM. +#import "FIRApp.h" +#else #import +#endif + +// The has_include is a workaround so the old IID needed for the FIS tests can find FIRErrors.h +#if __has_include("FirebaseCore/Sources/Private/FIRErrors.h") +#import "FirebaseCore/Sources/Private/FIRErrors.h" +#else #import +#endif @class FIRComponentContainer; @protocol FIRLibrary; diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRComponentContainer.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRComponentContainer.h index 8dfab9c1..db2bafef 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRComponentContainer.h +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRComponentContainer.h @@ -15,8 +15,14 @@ */ #import +// The has_include is a workaround so the old IID needed for the FIS tests can find the headers. +#if __has_include("FirebaseCore/Sources/Private/FIRComponentType.h") +#import "FirebaseCore/Sources/Private/FIRComponentType.h" +#import "FirebaseCore/Sources/Private/FIRLibrary.h" +#else #import #import +#endif NS_ASSUME_NONNULL_BEGIN diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRErrorCode.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRErrorCode.h index f77b3d00..c90d9eec 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRErrorCode.h +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRErrorCode.h @@ -32,7 +32,8 @@ typedef NS_ENUM(NSInteger, FIRErrorCode) { FIRErrorCodeInvalidAppID = -101, /** - * Error code for failing to configure a specific service. + * Error code for failing to configure a specific service. It's deprecated, but + * still used after copybara. */ FIRErrorCodeConfigFailed = -114, }; diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRLibrary.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRLibrary.h index af9d9685..e7a9e077 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRLibrary.h +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRLibrary.h @@ -19,7 +19,12 @@ #import +// The has_include is a workaround so the old IID needed for the FIS tests can find the headers. +#if __has_include("FirebaseCore/Sources/Private/FIRComponent.h") +#import "FirebaseCore/Sources/Private/FIRComponent.h" +#else #import +#endif @class FIRApp; diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRLogger.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRLogger.h index 548e389a..6fd77844 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRLogger.h +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIRLogger.h @@ -16,7 +16,12 @@ #import +#if SWIFT_PACKAGE +// TODO(paulb777): Investigate if there's a common strategy for both Cocoapods and Swift PM. +#import "FIRLoggerLevel.h" +#else #import +#endif NS_ASSUME_NONNULL_BEGIN diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIROptionsInternal.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIROptionsInternal.h index 0660a3cd..acaf4586 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIROptionsInternal.h +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FIROptionsInternal.h @@ -14,7 +14,12 @@ * limitations under the License. */ +#if SWIFT_PACKAGE +// TODO(paulb777): Investigate if there's a common strategy for both Cocoapods and Swift PM. +#import "FIROptions.h" +#else #import +#endif /** * Keys for the strings in the plist file. diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FirebaseCoreInternal.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FirebaseCoreInternal.h new file mode 100644 index 00000000..93af6cb8 --- /dev/null +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Private/FirebaseCoreInternal.h @@ -0,0 +1,31 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// An umbrella header, for any other libraries in this repo to access Firebase Public and Private +// headers. Any package manager complexity should be handled here. + +#if SWIFT_PACKAGE +@import FirebaseCore; +#else +#import +#endif + +#import "FirebaseCore/Sources/Private/FIRAppInternal.h" +#import "FirebaseCore/Sources/Private/FIRComponent.h" +#import "FirebaseCore/Sources/Private/FIRComponentContainer.h" +#import "FirebaseCore/Sources/Private/FIRDependency.h" +#import "FirebaseCore/Sources/Private/FIRHeartbeatInfo.h" +#import "FirebaseCore/Sources/Private/FIRLibrary.h" +#import "FirebaseCore/Sources/Private/FIRLogger.h" +#import "FirebaseCore/Sources/Private/FIROptionsInternal.h" diff --git a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Public/FIRConfiguration.h b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Public/FIRConfiguration.h index 8de3b076..2b8e678c 100644 --- a/ios/Pods/FirebaseCore/FirebaseCore/Sources/Public/FIRConfiguration.h +++ b/ios/Pods/FirebaseCore/FirebaseCore/Sources/Public/FIRConfiguration.h @@ -16,7 +16,7 @@ #import -#import +#import "FIRLoggerLevel.h" NS_ASSUME_NONNULL_BEGIN diff --git a/ios/Pods/GoogleUtilities/GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.h b/ios/Pods/FirebaseCore/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h similarity index 91% rename from ios/Pods/GoogleUtilities/GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.h rename to ios/Pods/FirebaseCore/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h index d5502647..2fb16226 100644 --- a/ios/Pods/GoogleUtilities/GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.h +++ b/ios/Pods/FirebaseCore/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h @@ -41,6 +41,7 @@ + (BOOL)isAppExtension; /// @return Returns @YES when is run on iOS version greater or equal to 7.0 -+ (BOOL)isIOS7OrHigher; ++ (BOOL)isIOS7OrHigher DEPRECATED_MSG_ATTRIBUTE( + "Always `YES` because only iOS 8 and higher supported. The method will be removed."); @end diff --git a/ios/Pods/GoogleUtilities/GoogleUtilities/Environment/Public/GULHeartbeatDateStorage.h b/ios/Pods/FirebaseCore/GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h similarity index 100% rename from ios/Pods/GoogleUtilities/GoogleUtilities/Environment/Public/GULHeartbeatDateStorage.h rename to ios/Pods/FirebaseCore/GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h diff --git a/ios/Pods/GoogleUtilities/GoogleUtilities/Environment/Public/GULKeychainStorage.h b/ios/Pods/FirebaseCore/GoogleUtilities/Environment/Private/GULKeychainStorage.h similarity index 100% rename from ios/Pods/GoogleUtilities/GoogleUtilities/Environment/Public/GULKeychainStorage.h rename to ios/Pods/FirebaseCore/GoogleUtilities/Environment/Private/GULKeychainStorage.h diff --git a/ios/Pods/GoogleUtilities/GoogleUtilities/Environment/Public/GULKeychainUtils.h b/ios/Pods/FirebaseCore/GoogleUtilities/Environment/Private/GULKeychainUtils.h similarity index 100% rename from ios/Pods/GoogleUtilities/GoogleUtilities/Environment/Public/GULKeychainUtils.h rename to ios/Pods/FirebaseCore/GoogleUtilities/Environment/Private/GULKeychainUtils.h diff --git a/ios/Pods/GoogleUtilities/GoogleUtilities/Environment/Public/GULSecureCoding.h b/ios/Pods/FirebaseCore/GoogleUtilities/Environment/Private/GULSecureCoding.h similarity index 100% rename from ios/Pods/GoogleUtilities/GoogleUtilities/Environment/Public/GULSecureCoding.h rename to ios/Pods/FirebaseCore/GoogleUtilities/Environment/Private/GULSecureCoding.h diff --git a/ios/Pods/FirebaseCore/GoogleUtilities/Logger/Private/GULLogger.h b/ios/Pods/FirebaseCore/GoogleUtilities/Logger/Private/GULLogger.h new file mode 100644 index 00000000..1146ee23 --- /dev/null +++ b/ios/Pods/FirebaseCore/GoogleUtilities/Logger/Private/GULLogger.h @@ -0,0 +1,163 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#if SWIFT_PACKAGE +@import GoogleUtilities_Logger; +#else +#import +#endif + +NS_ASSUME_NONNULL_BEGIN + +/** + * The services used in the logger. + */ +typedef NSString *const GULLoggerService; + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/** + * Initialize GULLogger. + */ +extern void GULLoggerInitializeASL(void); + +/** + * Override log level to Debug. + */ +void GULLoggerForceDebug(void); + +/** + * Turn on logging to STDERR. + */ +extern void GULLoggerEnableSTDERR(void); + +/** + * Changes the default logging level of GULLoggerLevelNotice to a user-specified level. + * The default level cannot be set above GULLoggerLevelNotice if the app is running from App Store. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern void GULSetLoggerLevel(GULLoggerLevel loggerLevel); + +/** + * Checks if the specified logger level is loggable given the current settings. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern BOOL GULIsLoggableLevel(GULLoggerLevel loggerLevel); + +/** + * Register version to include in logs. + * (required) version + */ +extern void GULLoggerRegisterVersion(const char *version); + +/** + * Logs a message to the Xcode console and the device log. If running from AppStore, will + * not log any messages with a level higher than GULLoggerLevelNotice to avoid log spamming. + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ +extern void GULLogBasic(GULLoggerLevel level, + GULLoggerService service, + BOOL forceLog, + NSString *messageCode, + NSString *message, +// On 64-bit simulators, va_list is not a pointer, so cannot be marked nullable +// See: http://stackoverflow.com/q/29095469 +#if __LP64__ && TARGET_OS_SIMULATOR || TARGET_OS_OSX + va_list args_ptr +#else + va_list _Nullable args_ptr +#endif +); + +/** + * The following functions accept the following parameters in order: + * (required) service name of type GULLoggerService. + * (required) message code starting from "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * See go/firebase-log-proposal for details. + * (required) message string which can be a format string. + * (optional) the list of arguments to substitute into the format string. + * Example usage: + * GULLogError(kGULLoggerCore, @"I-COR000001", @"Configuration of %@ failed.", app.name); + */ +extern void GULLogError(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogWarning(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogNotice(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogInfo(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogDebug(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +@interface GULLoggerWrapper : NSObject + +/** + * Objective-C wrapper for GULLogBasic to allow weak linking to GULLogger + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ + ++ (void)logWithLevel:(GULLoggerLevel)level + withService:(GULLoggerService)service + withCode:(NSString *)messageCode + withMessage:(NSString *)message + withArgs:(va_list)args; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseCoreDiagnosticsInterop/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h b/ios/Pods/FirebaseCore/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h similarity index 100% rename from ios/Pods/FirebaseCoreDiagnosticsInterop/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h rename to ios/Pods/FirebaseCore/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h diff --git a/ios/Pods/FirebaseCoreDiagnosticsInterop/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h b/ios/Pods/FirebaseCore/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h similarity index 100% rename from ios/Pods/FirebaseCoreDiagnosticsInterop/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h rename to ios/Pods/FirebaseCore/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h diff --git a/ios/Pods/FirebaseCore/README.md b/ios/Pods/FirebaseCore/README.md index 1747cca7..1d9f0f67 100644 --- a/ios/Pods/FirebaseCore/README.md +++ b/ios/Pods/FirebaseCore/README.md @@ -2,14 +2,20 @@ [![License](https://img.shields.io/cocoapods/l/Firebase.svg?style=flat)](https://cocoapods.org/pods/Firebase) [![Platform](https://img.shields.io/cocoapods/p/Firebase.svg?style=flat)](https://cocoapods.org/pods/Firebase) +[![Actions Status][gh-abtesting-badge]][gh-actions] [![Actions Status][gh-auth-badge]][gh-actions] [![Actions Status][gh-core-badge]][gh-actions] +[![Actions Status][gh-crashlytics-badge]][gh-actions] +[![Actions Status][gh-database-badge]][gh-actions] [![Actions Status][gh-datatransport-badge]][gh-actions] [![Actions Status][gh-dynamiclinks-badge]][gh-actions] [![Actions Status][gh-firebasepod-badge]][gh-actions] [![Actions Status][gh-firestore-badge]][gh-actions] +[![Actions Status][gh-functions-badge]][gh-actions] +[![Actions Status][gh-inappmessaging-badge]][gh-actions] [![Actions Status][gh-interop-badge]][gh-actions] [![Actions Status][gh-messaging-badge]][gh-actions] +[![Actions Status][gh-remoteconfig-badge]][gh-actions] [![Actions Status][gh-storage-badge]][gh-actions] [![Actions Status][gh-symbolcollision-badge]][gh-actions] [![Actions Status][gh-zip-badge]][gh-actions] @@ -92,7 +98,7 @@ Instructions for installing binary frameworks via To develop Firebase software in this repository, ensure that you have at least the following software: - * Xcode 10.1 (or later) + * Xcode 10.3 (or later) * CocoaPods 1.7.2 (or later) * [CocoaPods generate](https://github.com/square/cocoapods-generate) @@ -123,6 +129,10 @@ Firestore has a self contained Xcode project. See See [AddNewPod.md](AddNewPod.md). +### Managing Headers and Imports + +See [HeadersImports.md](HeadersImports.md). + ### Code Formatting To ensure that the code is formatted consistently, run the script @@ -130,21 +140,13 @@ To ensure that the code is formatted consistently, run the script before creating a PR. Travis will verify that any code changes are done in a style compliant way. Install -`clang-format` and `swiftformat`. -These commands will get the right versions: +`clang-format` and `swiftformat`: ``` -brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/c6f1cbd/Formula/clang-format.rb -brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/c13eda8/Formula/swiftformat.rb +brew install clang-format +brew install swiftformat ``` -Note: if you already have a newer version of these installed you may need to -`brew switch` to this version. - -To update this section, find the versions of clang-format and swiftformat.rb to -match the versions in the CI failure logs -[here](https://github.com/Homebrew/homebrew-core/tree/master/Formula). - ### Running Unit Tests Select a scheme and press Command-u to build a component and run its unit tests. @@ -167,12 +169,7 @@ files without real values, but can be replaced with real plist files. To get you 2. Create a new Firebase project, if you don't already have one 3. For each sample app you want to test, create a new Firebase app with the sample app's bundle identifier (e.g. `com.google.Database-Example`) -4. Download the resulting `GoogleService-Info.plist` and replace the appropriate dummy plist file -(e.g. in [Example/Database/App/](Example/Database/App/)); - -Some sample apps like Firebase Messaging ([Example/Messaging/App](Example/Messaging/App)) require -special Apple capabilities, and you will have to change the sample app to use a unique bundle -identifier that you can control in your own Apple Developer account. +4. Download the resulting `GoogleService-Info.plist` and add it to the Xcode project. ## Specific Component Instructions See the sections below for any special instructions for those components. @@ -185,8 +182,16 @@ building and running the FirebaseAuth pod along with various samples and tests. ### Firebase Database -To run the Database Integration tests, make your database authentication rules -[public](https://firebase.google.com/docs/database/security/quickstart). +The Firebase Database Integration tests can be run against a locally running Database Emulator +or against a production instance. + +To run against a local emulator instance, invoke `./scripts/run_database_emulator.sh start` before +running the integration test. + +To run against a production instance, provide a valid GoogleServices-Info.plist and copy it to +`FirebaseDatabase/Tests/Resources/GoogleService-Info.plist`. Your Security Rule must be set to +[public](https://firebase.google.com/docs/database/security/quickstart) while your tests are +running. ### Firebase Storage @@ -274,14 +279,20 @@ Your use of Firebase is governed by the [Terms of Service for Firebase Services](https://firebase.google.com/terms/). [gh-actions]: https://github.com/firebase/firebase-ios-sdk/actions +[gh-abtesting-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/abtesting/badge.svg [gh-auth-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/auth/badge.svg [gh-core-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/core/badge.svg +[gh-crashlytics-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/crashlytics/badge.svg +[gh-database-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/database/badge.svg [gh-datatransport-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/datatransport/badge.svg [gh-dynamiclinks-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/dynamiclinks/badge.svg [gh-firebasepod-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/firebasepod/badge.svg [gh-firestore-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/firestore/badge.svg +[gh-functions-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/functions/badge.svg +[gh-inappmessaging-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/inappmessaging/badge.svg [gh-interop-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/interop/badge.svg [gh-messaging-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/messaging/badge.svg +[gh-remoteconfig-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/remoteconfig/badge.svg [gh-storage-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/storage/badge.svg [gh-symbolcollision-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/symbolcollision/badge.svg [gh-zip-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/zip/badge.svg diff --git a/ios/Pods/FirebaseCoreDiagnostics/Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m b/ios/Pods/FirebaseCoreDiagnostics/Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m index 87d57c4e..85f6b548 100644 --- a/ios/Pods/FirebaseCoreDiagnostics/Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m +++ b/ios/Pods/FirebaseCoreDiagnostics/Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m @@ -17,17 +17,14 @@ #import #include -#import -#import -#import -#import +#import "GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h" -#import -#import -#import +#import "GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h" +#import "GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h" +#import "GoogleUtilities/Logger/Private/GULLogger.h" -#import -#import +#import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h" +#import "Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h" #import #import diff --git a/ios/Pods/FirebaseCoreDiagnostics/GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h b/ios/Pods/FirebaseCoreDiagnostics/GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h new file mode 100644 index 00000000..b5f6bc94 --- /dev/null +++ b/ios/Pods/FirebaseCoreDiagnostics/GoogleDataTransport/GDTCORLibrary/Internal/GoogleDataTransportInternal.h @@ -0,0 +1,22 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// An umbrella header, for any other libraries in this repo to access Firebase Public and Private +// headers. Any package manager complexity should be handled here. + +#if SWIFT_PACKAGE +@import GoogleDataTransport; +#else +#import +#endif diff --git a/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h b/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h new file mode 100644 index 00000000..2fb16226 --- /dev/null +++ b/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h @@ -0,0 +1,47 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@interface GULAppEnvironmentUtil : NSObject + +/// Indicates whether the app is from Apple Store or not. Returns NO if the app is on simulator, +/// development environment or sideloaded. ++ (BOOL)isFromAppStore; + +/// Indicates whether the app is a Testflight app. Returns YES if the app has sandbox receipt. +/// Returns NO otherwise. ++ (BOOL)isAppStoreReceiptSandbox; + +/// Indicates whether the app is on simulator or not at runtime depending on the device +/// architecture. ++ (BOOL)isSimulator; + +/// The current device model. Returns an empty string if device model cannot be retrieved. ++ (NSString *)deviceModel; + +/// The current operating system version. Returns an empty string if the system version cannot be +/// retrieved. ++ (NSString *)systemVersion; + +/// Indicates whether it is running inside an extension or an app. ++ (BOOL)isAppExtension; + +/// @return Returns @YES when is run on iOS version greater or equal to 7.0 ++ (BOOL)isIOS7OrHigher DEPRECATED_MSG_ATTRIBUTE( + "Always `YES` because only iOS 8 and higher supported. The method will be removed."); + +@end diff --git a/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h b/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h new file mode 100644 index 00000000..9432dfc0 --- /dev/null +++ b/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h @@ -0,0 +1,49 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Stores either a date or a dictionary to a specified file. +@interface GULHeartbeatDateStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@property(nonatomic, readonly) NSURL *fileURL; + +/** + * Default initializer. + * @param fileName The name of the file to store the date information. + * exist, it will be created if needed. + */ +- (instancetype)initWithFileName:(NSString *)fileName; + +/** + * Reads the date from the specified file for the given tag. + * @return Returns date if exists, otherwise `nil`. + */ +- (nullable NSDate *)heartbeatDateForTag:(NSString *)tag; + +/** + * Saves the date for the specified tag in the specified file. + * @return YES on success, NO otherwise. + */ +- (BOOL)setHearbeatDate:(NSDate *)date forTag:(NSString *)tag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULKeychainStorage.h b/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULKeychainStorage.h new file mode 100644 index 00000000..dc01a836 --- /dev/null +++ b/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULKeychainStorage.h @@ -0,0 +1,79 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; + +NS_ASSUME_NONNULL_BEGIN + +/// The class provides a convenient abstraction on top of the iOS Keychain API to save data. +@interface GULKeychainStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Initializes the keychain storage with Keychain Service name. + * @param service A Keychain Service name that will be used to store and retrieve objects. See also + * `kSecAttrService`. + */ +- (instancetype)initWithService:(NSString *)service; + +/** + * Get an object by key. + * @param key The key. + * @param objectClass The expected object class required by `NSSecureCoding`. + * @param accessGroup The Keychain Access Group. + * + * @return Returns a promise. It is resolved with an object stored by key if exists. It is resolved + * with `nil` when the object not found. It fails on a Keychain error. + */ +- (FBLPromise> *)getObjectForKey:(NSString *)key + objectClass:(Class)objectClass + accessGroup:(nullable NSString *)accessGroup; + +/** + * Saves the given object by the given key. + * @param object The object to store. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)setObject:(id)object + forKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +/** + * Removes the object by the given key. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)removeObjectForKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +#if TARGET_OS_OSX +/// If not `nil`, then only this keychain will be used to save and read data (see +/// `kSecMatchSearchList` and `kSecUseKeychain`. It is mostly intended to be used by unit tests. +@property(nonatomic, nullable) SecKeychainRef keychainRef; +#endif // TARGET_OSX + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULKeychainUtils.h b/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULKeychainUtils.h new file mode 100644 index 00000000..de4bef2f --- /dev/null +++ b/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULKeychainUtils.h @@ -0,0 +1,61 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXPORT NSString *const kGULKeychainUtilsErrorDomain; + +/// Helper functions to access Keychain. +@interface GULKeychainUtils : NSObject + +/** Fetches a keychain item data matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemCopyMatching` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns Data for the first Keychain Item matching the provided query or `nil` if there is not + * such an item (`outError` will be `nil` in this case) or an error occurred. + */ ++ (nullable NSData *)getItemWithQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Stores data to a Keychain Item matching to the provided query. An existing Keychain Item + * matching the query parameters will be updated or a new will be created. + * @param item A Keychain Item data to store. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemAdd` and + * `SecItemUpdate` for details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` when data was successfully stored, `NO` otherwise. + */ ++ (BOOL)setItem:(NSData *)item + withQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Removes a Keychain Item matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemDelete` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` if the item was removed successfully or doesn't exist, `NO` otherwise. + */ ++ (BOOL)removeItemWithQuery:(NSDictionary *)query error:(NSError *_Nullable *_Nullable)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULSecureCoding.h b/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULSecureCoding.h new file mode 100644 index 00000000..8484b395 --- /dev/null +++ b/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Environment/Private/GULSecureCoding.h @@ -0,0 +1,36 @@ +// Copyright 2019 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class wraps `NSKeyedArchiver` and `NSKeyedUnarchiver` API to provide a unified secure coding + * methods for iOS versions before and after 11. + */ +@interface GULSecureCoding : NSObject + ++ (nullable id)unarchivedObjectOfClasses:(NSSet *)classes + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable id)unarchivedObjectOfClass:(Class)class + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable NSData *)archivedDataWithRootObject:(id)object error:(NSError **)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Logger/Private/GULLogger.h b/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Logger/Private/GULLogger.h new file mode 100644 index 00000000..1146ee23 --- /dev/null +++ b/ios/Pods/FirebaseCoreDiagnostics/GoogleUtilities/Logger/Private/GULLogger.h @@ -0,0 +1,163 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#if SWIFT_PACKAGE +@import GoogleUtilities_Logger; +#else +#import +#endif + +NS_ASSUME_NONNULL_BEGIN + +/** + * The services used in the logger. + */ +typedef NSString *const GULLoggerService; + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/** + * Initialize GULLogger. + */ +extern void GULLoggerInitializeASL(void); + +/** + * Override log level to Debug. + */ +void GULLoggerForceDebug(void); + +/** + * Turn on logging to STDERR. + */ +extern void GULLoggerEnableSTDERR(void); + +/** + * Changes the default logging level of GULLoggerLevelNotice to a user-specified level. + * The default level cannot be set above GULLoggerLevelNotice if the app is running from App Store. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern void GULSetLoggerLevel(GULLoggerLevel loggerLevel); + +/** + * Checks if the specified logger level is loggable given the current settings. + * (required) log level (one of the GULLoggerLevel enum values). + */ +extern BOOL GULIsLoggableLevel(GULLoggerLevel loggerLevel); + +/** + * Register version to include in logs. + * (required) version + */ +extern void GULLoggerRegisterVersion(const char *version); + +/** + * Logs a message to the Xcode console and the device log. If running from AppStore, will + * not log any messages with a level higher than GULLoggerLevelNotice to avoid log spamming. + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ +extern void GULLogBasic(GULLoggerLevel level, + GULLoggerService service, + BOOL forceLog, + NSString *messageCode, + NSString *message, +// On 64-bit simulators, va_list is not a pointer, so cannot be marked nullable +// See: http://stackoverflow.com/q/29095469 +#if __LP64__ && TARGET_OS_SIMULATOR || TARGET_OS_OSX + va_list args_ptr +#else + va_list _Nullable args_ptr +#endif +); + +/** + * The following functions accept the following parameters in order: + * (required) service name of type GULLoggerService. + * (required) message code starting from "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * See go/firebase-log-proposal for details. + * (required) message string which can be a format string. + * (optional) the list of arguments to substitute into the format string. + * Example usage: + * GULLogError(kGULLoggerCore, @"I-COR000001", @"Configuration of %@ failed.", app.name); + */ +extern void GULLogError(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogWarning(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogNotice(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogInfo(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); +extern void GULLogDebug(GULLoggerService service, + BOOL force, + NSString *messageCode, + NSString *message, + ...) NS_FORMAT_FUNCTION(4, 5); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +@interface GULLoggerWrapper : NSObject + +/** + * Objective-C wrapper for GULLogBasic to allow weak linking to GULLogger + * (required) log level (one of the GULLoggerLevel enum values). + * (required) service name of type GULLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ + ++ (void)logWithLevel:(GULLoggerLevel)level + withService:(GULLoggerService)service + withCode:(NSString *)messageCode + withMessage:(NSString *)message + withArgs:(va_list)args; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseCoreDiagnostics/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h b/ios/Pods/FirebaseCoreDiagnostics/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h new file mode 100644 index 00000000..69c40721 --- /dev/null +++ b/ios/Pods/FirebaseCoreDiagnostics/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsData.h @@ -0,0 +1,61 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** If present, is a BOOL wrapped in an NSNumber. */ +#define kFIRCDIsDataCollectionDefaultEnabledKey @"FIRCDIsDataCollectionDefaultEnabledKey" + +/** If present, is an int32_t wrapped in an NSNumber. */ +#define kFIRCDConfigurationTypeKey @"FIRCDConfigurationTypeKey" + +/** If present, is an NSString. */ +#define kFIRCDSdkNameKey @"FIRCDSdkNameKey" + +/** If present, is an NSString. */ +#define kFIRCDSdkVersionKey @"FIRCDSdkVersionKey" + +/** If present, is an int32_t wrapped in an NSNumber. */ +#define kFIRCDllAppsCountKey @"FIRCDllAppsCountKey" + +/** If present, is an NSString. */ +#define kFIRCDGoogleAppIDKey @"FIRCDGoogleAppIDKey" + +/** If present, is an NSString. */ +#define kFIRCDBundleIDKey @"FIRCDBundleID" + +/** If present, is a BOOL wrapped in an NSNumber. */ +#define kFIRCDUsingOptionsFromDefaultPlistKey @"FIRCDUsingOptionsFromDefaultPlistKey" + +/** If present, is an NSString. */ +#define kFIRCDLibraryVersionIDKey @"FIRCDLibraryVersionIDKey" + +/** If present, is an NSString. */ +#define kFIRCDFirebaseUserAgentKey @"FIRCDFirebaseUserAgentKey" + +/** Defines the interface of a data object needed to log diagnostics data. */ +@protocol FIRCoreDiagnosticsData + +@required + +/** A dictionary containing data (non-exhaustive) to be logged in diagnostics. */ +@property(nonatomic) NSDictionary *diagnosticObjects; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Private/GDTCORDataFuture.h b/ios/Pods/FirebaseCoreDiagnostics/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h similarity index 58% rename from ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Private/GDTCORDataFuture.h rename to ios/Pods/FirebaseCoreDiagnostics/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h index 685cf2ba..2b0eb710 100644 --- a/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Private/GDTCORDataFuture.h +++ b/ios/Pods/FirebaseCoreDiagnostics/Interop/CoreDiagnostics/Public/FIRCoreDiagnosticsInterop.h @@ -16,20 +16,18 @@ #import +#import "FIRCoreDiagnosticsData.h" + NS_ASSUME_NONNULL_BEGIN -/** This class represents a future data object, determined at instantiation time. */ -@interface GDTCORDataFuture : NSObject +/** Allows the interoperation of FirebaseCore and FirebaseCoreDiagnostics. */ +@protocol FIRCoreDiagnosticsInterop -/** If not nil, this data future was instantiated with this file URL. */ -@property(nullable, readonly, nonatomic) NSURL *fileURL; - -/** Initializes an instance with the given the fileURL. +/** Sends the given diagnostics data. * - * @param fileURL The fileURL containing the data to return in -data. - * @return An instance of this class. + * @param diagnosticsData The diagnostics data object to send. */ -- (instancetype)initWithFileURL:(NSURL *)fileURL; ++ (void)sendDiagnosticsData:(id)diagnosticsData; @end diff --git a/ios/Pods/FirebaseCoreDiagnostics/README.md b/ios/Pods/FirebaseCoreDiagnostics/README.md index 1747cca7..1d9f0f67 100644 --- a/ios/Pods/FirebaseCoreDiagnostics/README.md +++ b/ios/Pods/FirebaseCoreDiagnostics/README.md @@ -2,14 +2,20 @@ [![License](https://img.shields.io/cocoapods/l/Firebase.svg?style=flat)](https://cocoapods.org/pods/Firebase) [![Platform](https://img.shields.io/cocoapods/p/Firebase.svg?style=flat)](https://cocoapods.org/pods/Firebase) +[![Actions Status][gh-abtesting-badge]][gh-actions] [![Actions Status][gh-auth-badge]][gh-actions] [![Actions Status][gh-core-badge]][gh-actions] +[![Actions Status][gh-crashlytics-badge]][gh-actions] +[![Actions Status][gh-database-badge]][gh-actions] [![Actions Status][gh-datatransport-badge]][gh-actions] [![Actions Status][gh-dynamiclinks-badge]][gh-actions] [![Actions Status][gh-firebasepod-badge]][gh-actions] [![Actions Status][gh-firestore-badge]][gh-actions] +[![Actions Status][gh-functions-badge]][gh-actions] +[![Actions Status][gh-inappmessaging-badge]][gh-actions] [![Actions Status][gh-interop-badge]][gh-actions] [![Actions Status][gh-messaging-badge]][gh-actions] +[![Actions Status][gh-remoteconfig-badge]][gh-actions] [![Actions Status][gh-storage-badge]][gh-actions] [![Actions Status][gh-symbolcollision-badge]][gh-actions] [![Actions Status][gh-zip-badge]][gh-actions] @@ -92,7 +98,7 @@ Instructions for installing binary frameworks via To develop Firebase software in this repository, ensure that you have at least the following software: - * Xcode 10.1 (or later) + * Xcode 10.3 (or later) * CocoaPods 1.7.2 (or later) * [CocoaPods generate](https://github.com/square/cocoapods-generate) @@ -123,6 +129,10 @@ Firestore has a self contained Xcode project. See See [AddNewPod.md](AddNewPod.md). +### Managing Headers and Imports + +See [HeadersImports.md](HeadersImports.md). + ### Code Formatting To ensure that the code is formatted consistently, run the script @@ -130,21 +140,13 @@ To ensure that the code is formatted consistently, run the script before creating a PR. Travis will verify that any code changes are done in a style compliant way. Install -`clang-format` and `swiftformat`. -These commands will get the right versions: +`clang-format` and `swiftformat`: ``` -brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/c6f1cbd/Formula/clang-format.rb -brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/c13eda8/Formula/swiftformat.rb +brew install clang-format +brew install swiftformat ``` -Note: if you already have a newer version of these installed you may need to -`brew switch` to this version. - -To update this section, find the versions of clang-format and swiftformat.rb to -match the versions in the CI failure logs -[here](https://github.com/Homebrew/homebrew-core/tree/master/Formula). - ### Running Unit Tests Select a scheme and press Command-u to build a component and run its unit tests. @@ -167,12 +169,7 @@ files without real values, but can be replaced with real plist files. To get you 2. Create a new Firebase project, if you don't already have one 3. For each sample app you want to test, create a new Firebase app with the sample app's bundle identifier (e.g. `com.google.Database-Example`) -4. Download the resulting `GoogleService-Info.plist` and replace the appropriate dummy plist file -(e.g. in [Example/Database/App/](Example/Database/App/)); - -Some sample apps like Firebase Messaging ([Example/Messaging/App](Example/Messaging/App)) require -special Apple capabilities, and you will have to change the sample app to use a unique bundle -identifier that you can control in your own Apple Developer account. +4. Download the resulting `GoogleService-Info.plist` and add it to the Xcode project. ## Specific Component Instructions See the sections below for any special instructions for those components. @@ -185,8 +182,16 @@ building and running the FirebaseAuth pod along with various samples and tests. ### Firebase Database -To run the Database Integration tests, make your database authentication rules -[public](https://firebase.google.com/docs/database/security/quickstart). +The Firebase Database Integration tests can be run against a locally running Database Emulator +or against a production instance. + +To run against a local emulator instance, invoke `./scripts/run_database_emulator.sh start` before +running the integration test. + +To run against a production instance, provide a valid GoogleServices-Info.plist and copy it to +`FirebaseDatabase/Tests/Resources/GoogleService-Info.plist`. Your Security Rule must be set to +[public](https://firebase.google.com/docs/database/security/quickstart) while your tests are +running. ### Firebase Storage @@ -274,14 +279,20 @@ Your use of Firebase is governed by the [Terms of Service for Firebase Services](https://firebase.google.com/terms/). [gh-actions]: https://github.com/firebase/firebase-ios-sdk/actions +[gh-abtesting-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/abtesting/badge.svg [gh-auth-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/auth/badge.svg [gh-core-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/core/badge.svg +[gh-crashlytics-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/crashlytics/badge.svg +[gh-database-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/database/badge.svg [gh-datatransport-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/datatransport/badge.svg [gh-dynamiclinks-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/dynamiclinks/badge.svg [gh-firebasepod-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/firebasepod/badge.svg [gh-firestore-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/firestore/badge.svg +[gh-functions-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/functions/badge.svg +[gh-inappmessaging-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/inappmessaging/badge.svg [gh-interop-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/interop/badge.svg [gh-messaging-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/messaging/badge.svg +[gh-remoteconfig-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/remoteconfig/badge.svg [gh-storage-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/storage/badge.svg [gh-symbolcollision-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/symbolcollision/badge.svg [gh-zip-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/zip/badge.svg diff --git a/ios/Pods/FirebaseCoreDiagnosticsInterop/LICENSE b/ios/Pods/FirebaseCoreDiagnosticsInterop/LICENSE deleted file mode 100644 index d6456956..00000000 --- a/ios/Pods/FirebaseCoreDiagnosticsInterop/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/ios/Pods/FirebaseCoreDiagnosticsInterop/README.md b/ios/Pods/FirebaseCoreDiagnosticsInterop/README.md deleted file mode 100644 index 3ddc8fbd..00000000 --- a/ios/Pods/FirebaseCoreDiagnosticsInterop/README.md +++ /dev/null @@ -1,251 +0,0 @@ -# Firebase iOS Open Source Development [![Build Status](https://travis-ci.org/firebase/firebase-ios-sdk.svg?branch=master)](https://travis-ci.org/firebase/firebase-ios-sdk) - -This repository contains a subset of the Firebase iOS SDK source. It currently -includes FirebaseCore, FirebaseABTesting, FirebaseAuth, FirebaseDatabase, -FirebaseFirestore, FirebaseFunctions, FirebaseInstanceID, FirebaseInAppMessaging, -FirebaseInAppMessagingDisplay, FirebaseMessaging, FirebaseRemoteConfig, and -FirebaseStorage. - -The repository also includes GoogleUtilities source. The -[GoogleUtilities](GoogleUtilities/README.md) pod is -a set of utilities used by Firebase and other Google products. - -Firebase is an app development platform with tools to help you build, grow and -monetize your app. More information about Firebase can be found at -[https://firebase.google.com](https://firebase.google.com). - -## Installation - -See the three subsections for details about three different installation methods. -1. [Standard pod install](README.md#standard-pod-install) -1. [Installing from the GitHub repo](README.md#installing-from-github) -1. [Experimental Carthage](README.md#carthage-ios-only) - -### Standard pod install - -Go to -[https://firebase.google.com/docs/ios/setup](https://firebase.google.com/docs/ios/setup). - -### Installing from GitHub - -For releases starting with 5.0.0, the source for each release is also deployed -to CocoaPods master and available via standard -[CocoaPods Podfile syntax](https://guides.cocoapods.org/syntax/podfile.html#pod). - -These instructions can be used to access the Firebase repo at other branches, -tags, or commits. - -#### Background - -See -[the Podfile Syntax Reference](https://guides.cocoapods.org/syntax/podfile.html#pod) -for instructions and options about overriding pod source locations. - -#### Accessing Firebase Source Snapshots - -All of the official releases are tagged in this repo and available via CocoaPods. To access a local -source snapshot or unreleased branch, use Podfile directives like the following: - -To access FirebaseFirestore via a branch: -``` -pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master' -pod 'FirebaseFirestore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master' -``` - -To access FirebaseMessaging via a checked out version of the firebase-ios-sdk repo do: - -``` -pod 'FirebaseCore', :path => '/path/to/firebase-ios-sdk' -pod 'FirebaseMessaging', :path => '/path/to/firebase-ios-sdk' -``` - -### Carthage (iOS only) - -Instructions for the experimental Carthage distribution are at -[Carthage](Carthage.md). - -### Rome - -Instructions for installing binary frameworks via -[Rome](https://github.com/CocoaPods/Rome) are at [Rome](Rome.md). - -## Development - -To develop Firebase software in this repository, ensure that you have at least -the following software: - - * Xcode 10.1 (or later) - * CocoaPods 1.7.2 (or later) - * [CocoaPods generate](https://github.com/square/cocoapods-generate) - -For the pod that you want to develop: - -`pod gen Firebase{name here}.podspec --local-sources=./ --auto-open --platforms=ios` - -Note: If the CocoaPods cache is out of date, you may need to run -`pod repo update` before the `pod gen` command. - -Note: Set the `--platforms` option to `macos` or `tvos` to develop/test for -those platforms. Since 10.2, Xcode does not properly handle multi-platform -CocoaPods workspaces. - -Firestore has a self contained Xcode project. See -[Firestore/README.md](Firestore/README.md). - -### Development for Catalyst -* `pod gen {name here}.podspec --local-sources=./ --auto-open --platforms=ios` -* Check the Mac box in the App-iOS Build Settings -* Sign the App in the Settings Signing & Capabilities tab -* Click Pods in the Project Manager -* Add Signing to the iOS host app and unit test targets -* Select the Unit-unit scheme -* Run it to build and test - -### Adding a New Firebase Pod - -See [AddNewPod.md](AddNewPod.md). - -### Code Formatting - -To ensure that the code is formatted consistently, run the script -[./scripts/style.sh](https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/style.sh) -before creating a PR. - -Travis will verify that any code changes are done in a style compliant way. Install -`clang-format` and `swiftformat`. -These commands will get the right versions: - -``` -brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/e3496d9/Formula/clang-format.rb -brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/7963c3d/Formula/swiftformat.rb -``` - -Note: if you already have a newer version of these installed you may need to -`brew switch` to this version. - -To update this section, find the versions of clang-format and swiftformat.rb to -match the versions in the CI failure logs -[here](https://github.com/Homebrew/homebrew-core/tree/master/Formula). - -### Running Unit Tests - -Select a scheme and press Command-u to build a component and run its unit tests. - -#### Viewing Code Coverage - -First, make sure that [xcov](https://github.com/nakiostudio/xcov) is installed with `gem install xcov`. - -After running the `AllUnitTests_iOS` scheme in Xcode, execute -`xcov --workspace Firebase.xcworkspace --scheme AllUnitTests_iOS --output_directory xcov_output` -at Example/ in the terminal. This will aggregate the coverage, and you can run `open xcov_output/index.html` to see the results. - -### Running Sample Apps -In order to run the sample apps and integration tests, you'll need valid -`GoogleService-Info.plist` files for those samples. The Firebase Xcode project contains dummy plist -files without real values, but can be replaced with real plist files. To get your own -`GoogleService-Info.plist` files: - -1. Go to the [Firebase Console](https://console.firebase.google.com/) -2. Create a new Firebase project, if you don't already have one -3. For each sample app you want to test, create a new Firebase app with the sample app's bundle -identifier (e.g. `com.google.Database-Example`) -4. Download the resulting `GoogleService-Info.plist` and replace the appropriate dummy plist file -(e.g. in [Example/Database/App/](Example/Database/App/)); - -Some sample apps like Firebase Messaging ([Example/Messaging/App](Example/Messaging/App)) require -special Apple capabilities, and you will have to change the sample app to use a unique bundle -identifier that you can control in your own Apple Developer account. - -## Specific Component Instructions -See the sections below for any special instructions for those components. - -### Firebase Auth - -If you're doing specific Firebase Auth development, see -[the Auth Sample README](Example/Auth/README.md) for instructions about -building and running the FirebaseAuth pod along with various samples and tests. - -### Firebase Database - -To run the Database Integration tests, make your database authentication rules -[public](https://firebase.google.com/docs/database/security/quickstart). - -### Firebase Storage - -To run the Storage Integration tests, follow the instructions in -[FIRStorageIntegrationTests.m](Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m). - -#### Push Notifications - -Push notifications can only be delivered to specially provisioned App IDs in the developer portal. -In order to actually test receiving push notifications, you will need to: - -1. Change the bundle identifier of the sample app to something you own in your Apple Developer -account, and enable that App ID for push notifications. -2. You'll also need to -[upload your APNs Provider Authentication Key or certificate to the Firebase Console](https://firebase.google.com/docs/cloud-messaging/ios/certs) -at **Project Settings > Cloud Messaging > [Your Firebase App]**. -3. Ensure your iOS device is added to your Apple Developer portal as a test device. - -#### iOS Simulator - -The iOS Simulator cannot register for remote notifications, and will not receive push notifications. -In order to receive push notifications, you'll have to follow the steps above and run the app on a -physical device. - -## Community Supported Efforts - -We've seen an amazing amount of interest and contributions to improve the Firebase SDKs, and we are -very grateful! We'd like to empower as many developers as we can to be able to use Firebase and -participate in the Firebase community. - -### tvOS, macOS, and Catalyst -Thanks to contributions from the community, FirebaseABTesting, FirebaseAuth, FirebaseCore, -FirebaseDatabase, FirebaseMessaging, FirebaseFirestore, -FirebaseFunctions, FirebaseRemoteConfig, and FirebaseStorage now compile, run unit tests, and work on -tvOS, macOS, and Catalyst. - -For tvOS, checkout the [Sample](Example/tvOSSample). - -Keep in mind that macOS, Catalyst and tvOS are not officially supported by Firebase, and this -repository is actively developed primarily for iOS. While we can catch basic unit test issues with -Travis, there may be some changes where the SDK no longer works as expected on macOS or tvOS. If you -encounter this, please [file an issue](https://github.com/firebase/firebase-ios-sdk/issues). - -To install, add a subset of the following to the Podfile: - -``` -pod 'Firebase/ABTesting' -pod 'Firebase/Auth' -pod 'Firebase/Database' -pod 'Firebase/Firestore' -pod 'Firebase/Functions' -pod 'Firebase/Messaging' -pod 'Firebase/RemoteConfig' -pod 'Firebase/Storage' -``` - -#### Additional Catalyst Notes - -* FirebaseAuth and FirebaseMessaging require adding `Keychain Sharing Capability` -to Build Settings. -* FirebaseFirestore requires signing the -[gRPC Resource target](https://github.com/firebase/firebase-ios-sdk/issues/3500#issuecomment-518741681). - -## Roadmap - -See [Roadmap](ROADMAP.md) for more about the Firebase iOS SDK Open Source -plans and directions. - -## Contributing - -See [Contributing](CONTRIBUTING.md) for more information on contributing to the Firebase -iOS SDK. - -## License - -The contents of this repository is licensed under the -[Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0). - -Your use of Firebase is governed by the -[Terms of Service for Firebase Services](https://firebase.google.com/terms/). diff --git a/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRAppInternal.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRAppInternal.h new file mode 100644 index 00000000..9a0c943d --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRAppInternal.h @@ -0,0 +1,173 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if SWIFT_PACKAGE +// TODO(paulb777): Investigate if there's a common strategy for both Cocoapods and Swift PM. +#import "FIRApp.h" +#else +#import +#endif + +// The has_include is a workaround so the old IID needed for the FIS tests can find FIRErrors.h +#if __has_include("FirebaseCore/Sources/Private/FIRErrors.h") +#import "FirebaseCore/Sources/Private/FIRErrors.h" +#else +#import +#endif + +@class FIRComponentContainer; +@protocol FIRLibrary; + +/** + * The internal interface to FIRApp. This is meant for first-party integrators, who need to receive + * FIRApp notifications, log info about the success or failure of their configuration, and access + * other internal functionality of FIRApp. + * + * TODO(b/28296561): Restructure this header. + */ +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, FIRConfigType) { + FIRConfigTypeCore = 1, + FIRConfigTypeSDK = 2, +}; + +extern NSString *const kFIRDefaultAppName; +extern NSString *const kFIRAppReadyToConfigureSDKNotification; +extern NSString *const kFIRAppDeleteNotification; +extern NSString *const kFIRAppIsDefaultAppKey; +extern NSString *const kFIRAppNameKey; +extern NSString *const kFIRGoogleAppIDKey; + +/** + * The format string for the User Defaults key used for storing the data collection enabled flag. + * This includes formatting to append the Firebase App's name. + */ +extern NSString *const kFIRGlobalAppDataCollectionEnabledDefaultsKeyFormat; + +/** + * The plist key used for storing the data collection enabled flag. + */ +extern NSString *const kFIRGlobalAppDataCollectionEnabledPlistKey; + +/** + * A notification fired containing diagnostic information when SDK errors occur. + */ +extern NSString *const kFIRAppDiagnosticsNotification; + +/** @var FIRAuthStateDidChangeInternalNotification + @brief The name of the @c NSNotificationCenter notification which is posted when the auth state + changes (e.g. a new token has been produced, a user logs in or out). The object parameter of + the notification is a dictionary possibly containing the key: + @c FIRAuthStateDidChangeInternalNotificationTokenKey (the new access token.) If it does not + contain this key it indicates a sign-out event took place. + */ +extern NSString *const FIRAuthStateDidChangeInternalNotification; + +/** @var FIRAuthStateDidChangeInternalNotificationTokenKey + @brief A key present in the dictionary object parameter of the + @c FIRAuthStateDidChangeInternalNotification notification. The value associated with this + key will contain the new access token. + */ +extern NSString *const FIRAuthStateDidChangeInternalNotificationTokenKey; + +/** @var FIRAuthStateDidChangeInternalNotificationAppKey + @brief A key present in the dictionary object parameter of the + @c FIRAuthStateDidChangeInternalNotification notification. The value associated with this + key will contain the FIRApp associated with the auth instance. + */ +extern NSString *const FIRAuthStateDidChangeInternalNotificationAppKey; + +/** @var FIRAuthStateDidChangeInternalNotificationUIDKey + @brief A key present in the dictionary object parameter of the + @c FIRAuthStateDidChangeInternalNotification notification. The value associated with this + key will contain the new user's UID (or nil if there is no longer a user signed in). + */ +extern NSString *const FIRAuthStateDidChangeInternalNotificationUIDKey; + +@interface FIRApp () + +/** + * A flag indicating if this is the default app (has the default app name). + */ +@property(nonatomic, readonly) BOOL isDefaultApp; + +/* + * The container of interop SDKs for this app. + */ +@property(nonatomic) FIRComponentContainer *container; + +/** + * Creates an error for failing to configure a subspec service. This method is called by each + * FIRApp notification listener. + */ ++ (NSError *)errorForSubspecConfigurationFailureWithDomain:(NSString *)domain + errorCode:(FIRErrorCode)code + service:(NSString *)service + reason:(NSString *)reason; +/** + * Checks if the default app is configured without trying to configure it. + */ ++ (BOOL)isDefaultAppConfigured; + +/** + * Registers a given third-party library with the given version number to be reported for + * analytics. + * + * @param name Name of the library. + * @param version Version of the library. + */ ++ (void)registerLibrary:(nonnull NSString *)name withVersion:(nonnull NSString *)version; + +/** + * Registers a given internal library with the given version number to be reported for + * analytics. + * + * @param library Optional parameter for component registration. + * @param name Name of the library. + * @param version Version of the library. + */ ++ (void)registerInternalLibrary:(nonnull Class)library + withName:(nonnull NSString *)name + withVersion:(nonnull NSString *)version; + +/** + * A concatenated string representing all the third-party libraries and version numbers. + */ ++ (NSString *)firebaseUserAgent; + +/** + * Used by each SDK to send logs about SDK configuration status to Clearcut. + * + * @note This API is a no-op, please remove calls to it. + */ +- (void)sendLogsWithServiceName:(NSString *)serviceName + version:(NSString *)version + error:(NSError *)error; + +/** + * Can be used by the unit tests in eack SDK to reset FIRApp. This method is thread unsafe. + */ ++ (void)resetApps; + +/** + * Can be used by the unit tests in each SDK to set customized options. + */ +- (instancetype)initInstanceWithName:(NSString *)name options:(FIROptions *)options; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRComponent.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRComponent.h new file mode 100644 index 00000000..cb51ee70 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRComponent.h @@ -0,0 +1,91 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FIRApp; +@class FIRComponentContainer; + +NS_ASSUME_NONNULL_BEGIN + +/// Provides a system to clean up cached instances returned from the component system. +NS_SWIFT_NAME(ComponentLifecycleMaintainer) +@protocol FIRComponentLifecycleMaintainer +/// The associated app will be deleted, clean up any resources as they are about to be deallocated. +- (void)appWillBeDeleted:(FIRApp *)app; +@end + +typedef _Nullable id (^FIRComponentCreationBlock)(FIRComponentContainer *container, + BOOL *isCacheable) + NS_SWIFT_NAME(ComponentCreationBlock); + +@class FIRDependency; + +/// Describes the timing of instantiation. Note: new components should default to lazy unless there +/// is a strong reason to be eager. +typedef NS_ENUM(NSInteger, FIRInstantiationTiming) { + FIRInstantiationTimingLazy, + FIRInstantiationTimingAlwaysEager, + FIRInstantiationTimingEagerInDefaultApp +} NS_SWIFT_NAME(InstantiationTiming); + +/// A component that can be used from other Firebase SDKs. +NS_SWIFT_NAME(Component) +@interface FIRComponent : NSObject + +/// The protocol describing functionality provided from the Component. +@property(nonatomic, strong, readonly) Protocol *protocol; + +/// The timing of instantiation. +@property(nonatomic, readonly) FIRInstantiationTiming instantiationTiming; + +/// An array of dependencies for the component. +@property(nonatomic, copy, readonly) NSArray *dependencies; + +/// A block to instantiate an instance of the component with the appropriate dependencies. +@property(nonatomic, copy, readonly) FIRComponentCreationBlock creationBlock; + +// There's an issue with long NS_SWIFT_NAMES that causes compilation to fail, disable clang-format +// for the next two methods. +// clang-format off + +/// Creates a component with no dependencies that will be lazily initialized. ++ (instancetype)componentWithProtocol:(Protocol *)protocol + creationBlock:(FIRComponentCreationBlock)creationBlock +NS_SWIFT_NAME(init(_:creationBlock:)); + +/// Creates a component to be registered with the component container. +/// +/// @param protocol - The protocol describing functionality provided by the component. +/// @param instantiationTiming - When the component should be initialized. Use .lazy unless there's +/// a good reason to be instantiated earlier. +/// @param dependencies - Any dependencies the `implementingClass` has, optional or required. +/// @param creationBlock - A block to instantiate the component with a container, and if +/// @return A component that can be registered with the component container. ++ (instancetype)componentWithProtocol:(Protocol *)protocol + instantiationTiming:(FIRInstantiationTiming)instantiationTiming + dependencies:(NSArray *)dependencies + creationBlock:(FIRComponentCreationBlock)creationBlock +NS_SWIFT_NAME(init(_:instantiationTiming:dependencies:creationBlock:)); + +// clang-format on + +/// Unavailable. +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRComponentContainer.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRComponentContainer.h new file mode 100644 index 00000000..db2bafef --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRComponentContainer.h @@ -0,0 +1,50 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#import + +// The has_include is a workaround so the old IID needed for the FIS tests can find the headers. +#if __has_include("FirebaseCore/Sources/Private/FIRComponentType.h") +#import "FirebaseCore/Sources/Private/FIRComponentType.h" +#import "FirebaseCore/Sources/Private/FIRLibrary.h" +#else +#import +#import +#endif + +NS_ASSUME_NONNULL_BEGIN + +/// A type-safe macro to retrieve a component from a container. This should be used to retrieve +/// components instead of using the container directly. +#define FIR_COMPONENT(type, container) \ + [FIRComponentType> instanceForProtocol:@protocol(type) inContainer:container] + +@class FIRApp; + +/// A container that holds different components that are registered via the +/// `registerAsComponentRegistrant:` call. These classes should conform to `FIRComponentRegistrant` +/// in order to properly register components for Core. +NS_SWIFT_NAME(FirebaseComponentContainer) +@interface FIRComponentContainer : NSObject + +/// A weak reference to the app that an instance of the container belongs to. +@property(nonatomic, weak, readonly) FIRApp *app; + +/// Unavailable. Use the `container` property on `FIRApp`. +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRComponentType.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRComponentType.h new file mode 100644 index 00000000..6f2aca7b --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRComponentType.h @@ -0,0 +1,34 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FIRComponentContainer; + +NS_ASSUME_NONNULL_BEGIN + +/// Do not use directly. A placeholder type in order to provide a macro that will warn users of +/// mis-matched protocols. +NS_SWIFT_NAME(ComponentType) +@interface FIRComponentType<__covariant T> : NSObject + +/// Do not use directly. A factory method to retrieve an instance that provides a specific +/// functionality. ++ (T)instanceForProtocol:(Protocol *)protocol inContainer:(FIRComponentContainer *)container; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Private/GDTCORUploadPackage_Private.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRCoreDiagnosticsConnector.h similarity index 54% rename from ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Private/GDTCORUploadPackage_Private.h rename to ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRCoreDiagnosticsConnector.h index 1ab64325..76c0c05f 100644 --- a/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Private/GDTCORUploadPackage_Private.h +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRCoreDiagnosticsConnector.h @@ -14,17 +14,22 @@ * limitations under the License. */ -#import +#import -@interface GDTCORUploadPackage () +@class FIRDiagnosticsData; +@class FIROptions; -/** The storage object this upload package will use to resolve event hashes to files. */ -@property(nonatomic) id storage; +NS_ASSUME_NONNULL_BEGIN -/** A handler that will receive callbacks for certain events. */ -@property(nonatomic) id handler; +/** Connects FIRCore with the CoreDiagnostics library. */ +@interface FIRCoreDiagnosticsConnector : NSObject -/** Checks if the package is expired and calls -packageExpired: on the handler if necessary. */ -- (void)checkIfPackageIsExpired; +/** Logs FirebaseCore related data. + * + * @param options The options object containing data to log. + */ ++ (void)logCoreTelemetryWithOptions:(FIROptions *)options; @end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRDependency.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRDependency.h new file mode 100644 index 00000000..46e9b7ea --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRDependency.h @@ -0,0 +1,45 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// A dependency on a specific protocol's functionality. +NS_SWIFT_NAME(Dependency) +@interface FIRDependency : NSObject + +/// The protocol describing functionality being depended on. +@property(nonatomic, strong, readonly) Protocol *protocol; + +/// A flag to specify if the dependency is required or not. +@property(nonatomic, readonly) BOOL isRequired; + +/// Initializes a dependency that is required. Calls `initWithProtocol:isRequired` with `YES` for +/// the required parameter. +/// Creates a required dependency on the specified protocol's functionality. ++ (instancetype)dependencyWithProtocol:(Protocol *)protocol; + +/// Creates a dependency on the specified protocol's functionality and specify if it's required for +/// the class's functionality. ++ (instancetype)dependencyWithProtocol:(Protocol *)protocol isRequired:(BOOL)required; + +/// Use `dependencyWithProtocol:isRequired:` instead. +- (instancetype)init NS_UNAVAILABLE; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRErrorCode.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRErrorCode.h new file mode 100644 index 00000000..c90d9eec --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRErrorCode.h @@ -0,0 +1,39 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** Error codes in Firebase error domain. */ +typedef NS_ENUM(NSInteger, FIRErrorCode) { + /** + * Unknown error. + */ + FIRErrorCodeUnknown = 0, + /** + * Loading data from the GoogleService-Info.plist file failed. This is a fatal error and should + * not be ignored. Further calls to the API will fail and/or possibly cause crashes. + */ + FIRErrorCodeInvalidPlistFile = -100, + + /** + * Validating the Google App ID format failed. + */ + FIRErrorCodeInvalidAppID = -101, + + /** + * Error code for failing to configure a specific service. It's deprecated, but + * still used after copybara. + */ + FIRErrorCodeConfigFailed = -114, +}; diff --git a/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRErrors.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRErrors.h new file mode 100644 index 00000000..19e47328 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRErrors.h @@ -0,0 +1,24 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#include "FIRErrorCode.h" + +extern NSString *const kFirebaseErrorDomain; +extern NSString *const kFirebaseConfigErrorDomain; +extern NSString *const kFirebaseCoreErrorDomain; +extern NSString *const kFirebasePerfErrorDomain; diff --git a/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRHeartbeatInfo.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRHeartbeatInfo.h new file mode 100644 index 00000000..bfff73e5 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRHeartbeatInfo.h @@ -0,0 +1,39 @@ +// Copyright 2019 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface FIRHeartbeatInfo : NSObject + +// Enum representing the different heartbeat codes. +typedef NS_ENUM(NSInteger, FIRHeartbeatInfoCode) { + FIRHeartbeatInfoCodeNone = 0, + FIRHeartbeatInfoCodeSDK = 1, + FIRHeartbeatInfoCodeGlobal = 2, + FIRHeartbeatInfoCodeCombined = 3, +}; + +/** + * Get heartbeat code requred for the sdk. + * @param heartbeatTag String representing the sdk heartbeat tag. + * @return Heartbeat code indicating whether or not an sdk/global heartbeat + * needs to be sent + */ ++ (FIRHeartbeatInfoCode)heartbeatCodeForTag:(NSString *)heartbeatTag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRLibrary.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRLibrary.h new file mode 100644 index 00000000..e7a9e077 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRLibrary.h @@ -0,0 +1,50 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIRLibrary_h +#define FIRLibrary_h + +#import + +// The has_include is a workaround so the old IID needed for the FIS tests can find the headers. +#if __has_include("FirebaseCore/Sources/Private/FIRComponent.h") +#import "FirebaseCore/Sources/Private/FIRComponent.h" +#else +#import +#endif + +@class FIRApp; + +NS_ASSUME_NONNULL_BEGIN + +/// Provide an interface to register a library for userAgent logging and availability to others. +NS_SWIFT_NAME(Library) +@protocol FIRLibrary + +/// Returns one or more FIRComponents that will be registered in +/// FIRApp and participate in dependency resolution and injection. ++ (NSArray *)componentsToRegister; + +@optional +/// Implement this method if the library needs notifications for lifecycle events. This method is +/// called when the developer calls `FirebaseApp.configure()`. ++ (void)configureWithApp:(FIRApp *)app; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* FIRLibrary_h */ diff --git a/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRLogger.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRLogger.h new file mode 100644 index 00000000..6fd77844 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIRLogger.h @@ -0,0 +1,156 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +#if SWIFT_PACKAGE +// TODO(paulb777): Investigate if there's a common strategy for both Cocoapods and Swift PM. +#import "FIRLoggerLevel.h" +#else +#import +#endif + +NS_ASSUME_NONNULL_BEGIN + +/** + * The Firebase services used in Firebase logger. + */ +typedef NSString *const FIRLoggerService; + +extern FIRLoggerService kFIRLoggerABTesting; +extern FIRLoggerService kFIRLoggerAdMob; +extern FIRLoggerService kFIRLoggerAnalytics; +extern FIRLoggerService kFIRLoggerAuth; +extern FIRLoggerService kFIRLoggerCrash; +extern FIRLoggerService kFIRLoggerCore; +extern FIRLoggerService kFIRLoggerMLKit; +extern FIRLoggerService kFIRLoggerPerf; +extern FIRLoggerService kFIRLoggerRemoteConfig; + +/** + * The key used to store the logger's error count. + */ +extern NSString *const kFIRLoggerErrorCountKey; + +/** + * The key used to store the logger's warning count. + */ +extern NSString *const kFIRLoggerWarningCountKey; + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/** + * Enables or disables Analytics debug mode. + * If set to YES, the logging level for Analytics will be set to FIRLoggerLevelDebug. + * Enabling the debug mode has no effect if the app is running from App Store. + * (required) analytics debug mode flag. + */ +void FIRSetAnalyticsDebugMode(BOOL analyticsDebugMode); + +/** + * Changes the default logging level of FIRLoggerLevelNotice to a user-specified level. + * The default level cannot be set above FIRLoggerLevelNotice if the app is running from App Store. + * (required) log level (one of the FIRLoggerLevel enum values). + */ +void FIRSetLoggerLevel(FIRLoggerLevel loggerLevel); + +/** + * Checks if the specified logger level is loggable given the current settings. + * (required) log level (one of the FIRLoggerLevel enum values). + * (required) whether or not this function is called from the Analytics component. + */ +BOOL FIRIsLoggableLevel(FIRLoggerLevel loggerLevel, BOOL analyticsComponent); + +/** + * Logs a message to the Xcode console and the device log. If running from AppStore, will + * not log any messages with a level higher than FIRLoggerLevelNotice to avoid log spamming. + * (required) log level (one of the FIRLoggerLevel enum values). + * (required) service name of type FIRLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ +extern void FIRLogBasic(FIRLoggerLevel level, + FIRLoggerService service, + NSString *messageCode, + NSString *message, +// On 64-bit simulators, va_list is not a pointer, so cannot be marked nullable +// See: http://stackoverflow.com/q/29095469 +#if __LP64__ && TARGET_OS_SIMULATOR || TARGET_OS_OSX + va_list args_ptr +#else + va_list _Nullable args_ptr +#endif +); + +/** + * The following functions accept the following parameters in order: + * (required) service name of type FIRLoggerService. + * (required) message code starting from "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * See go/firebase-log-proposal for details. + * (required) message string which can be a format string. + * (optional) the list of arguments to substitute into the format string. + * Example usage: + * FIRLogError(kFIRLoggerCore, @"I-COR000001", @"Configuration of %@ failed.", app.name); + */ +extern void FIRLogError(FIRLoggerService service, NSString *messageCode, NSString *message, ...) + NS_FORMAT_FUNCTION(3, 4); +extern void FIRLogWarning(FIRLoggerService service, NSString *messageCode, NSString *message, ...) + NS_FORMAT_FUNCTION(3, 4); +extern void FIRLogNotice(FIRLoggerService service, NSString *messageCode, NSString *message, ...) + NS_FORMAT_FUNCTION(3, 4); +extern void FIRLogInfo(FIRLoggerService service, NSString *messageCode, NSString *message, ...) + NS_FORMAT_FUNCTION(3, 4); +extern void FIRLogDebug(FIRLoggerService service, NSString *messageCode, NSString *message, ...) + NS_FORMAT_FUNCTION(3, 4); + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +@interface FIRLoggerWrapper : NSObject + +/** + * Objective-C wrapper for FIRLogBasic to allow weak linking to FIRLogger + * (required) log level (one of the FIRLoggerLevel enum values). + * (required) service name of type FIRLoggerService. + * (required) message code starting with "I-" which means iOS, followed by a capitalized + * three-character service identifier and a six digit integer message ID that is unique + * within the service. + * An example of the message code is @"I-COR000001". + * (required) message string which can be a format string. + * (optional) variable arguments list obtained from calling va_start, used when message is a format + * string. + */ + ++ (void)logWithLevel:(FIRLoggerLevel)level + withService:(FIRLoggerService)service + withCode:(NSString *)messageCode + withMessage:(NSString *)message + withArgs:(va_list)args; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIROptionsInternal.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIROptionsInternal.h new file mode 100644 index 00000000..acaf4586 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FIROptionsInternal.h @@ -0,0 +1,119 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#if SWIFT_PACKAGE +// TODO(paulb777): Investigate if there's a common strategy for both Cocoapods and Swift PM. +#import "FIROptions.h" +#else +#import +#endif + +/** + * Keys for the strings in the plist file. + */ +extern NSString *const kFIRAPIKey; +extern NSString *const kFIRTrackingID; +extern NSString *const kFIRGoogleAppID; +extern NSString *const kFIRClientID; +extern NSString *const kFIRGCMSenderID; +extern NSString *const kFIRAndroidClientID; +extern NSString *const kFIRDatabaseURL; +extern NSString *const kFIRStorageBucket; +extern NSString *const kFIRBundleID; +extern NSString *const kFIRProjectID; + +/** + * Keys for the plist file name + */ +extern NSString *const kServiceInfoFileName; + +extern NSString *const kServiceInfoFileType; + +/** + * This header file exposes the initialization of FIROptions to internal use. + */ +@interface FIROptions () + +/** + * resetDefaultOptions and initInternalWithOptionsDictionary: are exposed only for unit tests. + */ ++ (void)resetDefaultOptions; + +/** + * Initializes the options with dictionary. The above strings are the keys of the dictionary. + * This is the designated initializer. + */ +- (instancetype)initInternalWithOptionsDictionary:(NSDictionary *)serviceInfoDictionary; + +/** + * defaultOptions and defaultOptionsDictionary are exposed in order to be used in FIRApp and + * other first party services. + */ ++ (FIROptions *)defaultOptions; + ++ (NSDictionary *)defaultOptionsDictionary; + +/** + * Indicates whether or not Analytics collection was explicitly enabled via a plist flag or at + * runtime. + */ +@property(nonatomic, readonly) BOOL isAnalyticsCollectionExplicitlySet; + +/** + * Whether or not Analytics Collection was enabled. Analytics Collection is enabled unless + * explicitly disabled in GoogleService-Info.plist. + */ +@property(nonatomic, readonly) BOOL isAnalyticsCollectionEnabled; + +/** + * Whether or not Analytics Collection was completely disabled. If YES, then + * isAnalyticsCollectionEnabled will be NO. + */ +@property(nonatomic, readonly) BOOL isAnalyticsCollectionDeactivated; + +/** + * The version ID of the client library, e.g. @"1100000". + */ +@property(nonatomic, readonly, copy) NSString *libraryVersionID; + +/** + * The flag indicating whether this object was constructed with the values in the default plist + * file. + */ +@property(nonatomic) BOOL usingOptionsFromDefaultPlist; + +/** + * Whether or not Measurement was enabled. Measurement is enabled unless explicitly disabled in + * GoogleService-Info.plist. + */ +@property(nonatomic, readonly) BOOL isMeasurementEnabled; + +/** + * Whether or not Analytics was enabled in the developer console. + */ +@property(nonatomic, readonly) BOOL isAnalyticsEnabled; + +/** + * Whether or not SignIn was enabled in the developer console. + */ +@property(nonatomic, readonly) BOOL isSignInEnabled; + +/** + * Whether or not editing is locked. This should occur after FIROptions has been set on a FIRApp. + */ +@property(nonatomic, getter=isEditingLocked) BOOL editingLocked; + +@end diff --git a/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FirebaseCoreInternal.h b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FirebaseCoreInternal.h new file mode 100644 index 00000000..93af6cb8 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseCore/Sources/Private/FirebaseCoreInternal.h @@ -0,0 +1,31 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// An umbrella header, for any other libraries in this repo to access Firebase Public and Private +// headers. Any package manager complexity should be handled here. + +#if SWIFT_PACKAGE +@import FirebaseCore; +#else +#import +#endif + +#import "FirebaseCore/Sources/Private/FIRAppInternal.h" +#import "FirebaseCore/Sources/Private/FIRComponent.h" +#import "FirebaseCore/Sources/Private/FIRComponentContainer.h" +#import "FirebaseCore/Sources/Private/FIRDependency.h" +#import "FirebaseCore/Sources/Private/FIRHeartbeatInfo.h" +#import "FirebaseCore/Sources/Private/FIRLibrary.h" +#import "FirebaseCore/Sources/Private/FIRLogger.h" +#import "FirebaseCore/Sources/Private/FIROptionsInternal.h" diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h index 5bc21a11..941aa3dd 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h @@ -16,7 +16,7 @@ #import -#import +#import "FirebaseInstallations/Source/Library/Public/FIRInstallationsErrors.h" @class FIRInstallationsHTTPError; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.m index f85923ac..1b335700 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.m @@ -14,9 +14,9 @@ * limitations under the License. */ -#import "FIRInstallationsErrorUtil.h" +#import "FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h" -#import "FIRInstallationsHTTPError.h" +#import "FirebaseInstallations/Source/Library/Errors/FIRInstallationsHTTPError.h" NSString *const kFirebaseInstallationsErrorDomain = @"com.firebase.installations"; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/FIRInstallationsHTTPError.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/FIRInstallationsHTTPError.m index 5b3eae22..4236f452 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/FIRInstallationsHTTPError.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/FIRInstallationsHTTPError.m @@ -14,8 +14,8 @@ * limitations under the License. */ -#import "FIRInstallationsHTTPError.h" -#import "FIRInstallationsErrorUtil.h" +#import "FirebaseInstallations/Source/Library/Errors/FIRInstallationsHTTPError.h" +#import "FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h" @implementation FIRInstallationsHTTPError @@ -41,9 +41,10 @@ + (NSDictionary *)userInfoWithHTTPResponse:(NSHTTPURLResponse *)HTTPResponse data:(nullable NSData *)data { NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - NSString *failureReason = [NSString - stringWithFormat:@"The server responded with an error. HTTP response: %@\nResponse body: %@", - HTTPResponse, responseString]; + NSString *failureReason = + [NSString stringWithFormat:@"The server responded with an error: \n - URL: %@ \n - HTTP " + @"status code: %ld \n - Response body: %@", + HTTPResponse.URL, (long)HTTPResponse.statusCode, responseString]; return @{NSLocalizedFailureReasonErrorKey : failureReason}; } diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallations.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallations.m index 71e7dd43..cbdd8b29 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallations.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallations.m @@ -14,7 +14,7 @@ * limitations under the License. */ -#import "FIRInstallations.h" +#import "FirebaseInstallations/Source/Library/Public/FIRInstallations.h" #if __has_include() #import @@ -22,21 +22,16 @@ #import "FBLPromises.h" #endif -#import -#import -#import -#import -#import -#import +#import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h" -#import "FIRInstallationsAuthTokenResultInternal.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsAuthTokenResultInternal.h" -#import "FIRInstallationsErrorUtil.h" -#import "FIRInstallationsIDController.h" -#import "FIRInstallationsItem.h" -#import "FIRInstallationsLogger.h" -#import "FIRInstallationsStoredAuthToken.h" -#import "FIRInstallationsVersion.h" +#import "FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsItem.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsLogger.h" +#import "FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsIDController.h" +#import "FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredAuthToken.h" +#import "FirebaseInstallations/Source/Library/Public/FIRInstallationsVersion.h" NS_ASSUME_NONNULL_BEGIN @@ -89,10 +84,12 @@ NS_ASSUME_NONNULL_BEGIN projectID:appOptions.projectID GCMSenderID:appOptions.GCMSenderID accessGroup:appOptions.appGroupID]; + + // `prefetchAuthToken` is disabled due to b/156746574. return [self initWithAppOptions:appOptions appName:appName installationsIDController:IDController - prefetchAuthToken:YES]; + prefetchAuthToken:NO]; } /// The initializer is supposed to be used by tests to inject `installationsStore`. diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsAuthTokenResult.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsAuthTokenResult.m index 92e5fab1..47a71e84 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsAuthTokenResult.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsAuthTokenResult.m @@ -14,7 +14,7 @@ * limitations under the License. */ -#import "FIRInstallationsAuthTokenResultInternal.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsAuthTokenResultInternal.h" @implementation FIRInstallationsAuthTokenResult diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsAuthTokenResultInternal.h b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsAuthTokenResultInternal.h index 0c959dba..2233dd34 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsAuthTokenResultInternal.h +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsAuthTokenResultInternal.h @@ -14,7 +14,7 @@ * limitations under the License. */ -#import +#import "FirebaseInstallations/Source/Library/Public/FIRInstallationsAuthTokenResult.h" NS_ASSUME_NONNULL_BEGIN diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsItem.h b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsItem.h index 95fdf835..4b64b7fc 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsItem.h +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsItem.h @@ -16,7 +16,7 @@ #import -#import "FIRInstallationsStatus.h" +#import "FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsStatus.h" @class FIRInstallationsStoredItem; @class FIRInstallationsStoredAuthToken; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsItem.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsItem.m index bc819bf8..200d8ae4 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsItem.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsItem.m @@ -14,10 +14,10 @@ * limitations under the License. */ -#import "FIRInstallationsItem.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsItem.h" -#import "FIRInstallationsStoredAuthToken.h" -#import "FIRInstallationsStoredItem.h" +#import "FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredAuthToken.h" +#import "FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.h" @implementation FIRInstallationsItem diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsLogger.h b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsLogger.h index baeadb2e..e4192bf6 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsLogger.h +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsLogger.h @@ -16,7 +16,7 @@ #import -#import +#import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h" extern FIRLoggerService kFIRLoggerInstallations; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsLogger.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsLogger.m index c2bdf37f..edfcde97 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsLogger.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsLogger.m @@ -14,7 +14,7 @@ * limitations under the License. */ -#import "FIRInstallationsLogger.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsLogger.h" FIRLoggerService kFIRLoggerInstallations = @"[Firebase/Installations]"; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsVersion.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsVersion.m index a75e3f5b..8509680f 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsVersion.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsVersion.m @@ -14,7 +14,7 @@ * limitations under the License. */ -#import "FIRInstallationsVersion.h" +#import "FirebaseInstallations/Source/Library/Public/FIRInstallationsVersion.h" // Convert the macro to a string #define STR(x) STR_EXPAND(x) diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDStore.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDStore.m index 1f3a82af..1a77831d 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDStore.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDStore.m @@ -14,7 +14,7 @@ * limitations under the License. */ -#import "FIRInstallationsIIDStore.h" +#import "FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDStore.h" #if __has_include() #import @@ -23,7 +23,7 @@ #endif #import -#import "FIRInstallationsErrorUtil.h" +#import "FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h" static NSString *const kFIRInstallationsIIDKeyPairPublicTagPrefix = @"com.google.iid.keypair.public-"; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.m index b2b69313..7d622635 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.m @@ -14,7 +14,7 @@ * limitations under the License. */ -#import "FIRInstallationsIIDTokenStore.h" +#import "FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.h" #if __has_include() #import @@ -22,9 +22,9 @@ #import "FBLPromises.h" #endif -#import +#import "GoogleUtilities/Environment/Private/GULKeychainUtils.h" -#import "FIRInstallationsErrorUtil.h" +#import "FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h" static NSString *const kFIRInstallationsIIDTokenKeychainId = @"com.google.iid-tokens"; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsAPIService.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsAPIService.m index 6e746220..8f38e0c6 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsAPIService.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsAPIService.m @@ -14,9 +14,9 @@ * limitations under the License. */ -#import "FIRInstallationsAPIService.h" +#import "FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsAPIService.h" -#import +#import "FirebaseInstallations/Source/Library/Public/FIRInstallationsVersion.h" #if __has_include() #import @@ -24,11 +24,10 @@ #import "FBLPromises.h" #endif -#import -#import -#import "FIRInstallationsErrorUtil.h" -#import "FIRInstallationsItem+RegisterInstallationAPI.h" -#import "FIRInstallationsLogger.h" +#import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h" +#import "FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsLogger.h" +#import "FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsItem+RegisterInstallationAPI.h" NSString *const kFIRInstallationsAPIBaseURL = @"https://firebaseinstallations.googleapis.com"; NSString *const kFIRInstallationsAPIKey = @"X-Goog-Api-Key"; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsItem+RegisterInstallationAPI.h b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsItem+RegisterInstallationAPI.h index cc6b5432..0e4af55e 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsItem+RegisterInstallationAPI.h +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsItem+RegisterInstallationAPI.h @@ -14,7 +14,7 @@ * limitations under the License. */ -#import "FIRInstallationsItem.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsItem.h" @class FIRInstallationsStoredAuthToken; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsItem+RegisterInstallationAPI.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsItem+RegisterInstallationAPI.m index 569e35b9..e5c73601 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsItem+RegisterInstallationAPI.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsItem+RegisterInstallationAPI.m @@ -14,10 +14,10 @@ * limitations under the License. */ -#import "FIRInstallationsItem+RegisterInstallationAPI.h" +#import "FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsItem+RegisterInstallationAPI.h" -#import "FIRInstallationsErrorUtil.h" -#import "FIRInstallationsStoredAuthToken.h" +#import "FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h" +#import "FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredAuthToken.h" @implementation FIRInstallationsItem (RegisterInstallationAPI) diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsIDController.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsIDController.m index 1b8ddcbf..b6ea4b24 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsIDController.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsIDController.m @@ -14,7 +14,7 @@ * limitations under the License. */ -#import "FIRInstallationsIDController.h" +#import "FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsIDController.h" #if __has_include() #import @@ -22,20 +22,20 @@ #import "FBLPromises.h" #endif -#import -#import +#import "FirebaseCore/Sources/Private/FirebaseCoreInternal.h" +#import "GoogleUtilities/Environment/Private/GULKeychainStorage.h" -#import "FIRInstallationsAPIService.h" -#import "FIRInstallationsErrorUtil.h" -#import "FIRInstallationsIIDStore.h" -#import "FIRInstallationsIIDTokenStore.h" -#import "FIRInstallationsItem.h" -#import "FIRInstallationsLogger.h" -#import "FIRInstallationsSingleOperationPromiseCache.h" -#import "FIRInstallationsStore.h" +#import "FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsItem.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsLogger.h" +#import "FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDStore.h" +#import "FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.h" +#import "FirebaseInstallations/Source/Library/InstallationsAPI/FIRInstallationsAPIService.h" +#import "FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsSingleOperationPromiseCache.h" +#import "FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStore.h" -#import "FIRInstallationsHTTPError.h" -#import "FIRInstallationsStoredAuthToken.h" +#import "FirebaseInstallations/Source/Library/Errors/FIRInstallationsHTTPError.h" +#import "FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredAuthToken.h" const NSNotificationName FIRInstallationIDDidChangeNotification = @"FIRInstallationIDDidChangeNotification"; @@ -44,6 +44,8 @@ NSString *const kFIRInstallationIDDidChangeNotificationAppNameKey = NSTimeInterval const kFIRInstallationsTokenExpirationThreshold = 60 * 60; // 1 hour. +static NSString *const kKeychainService = @"com.firebase.FIRInstallations.installations"; + @interface FIRInstallationsIDController () @property(nonatomic, readonly) NSString *appID; @property(nonatomic, readonly) NSString *appName; @@ -71,9 +73,9 @@ NSTimeInterval const kFIRInstallationsTokenExpirationThreshold = 60 * 60; // 1 APIKey:(NSString *)APIKey projectID:(NSString *)projectID GCMSenderID:(NSString *)GCMSenderID - accessGroup:(NSString *)accessGroup { - GULKeychainStorage *secureStorage = - [[GULKeychainStorage alloc] initWithService:@"com.firebase.FIRInstallations.installations"]; + accessGroup:(nullable NSString *)accessGroup { + NSString *serviceName = [FIRInstallationsIDController keychainServiceWithAppID:appID]; + GULKeychainStorage *secureStorage = [[GULKeychainStorage alloc] initWithService:serviceName]; FIRInstallationsStore *installationsStore = [[FIRInstallationsStore alloc] initWithSecureStorage:secureStorage accessGroup:accessGroup]; @@ -256,9 +258,9 @@ NSTimeInterval const kFIRInstallationsTokenExpirationThreshold = 60 * 60; // 1 if ([self doesRegistrationErrorRequireConfigChange:error]) { FIRLogError(kFIRLoggerInstallations, kFIRInstallationsMessageCodeInvalidFirebaseConfiguration, - @"Firebase Installation registration failed for app with name: %@, error: " + @"Firebase Installation registration failed for app with name: %@, error:\n" @"%@\nPlease make sure you use valid GoogleService-Info.plist", - self.appName, error); + self.appName, error.userInfo[NSLocalizedFailureReasonErrorKey]); } }) .then(^id(FIRInstallationsItem *registeredInstallation) { @@ -456,4 +458,23 @@ NSTimeInterval const kFIRInstallationsTokenExpirationThreshold = 60 * 60; // 1 return [self.appName isEqualToString:kFIRDefaultAppName]; } +#pragma mark - Keychain + ++ (NSString *)keychainServiceWithAppID:(NSString *)appID { +#if TARGET_OS_MACCATALYST || TARGET_OS_OSX + // We need to keep service name unique per application on macOS. + // Applications on macOS may request access to Keychain items stored by other applications. It + // means that when the app looks up for a relevant Keychain item in the service scope it will + // request user password to grant access to the Keychain if there are other Keychain items from + // other applications stored under the same Keychain Service. + return [kKeychainService stringByAppendingFormat:@".%@", appID]; +#else + // Use a constant Keychain service for non-macOS because: + // 1. Keychain items cannot be shared between apps until configured specifically so the service + // name collisions are not a concern + // 2. We don't want to change the service name to avoid doing a migration. + return kKeychainService; +#endif +} + @end diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsSingleOperationPromiseCache.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsSingleOperationPromiseCache.m index dfccfe36..7ae8781f 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsSingleOperationPromiseCache.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsSingleOperationPromiseCache.m @@ -14,7 +14,7 @@ * limitations under the License. */ -#import "FIRInstallationsSingleOperationPromiseCache.h" +#import "FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsSingleOperationPromiseCache.h" #if __has_include() #import diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStore.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStore.m index 46f58dba..72041000 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStore.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStore.m @@ -14,9 +14,9 @@ * limitations under the License. */ -#import "FIRInstallationsStore.h" +#import "FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStore.h" -#import +#import "GoogleUtilities/UserDefaults/Private/GULUserDefaults.h" #if __has_include() #import @@ -24,11 +24,11 @@ #import "FBLPromises.h" #endif -#import +#import "GoogleUtilities/Environment/Private/GULKeychainStorage.h" -#import "FIRInstallationsErrorUtil.h" -#import "FIRInstallationsItem.h" -#import "FIRInstallationsStoredItem.h" +#import "FirebaseInstallations/Source/Library/Errors/FIRInstallationsErrorUtil.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsItem.h" +#import "FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.h" NSString *const kFIRInstallationsStoreUserDefaultsID = @"com.firebase.FIRInstallations"; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredAuthToken.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredAuthToken.m index b21f6dd2..8236f2a6 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredAuthToken.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredAuthToken.m @@ -14,9 +14,9 @@ * limitations under the License. */ -#import "FIRInstallationsStoredAuthToken.h" +#import "FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredAuthToken.h" -#import "FIRInstallationsLogger.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsLogger.h" NSString *const kFIRInstallationsStoredAuthTokenStatusKey = @"status"; NSString *const kFIRInstallationsStoredAuthTokenTokenKey = @"token"; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.h b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.h index 4926588c..83902deb 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.h +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.h @@ -16,7 +16,7 @@ #import -#import "FIRInstallationsStatus.h" +#import "FirebaseInstallations/Source/Library/InstallationsIDController/FIRInstallationsStatus.h" @class FIRInstallationsStoredAuthToken; @class FIRInstallationsStoredIIDCheckin; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.m b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.m index 0c7655c3..4e199559 100644 --- a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.m +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.m @@ -14,10 +14,10 @@ * limitations under the License. */ -#import "FIRInstallationsStoredItem.h" +#import "FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredItem.h" -#import "FIRInstallationsLogger.h" -#import "FIRInstallationsStoredAuthToken.h" +#import "FirebaseInstallations/Source/Library/FIRInstallationsLogger.h" +#import "FirebaseInstallations/Source/Library/InstallationsStore/FIRInstallationsStoredAuthToken.h" NSString *const kFIRInstallationsStoredItemFirebaseInstallationIDKey = @"firebaseInstallationID"; NSString *const kFIRInstallationsStoredItemRefreshTokenKey = @"refreshToken"; diff --git a/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h new file mode 100644 index 00000000..cd40f172 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Private/FirebaseInstallationsInternal.h @@ -0,0 +1,23 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// An umbrella header, for any other libraries in this repo to access Firebase +// Installations Public headers. Any package manager complexity should be +// handled here. + +#if SWIFT_PACKAGE +@import FirebaseInstallations; +#else +#import +#endif diff --git a/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h b/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h new file mode 100644 index 00000000..2fb16226 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULAppEnvironmentUtil.h @@ -0,0 +1,47 @@ +/* + * Copyright 2017 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@interface GULAppEnvironmentUtil : NSObject + +/// Indicates whether the app is from Apple Store or not. Returns NO if the app is on simulator, +/// development environment or sideloaded. ++ (BOOL)isFromAppStore; + +/// Indicates whether the app is a Testflight app. Returns YES if the app has sandbox receipt. +/// Returns NO otherwise. ++ (BOOL)isAppStoreReceiptSandbox; + +/// Indicates whether the app is on simulator or not at runtime depending on the device +/// architecture. ++ (BOOL)isSimulator; + +/// The current device model. Returns an empty string if device model cannot be retrieved. ++ (NSString *)deviceModel; + +/// The current operating system version. Returns an empty string if the system version cannot be +/// retrieved. ++ (NSString *)systemVersion; + +/// Indicates whether it is running inside an extension or an app. ++ (BOOL)isAppExtension; + +/// @return Returns @YES when is run on iOS version greater or equal to 7.0 ++ (BOOL)isIOS7OrHigher DEPRECATED_MSG_ATTRIBUTE( + "Always `YES` because only iOS 8 and higher supported. The method will be removed."); + +@end diff --git a/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h b/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h new file mode 100644 index 00000000..9432dfc0 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULHeartbeatDateStorage.h @@ -0,0 +1,49 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// Stores either a date or a dictionary to a specified file. +@interface GULHeartbeatDateStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +@property(nonatomic, readonly) NSURL *fileURL; + +/** + * Default initializer. + * @param fileName The name of the file to store the date information. + * exist, it will be created if needed. + */ +- (instancetype)initWithFileName:(NSString *)fileName; + +/** + * Reads the date from the specified file for the given tag. + * @return Returns date if exists, otherwise `nil`. + */ +- (nullable NSDate *)heartbeatDateForTag:(NSString *)tag; + +/** + * Saves the date for the specified tag in the specified file. + * @return YES on success, NO otherwise. + */ +- (BOOL)setHearbeatDate:(NSDate *)date forTag:(NSString *)tag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULKeychainStorage.h b/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULKeychainStorage.h new file mode 100644 index 00000000..dc01a836 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULKeychainStorage.h @@ -0,0 +1,79 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@class FBLPromise; + +NS_ASSUME_NONNULL_BEGIN + +/// The class provides a convenient abstraction on top of the iOS Keychain API to save data. +@interface GULKeychainStorage : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** Initializes the keychain storage with Keychain Service name. + * @param service A Keychain Service name that will be used to store and retrieve objects. See also + * `kSecAttrService`. + */ +- (instancetype)initWithService:(NSString *)service; + +/** + * Get an object by key. + * @param key The key. + * @param objectClass The expected object class required by `NSSecureCoding`. + * @param accessGroup The Keychain Access Group. + * + * @return Returns a promise. It is resolved with an object stored by key if exists. It is resolved + * with `nil` when the object not found. It fails on a Keychain error. + */ +- (FBLPromise> *)getObjectForKey:(NSString *)key + objectClass:(Class)objectClass + accessGroup:(nullable NSString *)accessGroup; + +/** + * Saves the given object by the given key. + * @param object The object to store. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)setObject:(id)object + forKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +/** + * Removes the object by the given key. + * @param key The key to store the object. If there is an existing object by the key, it will be + * overridden. + * @param accessGroup The Keychain Access Group. + * + * @return Returns which is resolved with `[NSNull null]` on success. + */ +- (FBLPromise *)removeObjectForKey:(NSString *)key + accessGroup:(nullable NSString *)accessGroup; + +#if TARGET_OS_OSX +/// If not `nil`, then only this keychain will be used to save and read data (see +/// `kSecMatchSearchList` and `kSecUseKeychain`. It is mostly intended to be used by unit tests. +@property(nonatomic, nullable) SecKeychainRef keychainRef; +#endif // TARGET_OSX + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULKeychainUtils.h b/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULKeychainUtils.h new file mode 100644 index 00000000..de4bef2f --- /dev/null +++ b/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULKeychainUtils.h @@ -0,0 +1,61 @@ +/* + * Copyright 2019 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +FOUNDATION_EXPORT NSString *const kGULKeychainUtilsErrorDomain; + +/// Helper functions to access Keychain. +@interface GULKeychainUtils : NSObject + +/** Fetches a keychain item data matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemCopyMatching` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns Data for the first Keychain Item matching the provided query or `nil` if there is not + * such an item (`outError` will be `nil` in this case) or an error occurred. + */ ++ (nullable NSData *)getItemWithQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Stores data to a Keychain Item matching to the provided query. An existing Keychain Item + * matching the query parameters will be updated or a new will be created. + * @param item A Keychain Item data to store. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemAdd` and + * `SecItemUpdate` for details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` when data was successfully stored, `NO` otherwise. + */ ++ (BOOL)setItem:(NSData *)item + withQuery:(NSDictionary *)query + error:(NSError *_Nullable *_Nullable)outError; + +/** Removes a Keychain Item matching to the provided query. + * @param query A dictionary with Keychain query parameters. See docs for `SecItemDelete` for + * details. + * @param outError A pointer to `NSError` instance or `NULL`. The instance at `outError` will be + * assigned with an error if there is. + * @returns `YES` if the item was removed successfully or doesn't exist, `NO` otherwise. + */ ++ (BOOL)removeItemWithQuery:(NSDictionary *)query error:(NSError *_Nullable *_Nullable)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULSecureCoding.h b/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULSecureCoding.h new file mode 100644 index 00000000..8484b395 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/GoogleUtilities/Environment/Private/GULSecureCoding.h @@ -0,0 +1,36 @@ +// Copyright 2019 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** The class wraps `NSKeyedArchiver` and `NSKeyedUnarchiver` API to provide a unified secure coding + * methods for iOS versions before and after 11. + */ +@interface GULSecureCoding : NSObject + ++ (nullable id)unarchivedObjectOfClasses:(NSSet *)classes + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable id)unarchivedObjectOfClass:(Class)class + fromData:(NSData *)data + error:(NSError **)outError; + ++ (nullable NSData *)archivedDataWithRootObject:(id)object error:(NSError **)outError; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseInstallations/GoogleUtilities/UserDefaults/Private/GULUserDefaults.h b/ios/Pods/FirebaseInstallations/GoogleUtilities/UserDefaults/Private/GULUserDefaults.h new file mode 100644 index 00000000..0d047818 --- /dev/null +++ b/ios/Pods/FirebaseInstallations/GoogleUtilities/UserDefaults/Private/GULUserDefaults.h @@ -0,0 +1,110 @@ +// Copyright 2018 Google +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#import + +NS_ASSUME_NONNULL_BEGIN + +/// A thread-safe user defaults that uses C functions from CFPreferences.h instead of +/// `NSUserDefaults`. This is to avoid sending an `NSNotification` when it's changed from a +/// background thread to avoid crashing. // TODO: Insert radar number here. +@interface GULUserDefaults : NSObject + +/// A shared user defaults similar to +[NSUserDefaults standardUserDefaults] and accesses the same +/// data of the standardUserDefaults. ++ (GULUserDefaults *)standardUserDefaults; + +/// Initializes preferences with a suite name that is the same with the NSUserDefaults' suite name. +/// Both of CFPreferences and NSUserDefaults share the same plist file so their data will exactly +/// the same. +/// +/// @param suiteName The name of the suite of the user defaults. +- (instancetype)initWithSuiteName:(nullable NSString *)suiteName; + +#pragma mark - Getters + +/// Searches the receiver's search list for a default with the key 'defaultName' and return it. If +/// another process has changed defaults in the search list, NSUserDefaults will automatically +/// update to the latest values. If the key in question has been marked as ubiquitous via a Defaults +/// Configuration File, the latest value may not be immediately available, and the registered value +/// will be returned instead. +- (nullable id)objectForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value is not an NSArray. +- (nullable NSArray *)arrayForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will return nil if the value +/// is not an NSDictionary. +- (nullable NSDictionary *)dictionaryForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it will convert NSNumber values to their NSString +/// representation. If a non-string non-number value is found, nil will be returned. +- (nullable NSString *)stringForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to an NSInteger. If the +/// value is an NSNumber, the result of -integerValue will be returned. If the value is an NSString, +/// it will be converted to NSInteger if possible. If the value is a boolean, it will be converted +/// to either 1 for YES or 0 for NO. If the value is absent or can't be converted to an integer, 0 +/// will be returned. +- (NSInteger)integerForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a float, and boolean values will not be +/// converted. +- (float)floatForKey:(NSString *)defaultName; + +/// Similar to -integerForKey:, except that it returns a double, and boolean values will not be +/// converted. +- (double)doubleForKey:(NSString *)defaultName; + +/// Equivalent to -objectForKey:, except that it converts the returned value to a BOOL. If the value +/// is an NSNumber, NO will be returned if the value is 0, YES otherwise. If the value is an +/// NSString, values of "YES" or "1" will return YES, and values of "NO", "0", or any other string +/// will return NO. If the value is absent or can't be converted to a BOOL, NO will be returned. +- (BOOL)boolForKey:(NSString *)defaultName; + +#pragma mark - Setters + +/// Immediately stores a value (or removes the value if `nil` is passed as the value) for the +/// provided key in the search list entry for the receiver's suite name in the current user and any +/// host, then asynchronously stores the value persistently, where it is made available to other +/// processes. +- (void)setObject:(nullable id)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a float to an NSNumber. +- (void)setFloat:(float)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a double to an +/// NSNumber. +- (void)setDouble:(double)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from an NSInteger to an +/// NSNumber. +- (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName; + +/// Equivalent to -setObject:forKey: except that the value is converted from a BOOL to an NSNumber. +- (void)setBool:(BOOL)value forKey:(NSString *)defaultName; + +#pragma mark - Removing Defaults + +/// Equivalent to -[... setObject:nil forKey:defaultName] +- (void)removeObjectForKey:(NSString *)defaultName; + +#pragma mark - Save data + +/// Blocks the calling thread until all in-progress set operations have completed. +- (void)synchronize; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Pods/FirebaseInstallations/README.md b/ios/Pods/FirebaseInstallations/README.md index b04a2709..1d9f0f67 100644 --- a/ios/Pods/FirebaseInstallations/README.md +++ b/ios/Pods/FirebaseInstallations/README.md @@ -1,18 +1,29 @@ -# Firebase iOS Open Source Development - [![Actions Status][gh-auth-badge]][gh-actions] - [![Actions Status][gh-core-badge]][gh-actions] - [![Actions Status][gh-datatransport-badge]][gh-actions] - [![Actions Status][gh-dynamiclinks-badge]][gh-actions] - [![Actions Status][gh-firebasepod-badge]][gh-actions] - [![Actions Status][gh-firestore-badge]][gh-actions] - [![Actions Status][gh-interop-badge]][gh-actions] - [![Actions Status][gh-messaging-badge]][gh-actions] - [![Actions Status][gh-storage-badge]][gh-actions] - [![Actions Status][gh-symbolcollision-badge]][gh-actions] - [![Actions Status][gh-zip-badge]][gh-actions] - [![Travis](https://travis-ci.org/firebase/firebase-ios-sdk.svg?branch=master)](https://travis-ci.org/firebase/firebase-ios-sdk) +[![Version](https://img.shields.io/cocoapods/v/Firebase.svg?style=flat)](https://cocoapods.org/pods/Firebase) +[![License](https://img.shields.io/cocoapods/l/Firebase.svg?style=flat)](https://cocoapods.org/pods/Firebase) +[![Platform](https://img.shields.io/cocoapods/p/Firebase.svg?style=flat)](https://cocoapods.org/pods/Firebase) -This repository contains all Firebase iOS SDK source except FirebaseAnalytics, +[![Actions Status][gh-abtesting-badge]][gh-actions] +[![Actions Status][gh-auth-badge]][gh-actions] +[![Actions Status][gh-core-badge]][gh-actions] +[![Actions Status][gh-crashlytics-badge]][gh-actions] +[![Actions Status][gh-database-badge]][gh-actions] +[![Actions Status][gh-datatransport-badge]][gh-actions] +[![Actions Status][gh-dynamiclinks-badge]][gh-actions] +[![Actions Status][gh-firebasepod-badge]][gh-actions] +[![Actions Status][gh-firestore-badge]][gh-actions] +[![Actions Status][gh-functions-badge]][gh-actions] +[![Actions Status][gh-inappmessaging-badge]][gh-actions] +[![Actions Status][gh-interop-badge]][gh-actions] +[![Actions Status][gh-messaging-badge]][gh-actions] +[![Actions Status][gh-remoteconfig-badge]][gh-actions] +[![Actions Status][gh-storage-badge]][gh-actions] +[![Actions Status][gh-symbolcollision-badge]][gh-actions] +[![Actions Status][gh-zip-badge]][gh-actions] +[![Travis](https://travis-ci.org/firebase/firebase-ios-sdk.svg?branch=master)](https://travis-ci.org/firebase/firebase-ios-sdk) + +# Firebase Apple Open Source Development + +This repository contains all Apple platform Firebase SDK source except FirebaseAnalytics, FirebasePerformance, and FirebaseML. The repository also includes GoogleUtilities source. The @@ -87,7 +98,7 @@ Instructions for installing binary frameworks via To develop Firebase software in this repository, ensure that you have at least the following software: - * Xcode 10.1 (or later) + * Xcode 10.3 (or later) * CocoaPods 1.7.2 (or later) * [CocoaPods generate](https://github.com/square/cocoapods-generate) @@ -118,6 +129,10 @@ Firestore has a self contained Xcode project. See See [AddNewPod.md](AddNewPod.md). +### Managing Headers and Imports + +See [HeadersImports.md](HeadersImports.md). + ### Code Formatting To ensure that the code is formatted consistently, run the script @@ -125,21 +140,13 @@ To ensure that the code is formatted consistently, run the script before creating a PR. Travis will verify that any code changes are done in a style compliant way. Install -`clang-format` and `swiftformat`. -These commands will get the right versions: +`clang-format` and `swiftformat`: ``` -brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/c6f1cbd/Formula/clang-format.rb -brew upgrade https://raw.githubusercontent.com/Homebrew/homebrew-core/c13eda8/Formula/swiftformat.rb +brew install clang-format +brew install swiftformat ``` -Note: if you already have a newer version of these installed you may need to -`brew switch` to this version. - -To update this section, find the versions of clang-format and swiftformat.rb to -match the versions in the CI failure logs -[here](https://github.com/Homebrew/homebrew-core/tree/master/Formula). - ### Running Unit Tests Select a scheme and press Command-u to build a component and run its unit tests. @@ -162,12 +169,7 @@ files without real values, but can be replaced with real plist files. To get you 2. Create a new Firebase project, if you don't already have one 3. For each sample app you want to test, create a new Firebase app with the sample app's bundle identifier (e.g. `com.google.Database-Example`) -4. Download the resulting `GoogleService-Info.plist` and replace the appropriate dummy plist file -(e.g. in [Example/Database/App/](Example/Database/App/)); - -Some sample apps like Firebase Messaging ([Example/Messaging/App](Example/Messaging/App)) require -special Apple capabilities, and you will have to change the sample app to use a unique bundle -identifier that you can control in your own Apple Developer account. +4. Download the resulting `GoogleService-Info.plist` and add it to the Xcode project. ## Specific Component Instructions See the sections below for any special instructions for those components. @@ -180,8 +182,16 @@ building and running the FirebaseAuth pod along with various samples and tests. ### Firebase Database -To run the Database Integration tests, make your database authentication rules -[public](https://firebase.google.com/docs/database/security/quickstart). +The Firebase Database Integration tests can be run against a locally running Database Emulator +or against a production instance. + +To run against a local emulator instance, invoke `./scripts/run_database_emulator.sh start` before +running the integration test. + +To run against a production instance, provide a valid GoogleServices-Info.plist and copy it to +`FirebaseDatabase/Tests/Resources/GoogleService-Info.plist`. Your Security Rule must be set to +[public](https://firebase.google.com/docs/database/security/quickstart) while your tests are +running. ### Firebase Storage @@ -269,14 +279,20 @@ Your use of Firebase is governed by the [Terms of Service for Firebase Services](https://firebase.google.com/terms/). [gh-actions]: https://github.com/firebase/firebase-ios-sdk/actions +[gh-abtesting-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/abtesting/badge.svg [gh-auth-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/auth/badge.svg [gh-core-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/core/badge.svg +[gh-crashlytics-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/crashlytics/badge.svg +[gh-database-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/database/badge.svg [gh-datatransport-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/datatransport/badge.svg [gh-dynamiclinks-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/dynamiclinks/badge.svg [gh-firebasepod-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/firebasepod/badge.svg [gh-firestore-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/firestore/badge.svg +[gh-functions-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/functions/badge.svg +[gh-inappmessaging-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/inappmessaging/badge.svg [gh-interop-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/interop/badge.svg [gh-messaging-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/messaging/badge.svg +[gh-remoteconfig-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/remoteconfig/badge.svg [gh-storage-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/storage/badge.svg [gh-symbolcollision-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/symbolcollision/badge.svg [gh-zip-badge]: https://github.com/firebase/firebase-ios-sdk/workflows/zip/badge.svg diff --git a/ios/Pods/Flipper/README.md b/ios/Pods/Flipper/README.md index 47df0532..b028c7ec 100644 --- a/ios/Pods/Flipper/README.md +++ b/ios/Pods/Flipper/README.md @@ -38,19 +38,19 @@ Both Flipper's desktop app and native mobile SDKs are open-source and MIT licens This repository includes all parts of Flipper. This includes: -* Flipper's desktop app built using [Electron](https://electronjs.org) (`/src`) +* Flipper's desktop app built using [Electron](https://electronjs.org) (`/desktop`) * native Flipper SDKs for iOS (`/iOS`) * native Flipper SDKs for Android (`/android`) * Plugins: - * Logs (`/src/device-plugins/logs`) - * Layout inspector (`/src/plugins/layout`) - * Network inspector (`/src/plugins/network`) - * Shared Preferences/NSUserDefaults inspector (`/src/plugins/shared_preferences`) + * Logs (`/desktop/src/device-plugins/logs`) + * Layout inspector (`/desktop/plugins/layout`) + * Network inspector (`/desktop/plugins/network`) + * Shared Preferences/NSUserDefaults inspector (`/desktop/plugins/shared_preferences`) * website and documentation (`/website` / `/docs`) # Getting started -Please refer to our [Getting Started guide](https://fbflipper.com/docs/getting-started.html) to set up Flipper. +Please refer to our [Getting Started guide](https://fbflipper.com/docs/getting-started/index) to set up Flipper. ## Requirements @@ -66,7 +66,7 @@ Please refer to our [Getting Started guide](https://fbflipper.com/docs/getting-s ``` git clone https://github.com/facebook/flipper.git -cd flipper +cd flipper/desktop yarn yarn start ``` @@ -119,9 +119,9 @@ Alternatively, the app can be started on `iOS` by running `yarn ios`. Older yarn versions might show an error / hang with the message 'Waiting for the other yarn instance to finish'. If that happens, run the command `yarn` first separately in the directory `react-native/react-native-flipper`. -## Documentation +# Documentation -Find the full documentation for this project at [fbflipper.com](https://fbflipper.com/docs). +Find the full documentation for this project at [fbflipper.com](https://fbflipper.com/). Our documentation is built with [Docusaurus](https://docusaurus.io/). You can build it locally by running this: diff --git a/ios/Pods/Flipper/xplat/Flipper/FlipperClient.cpp b/ios/Pods/Flipper/xplat/Flipper/FlipperClient.cpp index dc3325e5..6b897d58 100644 --- a/ios/Pods/Flipper/xplat/Flipper/FlipperClient.cpp +++ b/ios/Pods/Flipper/xplat/Flipper/FlipperClient.cpp @@ -69,12 +69,6 @@ void FlipperClient::addPlugin(std::shared_ptr plugin) { step->complete(); if (connected_) { refreshPlugins(); - if (plugin->runInBackground()) { - auto& conn = connections_[plugin->identifier()]; - conn = std::make_shared( - socket_.get(), plugin->identifier()); - plugin->didConnect(conn); - } } }); } @@ -95,27 +89,6 @@ void FlipperClient::removePlugin(std::shared_ptr plugin) { }); } -void FlipperClient::startBackgroundPlugins() { - std::cout << "Activating Background Plugins..." << std::endl; - for (std::map>::iterator it = - plugins_.begin(); - it != plugins_.end(); - ++it) { - std::cout << it->first << std::endl; - if (it->second.get()->runInBackground()) { - try { - auto& conn = connections_[it->first]; - conn = - std::make_shared(socket_.get(), it->first); - it->second.get()->didConnect(conn); - } catch (std::exception& e) { - log("Exception starting background plugin: " + it->first + ". " + - e.what()); - } - } - } -} - std::shared_ptr FlipperClient::getPlugin( const std::string& identifier) { std::lock_guard lock(mutex_); @@ -130,6 +103,15 @@ bool FlipperClient::hasPlugin(const std::string& identifier) { return plugins_.find(identifier) != plugins_.end(); } +void FlipperClient::connect(std::shared_ptr plugin) { + if (connections_.find(plugin->identifier()) == connections_.end()) { + auto& conn = connections_[plugin->identifier()]; + conn = std::make_shared( + socket_.get(), plugin->identifier()); + plugin->didConnect(conn); + } +} + void FlipperClient::disconnect(std::shared_ptr plugin) { const auto& conn = connections_.find(plugin->identifier()); if (conn != connections_.end()) { @@ -151,7 +133,6 @@ void FlipperClient::onConnected() { std::lock_guard lock(mutex_); connected_ = true; - startBackgroundPlugins(); }); } @@ -189,6 +170,18 @@ void FlipperClient::onMessageReceived( return; } + if (method == "getBackgroundPlugins") { + dynamic identifiers = dynamic::array(); + for (const auto& elem : plugins_) { + if (elem.second->runInBackground()) { + identifiers.push_back(elem.first); + } + } + dynamic response = dynamic::object("plugins", identifiers); + responder->success(response); + return; + } + if (method == "init") { const auto identifier = params["plugin"].getString(); if (plugins_.find(identifier) == plugins_.end()) { @@ -200,12 +193,7 @@ void FlipperClient::onMessageReceived( return; } const auto plugin = plugins_.at(identifier); - if (!plugin.get()->runInBackground()) { - auto& conn = connections_[plugin->identifier()]; - conn = std::make_shared( - socket_.get(), plugin->identifier()); - plugin->didConnect(conn); - } + connect(plugin); return; } @@ -220,9 +208,7 @@ void FlipperClient::onMessageReceived( return; } const auto plugin = plugins_.at(identifier); - if (!plugin.get()->runInBackground()) { - disconnect(plugin); - } + disconnect(plugin); return; } diff --git a/ios/Pods/Flipper/xplat/Flipper/FlipperClient.h b/ios/Pods/Flipper/xplat/Flipper/FlipperClient.h index 1c107d6a..28071e81 100644 --- a/ios/Pods/Flipper/xplat/Flipper/FlipperClient.h +++ b/ios/Pods/Flipper/xplat/Flipper/FlipperClient.h @@ -108,8 +108,8 @@ class FlipperClient : public FlipperConnectionManager::Callbacks { std::mutex mutex_; std::shared_ptr flipperState_; + void connect(std::shared_ptr plugin); void disconnect(std::shared_ptr plugin); - void startBackgroundPlugins(); std::string callstack(); void handleError(std::exception& e); }; diff --git a/ios/Pods/Flipper/xplat/Flipper/FlipperConnectionManagerImpl.cpp b/ios/Pods/Flipper/xplat/Flipper/FlipperConnectionManagerImpl.cpp index 9cbcfb5e..c10fab36 100644 --- a/ios/Pods/Flipper/xplat/Flipper/FlipperConnectionManagerImpl.cpp +++ b/ios/Pods/Flipper/xplat/Flipper/FlipperConnectionManagerImpl.cpp @@ -35,7 +35,7 @@ static constexpr int maxPayloadSize = 0xFFFFFF; // Not a public-facing version number. // Used for compatibility checking with desktop flipper. // To be bumped for every core platform interface change. -static constexpr int sdkVersion = 3; +static constexpr int sdkVersion = 4; namespace facebook { namespace flipper { @@ -127,34 +127,36 @@ void FlipperConnectionManagerImpl::startSync() { : "Establish main connection"); try { if (isClientSetupStep) { - doCertificateExchange(); + bool success = doCertificateExchange(); + if (!success) { + reconnect(); + return; + } } else { - connectSecurely(); + if (!connectSecurely()) { + // The expected code path when flipper desktop is not running. + // Don't count as a failed attempt, or it would invalidate the + // connection files for no reason. On iOS devices, we can always connect + // to the local port forwarding server even when it can't connect to + // flipper. In that case we get a Network error instead of a Port not + // open error, so we treat them the same. + step->fail( + "No route to flipper found. Is flipper desktop running? Retrying..."); + reconnect(); + } } step->complete(); } catch (const folly::AsyncSocketException& e) { - if (e.getType() == folly::AsyncSocketException::NOT_OPEN || - e.getType() == folly::AsyncSocketException::NETWORK_ERROR) { - // The expected code path when flipper desktop is not running. - // Don't count as a failed attempt, or it would invalidate the connection - // files for no reason. On iOS devices, we can always connect to the local - // port forwarding server even when it can't connect to flipper. In that - // case we get a Network error instead of a Port not open error, so we - // treat them the same. - step->fail( - "No route to flipper found. Is flipper desktop running? Retrying..."); + if (e.getType() == folly::AsyncSocketException::SSL_ERROR) { + auto message = std::string(e.what()) + + "\nMake sure the date and time of your device is up to date."; + log(message); + step->fail(message); } else { - if (e.getType() == folly::AsyncSocketException::SSL_ERROR) { - auto message = std::string(e.what()) + - "\nMake sure the date and time of your device is up to date."; - log(message); - step->fail(message); - } else { - log(e.what()); - step->fail(e.what()); - } - failedConnectionAttempts_++; + log(e.what()); + step->fail(e.what()); } + failedConnectionAttempts_++; reconnect(); } catch (const std::exception& e) { log(e.what()); @@ -164,7 +166,7 @@ void FlipperConnectionManagerImpl::startSync() { } } -void FlipperConnectionManagerImpl::doCertificateExchange() { +bool FlipperConnectionManagerImpl::doCertificateExchange() { rsocket::SetupParameters parameters; folly::SocketAddress address; @@ -175,7 +177,7 @@ void FlipperConnectionManagerImpl::doCertificateExchange() { auto connectingInsecurely = flipperState_->start("Connect insecurely"); connectionIsTrusted_ = false; - client_ = + auto newClient = rsocket::RSocket::createConnectedClient( std::make_unique( *connectionEventBase_->getEventBase(), std::move(address)), @@ -184,7 +186,22 @@ void FlipperConnectionManagerImpl::doCertificateExchange() { std::chrono::seconds(connectionKeepaliveSeconds), // keepaliveInterval nullptr, // stats std::make_shared(this)) + .thenError([](const auto& e) { + if (e.getType() == folly::AsyncSocketException::NOT_OPEN || + e.getType() == folly::AsyncSocketException::NETWORK_ERROR) { + // This is the state where no Flipper desktop client is connected. + // We don't want an exception thrown here. + return std::unique_ptr(nullptr); + } + throw e; + }) .get(); + + if (newClient.get() == nullptr) { + return false; + } + + client_ = std::move(newClient); connectingInsecurely->complete(); auto resettingState = flipperState_->start("Reset state"); @@ -192,9 +209,10 @@ void FlipperConnectionManagerImpl::doCertificateExchange() { resettingState->complete(); requestSignedCertFromFlipper(); + return true; } -void FlipperConnectionManagerImpl::connectSecurely() { +bool FlipperConnectionManagerImpl::connectSecurely() { rsocket::SetupParameters parameters; folly::SocketAddress address; @@ -216,7 +234,8 @@ void FlipperConnectionManagerImpl::connectSecurely() { contextStore_->getSSLContext(); auto connectingSecurely = flipperState_->start("Connect securely"); connectionIsTrusted_ = true; - client_ = + + auto newClient = rsocket::RSocket::createConnectedClient( std::make_unique( *connectionEventBase_->getEventBase(), @@ -227,9 +246,24 @@ void FlipperConnectionManagerImpl::connectSecurely() { std::chrono::seconds(connectionKeepaliveSeconds), // keepaliveInterval nullptr, // stats std::make_shared(this)) + .thenError([](const auto& e) { + if (e.getType() == folly::AsyncSocketException::NOT_OPEN || + e.getType() == folly::AsyncSocketException::NETWORK_ERROR) { + // This is the state where no Flipper desktop client is connected. + // We don't want an exception thrown here. + return std::unique_ptr(nullptr); + } + throw e; + }) .get(); + if (newClient.get() == nullptr) { + return false; + } + + client_ = std::move(newClient); connectingSecurely->complete(); failedConnectionAttempts_ = 0; + return true; } void FlipperConnectionManagerImpl::reconnect() { diff --git a/ios/Pods/Flipper/xplat/Flipper/FlipperConnectionManagerImpl.h b/ios/Pods/Flipper/xplat/Flipper/FlipperConnectionManagerImpl.h index 9763748c..004c5be3 100644 --- a/ios/Pods/Flipper/xplat/Flipper/FlipperConnectionManagerImpl.h +++ b/ios/Pods/Flipper/xplat/Flipper/FlipperConnectionManagerImpl.h @@ -68,8 +68,8 @@ class FlipperConnectionManagerImpl : public FlipperConnectionManager { std::shared_ptr contextStore_; void startSync(); - void doCertificateExchange(); - void connectSecurely(); + bool doCertificateExchange(); + bool connectSecurely(); bool isCertificateExchangeNeeded(); void requestSignedCertFromFlipper(); bool isRunningInOwnThread(); diff --git a/ios/Pods/FlipperKit/README.md b/ios/Pods/FlipperKit/README.md index 47df0532..b028c7ec 100644 --- a/ios/Pods/FlipperKit/README.md +++ b/ios/Pods/FlipperKit/README.md @@ -38,19 +38,19 @@ Both Flipper's desktop app and native mobile SDKs are open-source and MIT licens This repository includes all parts of Flipper. This includes: -* Flipper's desktop app built using [Electron](https://electronjs.org) (`/src`) +* Flipper's desktop app built using [Electron](https://electronjs.org) (`/desktop`) * native Flipper SDKs for iOS (`/iOS`) * native Flipper SDKs for Android (`/android`) * Plugins: - * Logs (`/src/device-plugins/logs`) - * Layout inspector (`/src/plugins/layout`) - * Network inspector (`/src/plugins/network`) - * Shared Preferences/NSUserDefaults inspector (`/src/plugins/shared_preferences`) + * Logs (`/desktop/src/device-plugins/logs`) + * Layout inspector (`/desktop/plugins/layout`) + * Network inspector (`/desktop/plugins/network`) + * Shared Preferences/NSUserDefaults inspector (`/desktop/plugins/shared_preferences`) * website and documentation (`/website` / `/docs`) # Getting started -Please refer to our [Getting Started guide](https://fbflipper.com/docs/getting-started.html) to set up Flipper. +Please refer to our [Getting Started guide](https://fbflipper.com/docs/getting-started/index) to set up Flipper. ## Requirements @@ -66,7 +66,7 @@ Please refer to our [Getting Started guide](https://fbflipper.com/docs/getting-s ``` git clone https://github.com/facebook/flipper.git -cd flipper +cd flipper/desktop yarn yarn start ``` @@ -119,9 +119,9 @@ Alternatively, the app can be started on `iOS` by running `yarn ios`. Older yarn versions might show an error / hang with the message 'Waiting for the other yarn instance to finish'. If that happens, run the command `yarn` first separately in the directory `react-native/react-native-flipper`. -## Documentation +# Documentation -Find the full documentation for this project at [fbflipper.com](https://fbflipper.com/docs). +Find the full documentation for this project at [fbflipper.com](https://fbflipper.com/). Our documentation is built with [Docusaurus](https://docusaurus.io/). You can build it locally by running this: diff --git a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h index 6cb5f625..c27aaf46 100644 --- a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h +++ b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h @@ -10,6 +10,7 @@ #import #import +#import #import "SKDescriptorMapper.h" #import "SKInvalidation.h" @@ -29,4 +30,7 @@ @end +/** Exposed for tests only. */ +SK_EXTERN_C dispatch_queue_t SKLayoutPluginSerialBackgroundQueue(void); + #endif diff --git a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.mm b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.mm index d64db0b0..2ef733b9 100644 --- a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.mm +++ b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.mm @@ -24,9 +24,8 @@ NSMapTable* _trackedObjects; NSString* _lastHighlightedNode; NSMutableSet* _invalidObjects; - Boolean _invalidateMessageQueued; - NSDate* _lastInvalidateMessage; - std::mutex invalidObjectsMutex; + BOOL _invalidateMessageQueued; + std::mutex _invalidObjectsMutex; id _rootNode; id _tapListener; @@ -49,10 +48,7 @@ if (self = [super init]) { _descriptorMapper = mapper; _trackedObjects = [NSMapTable strongToWeakObjectsMapTable]; - _lastHighlightedNode = nil; _invalidObjects = [NSMutableSet new]; - _invalidateMessageQueued = false; - _lastInvalidateMessage = [NSDate date]; _rootNode = rootNode; _tapListener = tapListener; @@ -95,15 +91,6 @@ responder); }]; - [connection receive:@"getAllNodes" - withBlock:^(NSDictionary* params, id responder) { - FlipperPerformBlockOnMainThread( - ^{ - [weakSelf onCallGetAllNodesWithResponder:responder]; - }, - responder); - }]; - [connection receive:@"getNodes" withBlock:^(NSDictionary* params, id responder) { FlipperPerformBlockOnMainThread( @@ -189,19 +176,6 @@ [responder success:rootNode]; } -- (void)populateAllNodesFromNode:(nonnull NSString*)identifier - inDictionary: - (nonnull NSMutableDictionary*) - mutableDict { - NSDictionary* nodeDict = [self getNode:identifier]; - mutableDict[identifier] = nodeDict; - NSArray* arr = nodeDict[@"children"]; - for (NSString* childIdentifier in arr) { - [self populateAllNodesFromNode:childIdentifier inDictionary:mutableDict]; - } - return; -} - - (void)populateAllNodesFromNode:(nonnull NSString*)identifier inArray:(nonnull NSMutableArray*) mutableArray { @@ -216,26 +190,6 @@ } } -- (void)onCallGetAllNodesWithResponder:(nonnull id)responder { - NSMutableArray* allNodes = @[].mutableCopy; - NSString* identifier = [self trackObject:_rootNode]; - NSDictionary* rootNode = [self getNode:identifier]; - if (!rootNode) { - return [responder error:@{ - @"error" : [NSString - stringWithFormat: - @"getNode returned nil for the rootNode %@, while getting all the nodes", - identifier] - }]; - } - [allNodes addObject:rootNode]; - NSMutableDictionary* allNodesDict = @{}.mutableCopy; - [self populateAllNodesFromNode:identifier inDictionary:allNodesDict]; - [responder success:@{ - @"allNodes" : @{@"rootElement" : identifier, @"elements" : allNodesDict} - }]; -} - - (NSMutableArray*)getChildrenForNode:(id)node withDescriptor:(SKNodeDescriptor*)descriptor { NSMutableArray* children = [NSMutableArray new]; @@ -262,7 +216,10 @@ [elements addObject:node]; } - [responder success:@{@"elements" : elements}]; + // Converting to folly::dynamic is expensive, do it on a bg queue: + dispatch_async(SKLayoutPluginSerialBackgroundQueue(), ^{ + [responder success:@{@"elements" : elements}]; + }); } - (void)onCallSetData:(NSString*)objectId @@ -399,36 +356,37 @@ [descriptor invalidateNode:node]; // Collect invalidate messages before sending in a batch - std::lock_guard lock(invalidObjectsMutex); + std::lock_guard lock(_invalidObjectsMutex); [_invalidObjects addObject:nodeId]; if (_invalidateMessageQueued) { return; } - _invalidateMessageQueued = true; + _invalidateMessageQueued = YES; - if (_lastInvalidateMessage.timeIntervalSinceNow < -1) { - dispatch_after( - dispatch_time(DISPATCH_TIME_NOW, 500 * NSEC_PER_MSEC), - dispatch_get_main_queue(), - ^{ - [self reportInvalidatedObjects]; - }); - } + dispatch_after( + dispatch_time(DISPATCH_TIME_NOW, 500 * NSEC_PER_MSEC), + dispatch_get_main_queue(), + ^{ + [self _reportInvalidatedObjects]; + }); } -- (void)reportInvalidatedObjects { - std::lock_guard lock(invalidObjectsMutex); +- (void)invalidateRootNode { + [self invalidateNode:_rootNode]; +} + +- (void)_reportInvalidatedObjects { NSMutableArray* nodes = [NSMutableArray new]; - for (NSString* nodeId in self->_invalidObjects) { - [nodes addObject:[NSDictionary dictionaryWithObject:nodeId forKey:@"id"]]; - } - [self->_connection send:@"invalidate" - withParams:[NSDictionary dictionaryWithObject:nodes - forKey:@"nodes"]]; - self->_lastInvalidateMessage = [NSDate date]; - self->_invalidObjects = [NSMutableSet new]; - self->_invalidateMessageQueued = false; - return; + { // scope mutex acquisition + std::lock_guard lock(_invalidObjectsMutex); + for (NSString* nodeId in _invalidObjects) { + [nodes addObject:@{@"id" : nodeId}]; + } + _invalidObjects = [NSMutableSet new]; + _invalidateMessageQueued = NO; + } // release mutex before calling out to other code + + [_connection send:@"invalidate" withParams:@{@"nodes" : nodes}]; } - (void)updateNodeReference:(id)node { @@ -567,4 +525,22 @@ @end +/** + Operations like converting NSDictionary to folly::dynamic can be expensive. + Do them on this serial background queue to avoid blocking the main thread. + (Of course, ideally we wouldn't bother with building NSDictionary objects + in the first place, in favor of just using folly::dynamic directly...) + */ +dispatch_queue_t SKLayoutPluginSerialBackgroundQueue(void) { + static dispatch_queue_t queue; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + queue = dispatch_queue_create("flipper.layout.bg", DISPATCH_QUEUE_SERIAL); + // This should be relatively high priority, to prevent Flipper lag. + dispatch_set_target_queue( + queue, dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0)); + }); + return queue; +} + #endif diff --git a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKInvalidation.h b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKInvalidation.h index 9b26d599..f2eee581 100644 --- a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKInvalidation.h +++ b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKInvalidation.h @@ -10,7 +10,7 @@ @protocol SKInvalidationDelegate - (void)invalidateNode:(id)node; - +- (void)invalidateRootNode; - (void)updateNodeReference:(id)node; @end diff --git a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKNodeDescriptor.h b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKNodeDescriptor.h index c805b8c6..b00289c5 100644 --- a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKNodeDescriptor.h +++ b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/SKNodeDescriptor.h @@ -45,9 +45,13 @@ typedef void (^SKNodeUpdateData)(id value); - (NSString*)identifierForNode:(T)node; /** - An ID which is equal between reflowing components is needed to get the - identifier of root node of a tree which need to be invalidated on - FlipperKitLayoutPlugin side. + When the setData command is received from Flipper to change a node's data, + an "invalidateWithData" command is sent back to signal that the node has + changed. However sometimes you may want to invalidate some other node, + not the node that had its data actually modified; usually some ancestor. + This method allows you to substitute another node's identifier. + If you do not override it, the default behavior is to simply return + the node's identifier. */ - (NSString*)identifierForInvalidation:(T)node; diff --git a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/UIView+SKInvalidation.mm b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/UIView+SKInvalidation.mm index 3da4f961..10058261 100644 --- a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/UIView+SKInvalidation.mm +++ b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/UIView+SKInvalidation.mm @@ -9,7 +9,6 @@ #import #import - #import "SKInvalidation.h" #import "SKSwizzle.h" #import "UIView+SKInvalidation.h" @@ -31,6 +30,14 @@ FB_LINKABLE(UIView_SKInvalidation) }); } +/** +This function takes in a view and returns true if the view is a UIWindow and its +windowLevel is an alert one otherwise it returns false. +*/ +static auto shouldInvalidateRootNode(UIView* view) -> bool { + return [view isKindOfClass:[UIWindow class]]; +} + - (void)swizzle_setHidden:(BOOL)hidden { [self swizzle_setHidden:hidden]; @@ -47,7 +54,11 @@ FB_LINKABLE(UIView_SKInvalidation) id delegate = [SKInvalidation sharedInstance].delegate; if (delegate != nil) { - [delegate invalidateNode:view]; + if (shouldInvalidateRootNode(view.superview)) { + [delegate invalidateRootNode]; + return; + } + [delegate invalidateNode:view.superview]; } } @@ -55,6 +66,10 @@ FB_LINKABLE(UIView_SKInvalidation) id delegate = [SKInvalidation sharedInstance].delegate; if (delegate != nil && self.superview != nil) { + if (shouldInvalidateRootNode(self.superview)) { + [delegate invalidateRootNode]; + return; + } [delegate invalidateNode:self.superview]; } diff --git a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/descriptors/SKViewDescriptor.mm b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/descriptors/SKViewDescriptor.mm index 0a6bc759..44bef040 100644 --- a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/descriptors/SKViewDescriptor.mm +++ b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutPlugin/descriptors/SKViewDescriptor.mm @@ -453,6 +453,11 @@ static NSDictionary* YGUnitEnumMap = nil; @"Accessibility.accessibilityTraits.UIAccessibilityTraitCausesPageTurn": ^(NSNumber *value) { node.accessibilityTraits = AccessibilityTraitsToggle(node.accessibilityTraits, UIAccessibilityTraitCausesPageTurn, [value boolValue]); }, + @"Accessibility.accessibilityTraits.UIAccessibilityTraitTabBar": ^(NSNumber *value) { + if (@available(iOS 10.0, *)) { + node.accessibilityTraits = AccessibilityTraitsToggle(node.accessibilityTraits, UIAccessibilityTraitTabBar, [value boolValue]); + } + }, @"Accessibility.accessibilityViewIsModal": ^(NSNumber *value) { node.accessibilityViewIsModal = [value boolValue]; }, diff --git a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.mm b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.mm index ab17894d..f102aeea 100644 --- a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.mm +++ b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.mm @@ -78,6 +78,11 @@ } - (void)didObserveResponse:(SKResponseInfo*)response { + // Only track HTTP(S) calls, data URLs cannot be casted to NSHTTPURLResponse + if (![response.response isKindOfClass:[NSHTTPURLResponse class]]) { + return; + } + NSHTTPURLResponse* httpResponse = (NSHTTPURLResponse*)response.response; NSMutableArray*>* headers = [NSMutableArray new]; diff --git a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/SKResponseInfo.m b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/SKResponseInfo.m index 1213dd16..668e03c1 100644 --- a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/SKResponseInfo.m +++ b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitNetworkPlugin/FlipperKitNetworkPlugin/SKResponseInfo.m @@ -29,6 +29,11 @@ } + (BOOL)shouldStripReponseBodyWithResponse:(NSURLResponse*)response { + // Only HTTP(S) responses have Content-Type headers + if (![response isKindOfClass:[NSHTTPURLResponse class]]) { + return YES; + } + NSHTTPURLResponse* httpResponse = (NSHTTPURLResponse*)response; NSString* contentType = httpResponse.allHeaderFields[@"content-type"]; if (!contentType) { diff --git a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.m b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.m index ced17e17..d995fb87 100644 --- a/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.m +++ b/ios/Pods/FlipperKit/iOS/Plugins/FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.m @@ -82,6 +82,15 @@ static NSString* const kAppSuiteUserDefaultsName = @"App Suite UserDefaults"; forKey:preferenceName]; [responder success:[sharedPreferences dictionaryRepresentation]]; }]; + + [connection receive:@"deleteSharedPreference" + withBlock:^(NSDictionary* params, id responder) { + NSUserDefaults* sharedPreferences = + [self sharedPreferencesForParams:params]; + NSString* preferenceName = params[@"preferenceName"]; + [sharedPreferences removeObjectForKey:preferenceName]; + [responder success:[sharedPreferences dictionaryRepresentation]]; + }]; } - (void)didDisconnect { diff --git a/ios/Pods/Folly/LICENSE b/ios/Pods/Folly/LICENSE index f433b1a5..48bdb128 100644 --- a/ios/Pods/Folly/LICENSE +++ b/ios/Pods/Folly/LICENSE @@ -175,3 +175,26 @@ of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + + +Files in folly/external/farmhash licensed as follows + + Copyright (c) 2014 Google, 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: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/ios/Pods/Folly/README.md b/ios/Pods/Folly/README.md index cd093f41..f50d687b 100644 --- a/ios/Pods/Folly/README.md +++ b/ios/Pods/Folly/README.md @@ -66,13 +66,13 @@ is to look at the headers in [top level `folly/` directory](https://github.com/f check the [`docs` folder](folly/docs) for documentation, starting with the [overview](folly/docs/Overview.md). -Folly is published on Github at https://github.com/facebook/folly +Folly is published on GitHub at https://github.com/facebook/folly ### Build Notes #### Dependencies -folly requires gcc 4.9+ and a version of boost compiled with C++14 support. +folly requires gcc 5.1+ and a version of boost compiled with C++14 support. googletest is required to build and run folly's tests. You can download it from https://github.com/google/googletest/archive/release-1.8.0.tar.gz @@ -104,6 +104,11 @@ cmake \ -DCMAKE_LIBRARY_PATH=/alt/lib/path1:/alt/lib/path2 ... ``` +#### Building tests + +By default, building the tests is disabled as part of the CMake `all` target. +To build the tests, specify `-DBUILD_TESTS=ON` to CMake at configure time. + #### Ubuntu 16.04 LTS The following packages are required (feel free to cut and paste the apt-get @@ -127,7 +132,21 @@ sudo apt-get install \ binutils-dev \ libjemalloc-dev \ libssl-dev \ - pkg-config + pkg-config \ + libunwind-dev +``` + +Folly relies on [fmt](https://github.com/fmtlib/fmt) which needs to be installed from source. +The following commands will download, compile, and install fmt. + +``` +git clone https://github.com/fmtlib/fmt.git && cd fmt + +mkdir _build && cd _build +cmake .. + +make -j$(nproc) +sudo make install ``` If advanced debugging functionality is required, use: @@ -139,12 +158,12 @@ sudo apt-get install \ libdwarf-dev ``` -In the folly directory, run: +In the folly directory (e.g. the checkout root or the archive unpack root), run: ``` mkdir _build && cd _build cmake .. make -j $(nproc) - make install + make install # with either sudo or DESTDIR as necessary ``` #### OS X (Homebrew) @@ -154,19 +173,19 @@ folly is available as a Formula and releases may be built via `brew install foll You may also use `folly/build/bootstrap-osx-homebrew.sh` to build against `master`: ``` - cd folly - ./build/bootstrap-osx-homebrew.sh + ./folly/build/bootstrap-osx-homebrew.sh ``` +This will create a build directory `_build` in the top-level. + #### OS X (MacPorts) Install the required packages from MacPorts: ``` sudo port install \ - autoconf \ - automake \ boost \ + cmake \ gflags \ git \ google-glog \ @@ -174,8 +193,9 @@ Install the required packages from MacPorts: libtool \ lz4 \ lzma \ - scons \ + openssl \ snappy \ + xz \ zlib ``` @@ -193,9 +213,10 @@ Download and install folly with the parameters listed below: ``` git clone https://github.com/facebook/folly.git - cd folly/folly - autoreconf -ivf - ./configure CPPFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib" + cd folly + mkdir _build + cd _build + cmake .. make sudo make install ``` diff --git a/ios/Pods/Folly/folly/AtomicHashArray-inl.h b/ios/Pods/Folly/folly/AtomicHashArray-inl.h index 91a66f61..d0580116 100644 --- a/ios/Pods/Folly/folly/AtomicHashArray-inl.h +++ b/ios/Pods/Folly/folly/AtomicHashArray-inl.h @@ -1,11 +1,11 @@ /* - * Copyright 2012-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,7 +21,9 @@ #include #include +#include #include +#include namespace folly { @@ -58,7 +60,11 @@ AtomicHashArray< numEntries_(0, cacheSize), numPendingEntries_(0, cacheSize), isFull_(0), - numErases_(0) {} + numErases_(0) { + if (capacity == 0) { + throw_exception("capacity"); + } +} /* * findInternal -- @@ -480,10 +486,10 @@ struct AtomicHashArray< Allocator, ProbeFcn, KeyConvertFcn>::aha_iterator - : boost::iterator_facade< + : detail::IteratorFacade< aha_iterator, IterVal, - boost::forward_traversal_tag> { + std::forward_iterator_tag> { explicit aha_iterator() : aha_(nullptr) {} // Conversion ctor for interoperability between const_iterator and @@ -514,7 +520,8 @@ struct AtomicHashArray< private: friend class AtomicHashArray; - friend class boost::iterator_core_access; + friend class detail:: + IteratorFacade; void increment() { ++offset_; diff --git a/ios/Pods/Folly/folly/AtomicHashArray.h b/ios/Pods/Folly/folly/AtomicHashArray.h index 0bb4aa60..cd62a232 100644 --- a/ios/Pods/Folly/folly/AtomicHashArray.h +++ b/ios/Pods/Folly/folly/AtomicHashArray.h @@ -1,11 +1,11 @@ /* - * Copyright 2012-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -34,9 +34,6 @@ #include -#include -#include - #include #include #include @@ -102,7 +99,7 @@ template < class Allocator = std::allocator, class ProbeFcn = AtomicHashArrayLinearProbeFcn, class KeyConvertFcn = Identity> -class AtomicHashArray : boost::noncopyable { +class AtomicHashArray { static_assert( (std::is_convertible::value || std::is_convertible::value || @@ -422,6 +419,9 @@ class AtomicHashArray : boost::noncopyable { double maxLoadFactor, uint32_t cacheSize); + AtomicHashArray(const AtomicHashArray&) = delete; + AtomicHashArray& operator=(const AtomicHashArray&) = delete; + ~AtomicHashArray() = default; inline void unlockCell(value_type* const cell, KeyT newKey) { diff --git a/ios/Pods/Folly/folly/AtomicHashMap-inl.h b/ios/Pods/Folly/folly/AtomicHashMap-inl.h index 65498baa..f15f07e2 100644 --- a/ios/Pods/Folly/folly/AtomicHashMap-inl.h +++ b/ios/Pods/Folly/folly/AtomicHashMap-inl.h @@ -1,11 +1,11 @@ /* - * Copyright 2012-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -19,6 +19,9 @@ #endif #include +#include + +#include namespace folly { @@ -566,10 +569,10 @@ struct AtomicHashMap< Allocator, ProbeFcn, KeyConvertFcn>::ahm_iterator - : boost::iterator_facade< + : detail::IteratorFacade< ahm_iterator, IterVal, - boost::forward_traversal_tag> { + std::forward_iterator_tag> { explicit ahm_iterator() : ahm_(nullptr) {} // Conversion ctor for interoperability between const_iterator and @@ -596,7 +599,8 @@ struct AtomicHashMap< explicit ahm_iterator(ContT* ahm, uint32_t subMap, const SubIt& subIt) : ahm_(ahm), subMap_(subMap), subIt_(subIt) {} - friend class boost::iterator_core_access; + friend class detail:: + IteratorFacade; void increment() { CHECK(!isEnd()); diff --git a/ios/Pods/Folly/folly/AtomicHashMap.h b/ios/Pods/Folly/folly/AtomicHashMap.h index 75aeeceb..a98d0866 100644 --- a/ios/Pods/Folly/folly/AtomicHashMap.h +++ b/ios/Pods/Folly/folly/AtomicHashMap.h @@ -1,11 +1,11 @@ /* - * Copyright 2012-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /* * AtomicHashMap -- * @@ -81,10 +82,6 @@ #pragma once #define FOLLY_ATOMICHASHMAP_H_ -#include -#include -#include - #include #include #include @@ -162,7 +159,7 @@ template < class Allocator, class ProbeFcn, class KeyConvertFcn> -class AtomicHashMap : boost::noncopyable { +class AtomicHashMap { typedef AtomicHashArray< KeyT, ValueT, @@ -206,6 +203,9 @@ class AtomicHashMap : boost::noncopyable { // and a Config object to specify more advanced options. explicit AtomicHashMap(size_t finalSizeEst, const Config& c = Config()); + AtomicHashMap(const AtomicHashMap&) = delete; + AtomicHashMap& operator=(const AtomicHashMap&) = delete; + ~AtomicHashMap() { const unsigned int numMaps = numMapsAllocated_.load(std::memory_order_relaxed); diff --git a/ios/Pods/Folly/folly/AtomicIntrusiveLinkedList.h b/ios/Pods/Folly/folly/AtomicIntrusiveLinkedList.h index 95868bf9..aa2a866e 100644 --- a/ios/Pods/Folly/folly/AtomicIntrusiveLinkedList.h +++ b/ios/Pods/Folly/folly/AtomicIntrusiveLinkedList.h @@ -1,11 +1,11 @@ /* - * Copyright 2014-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ios/Pods/Folly/folly/AtomicLinkedList.h b/ios/Pods/Folly/folly/AtomicLinkedList.h index 254a48a0..ecff27ab 100644 --- a/ios/Pods/Folly/folly/AtomicLinkedList.h +++ b/ios/Pods/Folly/folly/AtomicLinkedList.h @@ -1,11 +1,11 @@ /* - * Copyright 2014-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ios/Pods/Folly/folly/AtomicUnorderedMap.h b/ios/Pods/Folly/folly/AtomicUnorderedMap.h index 28209ca3..f7e84d7a 100644 --- a/ios/Pods/Folly/folly/AtomicUnorderedMap.h +++ b/ios/Pods/Folly/folly/AtomicUnorderedMap.h @@ -1,11 +1,11 @@ /* - * Copyright 2013-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,11 +24,10 @@ #include #include -#include - #include #include #include +#include #include #include #include @@ -135,8 +134,8 @@ template < typename Hash = std::hash, typename KeyEqual = std::equal_to, bool SkipKeyValueDeletion = - (boost::has_trivial_destructor::value && - boost::has_trivial_destructor::value), + (std::is_trivially_destructible::value && + std::is_trivially_destructible::value), template class Atom = std::atomic, typename IndexType = uint32_t, typename Allocator = folly::detail::MMapAlloc> @@ -362,8 +361,7 @@ struct AtomicUnorderedInsertMap { IndexType next_; /// Key and Value - typename std::aligned_storage::type - raw_; + aligned_storage_for_t raw_; ~Slot() { auto s = state(); @@ -463,7 +461,7 @@ struct AtomicUnorderedInsertMap { void zeroFillSlots() { using folly::detail::GivesZeroFilledMemory; if (!GivesZeroFilledMemory::value) { - memset(slots_, 0, mmapRequested_); + memset(static_cast(slots_), 0, mmapRequested_); } } }; @@ -478,8 +476,8 @@ template < typename Hash = std::hash, typename KeyEqual = std::equal_to, bool SkipKeyValueDeletion = - (boost::has_trivial_destructor::value && - boost::has_trivial_destructor::value), + (std::is_trivially_destructible::value && + std::is_trivially_destructible::value), template class Atom = std::atomic, typename Allocator = folly::detail::MMapAlloc> using AtomicUnorderedInsertMap64 = AtomicUnorderedInsertMap< diff --git a/ios/Pods/Folly/folly/Benchmark.h b/ios/Pods/Folly/folly/Benchmark.h index a2b286a2..f4d8fc7b 100644 --- a/ios/Pods/Folly/folly/Benchmark.h +++ b/ios/Pods/Folly/folly/Benchmark.h @@ -1,11 +1,11 @@ /* - * Copyright 2012-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -52,22 +53,41 @@ inline bool runBenchmarksOnFlag() { return FLAGS_benchmark; } -namespace detail { +class UserMetric { + public: + enum class Type { CUSTOM, TIME, METRIC }; -using TimeIterPair = - std::pair; -using BenchmarkFun = std::function; + int64_t value{}; + Type type{Type::CUSTOM}; + + UserMetric() = default; + /* implicit */ UserMetric(int64_t val, Type typ = Type::CUSTOM) + : value(val), type(typ) {} +}; + +using UserCounters = std::unordered_map; + +namespace detail { +struct TimeIterData { + std::chrono::high_resolution_clock::duration duration; + unsigned int niter; + UserCounters userCounters; +}; + +using BenchmarkFun = std::function; struct BenchmarkRegistration { std::string file; std::string name; BenchmarkFun func; + bool useCounter = false; }; struct BenchmarkResult { std::string file; std::string name; double timeInNs; + UserCounters counters; }; /** @@ -77,7 +97,8 @@ struct BenchmarkResult { void addBenchmarkImpl( const char* file, const char* name, - std::function); + BenchmarkFun, + bool useCounter); } // namespace detail @@ -166,9 +187,7 @@ struct BenchmarkSuspender { * function). */ template -typename std::enable_if< - boost::function_types::function_arity< - decltype(&Lambda::operator())>::value == 2>::type +typename std::enable_if::value>::type addBenchmark(const char* file, const char* name, Lambda&& lambda) { auto execute = [=](unsigned int times) { BenchmarkSuspender::timeSpent = {}; @@ -179,13 +198,11 @@ addBenchmark(const char* file, const char* name, Lambda&& lambda) { niter = lambda(times); auto end = std::chrono::high_resolution_clock::now(); // CORE MEASUREMENT ENDS - - return detail::TimeIterPair( - (end - start) - BenchmarkSuspender::timeSpent, niter); + return detail::TimeIterData{ + (end - start) - BenchmarkSuspender::timeSpent, niter, UserCounters{}}; }; - detail::addBenchmarkImpl( - file, name, std::function(execute)); + detail::addBenchmarkImpl(file, name, detail::BenchmarkFun(execute), false); } /** @@ -195,9 +212,7 @@ addBenchmark(const char* file, const char* name, Lambda&& lambda) { * (iteration occurs outside the function). */ template -typename std::enable_if< - boost::function_types::function_arity< - decltype(&Lambda::operator())>::value == 1>::type +typename std::enable_if::value>::type addBenchmark(const char* file, const char* name, Lambda&& lambda) { addBenchmark(file, name, [=](unsigned int times) { unsigned int niter = 0; @@ -208,6 +223,47 @@ addBenchmark(const char* file, const char* name, Lambda&& lambda) { }); } +/** + * similar as previous two template specialization, but lambda will also take + * customized counters in the following two cases + */ +template +typename std::enable_if< + folly::is_invocable::value>::type +addBenchmark(const char* file, const char* name, Lambda&& lambda) { + auto execute = [=](unsigned int times) { + BenchmarkSuspender::timeSpent = {}; + unsigned int niter; + + // CORE MEASUREMENT STARTS + auto start = std::chrono::high_resolution_clock::now(); + UserCounters counters; + niter = lambda(counters, times); + auto end = std::chrono::high_resolution_clock::now(); + // CORE MEASUREMENT ENDS + return detail::TimeIterData{ + (end - start) - BenchmarkSuspender::timeSpent, niter, counters}; + }; + + detail::addBenchmarkImpl( + file, + name, + std::function(execute), + true); +} + +template +typename std::enable_if::value>::type +addBenchmark(const char* file, const char* name, Lambda&& lambda) { + addBenchmark(file, name, [=](UserCounters& counters, unsigned int times) { + unsigned int niter = 0; + while (times-- > 0) { + niter += lambda(counters); + } + return niter; + }); +} + /** * Call doNotOptimizeAway(var) to ensure that var will be computed even * post-optimization. Use it for variables that are computed during @@ -315,32 +371,50 @@ void printResultComparison( * Introduces a benchmark function. Used internally, see BENCHMARK and * friends below. */ -#define BENCHMARK_IMPL(funName, stringName, rv, paramType, paramName) \ - static void funName(paramType); \ - static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ - (::folly::addBenchmark( \ - __FILE__, \ - stringName, \ - [](paramType paramName) -> unsigned { \ - funName(paramName); \ - return rv; \ - }), \ - true); \ + +#define BENCHMARK_IMPL(funName, stringName, rv, paramType, paramName) \ + static void funName(paramType); \ + FOLLY_MAYBE_UNUSED static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ + (::folly::addBenchmark( \ + __FILE__, \ + stringName, \ + [](paramType paramName) -> unsigned { \ + funName(paramName); \ + return rv; \ + }), \ + true); \ static void funName(paramType paramName) +#define BENCHMARK_IMPL_COUNTERS( \ + funName, stringName, counters, rv, paramType, paramName) \ + static void funName( \ + ::folly::UserCounters& FOLLY_PP_DETAIL_APPEND_VA_ARG(paramType)); \ + FOLLY_MAYBE_UNUSED static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ + (::folly::addBenchmark( \ + __FILE__, \ + stringName, \ + [](::folly::UserCounters& counters FOLLY_PP_DETAIL_APPEND_VA_ARG( \ + paramType paramName)) -> unsigned { \ + funName(counters FOLLY_PP_DETAIL_APPEND_VA_ARG(paramName)); \ + return rv; \ + }), \ + true); \ + static void funName(::folly::UserCounters& counters \ + FOLLY_PP_DETAIL_APPEND_VA_ARG(paramType paramName)) + /** * Introduces a benchmark function with support for returning the actual * number of iterations. Used internally, see BENCHMARK_MULTI and friends * below. */ -#define BENCHMARK_MULTI_IMPL(funName, stringName, paramType, paramName) \ - static unsigned funName(paramType); \ - static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ - (::folly::addBenchmark( \ - __FILE__, \ - stringName, \ - [](paramType paramName) { return funName(paramName); }), \ - true); \ +#define BENCHMARK_MULTI_IMPL(funName, stringName, paramType, paramName) \ + static unsigned funName(paramType); \ + FOLLY_MAYBE_UNUSED static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ + (::folly::addBenchmark( \ + __FILE__, \ + stringName, \ + [](paramType paramName) { return funName(paramName); }), \ + true); \ static unsigned funName(paramType paramName) /** @@ -355,9 +429,9 @@ void printResultComparison( * v.push_back(42); * } * - * BENCHMARK(insertVectorBegin, n) { + * BENCHMARK(insertVectorBegin, iters) { * vector v; - * FOR_EACH_RANGE (i, 0, n) { + * FOR_EACH_RANGE (i, 0, iters) { * v.insert(v.begin(), 42); * } * } @@ -365,11 +439,33 @@ void printResultComparison( #define BENCHMARK(name, ...) \ BENCHMARK_IMPL( \ name, \ - FB_STRINGIZE(name), \ + FOLLY_PP_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) +/** + * Allow users to record customized counter during benchmarking, + * there will be one extra column showing in the output result for each counter + * + * BENCHMARK_COUNTERS(insertVectorBegin, couters, iters) { + * vector v; + * FOR_EACH_RANGE (i, 0, iters) { + * v.insert(v.begin(), 42); + * } + * BENCHMARK_SUSPEND { + * counters["foo"] = 10; + * } + * } + */ +#define BENCHMARK_COUNTERS(name, counters, ...) \ + BENCHMARK_IMPL_COUNTERS( \ + name, \ + FOLLY_PP_STRINGIZE(name), \ + counters, \ + FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ + FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ + __VA_ARGS__) /** * Like BENCHMARK above, but allows the user to return the actual * number of iterations executed in the function body. This can be @@ -388,7 +484,7 @@ void printResultComparison( #define BENCHMARK_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ - FB_STRINGIZE(name), \ + FOLLY_PP_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) @@ -446,27 +542,27 @@ void printResultComparison( * BENCHMARK_NAMED_PARAM(addValue, 0_to_1000, 10, 0, 1000) * BENCHMARK_NAMED_PARAM(addValue, 5k_to_20k, 250, 5000, 20000) */ -#define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ - BENCHMARK_IMPL( \ - FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ - FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ - iters, \ - unsigned, \ - iters) { \ - name(iters, ##__VA_ARGS__); \ +#define BENCHMARK_NAMED_PARAM(name, param_name, ...) \ + BENCHMARK_IMPL( \ + FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ + FOLLY_PP_STRINGIZE(name) "(" FOLLY_PP_STRINGIZE(param_name) ")", \ + iters, \ + unsigned, \ + iters) { \ + name(iters, ##__VA_ARGS__); \ } /** * Same as BENCHMARK_NAMED_PARAM, but allows one to return the actual number * of iterations that have been run. */ -#define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ - BENCHMARK_MULTI_IMPL( \ - FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ - FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ - unsigned, \ - iters) { \ - return name(iters, ##__VA_ARGS__); \ +#define BENCHMARK_NAMED_PARAM_MULTI(name, param_name, ...) \ + BENCHMARK_MULTI_IMPL( \ + FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ + FOLLY_PP_STRINGIZE(name) "(" FOLLY_PP_STRINGIZE(param_name) ")", \ + unsigned, \ + iters) { \ + return name(iters, ##__VA_ARGS__); \ } /** @@ -496,11 +592,19 @@ void printResultComparison( #define BENCHMARK_RELATIVE(name, ...) \ BENCHMARK_IMPL( \ name, \ - "%" FB_STRINGIZE(name), \ + "%" FOLLY_PP_STRINGIZE(name), \ FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) +#define BENCHMARK_COUNTERS_RELATIVE(name, counters, ...) \ + BENCHMARK_IMPL_COUNTERS( \ + name, \ + "%" FOLLY_PP_STRINGIZE(name), \ + counters, \ + FB_ARG_2_OR_1(1, ##__VA_ARGS__), \ + FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ + __VA_ARGS__) /** * Same as BENCHMARK_RELATIVE, but allows one to return the actual number * of iterations that have been run. @@ -508,7 +612,7 @@ void printResultComparison( #define BENCHMARK_RELATIVE_MULTI(name, ...) \ BENCHMARK_MULTI_IMPL( \ name, \ - "%" FB_STRINGIZE(name), \ + "%" FOLLY_PP_STRINGIZE(name), \ FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \ __VA_ARGS__) @@ -528,35 +632,35 @@ void printResultComparison( /** * A combination of BENCHMARK_RELATIVE and BENCHMARK_NAMED_PARAM. */ -#define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ - BENCHMARK_IMPL( \ - FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ - "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ - iters, \ - unsigned, \ - iters) { \ - name(iters, ##__VA_ARGS__); \ +#define BENCHMARK_RELATIVE_NAMED_PARAM(name, param_name, ...) \ + BENCHMARK_IMPL( \ + FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ + "%" FOLLY_PP_STRINGIZE(name) "(" FOLLY_PP_STRINGIZE(param_name) ")", \ + iters, \ + unsigned, \ + iters) { \ + name(iters, ##__VA_ARGS__); \ } /** * Same as BENCHMARK_RELATIVE_NAMED_PARAM, but allows one to return the * actual number of iterations that have been run. */ -#define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ - BENCHMARK_MULTI_IMPL( \ - FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ - "%" FB_STRINGIZE(name) "(" FB_STRINGIZE(param_name) ")", \ - unsigned, \ - iters) { \ - return name(iters, ##__VA_ARGS__); \ +#define BENCHMARK_RELATIVE_NAMED_PARAM_MULTI(name, param_name, ...) \ + BENCHMARK_MULTI_IMPL( \ + FB_CONCATENATE(name, FB_CONCATENATE(_, param_name)), \ + "%" FOLLY_PP_STRINGIZE(name) "(" FOLLY_PP_STRINGIZE(param_name) ")", \ + unsigned, \ + iters) { \ + return name(iters, ##__VA_ARGS__); \ } /** * Draws a line of dashes. */ -#define BENCHMARK_DRAW_LINE() \ - static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ - (::folly::addBenchmark(__FILE__, "-", []() -> unsigned { return 0; }), \ +#define BENCHMARK_DRAW_LINE() \ + FOLLY_MAYBE_UNUSED static bool FB_ANONYMOUS_VARIABLE(follyBenchmarkUnused) = \ + (::folly::addBenchmark(__FILE__, "-", []() -> unsigned { return 0; }), \ true) /** diff --git a/ios/Pods/Folly/folly/Bits.h b/ios/Pods/Folly/folly/Bits.h index e5cf5be2..1569d598 100644 --- a/ios/Pods/Folly/folly/Bits.h +++ b/ios/Pods/Folly/folly/Bits.h @@ -1,11 +1,11 @@ /* - * Copyright 2011-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ios/Pods/Folly/folly/CPortability.h b/ios/Pods/Folly/folly/CPortability.h index 82a1e8e0..976daf06 100644 --- a/ios/Pods/Folly/folly/CPortability.h +++ b/ios/Pods/Folly/folly/CPortability.h @@ -1,11 +1,11 @@ /* - * Copyright 2013-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -68,12 +68,14 @@ * itself was compiled without ASAN but a downstream project that uses folly is * compiling with ASAN enabled. * - * Use FOLLY_ASAN_ENABLED (defined in folly-config.h) to check if folly itself - * was compiled with ASAN enabled. + * Use FOLLY_LIBRARY_SANITIZE_ADDRESS (defined in folly-config.h) to check if + * folly itself was compiled with ASAN enabled. */ +#ifndef FOLLY_SANITIZE_ADDRESS #if FOLLY_HAS_FEATURE(address_sanitizer) || __SANITIZE_ADDRESS__ #define FOLLY_SANITIZE_ADDRESS 1 #endif +#endif /* Define attribute wrapper for function attribute used to disable * address sanitizer instrumentation. Unfortunately, this attribute @@ -101,17 +103,46 @@ /* Define a convenience macro to test when thread sanitizer is being used * across the different compilers (e.g. clang, gcc) */ +#ifndef FOLLY_SANITIZE_THREAD #if FOLLY_HAS_FEATURE(thread_sanitizer) || __SANITIZE_THREAD__ #define FOLLY_SANITIZE_THREAD 1 #endif +#endif + +#if FOLLY_SANITIZE_THREAD +#define FOLLY_DISABLE_THREAD_SANITIZER \ + __attribute__((no_sanitize_thread, noinline)) +#else +#define FOLLY_DISABLE_THREAD_SANITIZER +#endif /** - * Define a convenience macro to test when ASAN, UBSAN or TSAN sanitizer are - * being used + * Define a convenience macro to test when memory sanitizer is being used + * across the different compilers (e.g. clang, gcc) */ -#if defined(FOLLY_SANITIZE_ADDRESS) || defined(FOLLY_SANITIZE_THREAD) +#ifndef FOLLY_SANITIZE_MEMORY +#if FOLLY_HAS_FEATURE(memory_sanitizer) || __SANITIZE_MEMORY__ +#define FOLLY_SANITIZE_MEMORY 1 +#endif +#endif + +#if FOLLY_SANITIZE_MEMORY +#define FOLLY_DISABLE_MEMORY_SANITIZER \ + __attribute__((no_sanitize_memory, noinline)) +#else +#define FOLLY_DISABLE_MEMORY_SANITIZER +#endif + +/** + * Define a convenience macro to test when ASAN, UBSAN, TSAN or MSAN sanitizer + * are being used + */ +#ifndef FOLLY_SANITIZE +#if defined(FOLLY_SANITIZE_ADDRESS) || defined(FOLLY_SANITIZE_THREAD) || \ + defined(FOLLY_SANITIZE_MEMORY) #define FOLLY_SANITIZE 1 #endif +#endif #if FOLLY_SANITIZE #define FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(...) \ @@ -120,15 +151,15 @@ #define FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER(...) #endif // FOLLY_SANITIZE +#define FOLLY_DISABLE_SANITIZERS \ + FOLLY_DISABLE_ADDRESS_SANITIZER FOLLY_DISABLE_THREAD_SANITIZER \ + FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER("undefined") + /** * Macro for marking functions as having public visibility. */ #if defined(__GNUC__) -#if __GNUC_PREREQ(4, 9) -#define FOLLY_EXPORT [[gnu::visibility("default")]] -#else #define FOLLY_EXPORT __attribute__((__visibility__("default"))) -#endif #else #define FOLLY_EXPORT #endif @@ -136,7 +167,7 @@ // noinline #ifdef _MSC_VER #define FOLLY_NOINLINE __declspec(noinline) -#elif defined(__clang__) || defined(__GNUC__) +#elif defined(__GNUC__) #define FOLLY_NOINLINE __attribute__((__noinline__)) #else #define FOLLY_NOINLINE @@ -145,16 +176,16 @@ // always inline #ifdef _MSC_VER #define FOLLY_ALWAYS_INLINE __forceinline -#elif defined(__clang__) || defined(__GNUC__) +#elif defined(__GNUC__) #define FOLLY_ALWAYS_INLINE inline __attribute__((__always_inline__)) #else #define FOLLY_ALWAYS_INLINE inline #endif // attribute hidden -#if _MSC_VER +#if defined(_MSC_VER) #define FOLLY_ATTR_VISIBILITY_HIDDEN -#elif defined(__clang__) || defined(__GNUC__) +#elif defined(__GNUC__) #define FOLLY_ATTR_VISIBILITY_HIDDEN __attribute__((__visibility__("hidden"))) #else #define FOLLY_ATTR_VISIBILITY_HIDDEN @@ -174,21 +205,38 @@ #endif #endif -// These functions are defined by the TSAN runtime library and enable -// annotating mutexes for TSAN. -extern "C" FOLLY_ATTR_WEAK void -AnnotateRWLockCreate(const char* f, int l, const volatile void* addr); -extern "C" FOLLY_ATTR_WEAK void -AnnotateRWLockCreateStatic(const char* f, int l, const volatile void* addr); -extern "C" FOLLY_ATTR_WEAK void -AnnotateRWLockDestroy(const char* f, int l, const volatile void* addr); -extern "C" FOLLY_ATTR_WEAK void -AnnotateRWLockAcquired(const char* f, int l, const volatile void* addr, long w); -extern "C" FOLLY_ATTR_WEAK void -AnnotateRWLockReleased(const char* f, int l, const volatile void* addr, long w); -extern "C" FOLLY_ATTR_WEAK void AnnotateBenignRaceSized( - const char* f, - int l, - const volatile void* addr, - long size, - const char* desc); +// FOLLY_ERASE +// +// A conceptual attribute/syntax combo for erasing a function from the build +// artifacts and forcing all call-sites to inline the callee, at least as far +// as each compiler supports. +// +// Semantically includes the inline specifier. +#define FOLLY_ERASE FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN + +// FOLLY_ERASE_HACK_GCC +// +// Equivalent to FOLLY_ERASE, but without hiding under gcc. Useful when applied +// to a function which may sometimes be hidden separately, for example by being +// declared in an anonymous namespace, since in such cases with -Wattributes +// enabled, gcc would emit: 'visibility' attribute ignored. +// +// Semantically includes the inline specifier. +#if defined(__GNUC__) && !defined(__clang__) +#define FOLLY_ERASE_HACK_GCC FOLLY_ALWAYS_INLINE +#else +#define FOLLY_ERASE_HACK_GCC FOLLY_ERASE +#endif + +// FOLLY_ERASE_TRYCATCH +// +// Equivalent to FOLLY_ERASE, but for code which might contain explicit +// exception handling. Has the effect of FOLLY_ERASE, except under MSVC which +// warns about __forceinline when functions contain exception handling. +// +// Semantically includes the inline specifier. +#ifdef _MSC_VER +#define FOLLY_ERASE_TRYCATCH inline +#else +#define FOLLY_ERASE_TRYCATCH FOLLY_ERASE +#endif diff --git a/ios/Pods/Folly/folly/CachelinePadded.h b/ios/Pods/Folly/folly/CachelinePadded.h index d706b18a..635bc53d 100644 --- a/ios/Pods/Folly/folly/CachelinePadded.h +++ b/ios/Pods/Folly/folly/CachelinePadded.h @@ -1,11 +1,11 @@ /* - * Copyright 2016-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +17,11 @@ #pragma once #include +#include #include #include +#include namespace folly { @@ -29,17 +31,20 @@ namespace folly { * * If `sizeof(T) <= alignof(T)` then the inner `T` will be entirely within one * false sharing range (AKA cache line). + * + * CachelinePadded may add padding both before and after the value. Consider + * whether alignas(folly::hardware_destructive_interference_size) suffices. */ template class CachelinePadded { - static_assert( - alignof(T) <= max_align_v, - "CachelinePadded does not support over-aligned types."); - public: template explicit CachelinePadded(Args&&... args) - : inner_(std::forward(args)...) {} + : inner_(std::forward(args)...) { + FOLLY_SAFE_DCHECK( + (reinterpret_cast(&inner_) % alignof(T)) == 0, + "CachelinePadded requires types aligned to their ABI requirement"); + } T* get() { return &inner_; diff --git a/ios/Pods/Folly/folly/CancellationToken-inl.h b/ios/Pods/Folly/folly/CancellationToken-inl.h new file mode 100644 index 00000000..8ce5c5c7 --- /dev/null +++ b/ios/Pods/Folly/folly/CancellationToken-inl.h @@ -0,0 +1,351 @@ +/* + * Copyright (c) Facebook, Inc. and its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +#include + +namespace folly { + +namespace detail { + +// Internal cancellation state object. +class CancellationState { + public: + FOLLY_NODISCARD static CancellationStateSourcePtr create(); + + private: + // Constructed initially with a CancellationSource reference count of 1. + CancellationState() noexcept; + + ~CancellationState(); + + friend struct CancellationStateTokenDeleter; + friend struct CancellationStateSourceDeleter; + + void removeTokenReference() noexcept; + void removeSourceReference() noexcept; + + public: + FOLLY_NODISCARD CancellationStateTokenPtr addTokenReference() noexcept; + + FOLLY_NODISCARD CancellationStateSourcePtr addSourceReference() noexcept; + + bool tryAddCallback( + CancellationCallback* callback, + bool incrementRefCountIfSuccessful) noexcept; + + void removeCallback(CancellationCallback* callback) noexcept; + + bool isCancellationRequested() const noexcept; + bool canBeCancelled() const noexcept; + + // Request cancellation. + // Return 'true' if cancellation had already been requested. + // Return 'false' if this was the first thread to request + // cancellation. + bool requestCancellation() noexcept; + + private: + void lock() noexcept; + void unlock() noexcept; + void unlockAndIncrementTokenCount() noexcept; + void unlockAndDecrementTokenCount() noexcept; + bool tryLockAndCancelUnlessCancelled() noexcept; + + template + bool tryLock(Predicate predicate) noexcept; + + static bool canBeCancelled(std::uint64_t state) noexcept; + static bool isCancellationRequested(std::uint64_t state) noexcept; + static bool isLocked(std::uint64_t state) noexcept; + + static constexpr std::uint64_t kCancellationRequestedFlag = 1; + static constexpr std::uint64_t kLockedFlag = 2; + static constexpr std::uint64_t kTokenReferenceCountIncrement = 4; + static constexpr std::uint64_t kSourceReferenceCountIncrement = + std::uint64_t(1) << 33u; + static constexpr std::uint64_t kTokenReferenceCountMask = + (kSourceReferenceCountIncrement - 1u) - + (kTokenReferenceCountIncrement - 1u); + static constexpr std::uint64_t kSourceReferenceCountMask = + std::numeric_limits::max() - + (kSourceReferenceCountIncrement - 1u); + + // Bit 0 - Cancellation Requested + // Bit 1 - Locked Flag + // Bits 2-32 - Token reference count (max ~2 billion) + // Bits 33-63 - Source reference count (max ~2 billion) + std::atomic state_; + CancellationCallback* head_; + std::thread::id signallingThreadId_; +}; + +inline void CancellationStateTokenDeleter::operator()( + CancellationState* state) noexcept { + state->removeTokenReference(); +} + +inline void CancellationStateSourceDeleter::operator()( + CancellationState* state) noexcept { + state->removeSourceReference(); +} + +} // namespace detail + +inline CancellationToken::CancellationToken( + const CancellationToken& other) noexcept + : state_() { + if (other.state_) { + state_ = other.state_->addTokenReference(); + } +} + +inline CancellationToken::CancellationToken(CancellationToken&& other) noexcept + : state_(std::move(other.state_)) {} + +inline CancellationToken& CancellationToken::operator=( + const CancellationToken& other) noexcept { + if (state_ != other.state_) { + CancellationToken temp{other}; + swap(temp); + } + return *this; +} + +inline CancellationToken& CancellationToken::operator=( + CancellationToken&& other) noexcept { + state_ = std::move(other.state_); + return *this; +} + +inline bool CancellationToken::isCancellationRequested() const noexcept { + return state_ != nullptr && state_->isCancellationRequested(); +} + +inline bool CancellationToken::canBeCancelled() const noexcept { + return state_ != nullptr && state_->canBeCancelled(); +} + +inline void CancellationToken::swap(CancellationToken& other) noexcept { + std::swap(state_, other.state_); +} + +inline CancellationToken::CancellationToken( + detail::CancellationStateTokenPtr state) noexcept + : state_(std::move(state)) {} + +inline bool operator==( + const CancellationToken& a, + const CancellationToken& b) noexcept { + return a.state_ == b.state_; +} + +inline bool operator!=( + const CancellationToken& a, + const CancellationToken& b) noexcept { + return !(a == b); +} + +inline CancellationSource::CancellationSource() + : state_(detail::CancellationState::create()) {} + +inline CancellationSource::CancellationSource( + const CancellationSource& other) noexcept + : state_() { + if (other.state_) { + state_ = other.state_->addSourceReference(); + } +} + +inline CancellationSource::CancellationSource( + CancellationSource&& other) noexcept + : state_(std::move(other.state_)) {} + +inline CancellationSource& CancellationSource::operator=( + const CancellationSource& other) noexcept { + if (state_ != other.state_) { + CancellationSource temp{other}; + swap(temp); + } + return *this; +} + +inline CancellationSource& CancellationSource::operator=( + CancellationSource&& other) noexcept { + state_ = std::move(other.state_); + return *this; +} + +inline CancellationSource CancellationSource::invalid() noexcept { + return CancellationSource{detail::CancellationStateSourcePtr{}}; +} + +inline bool CancellationSource::isCancellationRequested() const noexcept { + return state_ != nullptr && state_->isCancellationRequested(); +} + +inline bool CancellationSource::canBeCancelled() const noexcept { + return state_ != nullptr; +} + +inline CancellationToken CancellationSource::getToken() const noexcept { + if (state_ != nullptr) { + return CancellationToken{state_->addTokenReference()}; + } + return CancellationToken{}; +} + +inline bool CancellationSource::requestCancellation() const noexcept { + if (state_ != nullptr) { + return state_->requestCancellation(); + } + return false; +} + +inline void CancellationSource::swap(CancellationSource& other) noexcept { + std::swap(state_, other.state_); +} + +inline CancellationSource::CancellationSource( + detail::CancellationStateSourcePtr&& state) noexcept + : state_(std::move(state)) {} + +template < + typename Callable, + std::enable_if_t< + std::is_constructible:: + value, + int>> +inline CancellationCallback::CancellationCallback( + CancellationToken&& ct, + Callable&& callable) + : next_(nullptr), + prevNext_(nullptr), + state_(nullptr), + callback_(static_cast(callable)), + destructorHasRunInsideCallback_(nullptr), + callbackCompleted_(false) { + if (ct.state_ != nullptr && ct.state_->tryAddCallback(this, false)) { + state_ = ct.state_.release(); + } +} + +template < + typename Callable, + std::enable_if_t< + std::is_constructible:: + value, + int>> +inline CancellationCallback::CancellationCallback( + const CancellationToken& ct, + Callable&& callable) + : next_(nullptr), + prevNext_(nullptr), + state_(nullptr), + callback_(static_cast(callable)), + destructorHasRunInsideCallback_(nullptr), + callbackCompleted_(false) { + if (ct.state_ != nullptr && ct.state_->tryAddCallback(this, true)) { + state_ = ct.state_.get(); + } +} + +inline CancellationCallback::~CancellationCallback() { + if (state_ != nullptr) { + state_->removeCallback(this); + } +} + +inline void CancellationCallback::invokeCallback() noexcept { + // Invoke within a noexcept context so that we std::terminate() if it throws. + callback_(); +} + +namespace detail { + +inline CancellationStateSourcePtr CancellationState::create() { + return CancellationStateSourcePtr{new CancellationState()}; +} + +inline CancellationState::CancellationState() noexcept + : state_(kSourceReferenceCountIncrement), + head_(nullptr), + signallingThreadId_() {} + +inline CancellationStateTokenPtr +CancellationState::addTokenReference() noexcept { + state_.fetch_add(kTokenReferenceCountIncrement, std::memory_order_relaxed); + return CancellationStateTokenPtr{this}; +} + +inline void CancellationState::removeTokenReference() noexcept { + const auto oldState = state_.fetch_sub( + kTokenReferenceCountIncrement, std::memory_order_acq_rel); + DCHECK( + (oldState & kTokenReferenceCountMask) >= kTokenReferenceCountIncrement); + if (oldState < (2 * kTokenReferenceCountIncrement)) { + delete this; + } +} + +inline CancellationStateSourcePtr +CancellationState::addSourceReference() noexcept { + state_.fetch_add(kSourceReferenceCountIncrement, std::memory_order_relaxed); + return CancellationStateSourcePtr{this}; +} + +inline void CancellationState::removeSourceReference() noexcept { + const auto oldState = state_.fetch_sub( + kSourceReferenceCountIncrement, std::memory_order_acq_rel); + DCHECK( + (oldState & kSourceReferenceCountMask) >= kSourceReferenceCountIncrement); + if (oldState < + (kSourceReferenceCountIncrement + kTokenReferenceCountIncrement)) { + delete this; + } +} + +inline bool CancellationState::isCancellationRequested() const noexcept { + return isCancellationRequested(state_.load(std::memory_order_acquire)); +} + +inline bool CancellationState::canBeCancelled() const noexcept { + return canBeCancelled(state_.load(std::memory_order_acquire)); +} + +inline bool CancellationState::canBeCancelled(std::uint64_t state) noexcept { + // Can be cancelled if there is at least one CancellationSource ref-count + // or if cancellation has been requested. + return (state >= kSourceReferenceCountIncrement) || + isCancellationRequested(state); +} + +inline bool CancellationState::isCancellationRequested( + std::uint64_t state) noexcept { + return (state & kCancellationRequestedFlag) != 0; +} + +inline bool CancellationState::isLocked(std::uint64_t state) noexcept { + return (state & kLockedFlag) != 0; +} + +} // namespace detail + +} // namespace folly diff --git a/ios/Pods/Folly/folly/CancellationToken.h b/ios/Pods/Folly/folly/CancellationToken.h new file mode 100644 index 00000000..bdda121b --- /dev/null +++ b/ios/Pods/Folly/folly/CancellationToken.h @@ -0,0 +1,298 @@ +/* + * Copyright (c) Facebook, Inc. and its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +#include +#include +#include +#include + +namespace folly { + +class CancellationCallback; +class CancellationSource; +struct OperationCancelled : public std::exception { + const char* what() const noexcept override { + return "coroutine operation cancelled"; + } +}; + +namespace detail { +class CancellationState; +struct CancellationStateTokenDeleter { + void operator()(CancellationState*) noexcept; +}; +struct CancellationStateSourceDeleter { + void operator()(CancellationState*) noexcept; +}; +using CancellationStateTokenPtr = + std::unique_ptr; +using CancellationStateSourcePtr = + std::unique_ptr; +} // namespace detail + +// A CancellationToken is an object that can be passed into an function or +// operation that allows the caller to later request that the operation be +// cancelled. +// +// A CancellationToken object can be obtained by calling the .getToken() +// method on a CancellationSource or by copying another CancellationToken +// object. All CancellationToken objects obtained from the same original +// CancellationSource object all reference the same underlying cancellation +// state and will all be cancelled together. +// +// If your function needs to be cancellable but does not need to request +// cancellation then you should take a CancellationToken as a parameter. +// If your function needs to be able to request cancellation then you +// should instead take a CancellationSource as a parameter. +class CancellationToken { + public: + // Constructs to a token that can never be cancelled. + // + // Pass a default-constructed CancellationToken into an operation that + // you never intend to cancel. These objects are very cheap to create. + CancellationToken() noexcept = default; + + // Construct a copy of the token that shares the same underlying state. + CancellationToken(const CancellationToken& other) noexcept; + CancellationToken(CancellationToken&& other) noexcept; + + CancellationToken& operator=(const CancellationToken& other) noexcept; + CancellationToken& operator=(CancellationToken&& other) noexcept; + + // Query whether someone has called .requestCancellation() on an instance + // of CancellationSource object associated with this CancellationToken. + bool isCancellationRequested() const noexcept; + + // Query whether this CancellationToken can ever have cancellation requested + // on it. + // + // This will return false if the CancellationToken is not associated with a + // CancellationSource object. eg. because the CancellationToken was + // default-constructed, has been moved-from or because the last + // CancellationSource object associated with the underlying cancellation state + // has been destroyed and the operation has not yet been cancelled and so + // never will be. + // + // Implementations of operations may be able to take more efficient code-paths + // if they know they can never be cancelled. + bool canBeCancelled() const noexcept; + + void swap(CancellationToken& other) noexcept; + + friend bool operator==( + const CancellationToken& a, + const CancellationToken& b) noexcept; + + private: + friend class CancellationCallback; + friend class CancellationSource; + + explicit CancellationToken(detail::CancellationStateTokenPtr state) noexcept; + + detail::CancellationStateTokenPtr state_; +}; + +bool operator==( + const CancellationToken& a, + const CancellationToken& b) noexcept; +bool operator!=( + const CancellationToken& a, + const CancellationToken& b) noexcept; + +// A CancellationSource object provides the ability to request cancellation of +// operations that an associated CancellationToken was passed to. +// +// Example usage: +// CancellationSource cs; +// Future f = startSomeOperation(cs.getToken()); +// +// // Later... +// cs.requestCancellation(); +class CancellationSource { + public: + // Construct to a new, independent cancellation source. + CancellationSource(); + + // Construct a new reference to the same underlying cancellation state. + // + // Either the original or the new copy can be used to request cancellation + // of associated work. + CancellationSource(const CancellationSource& other) noexcept; + + // This leaves 'other' in an empty state where 'requestCancellation()' is a + // no-op and 'canBeCancelled()' returns false. + CancellationSource(CancellationSource&& other) noexcept; + + CancellationSource& operator=(const CancellationSource& other) noexcept; + CancellationSource& operator=(CancellationSource&& other) noexcept; + + // Construct a CancellationSource that cannot be cancelled. + // + // This factory function can be used to obtain a CancellationSource that + // is equivalent to a moved-from CancellationSource object without needing + // to allocate any shared-state. + static CancellationSource invalid() noexcept; + + // Query if cancellation has already been requested on this CancellationSource + // or any other CancellationSource object copied from the same original + // CancellationSource object. + bool isCancellationRequested() const noexcept; + + // Query if cancellation can be requested through this CancellationSource + // object. This will only return false if the CancellationSource object has + // been moved-from. + bool canBeCancelled() const noexcept; + + // Obtain a CancellationToken linked to this CancellationSource. + // + // This token can be passed into cancellable operations to allow the caller + // to later request cancellation of that operation. + CancellationToken getToken() const noexcept; + + // Request cancellation of work associated with this CancellationSource. + // + // This will ensure subsequent calls to isCancellationRequested() on any + // CancellationSource or CancellationToken object associated with the same + // underlying cancellation state to return true. + // + // If this is the first call to requestCancellation() on any + // CancellationSource object with the same underlying state then this call + // will also execute the callbacks associated with any CancellationCallback + // objects that were constructed with an associated CancellationToken. + // + // Note that it is possible that another thread may be concurrently + // registering a callback with CancellationCallback. This method guarantees + // that either this thread will see the callback registration and will + // ensure that the callback is called, or the CancellationCallback constructor + // will see the cancellation-requested signal and will execute the callback + // inline inside the constructor. + // + // Returns the previous state of 'isCancellationRequested()'. i.e. + // - 'true' if cancellation had previously been requested. + // - 'false' if this was the first call to request cancellation. + bool requestCancellation() const noexcept; + + void swap(CancellationSource& other) noexcept; + + friend bool operator==( + const CancellationSource& a, + const CancellationSource& b) noexcept; + + private: + explicit CancellationSource( + detail::CancellationStateSourcePtr&& state) noexcept; + + detail::CancellationStateSourcePtr state_; +}; + +bool operator==( + const CancellationSource& a, + const CancellationSource& b) noexcept; +bool operator!=( + const CancellationSource& a, + const CancellationSource& b) noexcept; + +class CancellationCallback { + using VoidFunction = folly::Function; + + public: + // Constructing a CancellationCallback object registers the callback + // with the specified CancellationToken such that the callback will be + // executed if the corresponding CancellationSource object has the + // requestCancellation() method called on it. + // + // If the CancellationToken object already had cancellation requested + // then the callback will be executed inline on the current thread before + // the constructor returns. Otherwise, the callback will be executed on + // in the execution context of the first thread to call requestCancellation() + // on a corresponding CancellationSource. + // + // The callback object must not throw any unhandled exceptions. Doing so + // will result in the program terminating via std::terminate(). + template < + typename Callable, + std::enable_if_t< + std::is_constructible::value, + int> = 0> + CancellationCallback(CancellationToken&& ct, Callable&& callable); + template < + typename Callable, + std::enable_if_t< + std::is_constructible::value, + int> = 0> + CancellationCallback(const CancellationToken& ct, Callable&& callable); + + // Deregisters the callback from the CancellationToken. + // + // If cancellation has been requested concurrently on another thread and the + // callback is currently executing then the destructor will block until after + // the callback has returned (otherwise it might be left with a dangling + // reference). + // + // You should generally try to implement your callback functions to be lock + // free to avoid deadlocks between the callback executing and the + // CancellationCallback destructor trying to deregister the callback. + // + // If the callback has not started executing yet then the callback will be + // deregistered from the CancellationToken before the destructor completes. + // + // Once the destructor returns you can be guaranteed that the callback will + // not be called by a subsequent call to 'requestCancellation()' on a + // CancellationSource associated with the CancellationToken passed to the + // constructor. + ~CancellationCallback(); + + // Not copyable/movable + CancellationCallback(const CancellationCallback&) = delete; + CancellationCallback(CancellationCallback&&) = delete; + CancellationCallback& operator=(const CancellationCallback&) = delete; + CancellationCallback& operator=(CancellationCallback&&) = delete; + + private: + friend class detail::CancellationState; + + void invokeCallback() noexcept; + + CancellationCallback* next_; + + // Pointer to the pointer that points to this node in the linked list. + // This could be the 'next_' of a previous CancellationCallback or could + // be the 'head_' pointer of the CancellationState. + // If this node is inserted in the list then this will be non-null. + CancellationCallback** prevNext_; + + detail::CancellationState* state_; + VoidFunction callback_; + + // Pointer to a flag stored on the stack of the caller to invokeCallback() + // that is used to indicate to the caller of invokeCallback() that the + // destructor has run and it is no longer valid to access the callback + // object. + bool* destructorHasRunInsideCallback_; + + // Flag used to signal that the callback has completed executing on another + // thread and it is now safe to exit the destructor. + std::atomic callbackCompleted_; +}; + +} // namespace folly + +#include diff --git a/ios/Pods/Folly/folly/Chrono.h b/ios/Pods/Folly/folly/Chrono.h index 06ca07fd..3b3838b4 100644 --- a/ios/Pods/Folly/folly/Chrono.h +++ b/ios/Pods/Folly/folly/Chrono.h @@ -1,11 +1,11 @@ /* - * Copyright 2017-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -31,11 +31,12 @@ * * std::chrono::round */ -#if __cpp_lib_chrono >= 201510 || _MSC_VER +#if __cpp_lib_chrono >= 201510 || _LIBCPP_STD_VER > 14 || _MSC_VER namespace folly { namespace chrono { +/* using override */ using std::chrono::abs; /* using override */ using std::chrono::ceil; /* using override */ using std::chrono::floor; /* using override */ using std::chrono::round; @@ -81,6 +82,18 @@ constexpr To round_impl(Duration const& d, To const& t0) { } } // namespace detail +// mimic: std::chrono::abs, C++17 +template < + typename Rep, + typename Period, + typename = typename std::enable_if< + std::chrono::duration::min() < + std::chrono::duration::zero()>::type> +constexpr std::chrono::duration abs( + std::chrono::duration const& d) { + return d < std::chrono::duration::zero() ? -d : d; +} + // mimic: std::chrono::ceil, C++17 // from: http://en.cppreference.com/w/cpp/chrono/duration/ceil, CC-BY-SA template < @@ -168,17 +181,18 @@ struct coarse_steady_clock { using time_point = std::chrono::time_point; constexpr static bool is_steady = true; - static time_point now() { + static time_point now() noexcept { #ifndef CLOCK_MONOTONIC_COARSE return time_point(std::chrono::duration_cast( std::chrono::steady_clock::now().time_since_epoch())); #else timespec ts; auto ret = clock_gettime(CLOCK_MONOTONIC_COARSE, &ts); - if (ret != 0) { + if (kIsDebug && (ret != 0)) { throw_exception( "Error using CLOCK_MONOTONIC_COARSE."); } + return time_point(std::chrono::duration_cast( std::chrono::seconds(ts.tv_sec) + std::chrono::nanoseconds(ts.tv_nsec))); diff --git a/ios/Pods/Folly/folly/ClockGettimeWrappers.h b/ios/Pods/Folly/folly/ClockGettimeWrappers.h index dfb28f82..8c403193 100644 --- a/ios/Pods/Folly/folly/ClockGettimeWrappers.h +++ b/ios/Pods/Folly/folly/ClockGettimeWrappers.h @@ -1,11 +1,11 @@ /* - * Copyright 2016-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ios/Pods/Folly/folly/AtomicBitSet.h b/ios/Pods/Folly/folly/ConcurrentBitSet.h similarity index 75% rename from ios/Pods/Folly/folly/AtomicBitSet.h rename to ios/Pods/Folly/folly/ConcurrentBitSet.h index 967821d3..2be6e216 100644 --- a/ios/Pods/Folly/folly/AtomicBitSet.h +++ b/ios/Pods/Folly/folly/ConcurrentBitSet.h @@ -1,11 +1,11 @@ /* - * Copyright 2013-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,22 +22,26 @@ #include #include -#include - #include namespace folly { /** * An atomic bitset of fixed size (specified at compile time). + * + * Formerly known as AtomicBitSet. It was renamed while fixing a bug + * to avoid any silent breakages during run time. */ template -class AtomicBitSet : private boost::noncopyable { +class ConcurrentBitSet { public: /** - * Construct an AtomicBitSet; all bits are initially false. + * Construct a ConcurrentBitSet; all bits are initially false. */ - AtomicBitSet(); + ConcurrentBitSet(); + + ConcurrentBitSet(const ConcurrentBitSet&) = delete; + ConcurrentBitSet& operator=(const ConcurrentBitSet&) = delete; /** * Set bit idx to true, using the given memory order. Returns the @@ -115,43 +119,44 @@ class AtomicBitSet : private boost::noncopyable { // avoid casts static constexpr BlockType kOne = 1; - - std::array data_; + static constexpr size_t kNumBlocks = (N + kBitsPerBlock - 1) / kBitsPerBlock; + std::array data_; }; // value-initialize to zero template -inline AtomicBitSet::AtomicBitSet() : data_() {} +inline ConcurrentBitSet::ConcurrentBitSet() : data_() {} template -inline bool AtomicBitSet::set(size_t idx, std::memory_order order) { - assert(idx < N * kBitsPerBlock); +inline bool ConcurrentBitSet::set(size_t idx, std::memory_order order) { + assert(idx < N); BlockType mask = kOne << bitOffset(idx); return data_[blockIndex(idx)].fetch_or(mask, order) & mask; } template -inline bool AtomicBitSet::reset(size_t idx, std::memory_order order) { - assert(idx < N * kBitsPerBlock); +inline bool ConcurrentBitSet::reset(size_t idx, std::memory_order order) { + assert(idx < N); BlockType mask = kOne << bitOffset(idx); return data_[blockIndex(idx)].fetch_and(~mask, order) & mask; } template inline bool -AtomicBitSet::set(size_t idx, bool value, std::memory_order order) { +ConcurrentBitSet::set(size_t idx, bool value, std::memory_order order) { return value ? set(idx, order) : reset(idx, order); } template -inline bool AtomicBitSet::test(size_t idx, std::memory_order order) const { - assert(idx < N * kBitsPerBlock); +inline bool ConcurrentBitSet::test(size_t idx, std::memory_order order) + const { + assert(idx < N); BlockType mask = kOne << bitOffset(idx); return data_[blockIndex(idx)].load(order) & mask; } template -inline bool AtomicBitSet::operator[](size_t idx) const { +inline bool ConcurrentBitSet::operator[](size_t idx) const { return test(idx); } diff --git a/ios/Pods/Folly/folly/ConcurrentSkipList-inl.h b/ios/Pods/Folly/folly/ConcurrentSkipList-inl.h index a4e5ddbc..a0eec307 100644 --- a/ios/Pods/Folly/folly/ConcurrentSkipList-inl.h +++ b/ios/Pods/Folly/folly/ConcurrentSkipList-inl.h @@ -1,11 +1,11 @@ /* - * Copyright 2011-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,9 +27,7 @@ #include #include -#include #include -#include #include #include @@ -43,7 +41,7 @@ template class csl_iterator; template -class SkipListNode : private boost::noncopyable { +class SkipListNode { enum : uint16_t { IS_HEAD_NODE = 1, MARKED_FOR_REMOVAL = (1 << 1), @@ -53,6 +51,9 @@ class SkipListNode : private boost::noncopyable { public: typedef T value_type; + SkipListNode(const SkipListNode&) = delete; + SkipListNode& operator=(const SkipListNode&) = delete; + template < typename NodeAlloc, typename U, @@ -81,7 +82,7 @@ class SkipListNode : private boost::noncopyable { template struct DestroyIsNoOp : StrictConjunction< AllocatorHasTrivialDeallocate, - boost::has_trivial_destructor> {}; + std::is_trivially_destructible> {}; // copy the head node to a new head node assuming lock acquired SkipListNode* copyHead(SkipListNode* node) { diff --git a/ios/Pods/Folly/folly/ConcurrentSkipList.h b/ios/Pods/Folly/folly/ConcurrentSkipList.h index 1e7638c7..ab75ce39 100644 --- a/ios/Pods/Folly/folly/ConcurrentSkipList.h +++ b/ios/Pods/Folly/folly/ConcurrentSkipList.h @@ -1,11 +1,11 @@ /* - * Copyright 2011-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -125,12 +125,12 @@ Sample usage: #include #include -#include #include #include #include #include +#include #include namespace folly { @@ -158,7 +158,7 @@ class ConcurrentSkipList { typedef T key_type; typedef detail::csl_iterator iterator; - typedef detail::csl_iterator const_iterator; + typedef detail::csl_iterator const_iterator; class Accessor; class Skipper; @@ -709,10 +709,10 @@ class ConcurrentSkipList::Accessor { // implements forward iterator concept. template -class detail::csl_iterator : public boost::iterator_facade< +class detail::csl_iterator : public detail::IteratorFacade< csl_iterator, ValT, - boost::forward_traversal_tag> { + std::forward_iterator_tag> { public: typedef ValT value_type; typedef value_type& reference; @@ -738,9 +738,10 @@ class detail::csl_iterator : public boost::iterator_facade< } private: - friend class boost::iterator_core_access; template friend class csl_iterator; + friend class detail:: + IteratorFacade; void increment() { node_ = node_->next(); diff --git a/ios/Pods/Folly/folly/ConstexprMath.h b/ios/Pods/Folly/folly/ConstexprMath.h index 3dae93a2..4a70ff6c 100644 --- a/ios/Pods/Folly/folly/ConstexprMath.h +++ b/ios/Pods/Folly/folly/ConstexprMath.h @@ -1,11 +1,11 @@ /* - * Copyright 2017-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,49 +17,11 @@ #pragma once #include +#include #include #include namespace folly { - -// TODO: Replace with std::equal_to, etc., after upgrading to C++14. -template -struct constexpr_equal_to { - constexpr bool operator()(T const& a, T const& b) const { - return a == b; - } -}; -template -struct constexpr_not_equal_to { - constexpr bool operator()(T const& a, T const& b) const { - return a != b; - } -}; -template -struct constexpr_less { - constexpr bool operator()(T const& a, T const& b) const { - return a < b; - } -}; -template -struct constexpr_less_equal { - constexpr bool operator()(T const& a, T const& b) const { - return a <= b; - } -}; -template -struct constexpr_greater { - constexpr bool operator()(T const& a, T const& b) const { - return a > b; - } -}; -template -struct constexpr_greater_equal { - constexpr bool operator()(T const& a, T const& b) const { - return a >= b; - } -}; - // TLDR: Prefer using operator< for ordering. And when // a and b are equivalent objects, we return b to make // sorting stable. @@ -91,7 +53,7 @@ constexpr_clamp(T const& v, T const& lo, T const& hi, Less less) { } template constexpr T const& constexpr_clamp(T const& v, T const& lo, T const& hi) { - return constexpr_clamp(v, lo, hi, constexpr_less{}); + return constexpr_clamp(v, lo, hi, std::less{}); } namespace detail { diff --git a/ios/Pods/Folly/folly/Conv.cpp b/ios/Pods/Folly/folly/Conv.cpp index 76e14c98..d74df582 100644 --- a/ios/Pods/Folly/folly/Conv.cpp +++ b/ios/Pods/Folly/folly/Conv.cpp @@ -1,11 +1,11 @@ /* - * Copyright 2011-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + #include #include @@ -275,7 +276,7 @@ Expected str_to_bool(StringPiece* src) noexcept { } bool result; - size_t len = size_t(e - b); + auto len = size_t(e - b); switch (*b) { case '0': case '1': { @@ -399,7 +400,7 @@ Expected str_to_floating(StringPiece* src) noexcept { // There must be non-whitespace, otherwise we would have caught this above assert(b < e); - size_t size = size_t(e - b); + auto size = size_t(e - b); bool negative = false; if (*b == '-') { @@ -543,7 +544,7 @@ inline Expected digits_to( return makeUnexpected(err); } - size_t size = size_t(e - b); + auto size = size_t(e - b); /* Although the string is entirely made of digits, we still need to * check for overflow. @@ -777,7 +778,7 @@ ConversionError makeConversionError(ConversionCode code, StringPiece input) { if (err.quote) { tmp.append(1, '"'); } - if (input.size() > 0) { + if (!input.empty()) { tmp.append(input.data(), input.size()); } if (err.quote) { diff --git a/ios/Pods/Folly/folly/Conv.h b/ios/Pods/Folly/folly/Conv.h index b187d01a..b6c0b87e 100644 --- a/ios/Pods/Folly/folly/Conv.h +++ b/ios/Pods/Folly/folly/Conv.h @@ -1,11 +1,11 @@ /* - * Copyright 2011-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,15 +15,92 @@ */ /** - * Converts anything to anything, with an emphasis on performance and - * safety. * - * @author Andrei Alexandrescu (andrei.alexandrescu@fb.com) + * This file provides a generic interface for converting objects to and from + * string-like types (std::string, fbstring, StringPiece), as well as + * range-checked conversions between numeric and enum types. The mechanisms are + * extensible, so that user-specified types can add folly::to support. + * + ******************************************************************************* + * TYPE -> STRING CONVERSIONS + ******************************************************************************* + * You can call the to or to. These are variadic + * functions that convert their arguments to strings, and concatenate them to + * form a result. So, for example, + * + * auto str = to(123, "456", 789); + * + * Sets str to "123456789". + * + * In addition to just concatenating the arguments, related functions can + * delimit them with some string: toDelim(",", "123", 456, "789") + * will return the string "123,456,789". + * + * toAppend does not return a string; instead, it takes a pointer to a string as + * its last argument, and appends the result of the concatenation into it: + * std::string str = "123"; + * toAppend(456, "789", &str); // Now str is "123456789". + * + * The toAppendFit function acts like toAppend, but it precalculates the size + * required to perform the append operation, and reserves that space in the + * output string before actually inserting its arguments. This can sometimes + * save on string expansion, but beware: appending to the same string many times + * with toAppendFit is likely a pessimization, since it will resize the string + * once per append. + * + * The combination of the append and delim variants also exist: toAppendDelim + * and toAppendDelimFit are defined, with the obvious semantics. + * + ******************************************************************************* + * STRING -> TYPE CONVERSIONS + ******************************************************************************* + * Going in the other direction, and parsing a string into a C++ type, is also + * supported: + * to("123"); // Returns 123. + * + * Out of range (e.g. to("1000")), or invalidly formatted (e.g. + * to("four")) inputs will throw. If throw-on-error is undesirable (for + * instance: you're dealing with untrusted input, and want to protect yourself + * from users sending you down a very slow exception-throwing path), you can use + * tryTo, which will return an Expected. + * + * There are overloads of to() and tryTo() that take a StringPiece*. These parse + * out a type from the beginning of a string, and modify the passed-in + * StringPiece to indicate the portion of the string not consumed. + * + ******************************************************************************* + * NUMERIC / ENUM CONVERSIONS + ******************************************************************************* + * Conv also supports a to(S) overload, where T and S are numeric or enum + * types, that checks to see that the target type can represent its argument, + * and will throw if it cannot. This includes cases where a floating point -> + * integral conversion is attempted on a value with a non-zero fractional + * component, and integral -> floating point conversions that would lose + * precision. Enum conversions are range-checked for the underlying type of the + * enum, but there is no check that the input value is a valid choice of enum + * value. + * + ******************************************************************************* + * CUSTOM TYPE CONVERSIONS + ******************************************************************************* + * Users may customize the string conversion functionality for their own data + * types, . The key functions you should implement are: + * // Two functions to allow conversion to your type from a string. + * Expected parseTo(folly::StringPiece in, + * YourType& out); + * YourErrorType makeConversionError(YourErrorType in, StringPiece in); + * // Two functions to allow conversion from your type to a string. + * template + * void toAppend(const YourType& in, String* out); + * size_t estimateSpaceNeeded(const YourType& in); + * + * These are documented below, inline. */ #pragma once #include +#include #include #include #include @@ -32,7 +109,6 @@ #include #include #include -#include #include #include // V8 JavaScript implementation @@ -44,7 +120,9 @@ #include #include #include +#include #include +#include #include namespace folly { @@ -109,7 +187,7 @@ class ConversionError : public ConversionErrorBase { * return YourConversionError(messageString); * } ******************************************************************************/ -ConversionError makeConversionError(ConversionCode code, StringPiece sp); +ConversionError makeConversionError(ConversionCode code, StringPiece input); namespace detail { /** @@ -648,15 +726,13 @@ template typename std::enable_if< std::is_enum::value && IsSomeString::value>::type toAppend(Src value, Tgt* result) { - toAppend( - static_cast::type>(value), result); + toAppend(to_underlying(value), result); } template typename std::enable_if::value, size_t>::type estimateSpaceNeeded(Src value) { - return estimateSpaceNeeded( - static_cast::type>(value)); + return estimateSpaceNeeded(to_underlying(value)); } /******************************************************************************* @@ -699,8 +775,9 @@ toAppend( case DoubleToStringConverter::FIXED: conv.ToFixed(value, int(numDigits), &builder); break; + case DoubleToStringConverter::PRECISION: default: - CHECK(mode == DoubleToStringConverter::PRECISION); + assert(mode == DoubleToStringConverter::PRECISION); conv.ToPrecision(value, int(numDigits), &builder); break; } @@ -1216,8 +1293,8 @@ typename std::enable_if< Expected>::type convertTo(const Src& value) noexcept { if /* constexpr */ ( - folly::_t>(std::numeric_limits::max()) < - folly::_t>(std::numeric_limits::max())) { + std::make_unsigned_t(std::numeric_limits::max()) < + std::make_unsigned_t(std::numeric_limits::max())) { if (greater_than::max()>(value)) { return makeUnexpected(ConversionCode::ARITH_POSITIVE_OVERFLOW); } @@ -1335,11 +1412,7 @@ convertTo(const Src& value) noexcept { template inline std::string errorValue(const Src& value) { -#ifdef FOLLY_HAS_RTTI - return to("(", demangle(typeid(Tgt)), ") ", value); -#else - return to(value); -#endif + return to("(", pretty_name(), ") ", value); } template @@ -1551,8 +1624,7 @@ typename std::enable_if< !std::is_convertible::value, Expected>::type tryTo(const Src& value) { - using I = typename std::underlying_type::type; - return tryTo(static_cast(value)); + return tryTo(to_underlying(value)); } template @@ -1571,7 +1643,7 @@ typename std::enable_if< !std::is_convertible::value, Tgt>::type to(const Src& value) { - return to(static_cast::type>(value)); + return to(to_underlying(value)); } template diff --git a/ios/Pods/Folly/folly/CppAttributes.h b/ios/Pods/Folly/folly/CppAttributes.h index 00cc3933..cd02fa3f 100644 --- a/ios/Pods/Folly/folly/CppAttributes.h +++ b/ios/Pods/Folly/folly/CppAttributes.h @@ -1,11 +1,11 @@ /* - * Copyright 2015-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ios/Pods/Folly/folly/CpuId.h b/ios/Pods/Folly/folly/CpuId.h index 8d92f8b7..517ccb57 100644 --- a/ios/Pods/Folly/folly/CpuId.h +++ b/ios/Pods/Folly/folly/CpuId.h @@ -1,11 +1,11 @@ /* - * Copyright 2012-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -105,108 +105,108 @@ class CpuId { #endif } -#define X(name, r, bit) \ - FOLLY_ALWAYS_INLINE bool name() const { \ - return ((r) & (1U << bit)) != 0; \ +#define FOLLY_DETAIL_CPUID_X(name, r, bit) \ + FOLLY_ALWAYS_INLINE bool name() const { \ + return ((r) & (1U << bit)) != 0; \ } // cpuid(1): Processor Info and Feature Bits. -#define C(name, bit) X(name, f1c_, bit) - C(sse3, 0) - C(pclmuldq, 1) - C(dtes64, 2) - C(monitor, 3) - C(dscpl, 4) - C(vmx, 5) - C(smx, 6) - C(eist, 7) - C(tm2, 8) - C(ssse3, 9) - C(cnxtid, 10) - C(fma, 12) - C(cx16, 13) - C(xtpr, 14) - C(pdcm, 15) - C(pcid, 17) - C(dca, 18) - C(sse41, 19) - C(sse42, 20) - C(x2apic, 21) - C(movbe, 22) - C(popcnt, 23) - C(tscdeadline, 24) - C(aes, 25) - C(xsave, 26) - C(osxsave, 27) - C(avx, 28) - C(f16c, 29) - C(rdrand, 30) -#undef C -#define D(name, bit) X(name, f1d_, bit) - D(fpu, 0) - D(vme, 1) - D(de, 2) - D(pse, 3) - D(tsc, 4) - D(msr, 5) - D(pae, 6) - D(mce, 7) - D(cx8, 8) - D(apic, 9) - D(sep, 11) - D(mtrr, 12) - D(pge, 13) - D(mca, 14) - D(cmov, 15) - D(pat, 16) - D(pse36, 17) - D(psn, 18) - D(clfsh, 19) - D(ds, 21) - D(acpi, 22) - D(mmx, 23) - D(fxsr, 24) - D(sse, 25) - D(sse2, 26) - D(ss, 27) - D(htt, 28) - D(tm, 29) - D(pbe, 31) -#undef D +#define FOLLY_DETAIL_CPUID_C(name, bit) FOLLY_DETAIL_CPUID_X(name, f1c_, bit) + FOLLY_DETAIL_CPUID_C(sse3, 0) + FOLLY_DETAIL_CPUID_C(pclmuldq, 1) + FOLLY_DETAIL_CPUID_C(dtes64, 2) + FOLLY_DETAIL_CPUID_C(monitor, 3) + FOLLY_DETAIL_CPUID_C(dscpl, 4) + FOLLY_DETAIL_CPUID_C(vmx, 5) + FOLLY_DETAIL_CPUID_C(smx, 6) + FOLLY_DETAIL_CPUID_C(eist, 7) + FOLLY_DETAIL_CPUID_C(tm2, 8) + FOLLY_DETAIL_CPUID_C(ssse3, 9) + FOLLY_DETAIL_CPUID_C(cnxtid, 10) + FOLLY_DETAIL_CPUID_C(fma, 12) + FOLLY_DETAIL_CPUID_C(cx16, 13) + FOLLY_DETAIL_CPUID_C(xtpr, 14) + FOLLY_DETAIL_CPUID_C(pdcm, 15) + FOLLY_DETAIL_CPUID_C(pcid, 17) + FOLLY_DETAIL_CPUID_C(dca, 18) + FOLLY_DETAIL_CPUID_C(sse41, 19) + FOLLY_DETAIL_CPUID_C(sse42, 20) + FOLLY_DETAIL_CPUID_C(x2apic, 21) + FOLLY_DETAIL_CPUID_C(movbe, 22) + FOLLY_DETAIL_CPUID_C(popcnt, 23) + FOLLY_DETAIL_CPUID_C(tscdeadline, 24) + FOLLY_DETAIL_CPUID_C(aes, 25) + FOLLY_DETAIL_CPUID_C(xsave, 26) + FOLLY_DETAIL_CPUID_C(osxsave, 27) + FOLLY_DETAIL_CPUID_C(avx, 28) + FOLLY_DETAIL_CPUID_C(f16c, 29) + FOLLY_DETAIL_CPUID_C(rdrand, 30) +#undef FOLLY_DETAIL_CPUID_C +#define FOLLY_DETAIL_CPUID_D(name, bit) FOLLY_DETAIL_CPUID_X(name, f1d_, bit) + FOLLY_DETAIL_CPUID_D(fpu, 0) + FOLLY_DETAIL_CPUID_D(vme, 1) + FOLLY_DETAIL_CPUID_D(de, 2) + FOLLY_DETAIL_CPUID_D(pse, 3) + FOLLY_DETAIL_CPUID_D(tsc, 4) + FOLLY_DETAIL_CPUID_D(msr, 5) + FOLLY_DETAIL_CPUID_D(pae, 6) + FOLLY_DETAIL_CPUID_D(mce, 7) + FOLLY_DETAIL_CPUID_D(cx8, 8) + FOLLY_DETAIL_CPUID_D(apic, 9) + FOLLY_DETAIL_CPUID_D(sep, 11) + FOLLY_DETAIL_CPUID_D(mtrr, 12) + FOLLY_DETAIL_CPUID_D(pge, 13) + FOLLY_DETAIL_CPUID_D(mca, 14) + FOLLY_DETAIL_CPUID_D(cmov, 15) + FOLLY_DETAIL_CPUID_D(pat, 16) + FOLLY_DETAIL_CPUID_D(pse36, 17) + FOLLY_DETAIL_CPUID_D(psn, 18) + FOLLY_DETAIL_CPUID_D(clfsh, 19) + FOLLY_DETAIL_CPUID_D(ds, 21) + FOLLY_DETAIL_CPUID_D(acpi, 22) + FOLLY_DETAIL_CPUID_D(mmx, 23) + FOLLY_DETAIL_CPUID_D(fxsr, 24) + FOLLY_DETAIL_CPUID_D(sse, 25) + FOLLY_DETAIL_CPUID_D(sse2, 26) + FOLLY_DETAIL_CPUID_D(ss, 27) + FOLLY_DETAIL_CPUID_D(htt, 28) + FOLLY_DETAIL_CPUID_D(tm, 29) + FOLLY_DETAIL_CPUID_D(pbe, 31) +#undef FOLLY_DETAIL_CPUID_D // cpuid(7): Extended Features. -#define B(name, bit) X(name, f7b_, bit) - B(bmi1, 3) - B(hle, 4) - B(avx2, 5) - B(smep, 7) - B(bmi2, 8) - B(erms, 9) - B(invpcid, 10) - B(rtm, 11) - B(mpx, 14) - B(avx512f, 16) - B(avx512dq, 17) - B(rdseed, 18) - B(adx, 19) - B(smap, 20) - B(avx512ifma, 21) - B(pcommit, 22) - B(clflushopt, 23) - B(clwb, 24) - B(avx512pf, 26) - B(avx512er, 27) - B(avx512cd, 28) - B(sha, 29) - B(avx512bw, 30) - B(avx512vl, 31) -#undef B -#define C(name, bit) X(name, f7c_, bit) - C(prefetchwt1, 0) - C(avx512vbmi, 1) -#undef C +#define FOLLY_DETAIL_CPUID_B(name, bit) FOLLY_DETAIL_CPUID_X(name, f7b_, bit) + FOLLY_DETAIL_CPUID_B(bmi1, 3) + FOLLY_DETAIL_CPUID_B(hle, 4) + FOLLY_DETAIL_CPUID_B(avx2, 5) + FOLLY_DETAIL_CPUID_B(smep, 7) + FOLLY_DETAIL_CPUID_B(bmi2, 8) + FOLLY_DETAIL_CPUID_B(erms, 9) + FOLLY_DETAIL_CPUID_B(invpcid, 10) + FOLLY_DETAIL_CPUID_B(rtm, 11) + FOLLY_DETAIL_CPUID_B(mpx, 14) + FOLLY_DETAIL_CPUID_B(avx512f, 16) + FOLLY_DETAIL_CPUID_B(avx512dq, 17) + FOLLY_DETAIL_CPUID_B(rdseed, 18) + FOLLY_DETAIL_CPUID_B(adx, 19) + FOLLY_DETAIL_CPUID_B(smap, 20) + FOLLY_DETAIL_CPUID_B(avx512ifma, 21) + FOLLY_DETAIL_CPUID_B(pcommit, 22) + FOLLY_DETAIL_CPUID_B(clflushopt, 23) + FOLLY_DETAIL_CPUID_B(clwb, 24) + FOLLY_DETAIL_CPUID_B(avx512pf, 26) + FOLLY_DETAIL_CPUID_B(avx512er, 27) + FOLLY_DETAIL_CPUID_B(avx512cd, 28) + FOLLY_DETAIL_CPUID_B(sha, 29) + FOLLY_DETAIL_CPUID_B(avx512bw, 30) + FOLLY_DETAIL_CPUID_B(avx512vl, 31) +#undef FOLLY_DETAIL_CPUID_B +#define FOLLY_DETAIL_CPUID_C(name, bit) FOLLY_DETAIL_CPUID_X(name, f7c_, bit) + FOLLY_DETAIL_CPUID_C(prefetchwt1, 0) + FOLLY_DETAIL_CPUID_C(avx512vbmi, 1) +#undef FOLLY_DETAIL_CPUID_C -#undef X +#undef FOLLY_DETAIL_CPUID_X private: uint32_t f1c_ = 0; diff --git a/ios/Pods/Folly/folly/DefaultKeepAliveExecutor.h b/ios/Pods/Folly/folly/DefaultKeepAliveExecutor.h index 5f8b8ea9..c5d7f606 100644 --- a/ios/Pods/Folly/folly/DefaultKeepAliveExecutor.h +++ b/ios/Pods/Folly/folly/DefaultKeepAliveExecutor.h @@ -1,11 +1,11 @@ /* - * Copyright 2018-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -46,6 +46,15 @@ class DefaultKeepAliveExecutor : public virtual Executor { keepAliveReleaseBaton_.wait(); } + void joinAndResetKeepAlive() { + joinKeepAlive(); + auto keepAliveCount = + controlBlock_->keepAliveCount_.exchange(1, std::memory_order_relaxed); + DCHECK_EQ(keepAliveCount, 0); + keepAliveReleaseBaton_.reset(); + keepAlive_ = makeKeepAlive(this); + } + private: struct ControlBlock { std::atomic keepAliveCount_{1}; @@ -143,8 +152,7 @@ class DefaultKeepAliveExecutor : public virtual Executor { std::shared_ptr controlBlock_{std::make_shared()}; Baton<> keepAliveReleaseBaton_; - KeepAlive keepAlive_{ - makeKeepAlive(this)}; + KeepAlive keepAlive_{makeKeepAlive(this)}; }; } // namespace folly diff --git a/ios/Pods/Folly/folly/Demangle.cpp b/ios/Pods/Folly/folly/Demangle.cpp index c5163213..0df902c0 100644 --- a/ios/Pods/Folly/folly/Demangle.cpp +++ b/ios/Pods/Folly/folly/Demangle.cpp @@ -1,11 +1,11 @@ /* - * Copyright 2014-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,6 +20,7 @@ #include #include +#include #include #if FOLLY_DETAIL_HAVE_DEMANGLE_H @@ -33,6 +34,9 @@ namespace folly { #if FOLLY_DETAIL_HAVE_DEMANGLE_H fbstring demangle(const char* name) { + if (!name) { + return fbstring(); + } #ifdef FOLLY_DEMANGLE_MAX_SYMBOL_SIZE // GCC's __cxa_demangle() uses on-stack data structures for the // parser state which are linear in the number of components of the @@ -118,14 +122,4 @@ size_t demangle(const char* name, char* out, size_t outSize) { #endif -size_t strlcpy(char* dest, const char* const src, size_t size) { - size_t len = strlen(src); - if (size != 0) { - size_t n = std::min(len, size - 1); // always null terminate! - memcpy(dest, src, n); - dest[n] = '\0'; - } - return len; -} - } // namespace folly diff --git a/ios/Pods/Folly/folly/Demangle.h b/ios/Pods/Folly/folly/Demangle.h index 13537dd5..da13fb17 100644 --- a/ios/Pods/Folly/folly/Demangle.h +++ b/ios/Pods/Folly/folly/Demangle.h @@ -1,11 +1,11 @@ /* - * Copyright 2014-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -54,12 +54,9 @@ inline fbstring demangle(const std::type_info& type) { * libiberty), so it is possible for the fbstring version to work, while this * version returns the original, mangled name. */ -size_t demangle(const char* name, char* buf, size_t bufSize); +size_t demangle(const char* name, char* out, size_t outSize); inline size_t demangle(const std::type_info& type, char* buf, size_t bufSize) { return demangle(type.name(), buf, bufSize); } -// glibc doesn't have strlcpy -size_t strlcpy(char* dest, const char* const src, size_t size); - } // namespace folly diff --git a/ios/Pods/Folly/folly/DiscriminatedPtr.h b/ios/Pods/Folly/folly/DiscriminatedPtr.h index dab19978..0f49bd68 100644 --- a/ios/Pods/Folly/folly/DiscriminatedPtr.h +++ b/ios/Pods/Folly/folly/DiscriminatedPtr.h @@ -1,11 +1,11 @@ /* - * Copyright 2011-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/ios/Pods/Folly/folly/DynamicConverter.h b/ios/Pods/Folly/folly/DynamicConverter.h index 1f323fd0..04aec594 100644 --- a/ios/Pods/Folly/folly/DynamicConverter.h +++ b/ios/Pods/Folly/folly/DynamicConverter.h @@ -1,11 +1,11 @@ /* - * Copyright 2012-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,7 +27,9 @@ #include #include #include +#include #include +#include namespace folly { template @@ -110,7 +112,7 @@ struct Dereferencer { static inline void derefToCache( Optional* /* mem */, const dynamic::const_item_iterator& /* it */) { - throw TypeError("array", dynamic::Type::OBJECT); + throw_exception("array", dynamic::Type::OBJECT); } static inline void derefToCache( @@ -249,7 +251,7 @@ struct DynamicConverter> { auto it = d.items().begin(); return std::make_pair(convertTo(it->first), convertTo(it->second)); } else { - throw TypeError("array (size 2) or object (size 1)", d.type()); + throw_exception("array (size 2) or object (size 1)", d.type()); } } }; @@ -271,7 +273,7 @@ struct DynamicConverter< dynamicconverter_detail::conversionIterator(d.items().begin()), dynamicconverter_detail::conversionIterator(d.items().end())); } else { - throw TypeError("object or array", d.type()); + throw_exception("object or array", d.type()); } } }; @@ -295,7 +297,7 @@ struct DynamicConverter< dynamicconverter_detail::conversionIterator(d.items().begin()), dynamicconverter_detail::conversionIterator(d.items().end())); } else { - throw TypeError("object or array", d.type()); + throw_exception("object or array", d.type()); } return ret; } @@ -327,6 +329,16 @@ struct DynamicConstructor< } }; +// enums +template +struct DynamicConstructor< + C, + typename std::enable_if::value>::type> { + static dynamic construct(const C& x) { + return dynamic(to_underlying(x)); + } +}; + // maps template struct DynamicConstructor< diff --git a/ios/Pods/Folly/folly/Exception.h b/ios/Pods/Folly/folly/Exception.h index 19d7509d..b050d641 100644 --- a/ios/Pods/Folly/folly/Exception.h +++ b/ios/Pods/Folly/folly/Exception.h @@ -1,11 +1,11 @@ /* - * Copyright 2013-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -63,12 +63,12 @@ std::system_error makeSystemError(Args&&... args) { // Helper to throw std::system_error [[noreturn]] inline void throwSystemErrorExplicit(int err, const char* msg) { - throw makeSystemErrorExplicit(err, msg); + throw_exception(makeSystemErrorExplicit(err, msg)); } template [[noreturn]] void throwSystemErrorExplicit(int err, Args&&... args) { - throw makeSystemErrorExplicit(err, std::forward(args)...); + throw_exception(makeSystemErrorExplicit(err, std::forward(args)...)); } // Helper to throw std::system_error from errno and components of a string @@ -132,11 +132,11 @@ void checkFopenErrorExplicit(FILE* fp, int savedErrno, Args&&... args) { * If cond is not true, raise an exception of type E. E must have a ctor that * works with const char* (a description of the failure). */ -#define CHECK_THROW(cond, E) \ - do { \ - if (!(cond)) { \ - throw E("Check failed: " #cond); \ - } \ +#define CHECK_THROW(cond, E) \ + do { \ + if (!(cond)) { \ + folly::throw_exception("Check failed: " #cond); \ + } \ } while (0) } // namespace folly diff --git a/ios/Pods/Folly/folly/ExceptionString.h b/ios/Pods/Folly/folly/ExceptionString.h index 5c3a2760..13042ead 100644 --- a/ios/Pods/Folly/folly/ExceptionString.h +++ b/ios/Pods/Folly/folly/ExceptionString.h @@ -1,11 +1,11 @@ /* - * Copyright 2016-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -31,7 +31,7 @@ namespace folly { * defined. */ inline fbstring exceptionStr(const std::exception& e) { -#ifdef FOLLY_HAS_RTTI +#if FOLLY_HAS_RTTI fbstring rv(demangle(typeid(e))); rv += ": "; #else @@ -41,29 +41,27 @@ inline fbstring exceptionStr(const std::exception& e) { return rv; } -// Empirically, this indicates if the runtime supports -// std::exception_ptr, as not all (arm, for instance) do. -#if defined(__GNUC__) && defined(__GCC_ATOMIC_INT_LOCK_FREE) && \ - __GCC_ATOMIC_INT_LOCK_FREE > 1 inline fbstring exceptionStr(std::exception_ptr ep) { - try { - std::rethrow_exception(ep); - } catch (const std::exception& e) { - return exceptionStr(e); - } catch (...) { - return ""; + if (!kHasExceptions) { + return "Exception (catch unavailable)"; } + return catch_exception( + [&]() -> fbstring { + return catch_exception( + [&]() -> fbstring { std::rethrow_exception(ep); }, + [](auto&& e) { return exceptionStr(e); }); + }, + []() -> fbstring { return ""; }); } -#endif template auto exceptionStr(const E& e) -> typename std:: enable_if::value, fbstring>::type { -#ifdef FOLLY_HAS_RTTI +#if FOLLY_HAS_RTTI return demangle(typeid(e)); #else (void)e; - return "Exception (no RTTI available) "; + return "Exception (no RTTI available)"; #endif } diff --git a/ios/Pods/Folly/folly/ExceptionWrapper-inl.h b/ios/Pods/Folly/folly/ExceptionWrapper-inl.h index a585e74c..16fb5d4b 100644 --- a/ios/Pods/Folly/folly/ExceptionWrapper-inl.h +++ b/ios/Pods/Folly/folly/ExceptionWrapper-inl.h @@ -1,11 +1,11 @@ /* - * Copyright 2017-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /* * * Author: Eric Niebler @@ -201,7 +202,7 @@ inline void exception_wrapper::InPlace::delete_(exception_wrapper* that) { template [[noreturn]] inline void exception_wrapper::InPlace::throw_( exception_wrapper const* that) { - throw that->buff_.as(); // @nolint + throw that->buff_.as(); } template inline std::type_info const* exception_wrapper::InPlace::type_( @@ -226,7 +227,7 @@ inline exception_wrapper exception_wrapper::InPlace::get_exception_ptr_( template [[noreturn]] inline void exception_wrapper::SharedPtr::Impl::throw_() const { - throw ex_; // @nolint + throw ex_; } template inline std::exception const* @@ -343,7 +344,7 @@ inline exception_wrapper::exception_wrapper( namespace exception_wrapper_detail { template Ex&& dont_slice(Ex&& ex) { - assert(typeid(ex) == typeid(_t>) || + assert(typeid(ex) == typeid(std::decay_t) || !"Dynamic and static exception types don't match. Exception would " "be sliced when storing in exception_wrapper."); return std::forward(ex); @@ -479,12 +480,12 @@ template template struct exception_wrapper::ExceptionTypeOf { - using type = arg_type<_t>>; + using type = arg_type>; static_assert( std::is_reference::value, "Always catch exceptions by reference."); static_assert( - !IsConst || std::is_const<_t>>::value, + !IsConst || std::is_const>::value, "handle() or with_exception() called on a const exception_wrapper " "and asked to catch a non-const exception. Handler will never fire. " "Catch exception by const reference to fix this."); @@ -550,7 +551,7 @@ struct exception_wrapper::HandleStdExceptReduce { return [th = std::forward(th), &ca](auto&& continuation) -> StdEx* { if (auto e = const_cast(th(continuation))) { - if (auto e2 = dynamic_cast<_t>>(e)) { + if (auto e2 = dynamic_cast>(e)) { ca(*e2); } else { return e; diff --git a/ios/Pods/Folly/folly/ExceptionWrapper.h b/ios/Pods/Folly/folly/ExceptionWrapper.h index 3bdc7ae0..8fb287b7 100644 --- a/ios/Pods/Folly/folly/ExceptionWrapper.h +++ b/ios/Pods/Folly/folly/ExceptionWrapper.h @@ -1,11 +1,11 @@ /* - * Copyright 2014-present Facebook, Inc. + * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + /* * Author: Eric Niebler */ @@ -52,7 +53,7 @@ FOLLY_GCC_DISABLE_NEW_SHADOW_WARNINGS namespace folly { #define FOLLY_REQUIRES_DEF(...) \ - _t(__VA_ARGS__), long>> + std::enable_if_t(__VA_ARGS__), long> #define FOLLY_REQUIRES(...) FOLLY_REQUIRES_DEF(__VA_ARGS__) = __LINE__ @@ -62,16 +63,15 @@ template