diff --git a/.editorconfig b/.editorconfig index e255fddd5..b70116121 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,7 +11,7 @@ trim_trailing_whitespace = true [{package.json,.travis.yml}] indent_style = space -indent_size = 2 +indent_size = 4 [{plugin.xml,Makefile}] indent_style = tab diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 299aec1d3..b1211eeb3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,38 +4,47 @@ about: Create a report to help us improve --- -**Describe the bug** +## Describe the bug + A clear and concise description of what the bug is. -**To Reproduce** +## To Reproduce + Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error -**Expected behavior** +## Expected behavior + A clear and concise description of what you expected to happen. -**Screenshots** +## Screenshots + If applicable, add screenshots to help explain your problem. -**Console Logs** +## Console Logs + If applicable, provide console logs showing the errors being reported. -**Plugin Version** -Run `cordova plugin list` to find out what version of cordova-plugin-firebase you are running with +## Plugin Version + +Run `cordova plugin list` to find out what version of `cordova-plugin-firebase-lib` you are running with + +## Desktop (please complete the following information): -**Desktop (please complete the following information):** - OS: [e.g. iOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] -**Smartphone (please complete the following information):** +## Smartphone (please complete the following information): + - Device: [e.g. iPhone6] - OS: [e.g. iOS8.1] - Browser [e.g. stock browser, safari] - Version [e.g. 22] -**Additional context** +## Additional context + Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 066b2d920..09eb9fb23 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -4,14 +4,18 @@ about: Suggest an idea for this project --- -**Is your feature request related to a problem? Please describe.** +## Is your feature request related to a problem? Please describe. + A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -**Describe the solution you'd like** +## Describe the solution you'd like + A clear and concise description of what you want to happen. -**Describe alternatives you've considered** +## Describe alternatives you've considered + A clear and concise description of any alternative solutions or features you've considered. -**Additional context** +## Additional context + Add any other context or screenshots about the feature request here. diff --git a/.gitignore b/.gitignore index 5e55e9165..f1d18f5e4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ .build-browser package-lock.json node_modules -cordova-plugin-firebase.code-workspace +lib/ +!scripts/lib diff --git a/.npmignore b/.npmignore index 20b37e0df..f9d9f7669 100644 --- a/.npmignore +++ b/.npmignore @@ -7,4 +7,7 @@ package-lock.json node_modules test -cordova-plugin-firebase.code-workspace +lib/ +.github/ +docs/ +cordova-plugin-firebase-lib.code-workspace diff --git a/.travis.yml b/.travis.yml index 44e115c44..310d8eb85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ env: global: + - ANDROID_API_LEVEL=28 + - ANDROID_BUILD_TOOLS_VERSION=28.0.3 - JAVA_HOME=/usr/lib/jvm/java-8-oracle - LANG=en_US.UTF-8 @@ -10,10 +12,10 @@ matrix: language: android android: components: - - tools-26.0.0 - - platform-tools-26.0.0 - - build-tools-26.0.0 - - android-26.0.0 + - tools + - platform-tools + - build-tools + - android - extra-google-google_play_services - extra-google-m2repository - extra-android-m2repository @@ -26,17 +28,17 @@ matrix: - android-sdk-preview-license-.+ - android-sdk-license-.+ - google-gdk-license-.+ - env: CORDOVA_VERSION="6.5.0" CORDOVA_PLATFORM="android" CORDOVA_PLATFORM_VERSION="6.4.0" + env: CORDOVA_VERSION="9.0.0" CORDOVA_PLATFORM="android" CORDOVA_PLATFORM_VERSION="8.0.0" - os: linux sudo: false language: android android: components: - - tools-26.0.0 - - platform-tools-26.0.0 - - build-tools-26.0.0 - - android-26.0.0 + - tools + - platform-tools + - build-tools + - android - extra-google-google_play_services - extra-google-m2repository - extra-android-m2repository @@ -56,10 +58,10 @@ matrix: language: android android: components: - - tools-26.0.0 - - platform-tools-26.0.0 - - build-tools-26.0.0 - - android-26.0.0 + - tools + - platform-tools + - build-tools + - android - extra-google-google_play_services - extra-google-m2repository - extra-android-m2repository diff --git a/CHANGELOG.md b/CHANGELOG.md index 453befc3b..eae0e11c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,73 +1,59 @@ -# Version 2.0.5 +# Change Log -### Bug Fixes -- #897: Fixed issue with after_prepare hook not copying required files +## v5.1.1 -# Version 2.0.4 +1. Common: Handling ampersand in app name. +2. Build: Improving JavaScript code and logging more information. -### Bug Fixes -- #866: Fixed issue with loading .plist file on some iOS devices +## v5.1.0 -# Version 2.0.3 +1. iOS: Downgrading the Firebase iOS dependency to 5.x to make the iOS app build fixed. +2. Common: Removed deprecated `getInstanceId` method. Use `getToken` instead. -### Features -- #874: Added new api `setCrashlyticsUserId` which allows setting Crashlytics user identifier -- #861: Updated `verifyPhoneNumber` api on android to add the following properties to the returned object: - - `code` - sms code - - `verified` - whether or not the verification was successful +## v5.0.0 -### Bug Fixes -- #869: Replace add/remove hooks with install/uninstall hooks to ensure proper configuration of the plugin -- #870: Add error handling to `fetch` api on iOS +1. iOS: Using CocoaPods to manage Firebase dependencies hence requires `cordova-cli` to be minimum `v9.0.0`. +2. Docs: Detailed instructions to get the Cordova environment versions and different major releases to be used. -# Version 2.0.2 +## v4.1.0 -### Bug Fixes -- #837: Fixed android build +1. Breaking change: Removed method `logJSError` (introduced in v3.2.0) and merged that into `logError` message. +2. Android: Handling a few edge cases for `logError` method. +3. Docs: Generating "Table of Contents" for README & API docs. -# Version 2.0.1 +## v4.0.1 -### Bug Fixes -- #836: Fixed Crashlytics on iOS -- #830: Fixed initialization of firebase services +1. Fixed typo in `firebase-browser.js` -# Version 2.0.0 +## v4.0.0 - Breaking Change -### Features -- #796: Update Firebase SDK Version to 5.x +1. Stop supporting `cordova-android 7.x.x`. Minimum `cordova-android 8.0.0` is required. +2. Fix the failing build due to breaking changes released by Google Firebase on Jun 17, 2019. -### Bug Fixes -- #822: Can't use initFirebase() on 1.1.3 [Firebase isn't initialized] -- #827: doc missing: initFirebase call needed before anything -- #824: Removed initRemoteConfig method +## v3.3.0 -# Version 1.1.4 (deprecated) +1. Backward compatibility fixes to support breaking changes released by Google Firebase on Jun 17, 2019. -This version has been deprecated due to complications with PR #784 +## v3.2.0 -# Version 1.1.3 (deprecated) +1. Added ability to log JavaScript stacktrace with a new method `logJSError`. Thanks to [distinctdan](https://github.com/distinctdan) for + [PR#8](https://github.com/wizpanda/cordova-plugin-firebase-lib/pull/8). -This version has been deprecated due to complications with PR #784 +## v3.1.0 -# Version 1.1.2 (deprecated) +1. Add `createChannel` function for Android O. -This version has been deprecated due to complications with PR #784 +## v3.0.0 -# Version 1.1.1 (deprecated) +First version under [Wiz Panda](https://www.wizpanda.com/). -This version has been deprecated due to complications with PR #784 +1. Cordova@9 support +2. Fixes issues cause by Firebase SDK updates on [5 April 2019](https://firebase.google.com/support/release-notes/android#update_-_april_05_2019). +Thanks to [Dave Alden](https://github.com/dpa99c) for [commit](https://github.com/wizpanda/cordova-plugin-firebase-lib/commit/46a7bd1c06434fb4c5a72c2c20ae5d951a2e37f4) +3. Remove obsolete entry for FirebasePluginInstanceIDService. Thanks to [Dave Alden](https://github.com/dpa99c) for [commit](https://github.com/wizpanda/cordova-plugin-firebase-lib/commit/eee2cfe845e6c2466d4c7fcb69d70c0c8840ea6b) +4. Remove unnecessary extra block which can lead to race condition. Thanks to [Dave Alden](https://github.com/dpa99c) for [commit](https://github.com/wizpanda/cordova-plugin-firebase-lib/commit/17eb7c46176d5ad28fc93b53a2c49d9e6ed1888b) +5. Remove redundant build-extras.gradle. Thanks to [Dave Alden](https://github.com/dpa99c) for [commit](https://github.com/wizpanda/cordova-plugin-firebase-lib/commit/289706fc30fe848de082c468440c91ffecdce97d) -# Version 1.1.0 (deprecated) +## For older versions -This version has been deprecated due to complications with PR #784 - -# Version 1.0.5 - -To force cordova to use this version, add the following to your project's config.xml: -``` - -``` -or by running: -``` -cordova plugin add cordova-plugin-firebase@1.0.5 --save -``` +See the https://github.com/arnesson/cordova-plugin-firebase/blob/v2.0.5/CHANGELOG.md \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 8c1cac742..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,65 +0,0 @@ -# Contribution Guidelines - -# Find a bug? - -No one is perfect and we aren't any different. If you find an issue, please take a few minutes to let us know. - -1. Take a look at the current issues (there's a handy search feature) to see if someone already reported the issue. If they have, there might be work arounds or proposed fixes posted in the issue which could save you time. -2. If the issue have not been reported, please open an issue. -3. Look for questions or updates to your issue as we might need additioanl information. The faster we get the information, the faster we can resolve your issue. -4. The fastest way to fix your issue is to fix the bug yourself. See the "Have a fix or want to get your hands dirty?" section below to find out how to show off your awesome developer skills! - -## Help Wanted flag - -This plugin is maintained by a community of developers. We do this in our spare time and don't have unlimited time to implement features or fix bugs. As such, we look to others who can submit pull requests to fix bugs or make enhancements. - -# Have a fix or want to get your hands dirty? - -It's really not that hard! If you have questions please don't hesitate to ask in an issue as we can try to help point you in the right direction. - -## Where is the code? - -### Javascript APIs - -You can find the Javscipt APIs in [firebase.js](www/firebase.js) file. This file typically redirects calls to the FirebasePlugin implementation for the platform, but if you need to add APIs, this is where you do it. - -### Android - -There are a number of files that make up the Android platform code, but the main file is [Firebase.java](src/android/FirebasePlugin.java). That is the best place to start. - -### iOS - -Again, there are multiple files that make up the iOS platform, but most of the code is split between [FirebasePlugin.m](src/ios/FirebasePlugin.m) and [AppDelegate+FirebasePlugin.m](src/ios/AppDelegate+FirebasePlugin.m). - -## I found the code, but now what? - -Submitting a bug fix or feature takes only a few minutes. - -1. Fork the repository. -2. Create a new branch. -3. Make the code change. -4. Create a commit and push it to your repo. -5. See the Pull Request section to let us know your code is ready to be merged into the main repo. - -MAKE SURE THE CODE WORKS WITHOUT MODIFYING OR CHECKING IN ANY PLATFORM FILES. Any changes to platform files (like build scripts, config files or anything in the /platform directory) should be made by the plugin. Since Cordova 4.3.0, the [platform management feature](https://cordova.apache.org/docs/en/latest/platform_plugin_versioning_ref/) allows you to build your project without checking in any platform files. - -# Pull Requests - -* Fill in [the required template](PULL_REQUEST_TEMPLATE.md) -* Include one feature/bug fix per Pull Request. Multiple issues in one PR can increase the complexity of the review and could delay the merging of your code. -* Maintain the formatting (specifically white spacing) in the files you are modifying -* Reference the Issue number in the PR if there's a related issue -* If you are adding new APIs or changing behavior, include entries in the README.md so new users know how to interact with the new features. We want everyone to use your work! - -## Need to test a PR? -We rely on the community to help test out fixes and enhancements to this plugin. You can test out a PR by running the following commands: -1. `cordova plugin remove cordova-plugin-firebase` -2. `cordova plugin add https://github.com//cordova-plugin-firebase.git#` - * replace `` with the name of user/org where the branch resides - * replace `` with the name of the branch used to create the PR -3. `cordova prepare` - -For example, to test the fix made by PR [#832](https://github.com/arnesson/cordova-plugin-firebase/pull/832#issuecomment-420386486), you would use the url `https://github.com/briantq/cordova-plugin-firebase.git#revert-lazy-init` since `briantq` is the name of the user and `revert-lazy-init` is the name of the branch. This information is available at the top of each PR. For this specific PR, the following information is displayed: -* briantq wants to merge 2 commits into arnesson:master from briantq:revert-lazy-init - -The last part being the vital information as it tells you exactly what to use in the url. diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index f87f5c14c..000000000 --- a/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1 +0,0 @@ -# TODO \ No newline at end of file diff --git a/README.md b/README.md index fab1b072e..592977e65 100644 --- a/README.md +++ b/README.md @@ -1,60 +1,36 @@ -[![Build Status](https://travis-ci.org/arnesson/cordova-plugin-firebase.svg?branch=master)](https://travis-ci.org/arnesson/cordova-plugin-firebase) +# We are moving & merging ... -# cordova-plugin-firebase -This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported. +Since the breaking change released by Google Firebase on Jun 17th, 2019, [we](https://www.wizpanda.com) have been maintaining this +repository. From the same time, another guy [Dave Alden](https://github.com/dpa99c) from somewhere in the world 😄 is also maintaining +his fork https://github.com/dpa99c/cordova-plugin-firebasex. -## Supported Cordova Versions -- cordova: `>= 6` -- cordova-android: `>= 6.4` -- cordova-ios: `>= 4` +Intention of both of us are same i.e. **to give back to the open-source community** and help developers of Cordova & Ionic frameworks so +that they can use the Google Firebase in their applications without a hitch. So both the repositories were being updated regularly and +new releases were being made. -## Installation -Install the plugin by adding it to your project's config.xml: -``` - -``` -or by running: -``` -cordova plugin add cordova-plugin-firebase --save -``` +This good though by both [Wiz Panda](https://www.wizpanda.com) & Dave resulted in developers of Cordova & Ionic getting confused & +diverted to two different repositories which will become a mess in the future. To prevent this, we discussed this in a +[thread](https://github.com/dpa99c/cordova-plugin-firebasex/issues/47) raised by [hugoblanc](https://github.com/hugoblanc) and we all +together decided to archive this repository and divert the developers to Dave's fork. -### Guides -Great installation and setup guide by Medium.com - [https://medium.com/@felipepucinelli/how-to-add-push...](https://medium.com/@felipepucinelli/how-to-add-push-notifications-in-your-cordova-application-using-firebase-69fac067e821) +Dave has been quite active on his fork and he is doing a great job updating & improving the native codebase and documentations so: -### Setup -Download your Firebase configuration files, GoogleService-Info.plist for iOS and google-services.json for android, and place them in the root folder of your cordova project. Check out this [firebase article](https://support.google.com/firebase/answer/7015592) for details on how to download the files. +## Requesting all the developers to start using [dpa99c/cordova-plugin-firebasex](https://github.com/dpa99c/cordova-plugin-firebasex) instead of this repository. -``` -- My Project/ - platforms/ - plugins/ - www/ - config.xml - google-services.json <-- - GoogleService-Info.plist <-- - ... -``` +One can still use the last version of this plugin i.e. `v5.1.1` and checkout the code at commit/tag +https://github.com/wizpanda/cordova-plugin-firebase-lib/tree/v5.1.1 but please note, **no further updates, improvements will be made to +this repository. No PR will be accepted.** -###### IMPORTANT NOTES -- This plugin uses a hook (after prepare) that copies the configuration files to the right place, namely `platforms/ios/\/Resources` for ios and `platforms/android` for android. -- Firebase SDK requires the configuration files to be present and valid, otherwise your app will crash on boot or Firebase features won't work. +If this plugin helped you in any way in your development, you can thank us by doing any or all of the following: -### PhoneGap Build -Hooks do not work with PhoneGap Build. This means you will have to manually make sure the configuration files are included. One way to do that is to make a private fork of this plugin and replace the placeholder config files (see `src/ios` and `src/android`) with your actual ones, as well as hard coding your app id and api key in `plugin.xml`. +1. Follow us on [LinkedIn](https://www.linkedin.com/company/wizpanda) +2. Like our [Facebook page](https://www.facebook.com/wizpandatech/) +3. Send us a [message](https://www.wizpanda.com/#contactUs) -### Google Play Services -Your build may fail if you are installing multiple plugins that use Google Play Services. This is caused by the plugins installing different versions of the Google Play Services library. This can be resolved by installing [cordova-android-play-services-gradle-release](https://github.com/dpa99c/cordova-android-play-services-gradle-release). +Or -If your build is still failing, you can try installing [cordova-android-firebase-gradle-release](https://github.com/dpa99c/cordova-android-firebase-gradle-release). For more info, read the following [comment](https://github.com/dpa99c/cordova-plugin-request-location-accuracy/issues/50#issuecomment-390025013) about locking down the specific versions for play services and firebase. It is suggested to use `+` instead of `15.+` to ensure the correct versions are used. +[![donate](https://user-images.githubusercontent.com/1804514/61858016-e0de0780-aee2-11e9-8697-1f3662b5c147.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=FKF4YUN7R92U6&item_name=Cordova+Firebase+Plugin¤cy_code=INR&source=url) -## Google Tag Manager +> We look forward to seeing you in our new spaces! -Checkout our [guide](docs/GOOGLE_TAG_MANAGER.md) for info on setting up Google Tag Manager. - -## Configuring Notifications - -Checkout our [guide](docs/NOTIFICATIONS.md) for info on configuring notification icons and colors. - -## API - -See the full [API](docs/API.md) available for this plugin. +![Cordova + Firebase](https://user-images.githubusercontent.com/1804514/61858103-0e2ab580-aee3-11e9-8a44-8cf079b8acf8.png) diff --git a/bump-version.js b/bump-version.js index 8e4d075f0..93fefd197 100644 --- a/bump-version.js +++ b/bump-version.js @@ -4,5 +4,5 @@ const fs = require('fs'); const version = require('./package.json').version; let data = fs.readFileSync('./plugin.xml', "utf8"); -data = data.replace(/plugin id="cordova-plugin-firebase" version="[^"]+"/, `plugin id="cordova-plugin-firebase" version="${version}"`); +data = data.replace(/plugin id="cordova-plugin-firebase-lib" version="[^"]+"/, `plugin id="cordova-plugin-firebase-lib" version="${version}"`); fs.writeFileSync('./plugin.xml', data); diff --git a/docs/API.md b/docs/API.md index efa484945..9c0b48beb 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1,11 +1,167 @@ -# API +# JavaScript API + +The list of available methods for this plugin. + +## Table of Contents + + + +- [Firebase Analytics](#firebase-analytics) + * [logEvent](#logevent) + * [setScreenName](#setscreenname) + * [setUserId](#setuserid) + * [setUserProperty](#setuserproperty) + * [setAnalyticsCollectionEnabled](#setanalyticscollectionenabled) +- [Firebase Auth](#firebase-auth) + * [verifyPhoneNumber](#verifyphonenumber) + - [Android](#android) + - [iOS](#ios) +- [Firebase Cloud Messaging (Push Notifications)](#firebase-cloud-messaging-push-notifications) + * [getToken](#gettoken) + * [onTokenRefresh](#ontokenrefresh) + * [onNotificationOpen](#onnotificationopen) + + [Notification flow:](#notification-flow) + * [grantPermission (iOS only)](#grantpermission-ios-only) + * [hasPermission](#haspermission) + * [setBadgeNumber](#setbadgenumber) + * [getBadgeNumber](#getbadgenumber) + * [clearAllNotifications](#clearallnotifications) + * [subscribe to a topic](#subscribe-to-a-topic) + * [unsubscribe from a topic](#unsubscribe-from-a-topic) + * [unregister](#unregister) +- [Firebase Crashlytics](#firebase-crashlytics) + * [setCrashlyticsUserId](#setcrashlyticsuserid) + * [logError](#logerror) +- [Firebase Performance](#firebase-performance) + * [startTrace](#starttrace) + * [incrementCounter](#incrementcounter) + * [stopTrace](#stoptrace) +- [Firebase Remote Config](#firebase-remote-config) + * [fetch](#fetch) + * [activateFetched](#activatefetched) + * [getValue](#getvalue) + * [getByteArray (Android only)](#getbytearray-android-only) + * [getInfo (Android only)](#getinfo-android-only) + * [setConfigSettings (Android only)](#setconfigsettings-android-only) + * [setDefaults (Android only)](#setdefaults-android-only) + + + +## Firebase Analytics + +### logEvent + +```javascript +window.FirebasePlugin.logEvent("select_content", {content_type: "page_view", item_id: "home"}); +``` -The list of available methods for this plugin is described below. +### setScreenName -## getToken +Set the name of the current screen in Analytics: -Get the device token (id): +```javascript +window.FirebasePlugin.setScreenName("Home"); +``` + +### setUserId + +Set a user id for use in Analytics: +```javascript +window.FirebasePlugin.setUserId("user_id"); +``` + +### setUserProperty + +Set a user property for use in Analytics: +```javascript +window.FirebasePlugin.setUserProperty("name", "value"); +``` + +### setAnalyticsCollectionEnabled + +Enable/disable analytics collection + +```javascript +window.FirebasePlugin.setAnalyticsCollectionEnabled(true); // Enables analytics collection +window.FirebasePlugin.setAnalyticsCollectionEnabled(false); // Disables analytics collection +``` + +## Firebase Auth + +### verifyPhoneNumber + +Request a verification ID and send a SMS with a verification code. Use them to construct a credential to sign in the user (in your app). +- https://firebase.google.com/docs/auth/android/phone-auth +- https://firebase.google.com/docs/reference/js/firebase.auth.Auth#signInWithCredential +- https://firebase.google.com/docs/reference/js/firebase.User#linkWithCredential + +**NOTE: This will only work on physical devices.** + +iOS will return: credential (string) +Android will return: +credential.verificationId (object and with key verificationId) +credential.instantVerification (boolean) +credential.code (string) (note that this key only exists if instantVerification is true) + +You need to use device plugin in order to access the right key. + +IMPORTANT NOTE: Android supports auto-verify and instant device verification. Therefore in that case it doesn't make sense to ask for an sms code as you won't receive one. In this case you'll get a credential.verificationId and a credential.code where code is the auto received verification code that would normally be sent via sms. To log in using this procedure you must pass this code to PhoneAuthProvider.credential(verificationId, code). You'll find an implementation example further below. + +When using node.js Firebase Admin-SDK, follow this tutorial: +- https://firebase.google.com/docs/auth/admin/create-custom-tokens + +Pass back your custom generated token and call +```javascript +firebase.auth().signInWithCustomToken(customTokenFromYourServer); +``` + +instead of + +```javascript +firebase.auth().signInWithCredential(credential) +``` +**YOU HAVE TO COVER THIS PROCESS, OR YOU WILL HAVE ABOUT 5% OF USERS STICKING ON YOUR SCREEN, NOT RECEIVING ANYTHING** +If this process is too complex for you, use this awesome plugin +- https://github.com/chemerisuk/cordova-plugin-firebase-authentication + +It's not perfect but it fits for the most use cases and doesn't require calling your endpoint, as it has native phone auth support. + +```javascript +window.FirebasePlugin.verifyPhoneNumber(number, timeOutDuration, function(credential) { + console.log(credential); + + // if instant verification is true use the code that we received from the firebase endpoint, otherwise ask user to input verificationCode: + var code = credential.instantVerification ? credential.code : inputField.value.toString(); + + var verificationId = credential.verificationId; + + var credential = firebase.auth.PhoneAuthProvider.credential(verificationId, code); + + // sign in with the credential + firebase.auth().signInWithCredential(credential); + + // OR link to an account + firebase.auth().currentUser.linkWithCredential(credential) +}, function(error) { + console.error(error); +}); ``` + + +##### Android +To use this auth you need to configure your app SHA hash in the android app configuration in the firebase console. +See https://developers.google.com/android/guides/client-auth to know how to get SHA app hash. + +##### iOS +Setup your push notifications first, and verify that they are arriving on your physical device before you test this method. Use the APNs auth key to generate the .p8 file and upload it to firebase. When you call this method, FCM sends a silent push to the device to verify it. + +## Firebase Cloud Messaging (Push Notifications) + +### getToken + +Get the device token (id): + +```javascript window.FirebasePlugin.getToken(function(token) { // save this server-side and use it to push notifications to this device console.log(token); @@ -15,10 +171,11 @@ window.FirebasePlugin.getToken(function(token) { ``` Note that token will be null if it has not been established yet -## onTokenRefresh +### onTokenRefresh Register for token changes: -``` + +```javascript window.FirebasePlugin.onTokenRefresh(function(token) { // save this server-side and use it to push notifications to this device console.log(token); @@ -28,195 +185,161 @@ window.FirebasePlugin.onTokenRefresh(function(token) { ``` This is the best way to get a valid token for the device as soon as the token is established -## onNotificationOpen +### onNotificationOpen Register notification callback: -``` + +```javascript window.FirebasePlugin.onNotificationOpen(function(notification) { console.log(notification); }, function(error) { console.error(error); }); ``` -Notification flow: -1. App is in foreground: +#### Notification flow: + +1. **App is in foreground**: 1. User receives the notification data in the JavaScript callback without any notification on the device itself (this is the normal behaviour of push notifications, it is up to you, the developer, to notify the user) -2. App is in background: +2. **App is in background**: 1. User receives the notification message in its device notification bar 2. User taps the notification and the app opens 3. User receives the notification data in the JavaScript callback -Notification icon on Android: - -[Changing notification icon](NOTIFICATIONS.md#changing-notification-icon) +To change notification icon on **Android**, see [Changing notification icon](NOTIFICATIONS.md#changing-notification-icon) -## grantPermission (iOS only) +### grantPermission (iOS only) Grant permission to receive push notifications (will trigger prompt): -``` +```javascript window.FirebasePlugin.grantPermission(); ``` -## hasPermission +### hasPermission Check permission to receive push notifications: -``` + +```javascript window.FirebasePlugin.hasPermission(function(data){ console.log(data.isEnabled); }); ``` -## setBadgeNumber +### setBadgeNumber Set a number on the icon badge: -``` -window.FirebasePlugin.setBadgeNumber(3); -``` -Set 0 to clear the badge -``` +```javascript +window.FirebasePlugin.setBadgeNumber(3); +// Set 0 to clear the badge window.FirebasePlugin.setBadgeNumber(0); ``` -## getBadgeNumber +### getBadgeNumber Get icon badge number: -``` +```javascript window.FirebasePlugin.getBadgeNumber(function(n) { console.log(n); }); ``` -## clearAllNotifications +### clearAllNotifications Clear all pending notifications from the drawer: -``` +```javascript window.FirebasePlugin.clearAllNotifications(); ``` -## subscribe +### subscribe to a topic -Subscribe to a topic: -``` +```javascript window.FirebasePlugin.subscribe("example"); ``` -## unsubscribe +### unsubscribe from a topic -Unsubscribe from a topic: -``` +```javascript window.FirebasePlugin.unsubscribe("example"); ``` -## unregister +### unregister Unregister from firebase, used to stop receiving push notifications. Call this when you logout user from your app. : -``` +```javascript window.FirebasePlugin.unregister(); ``` -## logEvent +## Firebase Crashlytics -Log an event using Analytics: -``` -window.FirebasePlugin.logEvent("select_content", {content_type: "page_view", item_id: "home"}); -``` - -## setCrashlyticsUserId +### setCrashlyticsUserId Set Crashlytics user identifier. - https://firebase.google.com/docs/crashlytics/customize-crash-reports?authuser=0#set_user_ids -## setScreenName - -Set the name of the current screen in Analytics: -``` -window.FirebasePlugin.setScreenName("Home"); +```javascript +window.FirebasePlugin.setCrashlyticsUserId("your-custom-user-id"); ``` -## setUserId +### logError -Set a user id for use in Analytics: -``` -window.FirebasePlugin.setUserId("user_id"); +Log any JavaScript error using Crashlytics: + +```javascript +window.FirebasePlugin.logError("Any JS error message", function () { + // Optional function for success callback +}, function () { + // Optional function for error callback +}); ``` -## setUserProperty +Optionally, you can pass a JavaScript error stacktrace from [StackTrace.js](https://www.stacktracejs.com/) which will be parsed and +included in the Crashlytics web console. Unfortunately, on iOS, setting custom stack traces isn't natively supported, so the stack lines +are logged as key/value pairs instead, which show up in the `Keys` section of an error in the firebase console. -Set a user property for use in Analytics: -``` -window.FirebasePlugin.setUserProperty("name", "value"); +```javascript +StackTrace.fromError(error, {offline: true}) + .then(function(stack) { + window.FirebasePlugin.logError("Any JS error message", stack, function () { + // Optional function for success callback + }, function () { + // Optional function for error callback + }); + }); ``` -## verifyPhoneNumber +## Firebase Performance -Request a verification ID and send a SMS with a verification code. Use them to construct a credential to sign in the user (in your app). -- https://firebase.google.com/docs/auth/android/phone-auth -- https://firebase.google.com/docs/reference/js/firebase.auth.Auth#signInWithCredential -- https://firebase.google.com/docs/reference/js/firebase.User#linkWithCredential +### startTrace -**NOTE: This will only work on physical devices.** - -iOS will return: credential (string) -Android will return: -credential.verificationId (object and with key verificationId) -credential.instantVerification (boolean) -credential.code (string) (note that this key only exists if instantVerification is true) +Start a trace. -You need to use device plugin in order to access the right key. +```javascript +window.FirebasePlugin.startTrace("test trace", success, error); +``` -IMPORTANT NOTE: Android supports auto-verify and instant device verification. Therefore in that case it doesn't make sense to ask for an sms code as you won't receive one. In this case you'll get a credential.verificationId and a credential.code where code is the auto received verification code that would normally be sent via sms. To log in using this procedure you must pass this code to PhoneAuthProvider.credential(verificationId, code). You'll find an implementation example further below. +### incrementCounter -When using node.js Firebase Admin-SDK, follow this tutorial: -- https://firebase.google.com/docs/auth/admin/create-custom-tokens +To count the performance-related events that occur in your app (such as cache hits or retries), add a line of code similar to the following whenever the event occurs, using a string other than retry to name that event if you are counting a different type of event: -Pass back your custom generated token and call -```js -firebase.auth().signInWithCustomToken(customTokenFromYourServer); -``` -instead of -``` -firebase.auth().signInWithCredential(credential) ``` -**YOU HAVE TO COVER THIS PROCESS, OR YOU WILL HAVE ABOUT 5% OF USERS STICKING ON YOUR SCREEN, NOT RECEIVING ANYTHING** -If this process is too complex for you, use this awesome plugin -- https://github.com/chemerisuk/cordova-plugin-firebase-authentication - -It's not perfect but it fits for the most use cases and doesn't require calling your endpoint, as it has native phone auth support. - +window.FirebasePlugin.incrementCounter("test trace", "retry", success, error); ``` -window.FirebasePlugin.verifyPhoneNumber(number, timeOutDuration, function(credential) { - console.log(credential); - - // if instant verification is true use the code that we received from the firebase endpoint, otherwise ask user to input verificationCode: - var code = credential.instantVerification ? credential.code : inputField.value.toString(); - - var verificationId = credential.verificationId; - var credential = firebase.auth.PhoneAuthProvider.credential(verificationId, code); +### stopTrace - // sign in with the credential - firebase.auth().signInWithCredential(credential); +Stop the trace - // OR link to an account - firebase.auth().currentUser.linkWithCredential(credential) -}, function(error) { - console.error(error); -}); +```javascript +window.FirebasePlugin.stopTrace("test trace"); ``` +## Firebase Remote Config -### Android -To use this auth you need to configure your app SHA hash in the android app configuration in the firebase console. -See https://developers.google.com/android/guides/client-auth to know how to get SHA app hash. - -### iOS -Setup your push notifications first, and verify that they are arriving on your physical device before you test this method. Use the APNs auth key to generate the .p8 file and upload it to firebase. When you call this method, FCM sends a silent push to the device to verify it. - -## fetch +### fetch Fetch Remote Config parameter values for your app: -``` + +```javascript window.FirebasePlugin.fetch(function () { // success callback }, function () { @@ -230,10 +353,10 @@ window.FirebasePlugin.fetch(600, function () { }); ``` -## activateFetched +### activateFetched Activate the Remote Config fetched config: -``` +```javascript window.FirebasePlugin.activateFetched(function(activated) { // activated will be true if there was a fetched config activated, // or false if no fetched config was found, or the fetched config was already activated. @@ -243,27 +366,21 @@ window.FirebasePlugin.activateFetched(function(activated) { }); ``` -## getValue +### getValue Retrieve a Remote Config value: -``` +```javascript window.FirebasePlugin.getValue("key", function(value) { console.log(value); }, function(error) { console.error(error); }); -// or, specify a namespace for the config value -window.FirebasePlugin.getValue("key", "namespace", function(value) { - console.log(value); -}, function(error) { - console.error(error); -}); ``` -## getByteArray (Android only) +### getByteArray (Android only) **NOTE: byte array is only available for SDK 19+** Retrieve a Remote Config byte array: -``` +```javascript window.FirebasePlugin.getByteArray("key", function(bytes) { // a Base64 encoded string that represents the value for "key" console.log(bytes.base64); @@ -272,21 +389,12 @@ window.FirebasePlugin.getByteArray("key", function(bytes) { }, function(error) { console.error(error); }); -// or, specify a namespace for the byte array -window.FirebasePlugin.getByteArray("key", "namespace", function(bytes) { - // a Base64 encoded string that represents the value for "key" - console.log(bytes.base64); - // a numeric array containing the values of the byte array (i.e. [0xFF, 0x00]) - console.log(bytes.array); -}, function(error) { - console.error(error); -}); ``` -## getInfo (Android only) +### getInfo (Android only) Get the current state of the FirebaseRemoteConfig singleton object: -``` +```javascript window.FirebasePlugin.getInfo(function(info) { // the status of the developer mode setting (true/false) console.log(info.configSettings.developerModeEnabled); @@ -303,20 +411,20 @@ window.FirebasePlugin.getInfo(function(info) { }); ``` -## setConfigSettings (Android only) +### setConfigSettings (Android only) Change the settings for the FirebaseRemoteConfig object's operations: -``` +```javascript var settings = { developerModeEnabled: true } window.FirebasePlugin.setConfigSettings(settings); ``` -## setDefaults (Android only) +### setDefaults (Android only) Set defaults in the Remote Config: -``` +```javascript // define defaults var defaults = { // map property name to value in Remote Config defaults @@ -332,40 +440,4 @@ var defaults = { } // set defaults window.FirebasePlugin.setDefaults(defaults); -// or, specify a namespace -window.FirebasePlugin.setDefaults(defaults, "namespace"); -``` - -## startTrace - -Start a trace. - -``` -window.FirebasePlugin.startTrace("test trace", success, error); -``` - -## incrementCounter - -To count the performance-related events that occur in your app (such as cache hits or retries), add a line of code similar to the following whenever the event occurs, using a string other than retry to name that event if you are counting a different type of event: - -``` -window.FirebasePlugin.incrementCounter("test trace", "retry", success, error); -``` - -## stopTrace - -Stop the trace - -``` -window.FirebasePlugin.stopTrace("test trace"); -``` - -## setAnalyticsCollectionEnabled - -Enable/disable analytics collection - -``` -window.FirebasePlugin.setAnalyticsCollectionEnabled(true); // Enables analytics collection - -window.FirebasePlugin.setAnalyticsCollectionEnabled(false); // Disables analytics collection ``` diff --git a/package.json b/package.json index 5ade7135f..25d8d7ad4 100644 --- a/package.json +++ b/package.json @@ -1,49 +1,58 @@ { - "author": { - "name": "Robert Arnesson" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/arnesson/cordova-plugin-firebase" - }, - "name": "cordova-plugin-firebase", - "version": "2.0.5", - "description": "Cordova plugin for Google Firebase", - "cordova": { - "id": "cordova-plugin-firebase", - "platforms": [ - "android", - "ios", - "browser" - ] - }, - "keywords": [ - "ecosystem:cordova", - "cordova-android", - "cordova-ios", - "cordova-browser", - "firebase", - "push", - "notifications", - "phone auth" - ], - "scripts": { - "version": "node ./bump-version.js && git add -A plugin.xml", - "postversion": "git push && git push --tags && npm publish --verbose", - "test": "npm run test:ios && npm run test:android && npm run test:browser", - "test:android": "npm run test:cordova@6.5.0:android@6.4.0 && npm run test:cordova@7.1.0:android@7.1.0 && npm run test:cordova@8.0.0:android@7.1.0", - "test:browser": "npm run test:cordova@6.5.0:browser@5.0.3 && npm run test:cordova@7.1.0:browser@5.0.3 && npm run test:cordova@8.0.0:browser@5.0.3", - "test:ios": "npm run test:cordova@6.5.0:ios@4.5.4 && npm run test:cordova@7.1.0:ios@4.5.4 && npm run test:cordova@8.0.0:ios@4.5.4", - "test:cordova@6.5.0:ios@4.5.4": "bash ./test/test-default.sh 6.5.0 ios 4.5.4", - "test:cordova@7.1.0:ios@4.5.4": "bash ./test/test-default.sh 7.1.0 ios 4.5.4", - "test:cordova@8.0.0:ios@4.5.4": "bash ./test/test-default.sh 8.0.0 ios 4.5.4", - "test:cordova@6.5.0:android@6.4.0": "bash ./test/test-default.sh 6.5.0 android 6.4.0 && bash ./test/test-with-3-plugins.sh 6.5.0 android 6.4.0 cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release", - "test:cordova@7.1.0:android@7.1.0": "bash ./test/test-default.sh 7.1.0 android 7.1.0 && bash ./test/test-with-3-plugins.sh 7.1.0 android 7.1.0 cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release", - "test:cordova@8.0.0:android@7.1.0": "bash ./test/test-default.sh 8.0.0 android 7.1.0 && bash ./test/test-with-3-plugins.sh 8.0.0 android 7.1.0 cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release", - "test:cordova@6.5.0:browser@5.0.3": "bash ./test/test-default.sh 6.5.0 browser 5.0.3", - "test:cordova@7.1.0:browser@5.0.3": "bash ./test/test-default.sh 7.1.0 browser 5.0.3", - "test:cordova@8.0.0:browser@5.0.3": "bash ./test/test-default.sh 8.0.0 browser 5.0.3" - }, - "dependencies": {} + "name": "cordova-plugin-firebase-lib", + "version": "5.1.1", + "author": { + "name": "Wiz Panda Techno Solutions", + "url": "https://www.wizpanda.com/" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/wizpanda/cordova-plugin-firebase-lib" + }, + "description": "Cordova plugin for Google Firebase", + "cordova": { + "id": "cordova-plugin-firebase-lib", + "platforms": [ + "android", + "ios", + "browser" + ] + }, + "keywords": [ + "ecosystem:cordova", + "cordova-android", + "cordova-ios", + "cordova-browser", + "firebase", + "push", + "notifications", + "phone auth" + ], + "scripts": { + "preversion": "git add CHANGELOG.md && npx markdown-toc -i README.md && npx markdown-toc -i docs/API.md", + "version": "node ./bump-version.js && git add -A plugin.xml && git add README.md && git add docs/*.md", + "postversion": "git push && git push --tags && npm publish --verbose", + "test": "npm run test:ios && npm run test:android && npm run test:browser", + "test:android": "npm run test:cordova@7.1.0:android@7.1.0 && npm run test:cordova@8.0.0:android@7.1.0 && npm run test:cordova@9.0.0:android@8.0.0", + "test:browser": "npm run test:cordova@6.5.0:browser@5.0.3 && npm run test:cordova@7.1.0:browser@5.0.3 && npm run test:cordova@8.0.0:browser@5.0.3", + "test:ios": "npm run test:cordova@6.5.0:ios@4.5.4 && npm run test:cordova@7.1.0:ios@4.5.4 && npm run test:cordova@8.0.0:ios@4.5.4", + "test:cordova@6.5.0:ios@4.5.4": "bash ./test/test-default.sh 6.5.0 ios 4.5.4", + "test:cordova@7.1.0:ios@4.5.4": "bash ./test/test-default.sh 7.1.0 ios 4.5.4", + "test:cordova@8.0.0:ios@4.5.4": "bash ./test/test-default.sh 8.0.0 ios 4.5.4", + "test:cordova@6.5.0:android@6.4.0": "bash ./test/test-default.sh 6.5.0 android 6.4.0 && bash ./test/test-with-3-plugins.sh 6.5.0 android 6.4.0 cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release", + "test:cordova@7.1.0:android@7.1.0": "bash ./test/test-default.sh 7.1.0 android 7.1.0 && bash ./test/test-with-3-plugins.sh 7.1.0 android 7.1.0 cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release", + "test:cordova@8.0.0:android@7.1.0": "bash ./test/test-default.sh 8.0.0 android 7.1.0 && bash ./test/test-with-3-plugins.sh 8.0.0 android 7.1.0 cordova-plugin-request-location-accuracy cordova-android-play-services-gradle-release cordova-android-firebase-gradle-release", + "test:cordova@6.5.0:browser@5.0.3": "bash ./test/test-default.sh 6.5.0 browser 5.0.3", + "test:cordova@7.1.0:browser@5.0.3": "bash ./test/test-default.sh 7.1.0 browser 5.0.3", + "test:cordova@8.0.0:browser@5.0.3": "bash ./test/test-default.sh 8.0.0 browser 5.0.3" + }, + "dependencies": { + "chalk": "^2.4.2", + "xcode": "^2.0.0" + }, + "devDependencies": { + "cordova-common": "^3.2.0", + "markdown-toc": "^1.2.0" + } } diff --git a/plugin.xml b/plugin.xml index b236828ed..432abe623 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,121 +1,115 @@ - - Google Firebase Plugin + - MIT + Google Firebase Plugin + Cordova plugin for Firebase integration + cordova + MIT - - - + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + - - - + + + - - - - - - - - - - - development - - - production - + + + + + + + + + + + + development + + + production + - + - - - - + + + + - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - + diff --git a/scripts/after_prepare.js b/scripts/after_prepare.js index 9e3111164..1ef97b7c1 100644 --- a/scripts/after_prepare.js +++ b/scripts/after_prepare.js @@ -3,56 +3,58 @@ 'use strict'; /** - * This hook makes sure projects using [cordova-plugin-firebase](https://github.com/arnesson/cordova-plugin-firebase) + * This hook makes sure projects using [cordova-plugin-firebase-lib](https://github.com/wizpanda/cordova-plugin-firebase-lib) * will build properly and have the required key files copied to the proper destinations when the app is build on Ionic Cloud using the package command. * Credits: https://github.com/arnesson. */ -var fs = require('fs'); -var path = require('path'); -var utilities = require("./lib/utilities"); - -var config = fs.readFileSync('config.xml').toString(); -var name = utilities.getValue(config, 'name'); - -var IOS_DIR = 'platforms/ios'; -var ANDROID_DIR = 'platforms/android'; - -var PLATFORM = { - IOS: { - dest: [ - IOS_DIR + '/' + name + '/Resources/GoogleService-Info.plist', - IOS_DIR + '/' + name + '/Resources/Resources/GoogleService-Info.plist' - ], - src: [ - 'GoogleService-Info.plist', - IOS_DIR + '/www/GoogleService-Info.plist', - 'www/GoogleService-Info.plist' - ] - }, - ANDROID: { - dest: [ - ANDROID_DIR + '/google-services.json', - ANDROID_DIR + '/app/google-services.json' - ], - src: [ - 'google-services.json', - ANDROID_DIR + '/assets/www/google-services.json', - 'www/google-services.json', - ANDROID_DIR + '/app/src/main/google-services.json' - ], - } +const chalk = require('chalk'); +const utilities = require('./lib/utilities'); + +let name = utilities.getAppName(); +if (name.includes('&')) { + name = name.replace(/&/g, '&'); +} + +const IOS_DIR = 'platforms/ios'; +const ANDROID_DIR = 'platforms/android'; + +const PLATFORM = { + IOS: { + dest: [ + IOS_DIR + '/' + name + '/Resources/GoogleService-Info.plist', + IOS_DIR + '/' + name + '/Resources/Resources/GoogleService-Info.plist' + ], + src: 'GoogleService-Info.plist' + }, + ANDROID: { + dest: [ + ANDROID_DIR + '/app/google-services.json' + ], + src: 'google-services.json' + } }; module.exports = function (context) { - //get platform from the context supplied by cordova - var platforms = context.opts.platforms; - // Copy key files to their platform specific folders - if (platforms.indexOf('ios') !== -1 && utilities.directoryExists(IOS_DIR)) { - console.log('Preparing Firebase on iOS'); - utilities.copyKey(PLATFORM.IOS); - } - if (platforms.indexOf('android') !== -1 && utilities.directoryExists(ANDROID_DIR)) { - console.log('Preparing Firebase on Android'); - utilities.copyKey(PLATFORM.ANDROID); - } + const log = console.log; + // Get platform from the context supplied by cordova + const platforms = context.opts.platforms; + + // Copy key files to their platform specific folders + if (platforms.indexOf('ios') !== -1 && utilities.directoryExists(IOS_DIR)) { + log(chalk.green.bold('Preparing Firebase on iOS')); + utilities.copyKey(PLATFORM.IOS); + + const rightPath = './platforms/ios/' + name + '.xcworkspace'; + const wrongPath = './platforms/ios/' + name + '.xcodeproj'; + + log(chalk.bold.red.underline('\nIMPORTANT:')); + log(chalk.green('Please make sure you open', chalk.bold(rightPath), 'instead of', chalk.bold(wrongPath), + 'if you are using Xcode to build.')); + log(chalk.green('Alternatively, you can simply run', chalk.bold('open -a Xcode platforms/ios'))); + } + + if (platforms.indexOf('android') !== -1 && utilities.directoryExists(ANDROID_DIR)) { + log(chalk.green.bold('Preparing Firebase on Android')); + utilities.copyKey(PLATFORM.ANDROID); + } }; diff --git a/scripts/android/after_plugin_install.js b/scripts/android/after_plugin_install.js index d5a0e40e7..68e83a0e4 100644 --- a/scripts/android/after_plugin_install.js +++ b/scripts/android/after_plugin_install.js @@ -1,9 +1,7 @@ -var helper = require('./helper'); +const helper = require('./helper'); -module.exports = function(context) { - - // Modify the Gradle build file to add a task that will upload the debug symbols - // at build time. +module.exports = function () { + // Modify the Gradle build file to add a task that will upload the debug symbols at build time. helper.restoreRootBuildGradle(); helper.modifyRootBuildGradle(); }; diff --git a/scripts/android/before_plugin_uninstall.js b/scripts/android/before_plugin_uninstall.js index 717fcfc63..455428e25 100644 --- a/scripts/android/before_plugin_uninstall.js +++ b/scripts/android/before_plugin_uninstall.js @@ -1,7 +1,6 @@ -var helper = require('./helper'); - -module.exports = function(context) { +const helper = require('./helper'); +module.exports = function () { // Remove the Gradle modifications that were added when the plugin was installed. helper.restoreRootBuildGradle(); }; diff --git a/scripts/android/helper.js b/scripts/android/helper.js index 71b7a887e..0abff9629 100644 --- a/scripts/android/helper.js +++ b/scripts/android/helper.js @@ -1,118 +1,118 @@ -var fs = require("fs"); -var path = require("path"); +const fs = require("fs"); +const path = require("path"); function rootBuildGradleExists() { - var target = path.join("platforms", "android", "build.gradle"); - return fs.existsSync(target); + const target = path.join("platforms", "android", "build.gradle"); + return fs.existsSync(target); } /* * Helper function to read the build.gradle that sits at the root of the project */ function readRootBuildGradle() { - var target = path.join("platforms", "android", "build.gradle"); - return fs.readFileSync(target, "utf-8"); + const target = path.join("platforms", "android", "build.gradle"); + return fs.readFileSync(target, "utf-8"); } /* * Added a dependency on 'com.google.gms' based on the position of the know 'com.android.tools.build' dependency in the build.gradle */ function addDependencies(buildGradle) { - // find the known line to match - var match = buildGradle.match(/^(\s*)classpath 'com.android.tools.build(.*)/m); - var whitespace = match[1]; - - // modify the line to add the necessary dependencies - var googlePlayDependency = whitespace + 'classpath \'com.google.gms:google-services:4.2.0\' // google-services dependency from cordova-plugin-firebase'; - var fabricDependency = whitespace + 'classpath \'io.fabric.tools:gradle:1.25.4\' // fabric dependency from cordova-plugin-firebase' - var modifiedLine = match[0] + '\n' + googlePlayDependency + '\n' + fabricDependency; - - // modify the actual line - return buildGradle.replace(/^(\s*)classpath 'com.android.tools.build(.*)/m, modifiedLine); + // find the known line to match + const match = buildGradle.match(/^(\s*)classpath 'com.android.tools.build(.*)/m); + const whitespace = match[1]; + + // modify the line to add the necessary dependencies + const googlePlayDependency = whitespace + 'classpath \'com.google.gms:google-services:4.2.0\' // google-services dependency from cordova-plugin-firebase-lib'; + const fabricDependency = whitespace + 'classpath \'io.fabric.tools:gradle:1.25.4\' // fabric dependency from cordova-plugin-firebase-lib'; + const modifiedLine = match[0] + '\n' + googlePlayDependency + '\n' + fabricDependency; + + // modify the actual line + return buildGradle.replace(/^(\s*)classpath 'com.android.tools.build(.*)/m, modifiedLine); } /* * Add 'google()' and Crashlytics to the repository repo list */ function addRepos(buildGradle) { - // find the known line to match - var match = buildGradle.match(/^(\s*)jcenter\(\)/m); - var whitespace = match[1]; - - // modify the line to add the necessary repo - // Crashlytics goes under buildscripts which is the first grouping in the file - var fabricMavenRepo = whitespace + 'maven { url \'https://maven.fabric.io/public\' } // Fabrics Maven repository from cordova-plugin-firebase' - var modifiedLine = match[0] + '\n' + fabricMavenRepo; - - // modify the actual line - buildGradle = buildGradle.replace(/^(\s*)jcenter\(\)/m, modifiedLine); - - // update the all projects grouping - var allProjectsIndex = buildGradle.indexOf('allprojects'); - if (allProjectsIndex > 0) { - // split the string on allprojects because jcenter is in both groups and we need to modify the 2nd instance - var firstHalfOfFile = buildGradle.substring(0, allProjectsIndex); - var secondHalfOfFile = buildGradle.substring(allProjectsIndex); - - // Add google() to the allprojects section of the string - match = secondHalfOfFile.match(/^(\s*)jcenter\(\)/m); - var googlesMavenRepo = whitespace + 'google() // Google\'s Maven repository from cordova-plugin-firebase'; - modifiedLine = match[0] + '\n' + googlesMavenRepo; - // modify the part of the string that is after 'allprojects' - secondHalfOfFile = secondHalfOfFile.replace(/^(\s*)jcenter\(\)/m, modifiedLine); - - // recombine the modified line - buildGradle = firstHalfOfFile + secondHalfOfFile; - } else { - // this should not happen, but if it does, we should try to add the dependency to the buildscript - match = buildGradle.match(/^(\s*)jcenter\(\)/m); - var googlesMavenRepo = whitespace + 'google() // Google\'s Maven repository from cordova-plugin-firebase'; - modifiedLine = match[0] + '\n' + googlesMavenRepo; - // modify the part of the string that is after 'allprojects' + // find the known line to match + let match = buildGradle.match(/^(\s*)jcenter\(\)/m); + const whitespace = match[1]; + + // modify the line to add the necessary repo + // Crashlytics goes under buildscripts which is the first grouping in the file + const fabricMavenRepo = whitespace + 'maven { url \'https://maven.fabric.io/public\' } // Fabrics Maven repository from cordova-plugin-firebase-lib' + let modifiedLine = match[0] + '\n' + fabricMavenRepo; + + // modify the actual line buildGradle = buildGradle.replace(/^(\s*)jcenter\(\)/m, modifiedLine); - } - return buildGradle; + // update the all projects grouping + const allProjectsIndex = buildGradle.indexOf('allprojects'); + if (allProjectsIndex > 0) { + // split the string on allprojects because jcenter is in both groups and we need to modify the 2nd instance + const firstHalfOfFile = buildGradle.substring(0, allProjectsIndex); + let secondHalfOfFile = buildGradle.substring(allProjectsIndex); + + // Add google() to the allprojects section of the string + match = secondHalfOfFile.match(/^(\s*)jcenter\(\)/m); + const googlesMavenRepo = whitespace + 'google() // Google\'s Maven repository from cordova-plugin-firebase-lib'; + modifiedLine = match[0] + '\n' + googlesMavenRepo; + // modify the part of the string that is after 'allprojects' + secondHalfOfFile = secondHalfOfFile.replace(/^(\s*)jcenter\(\)/m, modifiedLine); + + // recombine the modified line + buildGradle = firstHalfOfFile + secondHalfOfFile; + } else { + // this should not happen, but if it does, we should try to add the dependency to the buildscript + match = buildGradle.match(/^(\s*)jcenter\(\)/m); + const googlesMavenRepo = whitespace + 'google() // Google\'s Maven repository from cordova-plugin-firebase-lib'; + modifiedLine = match[0] + '\n' + googlesMavenRepo; + // modify the part of the string that is after 'allprojects' + buildGradle = buildGradle.replace(/^(\s*)jcenter\(\)/m, modifiedLine); + } + + return buildGradle; } /* * Helper function to write to the build.gradle that sits at the root of the project */ function writeRootBuildGradle(contents) { - var target = path.join("platforms", "android", "build.gradle"); - fs.writeFileSync(target, contents); + const target = path.join("platforms", "android", "build.gradle"); + fs.writeFileSync(target, contents); } module.exports = { - modifyRootBuildGradle: function() { - // be defensive and don't crash if the file doesn't exist - if (!rootBuildGradleExists) { - return; - } + modifyRootBuildGradle: function () { + // be defensive and don't crash if the file doesn't exist + if (!rootBuildGradleExists) { + return; + } - var buildGradle = readRootBuildGradle(); + let buildGradle = readRootBuildGradle(); - // Add Google Play Services Dependency - buildGradle = addDependencies(buildGradle); - - // Add Google's Maven Repo - buildGradle = addRepos(buildGradle); + // Add Google Play Services Dependency + buildGradle = addDependencies(buildGradle); - writeRootBuildGradle(buildGradle); - }, + // Add Google's Maven Repo + buildGradle = addRepos(buildGradle); - restoreRootBuildGradle: function() { - // be defensive and don't crash if the file doesn't exist - if (!rootBuildGradleExists) { - return; - } + writeRootBuildGradle(buildGradle); + }, + + restoreRootBuildGradle: function () { + // be defensive and don't crash if the file doesn't exist + if (!rootBuildGradleExists) { + return; + } - var buildGradle = readRootBuildGradle(); + let buildGradle = readRootBuildGradle(); - // remove any lines we added - buildGradle = buildGradle.replace(/(?:^|\r?\n)(.*)cordova-plugin-firebase*?(?=$|\r?\n)/g, ''); - - writeRootBuildGradle(buildGradle); - } + // remove any lines we added + buildGradle = buildGradle.replace(/(?:^|\r?\n)(.*)cordova-plugin-firebase-lib*?(?=$|\r?\n)/g, ''); + + writeRootBuildGradle(buildGradle); + } }; diff --git a/scripts/ios/after_plugin_install.js b/scripts/ios/after_plugin_install.js index 41666e204..086645090 100644 --- a/scripts/ios/after_plugin_install.js +++ b/scripts/ios/after_plugin_install.js @@ -1,10 +1,10 @@ -var helper = require("./helper"); +const helper = require("./helper"); -module.exports = function(context) { +module.exports = function (context) { // Add a build phase which runs a shell script that executes the Crashlytics // run command line tool which uploads the debug symbols at build time. - var xcodeProjectPath = helper.getXcodeProjectPath(context); + const xcodeProjectPath = helper.getXcodeProjectPath(context); helper.removeShellScriptBuildPhase(context, xcodeProjectPath); helper.addShellScriptBuildPhase(context, xcodeProjectPath); }; diff --git a/scripts/ios/before_plugin_uninstall.js b/scripts/ios/before_plugin_uninstall.js index 59ca40020..08e35d3a9 100644 --- a/scripts/ios/before_plugin_uninstall.js +++ b/scripts/ios/before_plugin_uninstall.js @@ -1,8 +1,8 @@ -var helper = require("./helper"); +const helper = require("./helper"); -module.exports = function(context) { +module.exports = function (context) { // Remove the build script that was added when the plugin was installed. - var xcodeProjectPath = helper.getXcodeProjectPath(context); + const xcodeProjectPath = helper.getXcodeProjectPath(context); helper.removeShellScriptBuildPhase(context, xcodeProjectPath); }; diff --git a/scripts/ios/helper.js b/scripts/ios/helper.js index 946496a9c..936f9bee3 100644 --- a/scripts/ios/helper.js +++ b/scripts/ios/helper.js @@ -1,143 +1,138 @@ -var fs = require("fs"); -var path = require("path"); -var utilities = require("../lib/utilities"); +const fs = require('fs'); +const path = require('path'); +const xcode = require('xcode'); +const chalk = require('chalk'); +const utilities = require('../lib/utilities'); /** * This is used as the display text for the build phase block in XCode as well as the * inline comments inside of the .pbxproj file for the build script phase block. */ -var comment = "\"Crashlytics\""; +const comment = '"Crashlytics"'; module.exports = { - /** - * Used to get the path to the XCode project's .pbxproj file. - * - * @param {object} context - The Cordova context. - * @returns The path to the XCode project's .pbxproj file. + /** + * @returns string path to the XCode project's .pbxproj file. */ - getXcodeProjectPath: function (context) { - - var appName = utilities.getAppName(context); - - return path.join("platforms", "ios", appName + ".xcodeproj", "project.pbxproj"); - }, - - /** + getXcodeProjectPath: function () { + const appName = utilities.getAppName(); + const xcodeProjectPath = path.join("platforms", "ios", appName + ".xcodeproj", "project.pbxproj"); + console.log(chalk.blue.bold('Xcode project path:', xcodeProjectPath)); + return xcodeProjectPath; + }, + + /** * This helper is used to add a build phase to the XCode project which runs a shell * script during the build process. The script executes Crashlytics run command line * tool with the API and Secret keys. This tool is used to upload the debug symbols * (dSYMs) so that Crashlytics can display stack trace information in it's web console. */ - addShellScriptBuildPhase: function (context, xcodeProjectPath) { - var xcode = context.requireCordovaModule("xcode"); - - // Read and parse the XCode project (.pxbproj) from disk. - // File format information: http://www.monobjc.net/xcode-project-file-format.html - var xcodeProject = xcode.project(xcodeProjectPath); - xcodeProject.parseSync(); - - // Build the body of the script to be executed during the build phase. - var script = '"' + '\\"${SRCROOT}\\"' + "/\\\"" + utilities.getAppName(context) + "\\\"/Plugins/" + utilities.getPluginId() + "/Fabric.framework/run" + '"'; - - // Generate a unique ID for our new build phase. - var id = xcodeProject.generateUuid(); - // Create the build phase. - xcodeProject.hash.project.objects.PBXShellScriptBuildPhase[id] = { - isa: "PBXShellScriptBuildPhase", - buildActionMask: 2147483647, - files: [], - inputPaths: [], - name: comment, - outputPaths: [], - runOnlyForDeploymentPostprocessing: 0, - shellPath: "/bin/sh", - shellScript: script, - showEnvVarsInLog: 0 + addShellScriptBuildPhase: function (context, xcodeProjectPath) { + // Read and parse the XCode project (.pxbproj) from disk. + // File format information: http://www.monobjc.net/xcode-project-file-format.html + const xcodeProject = xcode.project(xcodeProjectPath); + xcodeProject.parseSync(); + + // Build the body of the script to be executed during the build phase. + const script = '"' + '\\"${PODS_ROOT}/Fabric/run\\"' + '"'; + + // Generate a unique ID for our new build phase. + const id = xcodeProject.generateUuid(); + // Create the build phase. + xcodeProject.hash.project.objects.PBXShellScriptBuildPhase[id] = { + isa: "PBXShellScriptBuildPhase", + buildActionMask: 2147483647, + files: [], + inputPaths: ['"' + '$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)' + '"'], + name: comment, + outputPaths: [], + runOnlyForDeploymentPostprocessing: 0, + shellPath: "/bin/sh", + shellScript: script, + showEnvVarsInLog: 0 }; - // Add a comment to the block (viewable in the source of the pbxproj file). - xcodeProject.hash.project.objects.PBXShellScriptBuildPhase[id + "_comment"] = comment; + // Add a comment to the block (viewable in the source of the pbxproj file). + xcodeProject.hash.project.objects.PBXShellScriptBuildPhase[id + "_comment"] = comment; - // Add this new shell script build phase block to the targets. - for (var nativeTargetId in xcodeProject.hash.project.objects.PBXNativeTarget) { + // Add this new shell script build phase block to the targets. + for (const nativeTargetId in xcodeProject.hash.project.objects.PBXNativeTarget) { - // Skip over the comment blocks. - if (nativeTargetId.indexOf("_comment") !== -1) { - continue; - } + // Skip over the comment blocks. + if (nativeTargetId.indexOf("_comment") !== -1) { + continue; + } - var nativeTarget = xcodeProject.hash.project.objects.PBXNativeTarget[nativeTargetId]; + const nativeTarget = xcodeProject.hash.project.objects.PBXNativeTarget[nativeTargetId]; - nativeTarget.buildPhases.push({ - value: id, - comment: comment - }); - } + nativeTarget.buildPhases.push({ + value: id, + comment: comment + }); + } - // Finally, write the .pbxproj back out to disk. - fs.writeFileSync(xcodeProjectPath, xcodeProject.writeSync()); - }, + // Finally, write the .pbxproj back out to disk. + fs.writeFileSync(xcodeProjectPath, xcodeProject.writeSync()); + }, - /** + /** * This helper is used to remove the build phase from the XCode project that was added * by the addShellScriptBuildPhase() helper method. */ - removeShellScriptBuildPhase: function (context, xcodeProjectPath) { + removeShellScriptBuildPhase: function (context, xcodeProjectPath) { + // Read and parse the XCode project (.pxbproj) from disk. + // File format information: http://www.monobjc.net/xcode-project-file-format.html + const xcodeProject = xcode.project(xcodeProjectPath); + xcodeProject.parseSync(); - var xcode = context.requireCordovaModule("xcode"); + // First, we want to delete the build phase block itself. - // Read and parse the XCode project (.pxbproj) from disk. - // File format information: http://www.monobjc.net/xcode-project-file-format.html - var xcodeProject = xcode.project(xcodeProjectPath); - xcodeProject.parseSync(); + const buildPhases = xcodeProject.hash.project.objects.PBXShellScriptBuildPhase; - // First, we want to delete the build phase block itself. + const commentTest = comment.replace(/"/g, ''); + for (const buildPhaseId in buildPhases) { - var buildPhases = xcodeProject.hash.project.objects.PBXShellScriptBuildPhase; + const buildPhase = xcodeProject.hash.project.objects.PBXShellScriptBuildPhase[buildPhaseId]; + let shouldDelete = false; - for (var buildPhaseId in buildPhases) { + if (buildPhaseId.indexOf("_comment") === -1) { + // Dealing with a build phase block. - var buildPhase = xcodeProject.hash.project.objects.PBXShellScriptBuildPhase[buildPhaseId]; - var shouldDelete = false; + // If the name of this block matches ours, then we want to delete it. + shouldDelete = buildPhase.name && buildPhase.name.indexOf(commentTest) !== -1; + } else { + // Dealing with a comment block. - if (buildPhaseId.indexOf("_comment") === -1) { - // Dealing with a build phase block. + // If this is a comment block that matches ours, then we want to delete it. + shouldDelete = buildPhase === commentTest; + } - // If the name of this block matches ours, then we want to delete it. - shouldDelete = buildPhase.name && buildPhase.name.indexOf(comment) !== -1; - } else { - // Dealing with a comment block. + if (shouldDelete) { + delete buildPhases[buildPhaseId]; + } + } - // If this is a comment block that matches ours, then we want to delete it. - shouldDelete = buildPhaseId === comment; - } + // Second, we want to delete the native target reference to the block. - if (shouldDelete) { - delete buildPhases[buildPhaseId]; - } - } - - // Second, we want to delete the native target reference to the block. + const nativeTargets = xcodeProject.hash.project.objects.PBXNativeTarget; - var nativeTargets = xcodeProject.hash.project.objects.PBXNativeTarget; + for (const nativeTargetId in nativeTargets) { - for (var nativeTargetId in nativeTargets) { + // Skip over the comment blocks. + if (nativeTargetId.indexOf("_comment") !== -1) { + continue; + } - // Skip over the comment blocks. - if (nativeTargetId.indexOf("_comment") !== -1) { - continue; - } + const nativeTarget = nativeTargets[nativeTargetId]; - var nativeTarget = nativeTargets[nativeTargetId]; + // We remove the reference to the block by filtering out the the ones that match. + nativeTarget.buildPhases = nativeTarget.buildPhases.filter(function (buildPhase) { + return buildPhase.comment !== commentTest; + }); + } - // We remove the reference to the block by filtering out the the ones that match. - nativeTarget.buildPhases = nativeTarget.buildPhases.filter(function (buildPhase) { - return buildPhase.comment !== comment; - }); + // Finally, write the .pbxproj back out to disk. + fs.writeFileSync(xcodeProjectPath, xcodeProject.writeSync()); } - - // Finally, write the .pbxproj back out to disk. - fs.writeFileSync(xcodeProjectPath, xcodeProject.writeSync()); - } }; diff --git a/scripts/lib/utilities.js b/scripts/lib/utilities.js index 7154f60d4..a99bd0852 100644 --- a/scripts/lib/utilities.js +++ b/scripts/lib/utilities.js @@ -1,88 +1,64 @@ /** * Utilities and shared functionality for the build hooks. */ -var fs = require('fs'); -var path = require("path"); +const fs = require('fs'); +const path = require('path'); +const chalk = require('chalk'); +const ConfigParser = require('cordova-common').ConfigParser; fs.ensureDirSync = function (dir) { - if (!fs.existsSync(dir)) { - dir.split(path.sep).reduce(function (currentPath, folder) { - currentPath += folder + path.sep; - if (!fs.existsSync(currentPath)) { - fs.mkdirSync(currentPath); - } - return currentPath; - }, ''); - } + // TODO Use Node.js 10 & use mkdirSync with recursive option + if (!fs.existsSync(dir)) { + dir.split(path.sep).reduce(function (currentPath, folder) { + currentPath += folder + path.sep; + if (!fs.existsSync(currentPath)) { + fs.mkdirSync(currentPath); + } + return currentPath; + }, ''); + } }; module.exports = { - /** - * Used to get the name of the application as defined in the config.xml. - * - * @param {object} context - The Cordova context. - * @returns {string} The value of the name element in config.xml. - */ - getAppName: function (context) { - var ConfigParser = context.requireCordovaModule("cordova-lib").configparser; - var config = new ConfigParser("config.xml"); - return config.name(); - }, + getAppName: function () { + const config = new ConfigParser('config.xml'); + return config.name(); + }, - /** - * The ID of the plugin; this should match the ID in plugin.xml. - */ - getPluginId: function () { - return "cordova-plugin-firebase"; - }, + copyKey: function (platform) { + const file = platform.src; - copyKey: function (platform) { - for (var i = 0; i < platform.src.length; i++) { - var file = platform.src[i]; - if (this.fileExists(file)) { - try { - var contents = fs.readFileSync(file).toString(); + if (this.fileExists(file)) { + const contents = fs.readFileSync(file).toString(); - try { - platform.dest.forEach(function (destinationPath) { - var folder = destinationPath.substring(0, destinationPath.lastIndexOf('/')); - fs.ensureDirSync(folder); - fs.writeFileSync(destinationPath, contents); - }); - } catch (e) { - // skip - } - } catch (err) { - console.log(err); + try { + platform.dest.forEach(function (destinationPath) { + const folder = destinationPath.substring(0, destinationPath.lastIndexOf('/')); + fs.ensureDirSync(folder); + fs.writeFileSync(destinationPath, contents); + }); + } catch (e) { + // skip + } + } else { + console.warn(chalk.yellow.bold('File: [' + file + '] not found. Please checkout', + 'https://github.com/wizpanda/cordova-plugin-firebase-lib#setup')); } + }, - break; - } - } - }, - - getValue: function (config, name) { - var value = config.match(new RegExp('<' + name + '(.*?)>(.*?)', 'i')); - if (value && value[2]) { - return value[2] - } else { - return null - } - }, - - fileExists: function (path) { - try { - return fs.statSync(path).isFile(); - } catch (e) { - return false; - } - }, + fileExists: function (path) { + try { + return fs.statSync(path).isFile(); + } catch (e) { + return false; + } + }, - directoryExists: function (path) { - try { - return fs.statSync(path).isDirectory(); - } catch (e) { - return false; + directoryExists: function (path) { + try { + return fs.statSync(path).isDirectory(); + } catch (e) { + return false; + } } - } }; diff --git a/src/android/FirebasePlugin.java b/src/android/FirebasePlugin.java index 2ba645835..ccbfcaca7 100755 --- a/src/android/FirebasePlugin.java +++ b/src/android/FirebasePlugin.java @@ -6,13 +6,23 @@ import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationManagerCompat; import android.util.Base64; import android.util.Log; +import android.annotation.TargetApi; +import android.app.NotificationChannel; +import android.content.ContentResolver; +import android.os.Build; +import androidx.core.app.NotificationCompat; +import android.media.AudioAttributes; +import android.net.Uri; + import com.crashlytics.android.Crashlytics; import io.fabric.sdk.android.Fabric; + import java.lang.reflect.Field; + import com.google.android.gms.tasks.OnFailureListener; import com.google.android.gms.tasks.OnSuccessListener; import com.google.android.gms.tasks.Task; @@ -62,11 +72,87 @@ public class FirebasePlugin extends CordovaPlugin { private final String TAG = "FirebasePlugin"; protected static final String KEY = "badge"; + private final String BADGE = "badge"; + private final String CHANNEL_DESCRIPTION = "description"; + private final String CHANNEL_ID = "id"; + private final String CHANNEL_IMPORTANCE = "importance"; + private final String CHANNEL_LIGHT_COLOR = "lightColor"; + private final String CHANNEL_VIBRATION = "vibration"; + private final String SOUND = "sound"; + private final String SOUND_DEFAULT = "default"; + private final String SOUND_RINGTONE = "ringtone"; + private final String VISIBILITY = "visibility"; + private static boolean inBackground = true; private static ArrayList notificationStack = null; private static CallbackContext notificationCallbackContext; private static CallbackContext tokenRefreshCallbackContext; + /** + * Gets the application context from cordova's main activity. + * + * @return the application context + */ + private Context getApplicationContext() { + return this.cordova.getActivity().getApplicationContext(); + } + + @TargetApi(26) + private void createChannel(JSONObject channel) throws JSONException { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) { + return; + } + + final NotificationManager notificationManager = (NotificationManager) cordova.getActivity() + .getSystemService(Context.NOTIFICATION_SERVICE); + + String packageName = getApplicationContext().getPackageName(); + NotificationChannel mChannel = new NotificationChannel(channel.getString(CHANNEL_ID), + channel.optString(CHANNEL_DESCRIPTION, ""), + channel.optInt(CHANNEL_IMPORTANCE, NotificationManager.IMPORTANCE_DEFAULT)); + + int lightColor = channel.optInt(CHANNEL_LIGHT_COLOR, -1); + if (lightColor != -1) { + mChannel.setLightColor(lightColor); + } + + int visibility = channel.optInt(VISIBILITY, NotificationCompat.VISIBILITY_PUBLIC); + mChannel.setLockscreenVisibility(visibility); + + boolean badge = channel.optBoolean(BADGE, true); + mChannel.setShowBadge(badge); + + String sound = channel.optString(SOUND, "default"); + AudioAttributes audioAttributes = new AudioAttributes.Builder() + .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION) + .setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE).build(); + + if (SOUND_RINGTONE.equals(sound)) { + mChannel.setSound(android.provider.Settings.System.DEFAULT_RINGTONE_URI, audioAttributes); + } else if (sound != null && !sound.contentEquals(SOUND_DEFAULT)) { + Uri soundUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + packageName + "/raw/" + sound); + mChannel.setSound(soundUri, audioAttributes); + } else { + mChannel.setSound(android.provider.Settings.System.DEFAULT_NOTIFICATION_URI, audioAttributes); + } + + // If vibration settings is an array set vibration pattern, else set enable vibration. + JSONArray pattern = channel.optJSONArray(CHANNEL_VIBRATION); + if (pattern != null) { + int patternLength = pattern.length(); + long[] patternArray = new long[patternLength]; + for (int i = 0; i < patternLength; i++) { + patternArray[i] = pattern.optLong(i); + } + mChannel.setVibrationPattern(patternArray); + } else { + boolean vibrate = channel.optBoolean(CHANNEL_VIBRATION, true); + mChannel.enableVibration(vibrate); + } + + notificationManager.createNotificationChannel(mChannel); + } + @Override protected void pluginInitialize() { final Context context = this.cordova.getActivity().getApplicationContext(); @@ -92,10 +178,7 @@ public void run() { @Override public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { - if (action.equals("getInstanceId")) { - this.getInstanceId(callbackContext); - return true; - } else if (action.equals("getId")) { + if (action.equals("getId")) { this.getId(callbackContext); return true; } else if (action.equals("getToken")) { @@ -129,9 +212,9 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo this.logEvent(callbackContext, args.getString(0), args.getJSONObject(1)); return true; } else if (action.equals("logError")) { - this.logError(callbackContext, args.getString(0)); + this.logError(callbackContext, args); return true; - }else if(action.equals("setCrashlyticsUserId")){ + } else if (action.equals("setCrashlyticsUserId")) { this.setCrashlyticsUserId(callbackContext, args.getString(0)); return true; } else if (action.equals("setScreenName")) { @@ -154,18 +237,10 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo } return true; } else if (action.equals("getByteArray")) { - if (args.length() > 1) { - this.getByteArray(callbackContext, args.getString(0), args.getString(1)); - } else { - this.getByteArray(callbackContext, args.getString(0), null); - } + this.getByteArray(callbackContext, args.getString(0)); return true; } else if (action.equals("getValue")) { - if (args.length() > 1) { - this.getValue(callbackContext, args.getString(0), args.getString(1)); - } else { - this.getValue(callbackContext, args.getString(0), null); - } + this.getValue(callbackContext, args.getString(0)); return true; } else if (action.equals("getInfo")) { this.getInfo(callbackContext); @@ -174,11 +249,7 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo this.setConfigSettings(callbackContext, args.getJSONObject(0)); return true; } else if (action.equals("setDefaults")) { - if (args.length() > 1) { - this.setDefaults(callbackContext, args.getJSONObject(0), args.getString(1)); - } else { - this.setDefaults(callbackContext, args.getJSONObject(0), null); - } + this.setDefaults(callbackContext, args.getJSONObject(0)); return true; } else if (action.equals("verifyPhoneNumber")) { this.verifyPhoneNumber(callbackContext, args.getString(0), args.getInt(1)); @@ -201,6 +272,14 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo } else if (action.equals("clearAllNotifications")) { this.clearAllNotifications(callbackContext); return true; + } else if (action.equals("createChannel")) { + try { + this.createChannel(args.getJSONObject(0)); + callbackContext.success(); + } catch (JSONException e) { + callbackContext.error(e.getMessage()); + } + return true; } return false; @@ -320,20 +399,6 @@ public void onNewIntent(Intent intent) { } } - // DEPRECTED - alias of getToken - private void getInstanceId(final CallbackContext callbackContext) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - String token = FirebaseInstanceId.getInstance().getToken(); - callbackContext.success(token); - } catch (Exception e) { - callbackContext.error(e.getMessage()); - } - } - }); - } - private void getId(final CallbackContext callbackContext) { cordova.getThreadPool().execute(new Runnable() { public void run() { @@ -484,13 +549,23 @@ public void run() { }); } - private void logError(final CallbackContext callbackContext, final String message) throws JSONException { + private void logError(final CallbackContext callbackContext, final JSONArray args) throws JSONException { + final String message = args.getString(0); + cordova.getThreadPool().execute(new Runnable() { public void run() { try { - Crashlytics.logException(new Exception(message)); + // We can optionally pass a stack trace generated by stacktrace.js. + if (args.length() == 2) { + JSONArray stackTrace = args.getJSONArray(1); + Exception e = new JavaScriptException(message, stackTrace); + Crashlytics.logException(e); + } else { + Crashlytics.logException(new JavaScriptException(message)); + } callbackContext.success(1); } catch (Exception e) { + Crashlytics.log("logError errored. Orig error: " + message); Crashlytics.log(e.getMessage()); e.printStackTrace(); callbackContext.error(e.getMessage()); @@ -602,38 +677,35 @@ public void onFailure(Exception e) { }); } - private void getByteArray(final CallbackContext callbackContext, final String key, final String namespace) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - byte[] bytes = namespace == null ? FirebaseRemoteConfig.getInstance().getByteArray(key) - : FirebaseRemoteConfig.getInstance().getByteArray(key, namespace); - JSONObject object = new JSONObject(); - object.put("base64", Base64.encodeToString(bytes, Base64.DEFAULT)); - object.put("array", new JSONArray(bytes)); - callbackContext.success(object); - } catch (Exception e) { - Crashlytics.logException(e); - callbackContext.error(e.getMessage()); + private void getByteArray(final CallbackContext callbackContext, final String key) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + try { + byte[] bytes = FirebaseRemoteConfig.getInstance().getByteArray(key); + JSONObject object = new JSONObject(); + object.put("base64", Base64.encodeToString(bytes, Base64.DEFAULT)); + object.put("array", new JSONArray(bytes)); + callbackContext.success(object); + } catch (Exception e) { + Crashlytics.logException(e); + callbackContext.error(e.getMessage()); + } } - } - }); + }); } - private void getValue(final CallbackContext callbackContext, final String key, final String namespace) { - cordova.getThreadPool().execute(new Runnable() { - public void run() { - try { - FirebaseRemoteConfigValue value = namespace == null - ? FirebaseRemoteConfig.getInstance().getValue(key) - : FirebaseRemoteConfig.getInstance().getValue(key, namespace); - callbackContext.success(value.asString()); - } catch (Exception e) { - Crashlytics.logException(e); - callbackContext.error(e.getMessage()); + private void getValue(final CallbackContext callbackContext, final String key) { + cordova.getThreadPool().execute(new Runnable() { + public void run() { + try { + FirebaseRemoteConfigValue value = FirebaseRemoteConfig.getInstance().getValue(key); + callbackContext.success(value.asString()); + } catch (Exception e) { + Crashlytics.logException(e); + callbackContext.error(e.getMessage()); + } } - } - }); + }); } private void getInfo(final CallbackContext callbackContext) { @@ -676,14 +748,11 @@ public void run() { }); } - private void setDefaults(final CallbackContext callbackContext, final JSONObject defaults, final String namespace) { + private void setDefaults(final CallbackContext callbackContext, final JSONObject defaults) { cordova.getThreadPool().execute(new Runnable() { public void run() { try { - if (namespace == null) - FirebaseRemoteConfig.getInstance().setDefaults(defaultsToMap(defaults)); - else - FirebaseRemoteConfig.getInstance().setDefaults(defaultsToMap(defaults), namespace); + FirebaseRemoteConfig.getInstance().setDefaults(defaultsToMap(defaults)); callbackContext.success(); } catch (Exception e) { Crashlytics.logException(e); @@ -747,22 +816,22 @@ public void onVerificationCompleted(PhoneAuthCredential credential) { try { String verificationId = null; String code = null; - + Field[] fields = credential.getClass().getDeclaredFields(); for (Field field : fields) { Class type = field.getType(); - if(type == String.class){ + if (type == String.class) { String value = getPrivateField(credential, field); - if(value == null) continue; - if(value.length() > 100) verificationId = value; - else if(value.length() >= 4 && value.length() <= 6) code = value; + if (value == null) continue; + if (value.length() > 100) verificationId = value; + else if (value.length() >= 4 && value.length() <= 6) code = value; } } returnResults.put("verified", verificationId != null && code != null); returnResults.put("verificationId", verificationId); returnResults.put("code", code); returnResults.put("instantVerification", true); - } catch(JSONException e){ + } catch (JSONException e) { Crashlytics.logException(e); callbackContext.error(e.getMessage()); return; @@ -814,7 +883,7 @@ public void onCodeSent(String verificationId, PhoneAuthProvider.ForceResendingTo callbackContext.sendPluginResult(pluginresult); } }; - + PhoneAuthProvider.getInstance().verifyPhoneNumber(number, // Phone number to verify timeOutDuration, // Timeout duration TimeUnit.SECONDS, // Unit of timeout @@ -827,7 +896,7 @@ public void onCodeSent(String verificationId, PhoneAuthProvider.ForceResendingTo } }); } - + private static String getPrivateField(PhoneAuthCredential credential, Field field) { try { field.setAccessible(true); @@ -882,7 +951,7 @@ public void run() { } if (myTrace != null && myTrace instanceof Trace) { - myTrace.incrementCounter(counterNamed); + myTrace.incrementMetric(counterNamed, 1); callbackContext.success(); } else { callbackContext.error("Trace not found"); diff --git a/src/android/FirebasePluginInstanceIDService.java b/src/android/FirebasePluginInstanceIDService.java deleted file mode 100755 index 329afe522..000000000 --- a/src/android/FirebasePluginInstanceIDService.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.apache.cordova.firebase; - -import android.util.Log; - -import com.google.firebase.iid.FirebaseInstanceId; -import com.google.firebase.iid.FirebaseInstanceIdService; - -public class FirebasePluginInstanceIDService extends FirebaseInstanceIdService { - - private static final String TAG = "FirebasePlugin"; - - /** - * Called if InstanceID token is updated. This may occur if the security of - * the previous token had been compromised. Note that this is called when the InstanceID token - * is initially generated so this is where you would retrieve the token. - */ - @Override - public void onTokenRefresh() { - // Get updated InstanceID token. - String refreshedToken = FirebaseInstanceId.getInstance().getToken(); - Log.d(TAG, "Refreshed token: " + refreshedToken); - - FirebasePlugin.sendToken(refreshedToken); - } -} diff --git a/src/android/FirebasePluginMessagingService.java b/src/android/FirebasePluginMessagingService.java index 4017bedff..c40ef8b50 100755 --- a/src/android/FirebasePluginMessagingService.java +++ b/src/android/FirebasePluginMessagingService.java @@ -8,7 +8,7 @@ import android.media.RingtoneManager; import android.net.Uri; import android.os.Bundle; -import android.support.v4.app.NotificationCompat; +import androidx.core.app.NotificationCompat; import android.util.Log; import android.app.Notification; import android.text.TextUtils; @@ -40,6 +40,21 @@ private String getStringResource(String name) { ); } + + /** + * Called if InstanceID token is updated. This may occur if the security of + * the previous token had been compromised. Note that this is called when the InstanceID token + * is initially generated so this is where you would retrieve the token. + */ + @Override + public void onNewToken(String refreshedToken) { + super.onNewToken(refreshedToken); + Log.e("NEW_TOKEN",refreshedToken); + Log.d(TAG, "Refreshed token: " + refreshedToken); + FirebasePlugin.sendToken(refreshedToken); + } + + /** * Called when message is received. * diff --git a/src/android/JavaScriptException.java b/src/android/JavaScriptException.java new file mode 100644 index 000000000..ada4e8505 --- /dev/null +++ b/src/android/JavaScriptException.java @@ -0,0 +1,42 @@ +package org.apache.cordova.firebase; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +/** + * Exception class to log Javascript based exceptions with stacktrace. + * + * @author https://github.com/distinctdan + */ +public class JavaScriptException extends Exception { + + public JavaScriptException(String message) { + super(message); + } + + public JavaScriptException(String message, JSONArray stackTrace) throws JSONException { + super(message); + this.handleStacktrace(stackTrace); + } + + private void handleStacktrace(JSONArray stackTrace) throws JSONException { + if (stackTrace == null) { + return; + } + + StackTraceElement[] trace = new StackTraceElement[stackTrace.length()]; + + for (int i = 0; i < stackTrace.length(); i++) { + JSONObject elem = stackTrace.getJSONObject(i); + trace[i] = new StackTraceElement( + "undefined", + elem.optString("functionName", "undefined"), + elem.optString("fileName", "undefined"), + elem.optInt("lineNumber", -1) + ); + } + + this.setStackTrace(trace); + } +} diff --git a/src/android/build-extras.gradle b/src/android/build-extras.gradle deleted file mode 100755 index e69de29bb..000000000 diff --git a/src/android/build.gradle b/src/android/build.gradle index fb05df755..62101dd9f 100755 --- a/src/android/build.gradle +++ b/src/android/build.gradle @@ -1,29 +1,28 @@ -buildscript { - repositories { - jcenter() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:+' - classpath 'com.google.gms:google-services:4.1.0' - } -} -repositories { - mavenCentral() - maven { - url "https://maven.google.com" - } -} - -dependencies { - compile 'me.leolin:ShortcutBadger:1.1.4@aar' - compile 'com.google.firebase:firebase-auth:+' - compile('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') { - transitive = true - } -} - -cdvPluginPostBuildExtras.add({ - apply plugin: 'com.google.gms.google-services' - apply plugin: 'io.fabric' -}) +buildscript { + repositories { + jcenter() + mavenCentral() + } + dependencies { + classpath 'com.google.gms:google-services:4.1.0' + } +} + +repositories { + mavenCentral() + maven { + url "https://maven.google.com" + } +} + +dependencies { + compile 'me.leolin:ShortcutBadger:1.1.4@aar' + compile('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') { + transitive = true + } +} + +cdvPluginPostBuildExtras.add({ + apply plugin: 'com.google.gms.google-services' + apply plugin: 'io.fabric' +}) diff --git a/src/ios/Crashlytics/Crashlytics.framework/Crashlytics b/src/ios/Crashlytics/Crashlytics.framework/Crashlytics deleted file mode 100755 index 887ea76a7..000000000 Binary files a/src/ios/Crashlytics/Crashlytics.framework/Crashlytics and /dev/null differ diff --git a/src/ios/Crashlytics/Crashlytics.framework/Headers/ANSCompatibility.h b/src/ios/Crashlytics/Crashlytics.framework/Headers/ANSCompatibility.h deleted file mode 100644 index 6ec011d93..000000000 --- a/src/ios/Crashlytics/Crashlytics.framework/Headers/ANSCompatibility.h +++ /dev/null @@ -1,31 +0,0 @@ -// -// ANSCompatibility.h -// AnswersKit -// -// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. -// - -#pragma once - -#if !__has_feature(nullability) -#define nonnull -#define nullable -#define _Nullable -#define _Nonnull -#endif - -#ifndef NS_ASSUME_NONNULL_BEGIN -#define NS_ASSUME_NONNULL_BEGIN -#endif - -#ifndef NS_ASSUME_NONNULL_END -#define NS_ASSUME_NONNULL_END -#endif - -#if __has_feature(objc_generics) -#define ANS_GENERIC_NSARRAY(type) NSArray -#define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary -#else -#define ANS_GENERIC_NSARRAY(type) NSArray -#define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary -#endif diff --git a/src/ios/Crashlytics/Crashlytics.framework/Headers/Answers.h b/src/ios/Crashlytics/Crashlytics.framework/Headers/Answers.h deleted file mode 100644 index 8deacbee5..000000000 --- a/src/ios/Crashlytics/Crashlytics.framework/Headers/Answers.h +++ /dev/null @@ -1,210 +0,0 @@ -// -// Answers.h -// Crashlytics -// -// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. -// - -#import -#import "ANSCompatibility.h" - -NS_ASSUME_NONNULL_BEGIN - -/** - * This class exposes the Answers Events API, allowing you to track key - * user user actions and metrics in your app. - */ -@interface Answers : NSObject - -/** - * Log a Sign Up event to see users signing up for your app in real-time, understand how - * many users are signing up with different methods and their success rate signing up. - * - * @param signUpMethodOrNil The method by which a user logged in, e.g. Twitter or Digits. - * @param signUpSucceededOrNil The ultimate success or failure of the login - * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. - */ -+ (void)logSignUpWithMethod:(nullable NSString *)signUpMethodOrNil - success:(nullable NSNumber *)signUpSucceededOrNil - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -/** - * Log an Log In event to see users logging into your app in real-time, understand how many - * users are logging in with different methods and their success rate logging into your app. - * - * @param loginMethodOrNil The method by which a user logged in, e.g. email, Twitter or Digits. - * @param loginSucceededOrNil The ultimate success or failure of the login - * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. - */ -+ (void)logLoginWithMethod:(nullable NSString *)loginMethodOrNil - success:(nullable NSNumber *)loginSucceededOrNil - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -/** - * Log a Share event to see users sharing from your app in real-time, letting you - * understand what content they're sharing from the type or genre down to the specific id. - * - * @param shareMethodOrNil The method by which a user shared, e.g. email, Twitter, SMS. - * @param contentNameOrNil The human readable name for this piece of content. - * @param contentTypeOrNil The type of content shared. - * @param contentIdOrNil The unique identifier for this piece of content. Useful for finding the top shared item. - * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. - */ -+ (void)logShareWithMethod:(nullable NSString *)shareMethodOrNil - contentName:(nullable NSString *)contentNameOrNil - contentType:(nullable NSString *)contentTypeOrNil - contentId:(nullable NSString *)contentIdOrNil - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -/** - * Log an Invite Event to track how users are inviting other users into - * your application. - * - * @param inviteMethodOrNil The method of invitation, e.g. GameCenter, Twitter, email. - * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. - */ -+ (void)logInviteWithMethod:(nullable NSString *)inviteMethodOrNil - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -/** - * Log a Purchase event to see your revenue in real-time, understand how many users are making purchases, see which - * items are most popular, and track plenty of other important purchase-related metrics. - * - * @param itemPriceOrNil The purchased item's price. - * @param currencyOrNil The ISO4217 currency code. Example: USD - * @param purchaseSucceededOrNil Was the purchase successful or unsuccessful - * @param itemNameOrNil The human-readable form of the item's name. Example: - * @param itemTypeOrNil The type, or genre of the item. Example: Song - * @param itemIdOrNil The machine-readable, unique item identifier Example: SKU - * @param customAttributesOrNil A dictionary of custom attributes to associate with this purchase. - */ -+ (void)logPurchaseWithPrice:(nullable NSDecimalNumber *)itemPriceOrNil - currency:(nullable NSString *)currencyOrNil - success:(nullable NSNumber *)purchaseSucceededOrNil - itemName:(nullable NSString *)itemNameOrNil - itemType:(nullable NSString *)itemTypeOrNil - itemId:(nullable NSString *)itemIdOrNil - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -/** - * Log a Level Start Event to track where users are in your game. - * - * @param levelNameOrNil The level name - * @param customAttributesOrNil A dictionary of custom attributes to associate with this level start event. - */ -+ (void)logLevelStart:(nullable NSString *)levelNameOrNil - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -/** - * Log a Level End event to track how users are completing levels in your game. - * - * @param levelNameOrNil The name of the level completed, E.G. "1" or "Training" - * @param scoreOrNil The score the user completed the level with. - * @param levelCompletedSuccesfullyOrNil A boolean representing whether or not the level was completed successfully. - * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. - */ -+ (void)logLevelEnd:(nullable NSString *)levelNameOrNil - score:(nullable NSNumber *)scoreOrNil - success:(nullable NSNumber *)levelCompletedSuccesfullyOrNil - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -/** - * Log an Add to Cart event to see users adding items to a shopping cart in real-time, understand how - * many users start the purchase flow, see which items are most popular, and track plenty of other important - * purchase-related metrics. - * - * @param itemPriceOrNil The purchased item's price. - * @param currencyOrNil The ISO4217 currency code. Example: USD - * @param itemNameOrNil The human-readable form of the item's name. Example: - * @param itemTypeOrNil The type, or genre of the item. Example: Song - * @param itemIdOrNil The machine-readable, unique item identifier Example: SKU - * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. - */ -+ (void)logAddToCartWithPrice:(nullable NSDecimalNumber *)itemPriceOrNil - currency:(nullable NSString *)currencyOrNil - itemName:(nullable NSString *)itemNameOrNil - itemType:(nullable NSString *)itemTypeOrNil - itemId:(nullable NSString *)itemIdOrNil - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -/** - * Log a Start Checkout event to see users moving through the purchase funnel in real-time, understand how many - * users are doing this and how much they're spending per checkout, and see how it related to other important - * purchase-related metrics. - * - * @param totalPriceOrNil The total price of the cart. - * @param currencyOrNil The ISO4217 currency code. Example: USD - * @param itemCountOrNil The number of items in the cart. - * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. - */ -+ (void)logStartCheckoutWithPrice:(nullable NSDecimalNumber *)totalPriceOrNil - currency:(nullable NSString *)currencyOrNil - itemCount:(nullable NSNumber *)itemCountOrNil - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -/** - * Log a Rating event to see users rating content within your app in real-time and understand what - * content is most engaging, from the type or genre down to the specific id. - * - * @param ratingOrNil The integer rating given by the user. - * @param contentNameOrNil The human readable name for this piece of content. - * @param contentTypeOrNil The type of content shared. - * @param contentIdOrNil The unique identifier for this piece of content. Useful for finding the top shared item. - * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. - */ -+ (void)logRating:(nullable NSNumber *)ratingOrNil - contentName:(nullable NSString *)contentNameOrNil - contentType:(nullable NSString *)contentTypeOrNil - contentId:(nullable NSString *)contentIdOrNil - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -/** - * Log a Content View event to see users viewing content within your app in real-time and - * understand what content is most engaging, from the type or genre down to the specific id. - * - * @param contentNameOrNil The human readable name for this piece of content. - * @param contentTypeOrNil The type of content shared. - * @param contentIdOrNil The unique identifier for this piece of content. Useful for finding the top shared item. - * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. - */ -+ (void)logContentViewWithName:(nullable NSString *)contentNameOrNil - contentType:(nullable NSString *)contentTypeOrNil - contentId:(nullable NSString *)contentIdOrNil - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -/** - * Log a Search event allows you to see users searching within your app in real-time and understand - * exactly what they're searching for. - * - * @param queryOrNil The user's query. - * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. - */ -+ (void)logSearchWithQuery:(nullable NSString *)queryOrNil - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -/** - * Log a Custom Event to see user actions that are uniquely important for your app in real-time, to see how often - * they're performing these actions with breakdowns by different categories you add. Use a human-readable name for - * the name of the event, since this is how the event will appear in Answers. - * - * @param eventName The human-readable name for the event. - * @param customAttributesOrNil A dictionary of custom attributes to associate with this event. Attribute keys - * must be NSString and values must be NSNumber or NSString. - * @discussion How we treat NSNumbers: - * We will provide information about the distribution of values over time. - * - * How we treat NSStrings: - * NSStrings are used as categorical data, allowing comparison across different category values. - * Strings are limited to a maximum length of 100 characters, attributes over this length will be - * truncated. - * - * When tracking the Tweet views to better understand user engagement, sending the tweet's length - * and the type of media present in the tweet allows you to track how tweet length and the type of media influence - * engagement. - */ -+ (void)logCustomEventWithName:(NSString *)eventName - customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Crashlytics/Crashlytics.framework/Headers/CLSAttributes.h b/src/ios/Crashlytics/Crashlytics.framework/Headers/CLSAttributes.h deleted file mode 100644 index 1526b0dca..000000000 --- a/src/ios/Crashlytics/Crashlytics.framework/Headers/CLSAttributes.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// CLSAttributes.h -// Crashlytics -// -// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. -// - -#pragma once - -#define CLS_DEPRECATED(x) __attribute__ ((deprecated(x))) - -#if !__has_feature(nullability) - #define nonnull - #define nullable - #define _Nullable - #define _Nonnull -#endif - -#ifndef NS_ASSUME_NONNULL_BEGIN - #define NS_ASSUME_NONNULL_BEGIN -#endif - -#ifndef NS_ASSUME_NONNULL_END - #define NS_ASSUME_NONNULL_END -#endif - -#if __has_feature(objc_generics) - #define CLS_GENERIC_NSARRAY(type) NSArray - #define CLS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary -#else - #define CLS_GENERIC_NSARRAY(type) NSArray - #define CLS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary -#endif diff --git a/src/ios/Crashlytics/Crashlytics.framework/Headers/CLSLogging.h b/src/ios/Crashlytics/Crashlytics.framework/Headers/CLSLogging.h deleted file mode 100644 index 59590d546..000000000 --- a/src/ios/Crashlytics/Crashlytics.framework/Headers/CLSLogging.h +++ /dev/null @@ -1,64 +0,0 @@ -// -// CLSLogging.h -// Crashlytics -// -// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. -// -#ifdef __OBJC__ -#import "CLSAttributes.h" -#import - -NS_ASSUME_NONNULL_BEGIN -#endif - - - -/** - * - * The CLS_LOG macro provides as easy way to gather more information in your log messages that are - * sent with your crash data. CLS_LOG prepends your custom log message with the function name and - * line number where the macro was used. If your app was built with the DEBUG preprocessor macro - * defined CLS_LOG uses the CLSNSLog function which forwards your log message to NSLog and CLSLog. - * If the DEBUG preprocessor macro is not defined CLS_LOG uses CLSLog only. - * - * Example output: - * -[AppDelegate login:] line 134 $ login start - * - * If you would like to change this macro, create a new header file, unset our define and then define - * your own version. Make sure this new header file is imported after the Crashlytics header file. - * - * #undef CLS_LOG - * #define CLS_LOG(__FORMAT__, ...) CLSNSLog... - * - **/ -#ifdef __OBJC__ -#ifdef DEBUG -#define CLS_LOG(__FORMAT__, ...) CLSNSLog((@"%s line %d $ " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) -#else -#define CLS_LOG(__FORMAT__, ...) CLSLog((@"%s line %d $ " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) -#endif -#endif - -/** - * - * Add logging that will be sent with your crash data. This logging will not show up in the system.log - * and will only be visible in your Crashlytics dashboard. - * - **/ - -#ifdef __OBJC__ -OBJC_EXTERN void CLSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2); -OBJC_EXTERN void CLSLogv(NSString *format, va_list ap) NS_FORMAT_FUNCTION(1,0); - -/** - * - * Add logging that will be sent with your crash data. This logging will show up in the system.log - * and your Crashlytics dashboard. It is not recommended for Release builds. - * - **/ -OBJC_EXTERN void CLSNSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2); -OBJC_EXTERN void CLSNSLogv(NSString *format, va_list ap) NS_FORMAT_FUNCTION(1,0); - - -NS_ASSUME_NONNULL_END -#endif diff --git a/src/ios/Crashlytics/Crashlytics.framework/Headers/CLSReport.h b/src/ios/Crashlytics/Crashlytics.framework/Headers/CLSReport.h deleted file mode 100644 index a8ff3b0b9..000000000 --- a/src/ios/Crashlytics/Crashlytics.framework/Headers/CLSReport.h +++ /dev/null @@ -1,103 +0,0 @@ -// -// CLSReport.h -// Crashlytics -// -// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. -// - -#import -#import "CLSAttributes.h" - -NS_ASSUME_NONNULL_BEGIN - -/** - * The CLSCrashReport protocol is deprecated. See the CLSReport class and the CrashyticsDelegate changes for details. - **/ -@protocol CLSCrashReport - -@property (nonatomic, copy, readonly) NSString *identifier; -@property (nonatomic, copy, readonly) NSDictionary *customKeys; -@property (nonatomic, copy, readonly) NSString *bundleVersion; -@property (nonatomic, copy, readonly) NSString *bundleShortVersionString; -@property (nonatomic, readonly, nullable) NSDate *crashedOnDate; -@property (nonatomic, copy, readonly) NSString *OSVersion; -@property (nonatomic, copy, readonly) NSString *OSBuildVersion; - -@end - -/** - * The CLSReport exposes an interface to the phsyical report that Crashlytics has created. You can - * use this class to get information about the event, and can also set some values after the - * event has occurred. - **/ -@interface CLSReport : NSObject - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -/** - * Returns the session identifier for the report. - **/ -@property (nonatomic, copy, readonly) NSString *identifier; - -/** - * Returns the custom key value data for the report. - **/ -@property (nonatomic, copy, readonly) NSDictionary *customKeys; - -/** - * Returns the CFBundleVersion of the application that generated the report. - **/ -@property (nonatomic, copy, readonly) NSString *bundleVersion; - -/** - * Returns the CFBundleShortVersionString of the application that generated the report. - **/ -@property (nonatomic, copy, readonly) NSString *bundleShortVersionString; - -/** - * Returns the date that the report was created. - **/ -@property (nonatomic, copy, readonly) NSDate *dateCreated; - -/** - * Returns the os version that the application crashed on. - **/ -@property (nonatomic, copy, readonly) NSString *OSVersion; - -/** - * Returns the os build version that the application crashed on. - **/ -@property (nonatomic, copy, readonly) NSString *OSBuildVersion; - -/** - * Returns YES if the report contains any crash information, otherwise returns NO. - **/ -@property (nonatomic, assign, readonly) BOOL isCrash; - -/** - * You can use this method to set, after the event, additional custom keys. The rules - * and semantics for this method are the same as those documented in Crashlytics.h. Be aware - * that the maximum size and count of custom keys is still enforced, and you can overwrite keys - * and/or cause excess keys to be deleted by using this method. - **/ -- (void)setObjectValue:(nullable id)value forKey:(NSString *)key; - -/** - * Record an application-specific user identifier. See Crashlytics.h for details. - **/ -@property (nonatomic, copy, nullable) NSString * userIdentifier; - -/** - * Record a user name. See Crashlytics.h for details. - **/ -@property (nonatomic, copy, nullable) NSString * userName; - -/** - * Record a user email. See Crashlytics.h for details. - **/ -@property (nonatomic, copy, nullable) NSString * userEmail; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Crashlytics/Crashlytics.framework/Headers/CLSStackFrame.h b/src/ios/Crashlytics/Crashlytics.framework/Headers/CLSStackFrame.h deleted file mode 100644 index cdb5596cc..000000000 --- a/src/ios/Crashlytics/Crashlytics.framework/Headers/CLSStackFrame.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// CLSStackFrame.h -// Crashlytics -// -// Copyright 2015 Crashlytics, Inc. All rights reserved. -// - -#import -#import "CLSAttributes.h" - -NS_ASSUME_NONNULL_BEGIN - -/** - * - * This class is used in conjunction with -[Crashlytics recordCustomExceptionName:reason:frameArray:] to - * record information about non-ObjC/C++ exceptions. All information included here will be displayed - * in the Crashlytics UI, and can influence crash grouping. Be particularly careful with the use of the - * address property. If set, Crashlytics will attempt symbolication and could overwrite other properities - * in the process. - * - **/ -@interface CLSStackFrame : NSObject - -+ (instancetype)stackFrame; -+ (instancetype)stackFrameWithAddress:(NSUInteger)address; -+ (instancetype)stackFrameWithSymbol:(NSString *)symbol; - -@property (nonatomic, copy, nullable) NSString *symbol; -@property (nonatomic, copy, nullable) NSString *rawSymbol; -@property (nonatomic, copy, nullable) NSString *library; -@property (nonatomic, copy, nullable) NSString *fileName; -@property (nonatomic, assign) uint32_t lineNumber; -@property (nonatomic, assign) uint64_t offset; -@property (nonatomic, assign) uint64_t address; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Crashlytics/Crashlytics.framework/Headers/Crashlytics.h b/src/ios/Crashlytics/Crashlytics.framework/Headers/Crashlytics.h deleted file mode 100644 index 7104ca812..000000000 --- a/src/ios/Crashlytics/Crashlytics.framework/Headers/Crashlytics.h +++ /dev/null @@ -1,288 +0,0 @@ -// -// Crashlytics.h -// Crashlytics -// -// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. -// - -#import - -#import "CLSAttributes.h" -#import "CLSLogging.h" -#import "CLSReport.h" -#import "CLSStackFrame.h" -#import "Answers.h" - -NS_ASSUME_NONNULL_BEGIN - -@protocol CrashlyticsDelegate; - -/** - * Crashlytics. Handles configuration and initialization of Crashlytics. - * - * Note: The Crashlytics class cannot be subclassed. If this is causing you pain for - * testing, we suggest using either a wrapper class or a protocol extension. - */ -@interface Crashlytics : NSObject - -@property (nonatomic, readonly, copy) NSString *APIKey; -@property (nonatomic, readonly, copy) NSString *version; -@property (nonatomic, assign) BOOL debugMode; - -/** - * - * The delegate can be used to influence decisions on reporting and behavior, as well as reacting - * to previous crashes. - * - * Make certain that the delegate is setup before starting Crashlytics with startWithAPIKey:... or - * via +[Fabric with:...]. Failure to do will result in missing any delegate callbacks that occur - * synchronously during start. - * - **/ -@property (nonatomic, assign, nullable) id delegate; - -/** - * The recommended way to install Crashlytics into your application is to place a call to +startWithAPIKey: - * in your -application:didFinishLaunchingWithOptions: or -applicationDidFinishLaunching: - * method. - * - * Note: Starting with 3.0, the submission process has been significantly improved. The delay parameter - * is no longer required to throttle submissions on launch, performance will be great without it. - * - * @param apiKey The Crashlytics API Key for this app - * - * @return The singleton Crashlytics instance - */ -+ (Crashlytics *)startWithAPIKey:(NSString *)apiKey; -+ (Crashlytics *)startWithAPIKey:(NSString *)apiKey afterDelay:(NSTimeInterval)delay CLS_DEPRECATED("Crashlytics no longer needs or uses the delay parameter. Please use +startWithAPIKey: instead."); - -/** - * If you need the functionality provided by the CrashlyticsDelegate protocol, you can use - * these convenience methods to activate the framework and set the delegate in one call. - * - * @param apiKey The Crashlytics API Key for this app - * @param delegate A delegate object which conforms to CrashlyticsDelegate. - * - * @return The singleton Crashlytics instance - */ -+ (Crashlytics *)startWithAPIKey:(NSString *)apiKey delegate:(nullable id)delegate; -+ (Crashlytics *)startWithAPIKey:(NSString *)apiKey delegate:(nullable id)delegate afterDelay:(NSTimeInterval)delay CLS_DEPRECATED("Crashlytics no longer needs or uses the delay parameter. Please use +startWithAPIKey:delegate: instead."); - -/** - * Access the singleton Crashlytics instance. - * - * @return The singleton Crashlytics instance - */ -+ (Crashlytics *)sharedInstance; - -/** - * The easiest way to cause a crash - great for testing! - */ -- (void)crash; - -/** - * The easiest way to cause a crash with an exception - great for testing. - */ -- (void)throwException; - -/** - * Specify a user identifier which will be visible in the Crashlytics UI. - * - * Many of our customers have requested the ability to tie crashes to specific end-users of their - * application in order to facilitate responses to support requests or permit the ability to reach - * out for more information. We allow you to specify up to three separate values for display within - * the Crashlytics UI - but please be mindful of your end-user's privacy. - * - * We recommend specifying a user identifier - an arbitrary string that ties an end-user to a record - * in your system. This could be a database id, hash, or other value that is meaningless to a - * third-party observer but can be indexed and queried by you. - * - * Optionally, you may also specify the end-user's name or username, as well as email address if you - * do not have a system that works well with obscured identifiers. - * - * Pursuant to our EULA, this data is transferred securely throughout our system and we will not - * disseminate end-user data unless required to by law. That said, if you choose to provide end-user - * contact information, we strongly recommend that you disclose this in your application's privacy - * policy. Data privacy is of our utmost concern. - * - * @param identifier An arbitrary user identifier string which ties an end-user to a record in your system. - */ -- (void)setUserIdentifier:(nullable NSString *)identifier; - -/** - * Specify a user name which will be visible in the Crashlytics UI. - * Please be mindful of your end-user's privacy and see if setUserIdentifier: can fulfil your needs. - * @see setUserIdentifier: - * - * @param name An end user's name. - */ -- (void)setUserName:(nullable NSString *)name; - -/** - * Specify a user email which will be visible in the Crashlytics UI. - * Please be mindful of your end-user's privacy and see if setUserIdentifier: can fulfil your needs. - * - * @see setUserIdentifier: - * - * @param email An end user's email address. - */ -- (void)setUserEmail:(nullable NSString *)email; - -+ (void)setUserIdentifier:(nullable NSString *)identifier CLS_DEPRECATED("Please access this method via +sharedInstance"); -+ (void)setUserName:(nullable NSString *)name CLS_DEPRECATED("Please access this method via +sharedInstance"); -+ (void)setUserEmail:(nullable NSString *)email CLS_DEPRECATED("Please access this method via +sharedInstance"); - -/** - * Set a value for a for a key to be associated with your crash data which will be visible in the Crashlytics UI. - * When setting an object value, the object is converted to a string. This is typically done by calling - * -[NSObject description]. - * - * @param value The object to be associated with the key - * @param key The key with which to associate the value - */ -- (void)setObjectValue:(nullable id)value forKey:(NSString *)key; - -/** - * Set an int value for a key to be associated with your crash data which will be visible in the Crashlytics UI. - * - * @param value The integer value to be set - * @param key The key with which to associate the value - */ -- (void)setIntValue:(int)value forKey:(NSString *)key; - -/** - * Set an BOOL value for a key to be associated with your crash data which will be visible in the Crashlytics UI. - * - * @param value The BOOL value to be set - * @param key The key with which to associate the value - */ -- (void)setBoolValue:(BOOL)value forKey:(NSString *)key; - -/** - * Set an float value for a key to be associated with your crash data which will be visible in the Crashlytics UI. - * - * @param value The float value to be set - * @param key The key with which to associate the value - */ -- (void)setFloatValue:(float)value forKey:(NSString *)key; - -+ (void)setObjectValue:(nullable id)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance"); -+ (void)setIntValue:(int)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance"); -+ (void)setBoolValue:(BOOL)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance"); -+ (void)setFloatValue:(float)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance"); - -/** - * This method can be used to record a single exception structure in a report. This is particularly useful - * when your code interacts with non-native languages like Lua, C#, or Javascript. This call can be - * expensive and should only be used shortly before process termination. This API is not intended be to used - * to log NSException objects. All safely-reportable NSExceptions are automatically captured by - * Crashlytics. - * - * @param name The name of the custom exception - * @param reason The reason this exception occurred - * @param frameArray An array of CLSStackFrame objects - */ -- (void)recordCustomExceptionName:(NSString *)name reason:(nullable NSString *)reason frameArray:(CLS_GENERIC_NSARRAY(CLSStackFrame *) *)frameArray; - -/** - * - * This allows you to record a non-fatal event, described by an NSError object. These events will be grouped and - * displayed similarly to crashes. Keep in mind that this method can be expensive. Also, the total number of - * NSErrors that can be recorded during your app's life-cycle is limited by a fixed-size circular buffer. If the - * buffer is overrun, the oldest data is dropped. Errors are relayed to Crashlytics on a subsequent launch - * of your application. - * - * You can also use the -recordError:withAdditionalUserInfo: to include additional context not represented - * by the NSError instance itself. - * - **/ -- (void)recordError:(NSError *)error; -- (void)recordError:(NSError *)error withAdditionalUserInfo:(nullable CLS_GENERIC_NSDICTIONARY(NSString *, id) *)userInfo; - -- (void)logEvent:(NSString *)eventName CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:"); -- (void)logEvent:(NSString *)eventName attributes:(nullable NSDictionary *) attributes CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:"); -+ (void)logEvent:(NSString *)eventName CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:"); -+ (void)logEvent:(NSString *)eventName attributes:(nullable NSDictionary *) attributes CLS_DEPRECATED("Please refer to Answers +logCustomEventWithName:"); - -@end - -/** - * - * The CrashlyticsDelegate protocol provides a mechanism for your application to take - * action on events that occur in the Crashlytics crash reporting system. You can make - * use of these calls by assigning an object to the Crashlytics' delegate property directly, - * or through the convenience +startWithAPIKey:delegate: method. - * - */ -@protocol CrashlyticsDelegate -@optional - - -- (void)crashlyticsDidDetectCrashDuringPreviousExecution:(Crashlytics *)crashlytics CLS_DEPRECATED("Please refer to -crashlyticsDidDetectReportForLastExecution:"); -- (void)crashlytics:(Crashlytics *)crashlytics didDetectCrashDuringPreviousExecution:(id )crash CLS_DEPRECATED("Please refer to -crashlyticsDidDetectReportForLastExecution:"); - -/** - * - * Called when a Crashlytics instance has determined that the last execution of the - * application resulted in a saved report. This is called synchronously on Crashlytics - * initialization. Your delegate must invoke the completionHandler, but does not need to do so - * synchronously, or even on the main thread. Invoking completionHandler with NO will cause the - * detected report to be deleted and not submitted to Crashlytics. This is useful for - * implementing permission prompts, or other more-complex forms of logic around submitting crashes. - * - * Instead of using this method, you should try to make use of -crashlyticsDidDetectReportForLastExecution: - * if you can. - * - * @warning Failure to invoke the completionHandler will prevent submissions from being reported. Watch out. - * - * @warning Just implementing this delegate method will disable all forms of synchronous report submission. This can - * impact the reliability of reporting crashes very early in application launch. - * - * @param report The CLSReport object representing the last detected report - * @param completionHandler The completion handler to call when your logic has completed. - * - */ -- (void)crashlyticsDidDetectReportForLastExecution:(CLSReport *)report completionHandler:(void (^)(BOOL submit))completionHandler; - -/** - * - * Called when a Crashlytics instance has determined that the last execution of the - * application resulted in a saved report. This method differs from - * -crashlyticsDidDetectReportForLastExecution:completionHandler: in three important ways: - * - * - it is not called synchronously during initialization - * - it does not give you the ability to prevent the report from being submitted - * - the report object itself is immutable - * - * Thanks to these limitations, making use of this method does not impact reporting - * reliabilty in any way. - * - * @param report The read-only CLSReport object representing the last detected report - * - */ - -- (void)crashlyticsDidDetectReportForLastExecution:(CLSReport *)report; - -/** - * If your app is running on an OS that supports it (OS X 10.9+, iOS 7.0+), Crashlytics will submit - * most reports using out-of-process background networking operations. This results in a significant - * improvement in reliability of reporting, as well as power and performance wins for your users. - * If you don't want this functionality, you can disable by returning NO from this method. - * - * @warning Background submission is not supported for extensions on iOS or OS X. - * - * @param crashlytics The Crashlytics singleton instance - * - * @return Return NO if you don't want out-of-process background network operations. - * - */ -- (BOOL)crashlyticsCanUseBackgroundSessions:(Crashlytics *)crashlytics; - -@end - -/** - * `CrashlyticsKit` can be used as a parameter to `[Fabric with:@[CrashlyticsKit]];` in Objective-C. In Swift, use Crashlytics.sharedInstance() - */ -#define CrashlyticsKit [Crashlytics sharedInstance] - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Crashlytics/Crashlytics.framework/Info.plist b/src/ios/Crashlytics/Crashlytics.framework/Info.plist deleted file mode 100644 index 1d5689612..000000000 Binary files a/src/ios/Crashlytics/Crashlytics.framework/Info.plist and /dev/null differ diff --git a/src/ios/Crashlytics/Crashlytics.framework/Modules/module.modulemap b/src/ios/Crashlytics/Crashlytics.framework/Modules/module.modulemap deleted file mode 100644 index da0845e39..000000000 --- a/src/ios/Crashlytics/Crashlytics.framework/Modules/module.modulemap +++ /dev/null @@ -1,14 +0,0 @@ -framework module Crashlytics { - header "Crashlytics.h" - header "Answers.h" - header "ANSCompatibility.h" - header "CLSLogging.h" - header "CLSReport.h" - header "CLSStackFrame.h" - header "CLSAttributes.h" - - export * - - link "z" - link "c++" -} diff --git a/src/ios/Crashlytics/Crashlytics.framework/run b/src/ios/Crashlytics/Crashlytics.framework/run deleted file mode 100755 index 9058ea62c..000000000 --- a/src/ios/Crashlytics/Crashlytics.framework/run +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# run -# -# Copyright (c) 2015 Crashlytics. All rights reserved. - -# Figure out where we're being called from -DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) - -# Quote path in case of spaces or special chars -DIR="\"${DIR}" - -PATH_SEP="/" -VALIDATE_COMMAND="uploadDSYM\" $@ validate run-script" -UPLOAD_COMMAND="uploadDSYM\" $@ run-script" - -# Ensure params are as expected, run in sync mode to validate -eval $DIR$PATH_SEP$VALIDATE_COMMAND -return_code=$? - -if [[ $return_code != 0 ]]; then - exit $return_code -fi - -# Verification passed, upload dSYM in background to prevent Xcode from waiting -# Note: Validation is performed again before upload. -# Output can still be found in Console.app -eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 & diff --git a/src/ios/Crashlytics/Crashlytics.framework/submit b/src/ios/Crashlytics/Crashlytics.framework/submit deleted file mode 100755 index 42e72311b..000000000 Binary files a/src/ios/Crashlytics/Crashlytics.framework/submit and /dev/null differ diff --git a/src/ios/Crashlytics/Crashlytics.framework/uploadDSYM b/src/ios/Crashlytics/Crashlytics.framework/uploadDSYM deleted file mode 100755 index e584ac2bd..000000000 Binary files a/src/ios/Crashlytics/Crashlytics.framework/uploadDSYM and /dev/null differ diff --git a/src/ios/Crashlytics/Fabric.framework/Fabric b/src/ios/Crashlytics/Fabric.framework/Fabric deleted file mode 100755 index 5ac784869..000000000 Binary files a/src/ios/Crashlytics/Fabric.framework/Fabric and /dev/null differ diff --git a/src/ios/Crashlytics/Fabric.framework/Headers/FABAttributes.h b/src/ios/Crashlytics/Fabric.framework/Headers/FABAttributes.h deleted file mode 100644 index 3a9355a7c..000000000 --- a/src/ios/Crashlytics/Fabric.framework/Headers/FABAttributes.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// FABAttributes.h -// Fabric -// -// Copyright (C) 2015 Twitter, Inc. -// -// 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 - -#define FAB_UNAVAILABLE(x) __attribute__((unavailable(x))) - -#if !__has_feature(nullability) - #define nonnull - #define nullable - #define _Nullable - #define _Nonnull -#endif - -#ifndef NS_ASSUME_NONNULL_BEGIN - #define NS_ASSUME_NONNULL_BEGIN -#endif - -#ifndef NS_ASSUME_NONNULL_END - #define NS_ASSUME_NONNULL_END -#endif - - -/** - * The following macros are defined here to provide - * backwards compatability. If you are still using - * them you should migrate to the native nullability - * macros. - */ -#define fab_nullable nullable -#define fab_nonnull nonnull -#define FAB_NONNULL __fab_nonnull -#define FAB_NULLABLE __fab_nullable -#define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN -#define FAB_END_NONNULL NS_ASSUME_NONNULL_END diff --git a/src/ios/Crashlytics/Fabric.framework/Headers/Fabric.h b/src/ios/Crashlytics/Fabric.framework/Headers/Fabric.h deleted file mode 100644 index ecbdb53b8..000000000 --- a/src/ios/Crashlytics/Fabric.framework/Headers/Fabric.h +++ /dev/null @@ -1,82 +0,0 @@ -// -// Fabric.h -// Fabric -// -// Copyright (C) 2015 Twitter, Inc. -// -// 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 -#import "FABAttributes.h" - -NS_ASSUME_NONNULL_BEGIN - -#if TARGET_OS_IPHONE -#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000 - #error "Fabric's minimum iOS version is 6.0" -#endif -#else -#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070 - #error "Fabric's minimum OS X version is 10.7" -#endif -#endif - -/** - * Fabric Base. Coordinates configuration and starts all provided kits. - */ -@interface Fabric : NSObject - -/** - * Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use. - * - * For example, in Objective-C: - * - * `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];` - * - * Swift: - * - * `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])` - * - * Only the first call to this method is honored. Subsequent calls are no-ops. - * - * @param kitClasses An array of kit Class objects - * - * @return Returns the shared Fabric instance. In most cases this can be ignored. - */ -+ (instancetype)with:(NSArray *)kitClasses; - -/** - * Returns the Fabric singleton object. - */ -+ (instancetype)sharedSDK; - -/** - * This BOOL enables or disables debug logging, such as kit version information. The default value is NO. - */ -@property (nonatomic, assign) BOOL debug; - -/** - * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance. - */ -- (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance."); - -/** - * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance. - */ -+ (instancetype)new FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance."); - -@end - -NS_ASSUME_NONNULL_END - diff --git a/src/ios/Crashlytics/Fabric.framework/Info.plist b/src/ios/Crashlytics/Fabric.framework/Info.plist deleted file mode 100644 index a00e88db7..000000000 Binary files a/src/ios/Crashlytics/Fabric.framework/Info.plist and /dev/null differ diff --git a/src/ios/Crashlytics/Fabric.framework/Modules/module.modulemap b/src/ios/Crashlytics/Fabric.framework/Modules/module.modulemap deleted file mode 100644 index 2a312239d..000000000 --- a/src/ios/Crashlytics/Fabric.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Fabric { - umbrella header "Fabric.h" - - export * - module * { export * } -} \ No newline at end of file diff --git a/src/ios/Crashlytics/Fabric.framework/run b/src/ios/Crashlytics/Fabric.framework/run deleted file mode 100755 index 9058ea62c..000000000 --- a/src/ios/Crashlytics/Fabric.framework/run +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# run -# -# Copyright (c) 2015 Crashlytics. All rights reserved. - -# Figure out where we're being called from -DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) - -# Quote path in case of spaces or special chars -DIR="\"${DIR}" - -PATH_SEP="/" -VALIDATE_COMMAND="uploadDSYM\" $@ validate run-script" -UPLOAD_COMMAND="uploadDSYM\" $@ run-script" - -# Ensure params are as expected, run in sync mode to validate -eval $DIR$PATH_SEP$VALIDATE_COMMAND -return_code=$? - -if [[ $return_code != 0 ]]; then - exit $return_code -fi - -# Verification passed, upload dSYM in background to prevent Xcode from waiting -# Note: Validation is performed again before upload. -# Output can still be found in Console.app -eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 & diff --git a/src/ios/Crashlytics/Fabric.framework/uploadDSYM b/src/ios/Crashlytics/Fabric.framework/uploadDSYM deleted file mode 100755 index 1581be8d5..000000000 Binary files a/src/ios/Crashlytics/Fabric.framework/uploadDSYM and /dev/null differ diff --git a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalytics b/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalytics deleted file mode 100755 index 467e04cc9..000000000 Binary files a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalytics and /dev/null differ diff --git a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h b/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h deleted file mode 100755 index d499af668..000000000 --- a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h +++ /dev/null @@ -1,62 +0,0 @@ -#import - -#import "FIRAnalytics.h" - -NS_ASSUME_NONNULL_BEGIN - -/** - * Provides App Delegate handlers to be used in your App Delegate. - * - * To save time integrating Firebase Analytics in an application, Firebase Analytics does not - * require delegation implementation from the AppDelegate. Instead this is automatically done by - * Firebase Analytics. Should you choose instead to delegate manually, you can turn off the App - * Delegate Proxy by adding FirebaseAppDelegateProxyEnabled into your app's Info.plist and setting - * it to NO, and adding the methods in this category to corresponding delegation handlers. - * - * To handle Universal Links, you must return YES in - * [UIApplicationDelegate application:didFinishLaunchingWithOptions:]. - */ -@interface FIRAnalytics (AppDelegate) - -/** - * Handles events related to a URL session that are waiting to be processed. - * - * For optimal use of Firebase Analytics, call this method from the - * [UIApplicationDelegate application:handleEventsForBackgroundURLSession:completionHandler] - * method of the app delegate in your app. - * - * @param identifier The identifier of the URL session requiring attention. - * @param completionHandler The completion handler to call when you finish processing the events. - * Calling this completion handler lets the system know that your app's user interface is - * updated and a new snapshot can be taken. - */ -+ (void)handleEventsForBackgroundURLSession:(NSString *)identifier - completionHandler:(nullable void (^)(void))completionHandler; - -/** - * Handles the event when the app is launched by a URL. - * - * Call this method from [UIApplicationDelegate application:openURL:options:] (on iOS 9.0 and - * above), or [UIApplicationDelegate application:openURL:sourceApplication:annotation:] (on - * iOS 8.x and below) in your app. - * - * @param url The URL resource to open. This resource can be a network resource or a file. - */ -+ (void)handleOpenURL:(NSURL *)url; - -/** - * Handles the event when the app receives data associated with user activity that includes a - * Universal Link (on iOS 9.0 and above). - * - * Call this method from [UIApplication continueUserActivity:restorationHandler:] in your app - * delegate (on iOS 9.0 and above). - * - * @param userActivity The activity object containing the data associated with the task the user - * was performing. - */ -+ (void)handleUserActivity:(id)userActivity; - -@end - -NS_ASSUME_NONNULL_END - diff --git a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics.h b/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics.h deleted file mode 100755 index 39d23f18f..000000000 --- a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics.h +++ /dev/null @@ -1,119 +0,0 @@ -#import - -#import "FIREventNames.h" -#import "FIRParameterNames.h" -#import "FIRUserPropertyNames.h" - -NS_ASSUME_NONNULL_BEGIN - -/// The top level Firebase Analytics singleton that provides methods for logging events and setting -/// user properties. See the developer guides for general -/// information on using Firebase Analytics in your apps. -NS_SWIFT_NAME(Analytics) -@interface FIRAnalytics : NSObject - -/// Logs an app event. The event can have up to 25 parameters. Events with the same name must have -/// the same parameters. Up to 500 event names are supported. Using predefined events and/or -/// parameters is recommended for optimal reporting. -/// -/// The following event names are reserved and cannot be used: -///
    -///
  • ad_activeview
  • -///
  • ad_click
  • -///
  • ad_exposure
  • -///
  • ad_impression
  • -///
  • ad_query
  • -///
  • adunit_exposure
  • -///
  • app_clear_data
  • -///
  • app_remove
  • -///
  • app_update
  • -///
  • error
  • -///
  • first_open
  • -///
  • in_app_purchase
  • -///
  • notification_dismiss
  • -///
  • notification_foreground
  • -///
  • notification_open
  • -///
  • notification_receive
  • -///
  • os_update
  • -///
  • screen_view
  • -///
  • session_start
  • -///
  • user_engagement
  • -///
-/// -/// @param name The name of the event. Should contain 1 to 40 alphanumeric characters or -/// underscores. The name must start with an alphabetic character. Some event names are -/// reserved. See FIREventNames.h for the list of reserved event names. The "firebase_", -/// "google_", and "ga_" prefixes are reserved and should not be used. Note that event names are -/// case-sensitive and that logging two events whose names differ only in case will result in -/// two distinct events. -/// @param parameters The dictionary of event parameters. Passing nil indicates that the event has -/// no parameters. Parameter names can be up to 40 characters long and must start with an -/// alphabetic character and contain only alphanumeric characters and underscores. Only NSString -/// and NSNumber (signed 64-bit integer and 64-bit floating-point number) parameter types are -/// supported. NSString parameter values can be up to 100 characters long. The "firebase_", -/// "google_", and "ga_" prefixes are reserved and should not be used for parameter names. -+ (void)logEventWithName:(NSString *)name - parameters:(nullable NSDictionary *)parameters - NS_SWIFT_NAME(logEvent(_:parameters:)); - -/// Sets a user property to a given value. Up to 25 user property names are supported. Once set, -/// user property values persist throughout the app lifecycle and across sessions. -/// -/// The following user property names are reserved and cannot be used: -///
    -///
  • first_open_time
  • -///
  • last_deep_link_referrer
  • -///
  • user_id
  • -///
-/// -/// @param value The value of the user property. Values can be up to 36 characters long. Setting the -/// value to nil removes the user property. -/// @param name The name of the user property to set. Should contain 1 to 24 alphanumeric characters -/// or underscores and must start with an alphabetic character. The "firebase_", "google_", and -/// "ga_" prefixes are reserved and should not be used for user property names. -+ (void)setUserPropertyString:(nullable NSString *)value forName:(NSString *)name - NS_SWIFT_NAME(setUserProperty(_:forName:)); - -/// Sets the user ID property. This feature must be used in accordance with -/// Google's Privacy Policy -/// -/// @param userID The user ID to ascribe to the user of this app on this device, which must be -/// non-empty and no more than 256 characters long. Setting userID to nil removes the user ID. -+ (void)setUserID:(nullable NSString *)userID; - -/// Sets the current screen name, which specifies the current visual context in your app. This helps -/// identify the areas in your app where users spend their time and how they interact with your app. -/// 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:]. -/// -/// 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. -/// -/// The screen name and screen class remain in effect until the current UIViewController changes or -/// a new call to setScreenName:screenClass: is made. -/// -/// @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 -/// default this is the class name of the current UIViewController. Set to nil to revert to the -/// default class name. -+ (void)setScreenName:(nullable NSString *)screenName - screenClass:(nullable NSString *)screenClassOverride; - -/// The unique ID for this instance of the application. -+ (NSString *)appInstanceID; - -/// Clears all analytics data for this instance from the device and resets the app instance ID. -/// FIRAnalyticsConfiguration values will be reset to the default values. -+ (void)resetAnalyticsData; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIREventNames.h b/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIREventNames.h deleted file mode 100755 index c70c53e25..000000000 --- a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIREventNames.h +++ /dev/null @@ -1,407 +0,0 @@ -/// @file FIREventNames.h -/// -/// Predefined event names. -/// -/// An Event is an important occurrence in your app that you want to measure. You can report up to -/// 500 different types of Events per app and you can associate up to 25 unique parameters with each -/// Event type. Some common events are suggested below, but you may also choose to specify custom -/// Event types that are associated with your specific app. Each event type is identified by a -/// unique name. Event names can be up to 40 characters long, may only contain alphanumeric -/// characters and underscores ("_"), and must start with an alphabetic character. The "firebase_", -/// "google_", and "ga_" prefixes are reserved and should not be used. - -#import - -/// Add Payment Info event. This event signifies that a user has submitted their payment information -/// to your app. -static NSString *const kFIREventAddPaymentInfo NS_SWIFT_NAME(AnalyticsEventAddPaymentInfo) = - @"add_payment_info"; - -/// E-Commerce Add To Cart event. This event signifies that an item was added to a cart for -/// purchase. Add this event to a funnel with kFIREventEcommercePurchase to gauge the effectiveness -/// of your checkout process. Note: If you supply the @c kFIRParameterValue parameter, you must -/// also supply the @c kFIRParameterCurrency parameter so that revenue metrics can be computed -/// accurately. Params: -/// -///
    -///
  • @c kFIRParameterQuantity (signed 64-bit integer as NSNumber)
  • -///
  • @c kFIRParameterItemID (NSString)
  • -///
  • @c kFIRParameterItemName (NSString)
  • -///
  • @c kFIRParameterItemCategory (NSString)
  • -///
  • @c kFIRParameterItemLocationID (NSString) (optional)
  • -///
  • @c kFIRParameterPrice (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterCurrency (NSString) (optional)
  • -///
  • @c kFIRParameterValue (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterOrigin (NSString) (optional)
  • -///
  • @c kFIRParameterDestination (NSString) (optional)
  • -///
  • @c kFIRParameterStartDate (NSString) (optional)
  • -///
  • @c kFIRParameterEndDate (NSString) (optional)
  • -///
-static NSString *const kFIREventAddToCart NS_SWIFT_NAME(AnalyticsEventAddToCart) = @"add_to_cart"; - -/// E-Commerce Add To Wishlist event. This event signifies that an item was added to a wishlist. -/// Use this event to identify popular gift items in your app. Note: If you supply the -/// @c kFIRParameterValue parameter, you must also supply the @c kFIRParameterCurrency -/// parameter so that revenue metrics can be computed accurately. Params: -/// -///
    -///
  • @c kFIRParameterQuantity (signed 64-bit integer as NSNumber)
  • -///
  • @c kFIRParameterItemID (NSString)
  • -///
  • @c kFIRParameterItemName (NSString)
  • -///
  • @c kFIRParameterItemCategory (NSString)
  • -///
  • @c kFIRParameterItemLocationID (NSString) (optional)
  • -///
  • @c kFIRParameterPrice (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterCurrency (NSString) (optional)
  • -///
  • @c kFIRParameterValue (double as NSNumber) (optional)
  • -///
-static NSString *const kFIREventAddToWishlist NS_SWIFT_NAME(AnalyticsEventAddToWishlist) = - @"add_to_wishlist"; - -/// App Open event. By logging this event when an App becomes active, developers can understand how -/// often users leave and return during the course of a Session. Although Sessions are automatically -/// reported, this event can provide further clarification around the continuous engagement of -/// app-users. -static NSString *const kFIREventAppOpen NS_SWIFT_NAME(AnalyticsEventAppOpen) = @"app_open"; - -/// E-Commerce Begin Checkout event. This event signifies that a user has begun the process of -/// checking out. Add this event to a funnel with your kFIREventEcommercePurchase event to gauge the -/// effectiveness of your checkout process. Note: If you supply the @c kFIRParameterValue -/// parameter, you must also supply the @c kFIRParameterCurrency parameter so that revenue -/// metrics can be computed accurately. Params: -/// -///
    -///
  • @c kFIRParameterValue (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterCurrency (NSString) (optional)
  • -///
  • @c kFIRParameterTransactionID (NSString) (optional)
  • -///
  • @c kFIRParameterStartDate (NSString) (optional)
  • -///
  • @c kFIRParameterEndDate (NSString) (optional)
  • -///
  • @c kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for -/// hotel bookings
  • -///
  • @c kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for -/// hotel bookings
  • -///
  • @c kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional) -/// for travel bookings
  • -///
  • @c kFIRParameterOrigin (NSString) (optional)
  • -///
  • @c kFIRParameterDestination (NSString) (optional)
  • -///
  • @c kFIRParameterTravelClass (NSString) (optional) for travel bookings
  • -///
-static NSString *const kFIREventBeginCheckout NS_SWIFT_NAME(AnalyticsEventBeginCheckout) = - @"begin_checkout"; - -/// Campaign Detail event. Log this event to supply the referral details of a re-engagement -/// campaign. Note: you must supply at least one of the required parameters kFIRParameterSource, -/// kFIRParameterMedium or kFIRParameterCampaign. Params: -/// -///
    -///
  • @c kFIRParameterSource (NSString)
  • -///
  • @c kFIRParameterMedium (NSString)
  • -///
  • @c kFIRParameterCampaign (NSString)
  • -///
  • @c kFIRParameterTerm (NSString) (optional)
  • -///
  • @c kFIRParameterContent (NSString) (optional)
  • -///
  • @c kFIRParameterAdNetworkClickID (NSString) (optional)
  • -///
  • @c kFIRParameterCP1 (NSString) (optional)
  • -///
-static NSString *const kFIREventCampaignDetails NS_SWIFT_NAME(AnalyticsEventCampaignDetails) = - @"campaign_details"; - -/// Checkout progress. Params: -/// -///
    -///
  • @c kFIRParameterCheckoutStep (unsigned 64-bit integer as NSNumber)
  • -///
  • @c kFIRParameterCheckoutOption (NSString) (optional)
  • -///
-static NSString *const kFIREventCheckoutProgress NS_SWIFT_NAME(AnalyticsEventCheckoutProgress) = - @"checkout_progress"; - -/// Earn Virtual Currency event. This event tracks the awarding of virtual currency in your app. Log -/// this along with @c kFIREventSpendVirtualCurrency to better understand your virtual economy. -/// Params: -/// -///
    -///
  • @c kFIRParameterVirtualCurrencyName (NSString)
  • -///
  • @c kFIRParameterValue (signed 64-bit integer or double as NSNumber)
  • -///
-static NSString *const kFIREventEarnVirtualCurrency - NS_SWIFT_NAME(AnalyticsEventEarnVirtualCurrency) = @"earn_virtual_currency"; - -/// E-Commerce Purchase event. This event signifies that an item was purchased by a user. Note: -/// This is different from the in-app purchase event, which is reported automatically for App -/// Store-based apps. Note: If you supply the @c kFIRParameterValue parameter, you must also -/// supply the @c kFIRParameterCurrency parameter so that revenue metrics can be computed -/// accurately. Params: -/// -///
    -///
  • @c kFIRParameterCurrency (NSString) (optional)
  • -///
  • @c kFIRParameterValue (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterTransactionID (NSString) (optional)
  • -///
  • @c kFIRParameterTax (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterShipping (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterCoupon (NSString) (optional)
  • -///
  • @c kFIRParameterLocation (NSString) (optional)
  • -///
  • @c kFIRParameterStartDate (NSString) (optional)
  • -///
  • @c kFIRParameterEndDate (NSString) (optional)
  • -///
  • @c kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for -/// hotel bookings
  • -///
  • @c kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for -/// hotel bookings
  • -///
  • @c kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional) -/// for travel bookings
  • -///
  • @c kFIRParameterOrigin (NSString) (optional)
  • -///
  • @c kFIRParameterDestination (NSString) (optional)
  • -///
  • @c kFIRParameterTravelClass (NSString) (optional) for travel bookings
  • -///
-static NSString *const kFIREventEcommercePurchase NS_SWIFT_NAME(AnalyticsEventEcommercePurchase) = - @"ecommerce_purchase"; - -/// Generate Lead event. Log this event when a lead has been generated in the app to understand the -/// efficacy of your install and re-engagement campaigns. Note: If you supply the -/// @c kFIRParameterValue parameter, you must also supply the @c kFIRParameterCurrency -/// parameter so that revenue metrics can be computed accurately. Params: -/// -///
    -///
  • @c kFIRParameterCurrency (NSString) (optional)
  • -///
  • @c kFIRParameterValue (double as NSNumber) (optional)
  • -///
-static NSString *const kFIREventGenerateLead NS_SWIFT_NAME(AnalyticsEventGenerateLead) = - @"generate_lead"; - -/// Join Group event. Log this event when a user joins a group such as a guild, team or family. Use -/// this event to analyze how popular certain groups or social features are in your app. Params: -/// -///
    -///
  • @c kFIRParameterGroupID (NSString)
  • -///
-static NSString *const kFIREventJoinGroup NS_SWIFT_NAME(AnalyticsEventJoinGroup) = @"join_group"; - -/// Level Up event. This event signifies that a player has leveled up in your gaming app. It can -/// help you gauge the level distribution of your userbase and help you identify certain levels that -/// are difficult to pass. Params: -/// -///
    -///
  • @c kFIRParameterLevel (signed 64-bit integer as NSNumber)
  • -///
  • @c kFIRParameterCharacter (NSString) (optional)
  • -///
-static NSString *const kFIREventLevelUp NS_SWIFT_NAME(AnalyticsEventLevelUp) = @"level_up"; - -/// Login event. Apps with a login feature can report this event to signify that a user has logged -/// in. -static NSString *const kFIREventLogin NS_SWIFT_NAME(AnalyticsEventLogin) = @"login"; - -/// Post Score event. Log this event when the user posts a score in your gaming app. This event can -/// help you understand how users are actually performing in your game and it can help you correlate -/// high scores with certain audiences or behaviors. Params: -/// -///
    -///
  • @c kFIRParameterScore (signed 64-bit integer as NSNumber)
  • -///
  • @c kFIRParameterLevel (signed 64-bit integer as NSNumber) (optional)
  • -///
  • @c kFIRParameterCharacter (NSString) (optional)
  • -///
-static NSString *const kFIREventPostScore NS_SWIFT_NAME(AnalyticsEventPostScore) = @"post_score"; - -/// Present Offer event. This event signifies that the app has presented a purchase offer to a user. -/// Add this event to a funnel with the kFIREventAddToCart and kFIREventEcommercePurchase to gauge -/// your conversion process. Note: If you supply the @c kFIRParameterValue parameter, you must -/// also supply the @c kFIRParameterCurrency parameter so that revenue metrics can be computed -/// accurately. Params: -/// -///
    -///
  • @c kFIRParameterQuantity (signed 64-bit integer as NSNumber)
  • -///
  • @c kFIRParameterItemID (NSString)
  • -///
  • @c kFIRParameterItemName (NSString)
  • -///
  • @c kFIRParameterItemCategory (NSString)
  • -///
  • @c kFIRParameterItemLocationID (NSString) (optional)
  • -///
  • @c kFIRParameterPrice (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterCurrency (NSString) (optional)
  • -///
  • @c kFIRParameterValue (double as NSNumber) (optional)
  • -///
-static NSString *const kFIREventPresentOffer NS_SWIFT_NAME(AnalyticsEventPresentOffer) = - @"present_offer"; - -/// E-Commerce Purchase Refund event. This event signifies that an item purchase was refunded. -/// Note: If you supply the @c kFIRParameterValue parameter, you must also supply the -/// @c kFIRParameterCurrency parameter so that revenue metrics can be computed accurately. -/// Params: -/// -///
    -///
  • @c kFIRParameterCurrency (NSString) (optional)
  • -///
  • @c kFIRParameterValue (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterTransactionID (NSString) (optional)
  • -///
-static NSString *const kFIREventPurchaseRefund NS_SWIFT_NAME(AnalyticsEventPurchaseRefund) = - @"purchase_refund"; - -/// Remove from cart event. Params: -/// -///
    -///
  • @c kFIRParameterQuantity (signed 64-bit integer as NSNumber)
  • -///
  • @c kFIRParameterItemID (NSString)
  • -///
  • @c kFIRParameterItemName (NSString)
  • -///
  • @c kFIRParameterItemCategory (NSString)
  • -///
  • @c kFIRParameterItemLocationID (NSString) (optional)
  • -///
  • @c kFIRParameterPrice (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterCurrency (NSString) (optional)
  • -///
  • @c kFIRParameterValue (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterOrigin (NSString) (optional)
  • -///
  • @c kFIRParameterDestination (NSString) (optional)
  • -///
  • @c kFIRParameterStartDate (NSString) (optional)
  • -///
  • @c kFIRParameterEndDate (NSString) (optional)
  • -///
-static NSString *const kFIREventRemoveFromCart NS_SWIFT_NAME(AnalyticsEventRemoveFromCart) = - @"remove_from_cart"; - -/// Search event. Apps that support search features can use this event to contextualize search -/// operations by supplying the appropriate, corresponding parameters. This event can help you -/// identify the most popular content in your app. Params: -/// -///
    -///
  • @c kFIRParameterSearchTerm (NSString)
  • -///
  • @c kFIRParameterStartDate (NSString) (optional)
  • -///
  • @c kFIRParameterEndDate (NSString) (optional)
  • -///
  • @c kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for -/// hotel bookings
  • -///
  • @c kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for -/// hotel bookings
  • -///
  • @c kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional) -/// for travel bookings
  • -///
  • @c kFIRParameterOrigin (NSString) (optional)
  • -///
  • @c kFIRParameterDestination (NSString) (optional)
  • -///
  • @c kFIRParameterTravelClass (NSString) (optional) for travel bookings
  • -///
-static NSString *const kFIREventSearch NS_SWIFT_NAME(AnalyticsEventSearch) = @"search"; - -/// Select Content event. This general purpose event signifies that a user has selected some content -/// of a certain type in an app. The content can be any object in your app. This event can help you -/// identify popular content and categories of content in your app. Params: -/// -///
    -///
  • @c kFIRParameterContentType (NSString)
  • -///
  • @c kFIRParameterItemID (NSString)
  • -///
-static NSString *const kFIREventSelectContent NS_SWIFT_NAME(AnalyticsEventSelectContent) = - @"select_content"; - -/// Set checkout option. Params: -/// -///
    -///
  • @c kFIRParameterCheckoutStep (unsigned 64-bit integer as NSNumber)
  • -///
  • @c kFIRParameterCheckoutOption (NSString)
  • -///
-static NSString *const kFIREventSetCheckoutOption NS_SWIFT_NAME(AnalyticsEventSetCheckoutOption) = - @"set_checkout_option"; - -/// Share event. Apps with social features can log the Share event to identify the most viral -/// content. Params: -/// -///
    -///
  • @c kFIRParameterContentType (NSString)
  • -///
  • @c kFIRParameterItemID (NSString)
  • -///
-static NSString *const kFIREventShare NS_SWIFT_NAME(AnalyticsEventShare) = @"share"; - -/// Sign Up event. This event indicates that a user has signed up for an account in your app. The -/// parameter signifies the method by which the user signed up. Use this event to understand the -/// different behaviors between logged in and logged out users. Params: -/// -///
    -///
  • @c kFIRParameterSignUpMethod (NSString)
  • -///
-static NSString *const kFIREventSignUp NS_SWIFT_NAME(AnalyticsEventSignUp) = @"sign_up"; - -/// Spend Virtual Currency event. This event tracks the sale of virtual goods in your app and can -/// help you identify which virtual goods are the most popular objects of purchase. Params: -/// -///
    -///
  • @c kFIRParameterItemName (NSString)
  • -///
  • @c kFIRParameterVirtualCurrencyName (NSString)
  • -///
  • @c kFIRParameterValue (signed 64-bit integer or double as NSNumber)
  • -///
-static NSString *const kFIREventSpendVirtualCurrency - NS_SWIFT_NAME(AnalyticsEventSpendVirtualCurrency) = @"spend_virtual_currency"; - -/// Tutorial Begin event. This event signifies the start of the on-boarding process in your app. Use -/// this in a funnel with kFIREventTutorialComplete to understand how many users complete this -/// process and move on to the full app experience. -static NSString *const kFIREventTutorialBegin NS_SWIFT_NAME(AnalyticsEventTutorialBegin) = - @"tutorial_begin"; - -/// Tutorial End event. Use this event to signify the user's completion of your app's on-boarding -/// process. Add this to a funnel with kFIREventTutorialBegin to gauge the completion rate of your -/// on-boarding process. -static NSString *const kFIREventTutorialComplete NS_SWIFT_NAME(AnalyticsEventTutorialComplete) = - @"tutorial_complete"; - -/// Unlock Achievement event. Log this event when the user has unlocked an achievement in your -/// game. Since achievements generally represent the breadth of a gaming experience, this event can -/// help you understand how many users are experiencing all that your game has to offer. Params: -/// -///
    -///
  • @c kFIRParameterAchievementID (NSString)
  • -///
-static NSString *const kFIREventUnlockAchievement NS_SWIFT_NAME(AnalyticsEventUnlockAchievement) = - @"unlock_achievement"; - -/// View Item event. This event signifies that some content was shown to the user. This content may -/// be a product, a webpage or just a simple image or text. Use the appropriate parameters to -/// contextualize the event. Use this event to discover the most popular items viewed in your app. -/// Note: If you supply the @c kFIRParameterValue parameter, you must also supply the -/// @c kFIRParameterCurrency parameter so that revenue metrics can be computed accurately. -/// Params: -/// -///
    -///
  • @c kFIRParameterItemID (NSString)
  • -///
  • @c kFIRParameterItemName (NSString)
  • -///
  • @c kFIRParameterItemCategory (NSString)
  • -///
  • @c kFIRParameterItemLocationID (NSString) (optional)
  • -///
  • @c kFIRParameterPrice (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterQuantity (signed 64-bit integer as NSNumber) (optional)
  • -///
  • @c kFIRParameterCurrency (NSString) (optional)
  • -///
  • @c kFIRParameterValue (double as NSNumber) (optional)
  • -///
  • @c kFIRParameterStartDate (NSString) (optional)
  • -///
  • @c kFIRParameterEndDate (NSString) (optional)
  • -///
  • @c kFIRParameterFlightNumber (NSString) (optional) for travel bookings
  • -///
  • @c kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional) -/// for travel bookings
  • -///
  • @c kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for -/// travel bookings
  • -///
  • @c kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for -/// travel bookings
  • -///
  • @c kFIRParameterOrigin (NSString) (optional)
  • -///
  • @c kFIRParameterDestination (NSString) (optional)
  • -///
  • @c kFIRParameterSearchTerm (NSString) (optional) for travel bookings
  • -///
  • @c kFIRParameterTravelClass (NSString) (optional) for travel bookings
  • -///
-static NSString *const kFIREventViewItem NS_SWIFT_NAME(AnalyticsEventViewItem) = @"view_item"; - -/// View Item List event. Log this event when the user has been presented with a list of items of a -/// certain category. Params: -/// -///
    -///
  • @c kFIRParameterItemCategory (NSString)
  • -///
-static NSString *const kFIREventViewItemList NS_SWIFT_NAME(AnalyticsEventViewItemList) = - @"view_item_list"; - -/// View Search Results event. Log this event when the user has been presented with the results of a -/// search. Params: -/// -///
    -///
  • @c kFIRParameterSearchTerm (NSString)
  • -///
-static NSString *const kFIREventViewSearchResults NS_SWIFT_NAME(AnalyticsEventViewSearchResults) = - @"view_search_results"; - -/// Level Start event. Log this event when the user starts a new level. Params: -/// -///
    -///
  • @c kFIRParameterLevelName (NSString)
  • -///
-static NSString *const kFIREventLevelStart NS_SWIFT_NAME(AnalyticsEventLevelStart) = - @"level_start"; - -/// Level End event. Log this event when the user finishes a level. Params: -/// -///
    -///
  • @c kFIRParameterLevelName (NSString)
  • -///
  • @c kFIRParameterSuccess (NSString)
  • -///
-static NSString *const kFIREventLevelEnd NS_SWIFT_NAME(AnalyticsEventLevelEnd) = @"level_end"; diff --git a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRParameterNames.h b/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRParameterNames.h deleted file mode 100755 index 4e1366ce9..000000000 --- a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRParameterNames.h +++ /dev/null @@ -1,507 +0,0 @@ -/// @file FIRParameterNames.h -/// -/// Predefined event parameter names. -/// -/// Params supply information that contextualize Events. You can associate up to 25 unique Params -/// with each Event type. Some Params are suggested below for certain common Events, but you are -/// not limited to these. You may supply extra Params for suggested Events or custom Params for -/// Custom events. Param names can be up to 40 characters long, may only contain alphanumeric -/// characters and underscores ("_"), and must start with an alphabetic character. Param values can -/// be up to 100 characters long. The "firebase_", "google_", and "ga_" prefixes are reserved and -/// should not be used. - -#import - -/// Game achievement ID (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterAchievementID : @"10_matches_won",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterAchievementID NS_SWIFT_NAME(AnalyticsParameterAchievementID) = - @"achievement_id"; - -/// Ad Network Click ID (NSString). Used for network-specific click IDs which vary in format. -///
-///     NSDictionary *params = @{
-///       kFIRParameterAdNetworkClickID : @"1234567",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterAdNetworkClickID - NS_SWIFT_NAME(AnalyticsParameterAdNetworkClickID) = @"aclid"; - -/// The store or affiliation from which this transaction occurred (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterAffiliation : @"Google Store",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterAffiliation NS_SWIFT_NAME(AnalyticsParameterAffiliation) = - @"affiliation"; - -/// The individual campaign name, slogan, promo code, etc. Some networks have pre-defined macro to -/// capture campaign information, otherwise can be populated by developer. Highly Recommended -/// (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterCampaign : @"winter_promotion",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterCampaign NS_SWIFT_NAME(AnalyticsParameterCampaign) = - @"campaign"; - -/// Character used in game (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterCharacter : @"beat_boss",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterCharacter NS_SWIFT_NAME(AnalyticsParameterCharacter) = - @"character"; - -/// The checkout step (1..N) (unsigned 64-bit integer as NSNumber). -///
-///     NSDictionary *params = @{
-///       kFIRParameterCheckoutStep : @"1",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterCheckoutStep NS_SWIFT_NAME(AnalyticsParameterCheckoutStep) = - @"checkout_step"; - -/// Some option on a step in an ecommerce flow (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterCheckoutOption : @"Visa",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterCheckoutOption - NS_SWIFT_NAME(AnalyticsParameterCheckoutOption) = @"checkout_option"; - -/// Campaign content (NSString). -static NSString *const kFIRParameterContent NS_SWIFT_NAME(AnalyticsParameterContent) = @"content"; - -/// Type of content selected (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterContentType : @"news article",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterContentType NS_SWIFT_NAME(AnalyticsParameterContentType) = - @"content_type"; - -/// Coupon code for a purchasable item (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterCoupon : @"zz123",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterCoupon NS_SWIFT_NAME(AnalyticsParameterCoupon) = @"coupon"; - -/// Campaign custom parameter (NSString). Used as a method of capturing custom data in a campaign. -/// Use varies by network. -///
-///     NSDictionary *params = @{
-///       kFIRParameterCP1 : @"custom_data",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterCP1 NS_SWIFT_NAME(AnalyticsParameterCP1) = @"cp1"; - -/// The name of a creative used in a promotional spot (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterCreativeName : @"Summer Sale",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterCreativeName NS_SWIFT_NAME(AnalyticsParameterCreativeName) = - @"creative_name"; - -/// The name of a creative slot (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterCreativeSlot : @"summer_banner2",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterCreativeSlot NS_SWIFT_NAME(AnalyticsParameterCreativeSlot) = - @"creative_slot"; - -/// Purchase currency in 3-letter -/// ISO_4217 format (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterCurrency : @"USD",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterCurrency NS_SWIFT_NAME(AnalyticsParameterCurrency) = - @"currency"; - -/// Flight or Travel destination (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterDestination : @"Mountain View, CA",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterDestination NS_SWIFT_NAME(AnalyticsParameterDestination) = - @"destination"; - -/// The arrival date, check-out date or rental end date for the item. This should be in -/// YYYY-MM-DD format (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterEndDate : @"2015-09-14",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterEndDate NS_SWIFT_NAME(AnalyticsParameterEndDate) = @"end_date"; - -/// Flight number for travel events (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterFlightNumber : @"ZZ800",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterFlightNumber NS_SWIFT_NAME(AnalyticsParameterFlightNumber) = - @"flight_number"; - -/// Group/clan/guild ID (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterGroupID : @"g1",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterGroupID NS_SWIFT_NAME(AnalyticsParameterGroupID) = @"group_id"; - -/// Index of an item in a list (signed 64-bit integer as NSNumber). -///
-///     NSDictionary *params = @{
-///       kFIRParameterIndex : @(1),
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterIndex NS_SWIFT_NAME(AnalyticsParameterIndex) = @"index"; - -/// Item brand (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterItemBrand : @"Google",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterItemBrand NS_SWIFT_NAME(AnalyticsParameterItemBrand) = - @"item_brand"; - -/// Item category (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterItemCategory : @"t-shirts",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterItemCategory NS_SWIFT_NAME(AnalyticsParameterItemCategory) = - @"item_category"; - -/// Item ID (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterItemID : @"p7654",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterItemID NS_SWIFT_NAME(AnalyticsParameterItemID) = @"item_id"; - -/// The Google Place ID (NSString) that -/// corresponds to the associated item. Alternatively, you can supply your own custom Location ID. -///
-///     NSDictionary *params = @{
-///       kFIRParameterItemLocationID : @"ChIJiyj437sx3YAR9kUWC8QkLzQ",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterItemLocationID - NS_SWIFT_NAME(AnalyticsParameterItemLocationID) = @"item_location_id"; - -/// Item name (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterItemName : @"abc",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterItemName NS_SWIFT_NAME(AnalyticsParameterItemName) = - @"item_name"; - -/// The list in which the item was presented to the user (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterItemList : @"Search Results",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterItemList NS_SWIFT_NAME(AnalyticsParameterItemList) = - @"item_list"; - -/// Item variant (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterItemVariant : @"Red",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterItemVariant NS_SWIFT_NAME(AnalyticsParameterItemVariant) = - @"item_variant"; - -/// Level in game (signed 64-bit integer as NSNumber). -///
-///     NSDictionary *params = @{
-///       kFIRParameterLevel : @(42),
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterLevel NS_SWIFT_NAME(AnalyticsParameterLevel) = @"level"; - -/// Location (NSString). The Google Place ID -/// that corresponds to the associated event. Alternatively, you can supply your own custom -/// Location ID. -///
-///     NSDictionary *params = @{
-///       kFIRParameterLocation : @"ChIJiyj437sx3YAR9kUWC8QkLzQ",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterLocation NS_SWIFT_NAME(AnalyticsParameterLocation) = - @"location"; - -/// The advertising or marketing medium, for example: cpc, banner, email, push. Highly recommended -/// (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterMedium : @"email",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterMedium NS_SWIFT_NAME(AnalyticsParameterMedium) = @"medium"; - -/// Number of nights staying at hotel (signed 64-bit integer as NSNumber). -///
-///     NSDictionary *params = @{
-///       kFIRParameterNumberOfNights : @(3),
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterNumberOfNights - NS_SWIFT_NAME(AnalyticsParameterNumberOfNights) = @"number_of_nights"; - -/// Number of passengers traveling (signed 64-bit integer as NSNumber). -///
-///     NSDictionary *params = @{
-///       kFIRParameterNumberOfPassengers : @(11),
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterNumberOfPassengers - NS_SWIFT_NAME(AnalyticsParameterNumberOfPassengers) = @"number_of_passengers"; - -/// Number of rooms for travel events (signed 64-bit integer as NSNumber). -///
-///     NSDictionary *params = @{
-///       kFIRParameterNumberOfRooms : @(2),
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterNumberOfRooms NS_SWIFT_NAME(AnalyticsParameterNumberOfRooms) = - @"number_of_rooms"; - -/// Flight or Travel origin (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterOrigin : @"Mountain View, CA",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterOrigin NS_SWIFT_NAME(AnalyticsParameterOrigin) = @"origin"; - -/// Purchase price (double as NSNumber). -///
-///     NSDictionary *params = @{
-///       kFIRParameterPrice : @(1.0),
-///       kFIRParameterCurrency : @"USD",  // e.g. $1.00 USD
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterPrice NS_SWIFT_NAME(AnalyticsParameterPrice) = @"price"; - -/// Purchase quantity (signed 64-bit integer as NSNumber). -///
-///     NSDictionary *params = @{
-///       kFIRParameterQuantity : @(1),
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterQuantity NS_SWIFT_NAME(AnalyticsParameterQuantity) = - @"quantity"; - -/// Score in game (signed 64-bit integer as NSNumber). -///
-///     NSDictionary *params = @{
-///       kFIRParameterScore : @(4200),
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterScore NS_SWIFT_NAME(AnalyticsParameterScore) = @"score"; - -/// The search string/keywords used (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterSearchTerm : @"periodic table",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterSearchTerm NS_SWIFT_NAME(AnalyticsParameterSearchTerm) = - @"search_term"; - -/// Shipping cost (double as NSNumber). -///
-///     NSDictionary *params = @{
-///       kFIRParameterShipping : @(9.50),
-///       kFIRParameterCurrency : @"USD",  // e.g. $9.50 USD
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterShipping NS_SWIFT_NAME(AnalyticsParameterShipping) = - @"shipping"; - -/// Sign up method (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterSignUpMethod : @"google",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterSignUpMethod NS_SWIFT_NAME(AnalyticsParameterSignUpMethod) = - @"sign_up_method"; - -/// The origin of your traffic, such as an Ad network (for example, google) or partner (urban -/// airship). Identify the advertiser, site, publication, etc. that is sending traffic to your -/// property. Highly recommended (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterSource : @"InMobi",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterSource NS_SWIFT_NAME(AnalyticsParameterSource) = @"source"; - -/// The departure date, check-in date or rental start date for the item. This should be in -/// YYYY-MM-DD format (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterStartDate : @"2015-09-14",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterStartDate NS_SWIFT_NAME(AnalyticsParameterStartDate) = - @"start_date"; - -/// Tax amount (double as NSNumber). -///
-///     NSDictionary *params = @{
-///       kFIRParameterTax : @(1.0),
-///       kFIRParameterCurrency : @"USD",  // e.g. $1.00 USD
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterTax NS_SWIFT_NAME(AnalyticsParameterTax) = @"tax"; - -/// If you're manually tagging keyword campaigns, you should use utm_term to specify the keyword -/// (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterTerm : @"game",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterTerm NS_SWIFT_NAME(AnalyticsParameterTerm) = @"term"; - -/// A single ID for a ecommerce group transaction (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterTransactionID : @"ab7236dd9823",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterTransactionID NS_SWIFT_NAME(AnalyticsParameterTransactionID) = - @"transaction_id"; - -/// Travel class (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterTravelClass : @"business",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterTravelClass NS_SWIFT_NAME(AnalyticsParameterTravelClass) = - @"travel_class"; - -/// A context-specific numeric value which is accumulated automatically for each event type. This is -/// a general purpose parameter that is useful for accumulating a key metric that pertains to an -/// event. Examples include revenue, distance, time and points. Value should be specified as signed -/// 64-bit integer or double as NSNumber. Notes: Values for pre-defined currency-related events -/// (such as @c kFIREventAddToCart) should be supplied using double as NSNumber and must be -/// accompanied by a @c kFIRParameterCurrency parameter. The valid range of accumulated values is -/// [-9,223,372,036,854.77, 9,223,372,036,854.77]. Supplying a non-numeric value, omitting the -/// corresponding @c kFIRParameterCurrency parameter, or supplying an invalid -/// currency code for conversion events will cause that -/// conversion to be omitted from reporting. -///
-///     NSDictionary *params = @{
-///       kFIRParameterValue : @(3.99),
-///       kFIRParameterCurrency : @"USD",  // e.g. $3.99 USD
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterValue NS_SWIFT_NAME(AnalyticsParameterValue) = @"value"; - -/// Name of virtual currency type (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterVirtualCurrencyName : @"virtual_currency_name",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterVirtualCurrencyName - NS_SWIFT_NAME(AnalyticsParameterVirtualCurrencyName) = @"virtual_currency_name"; - -/// The name of a level in a game (NSString). -///
-///     NSDictionary *params = @{
-///       kFIRParameterLevelName : @"room_1",
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterLevelName NS_SWIFT_NAME(AnalyticsParameterLevelName) = - @"level_name"; - -/// The result of an operation. Specify 1 to indicate success and 0 to indicate failure (unsigned -/// integer as NSNumber). -///
-///     NSDictionary *params = @{
-///       kFIRParameterSuccess : @(1),
-///       // ...
-///     };
-/// 
-static NSString *const kFIRParameterSuccess NS_SWIFT_NAME(AnalyticsParameterSuccess) = @"success"; diff --git a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h b/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h deleted file mode 100755 index f50707fa1..000000000 --- a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h +++ /dev/null @@ -1,17 +0,0 @@ -/// @file FIRUserPropertyNames.h -/// -/// Predefined user property names. -/// -/// A UserProperty is an attribute that describes the app-user. By supplying UserProperties, you can -/// later analyze different behaviors of various segments of your userbase. You may supply up to 25 -/// unique UserProperties per app, and you can use the name and value of your choosing for each one. -/// UserProperty names can be up to 24 characters long, may only contain alphanumeric characters and -/// underscores ("_"), and must start with an alphabetic character. UserProperty values can be up to -/// 36 characters long. The "firebase_", "google_", and "ga_" prefixes are reserved and should not -/// be used. - -#import - -/// The method used to sign in. For example, "google", "facebook" or "twitter". -static NSString *const kFIRUserPropertySignUpMethod - NS_SWIFT_NAME(AnalyticsUserPropertySignUpMethod) = @"sign_up_method"; diff --git a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h b/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h deleted file mode 100755 index ed7588a6b..000000000 --- a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "FIRAnalytics+AppDelegate.h" -#import "FIRAnalytics.h" -#import "FIREventNames.h" -#import "FIRParameterNames.h" -#import "FIRUserPropertyNames.h" diff --git a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Modules/module.modulemap b/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Modules/module.modulemap deleted file mode 100755 index ef80595cd..000000000 --- a/src/ios/Firebase/Analytics/FirebaseAnalytics.framework/Modules/module.modulemap +++ /dev/null @@ -1,10 +0,0 @@ -framework module FirebaseAnalytics { - umbrella header "FirebaseAnalytics.h" - export * - module * { export *} - link "sqlite3" - link "z" - link framework "Security" - link framework "StoreKit" - link framework "SystemConfiguration" - link framework "UIKit"} diff --git a/src/ios/Firebase/Analytics/FirebaseCore.framework/FirebaseCore b/src/ios/Firebase/Analytics/FirebaseCore.framework/FirebaseCore deleted file mode 100644 index 3d2600382..000000000 Binary files a/src/ios/Firebase/Analytics/FirebaseCore.framework/FirebaseCore and /dev/null differ diff --git a/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h b/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h deleted file mode 100644 index ca1d32c6e..000000000 --- a/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 - -NS_ASSUME_NONNULL_BEGIN - -/** - * This class provides configuration fields for Firebase Analytics. - */ -NS_SWIFT_NAME(AnalyticsConfiguration) -@interface FIRAnalyticsConfiguration : NSObject - -/** - * Returns the shared instance of FIRAnalyticsConfiguration. - */ -+ (FIRAnalyticsConfiguration *)sharedInstance NS_SWIFT_NAME(shared()); - -/** - * Sets the minimum engagement time in seconds required to start a new session. The default value - * is 10 seconds. - */ -- (void)setMinimumSessionInterval:(NSTimeInterval)minimumSessionInterval; - -/** - * Sets the interval of inactivity in seconds that terminates the current session. The default - * value is 1800 seconds (30 minutes). - */ -- (void)setSessionTimeoutInterval:(NSTimeInterval)sessionTimeoutInterval; - -/** - * Sets whether analytics collection is enabled for this app on this device. This setting is - * persisted across app sessions. By default it is enabled. - */ -- (void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRApp.h b/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRApp.h deleted file mode 100644 index e0dd6d692..000000000 --- a/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRApp.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * 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 - -@class FIROptions; - -NS_ASSUME_NONNULL_BEGIN - -/** A block that takes a BOOL and has no return value. */ -typedef void (^FIRAppVoidBoolCallback)(BOOL success) NS_SWIFT_NAME(FirebaseAppVoidBoolCallback); - -/** - * The entry point of Firebase SDKs. - * - * Initialize and configure FIRApp using +[FIRApp configure] - * or other customized ways as shown below. - * - * The logging system has two modes: default mode and debug mode. In default mode, only logs with - * log level Notice, Warning and Error will be sent to device. In debug mode, all logs will be sent - * to device. The log levels that Firebase uses are consistent with the ASL log levels. - * - * Enable debug mode by passing the -FIRDebugEnabled argument to the application. You can add this - * argument in the application's Xcode scheme. When debug mode is enabled via -FIRDebugEnabled, - * further executions of the application will also be in debug mode. In order to return to default - * mode, you must explicitly disable the debug mode with the application argument -FIRDebugDisabled. - * - * It is also possible to change the default logging level in code by calling setLoggerLevel: on - * the FIRConfiguration interface. - */ -NS_SWIFT_NAME(FirebaseApp) -@interface FIRApp : NSObject - -/** - * Configures a default Firebase app. Raises an exception if any configuration step fails. The - * default app is named "__FIRAPP_DEFAULT". This method should be called after the app is launched - * and before using Firebase services. This method is thread safe and contains synchronous file I/O - * (reading GoogleService-Info.plist from disk). - */ -+ (void)configure; - -/** - * Configures the default Firebase app with the provided options. The default app is named - * "__FIRAPP_DEFAULT". Raises an exception if any configuration step fails. This method is thread - * safe. - * - * @param options The Firebase application options used to configure the service. - */ -+ (void)configureWithOptions:(FIROptions *)options NS_SWIFT_NAME(configure(options:)); - -/** - * Configures a Firebase app with the given name and options. Raises an exception if any - * configuration step fails. This method is thread safe. - * - * @param name The application's name given by the developer. The name should should only contain - Letters, Numbers and Underscore. - * @param options The Firebase application options used to configure the services. - */ -// clang-format off -+ (void)configureWithName:(NSString *)name - options:(FIROptions *)options NS_SWIFT_NAME(configure(name:options:)); -// clang-format on - -/** - * Returns the default app, or nil if the default app does not exist. - */ -+ (nullable FIRApp *)defaultApp NS_SWIFT_NAME(app()); - -/** - * Returns a previously created FIRApp instance with the given name, or nil if no such app exists. - * This method is thread safe. - */ -+ (nullable FIRApp *)appNamed:(NSString *)name NS_SWIFT_NAME(app(name:)); - -/** - * Returns the set of all extant FIRApp instances, or nil if there are no FIRApp instances. This - * method is thread safe. - */ -@property(class, readonly, nullable) NSDictionary *allApps; - -/** - * Cleans up the current FIRApp, freeing associated data and returning its name to the pool for - * future use. This method is thread safe. - */ -- (void)deleteApp:(FIRAppVoidBoolCallback)completion; - -/** - * FIRApp instances should not be initialized directly. Call +[FIRApp configure], - * +[FIRApp configureWithOptions:], or +[FIRApp configureWithNames:options:] directly. - */ -- (instancetype)init NS_UNAVAILABLE; - -/** - * Gets the name of this app. - */ -@property(nonatomic, copy, readonly) NSString *name; - -/** - * Gets a copy of the options for this app. These are non-modifiable. - */ -@property(nonatomic, copy, readonly) FIROptions *options; - -/** - * Gets or sets whether automatic data collection is enabled for all products. Defaults to `YES` - * unless `FirebaseDataCollectionDefaultEnabled` is set to `NO` in your app's Info.plist. This value - * is persisted across runs of the app so that it can be set once when users have consented to - * collection. - */ -@property(nonatomic, readwrite, getter=isDataCollectionDefaultEnabled) - BOOL dataCollectionDefaultEnabled; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRConfiguration.h b/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRConfiguration.h deleted file mode 100644 index 95bba5e7b..000000000 --- a/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRConfiguration.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 - -#import "FIRAnalyticsConfiguration.h" -#import "FIRLoggerLevel.h" - -NS_ASSUME_NONNULL_BEGIN - -/** - * This interface provides global level properties that the developer can tweak, and the singleton - * of the Firebase Analytics configuration class. - */ -NS_SWIFT_NAME(FirebaseConfiguration) -@interface FIRConfiguration : NSObject - -/** Returns the shared configuration object. */ -@property(class, nonatomic, readonly) FIRConfiguration *sharedInstance NS_SWIFT_NAME(shared); - -/** The configuration class for Firebase Analytics. */ -@property(nonatomic, readwrite) FIRAnalyticsConfiguration *analyticsConfiguration; - -/** - * Sets the logging level for internal Firebase logging. Firebase will only log messages - * that are logged at or below loggerLevel. The messages are logged both to the Xcode - * console and to the device's log. Note that if an app is running from AppStore, it will - * never log above FIRLoggerLevelNotice even if loggerLevel is set to a higher (more verbose) - * setting. - * - * @param loggerLevel The maximum logging level. The default level is set to FIRLoggerLevelNotice. - */ -- (void)setLoggerLevel:(FIRLoggerLevel)loggerLevel; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRLoggerLevel.h b/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRLoggerLevel.h deleted file mode 100644 index dca3aa0b0..000000000 --- a/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIRLoggerLevel.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. - */ - -// Note that importing GULLoggerLevel.h will lead to a non-modular header -// import error. - -/** - * The log levels used by internal logging. - */ -typedef NS_ENUM(NSInteger, FIRLoggerLevel) { - /** Error level, matches ASL_LEVEL_ERR. */ - FIRLoggerLevelError = 3, - /** Warning level, matches ASL_LEVEL_WARNING. */ - FIRLoggerLevelWarning = 4, - /** Notice level, matches ASL_LEVEL_NOTICE. */ - FIRLoggerLevelNotice = 5, - /** Info level, matches ASL_LEVEL_INFO. */ - FIRLoggerLevelInfo = 6, - /** Debug level, matches ASL_LEVEL_DEBUG. */ - FIRLoggerLevelDebug = 7, - /** Minimum log level. */ - FIRLoggerLevelMin = FIRLoggerLevelError, - /** Maximum log level. */ - FIRLoggerLevelMax = FIRLoggerLevelDebug -} NS_SWIFT_NAME(FirebaseLoggerLevel); diff --git a/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIROptions.h b/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIROptions.h deleted file mode 100644 index 87a01ddc7..000000000 --- a/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FIROptions.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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 - -NS_ASSUME_NONNULL_BEGIN - -/** - * This class provides constant fields of Google APIs. - */ -NS_SWIFT_NAME(FirebaseOptions) -@interface FIROptions : NSObject - -/** - * Returns the default options. The first time this is called it synchronously reads - * GoogleService-Info.plist from disk. - */ -+ (nullable FIROptions *)defaultOptions NS_SWIFT_NAME(defaultOptions()); - -/** - * An iOS API key used for authenticating requests from your app, e.g. - * @"AIzaSyDdVgKwhZl0sTTTLZ7iTmt1r3N2cJLnaDk", used to identify your app to Google servers. - */ -@property(nonatomic, copy, nullable) NSString *APIKey NS_SWIFT_NAME(apiKey); - -/** - * The bundle ID for the application. Defaults to `[[NSBundle mainBundle] bundleID]` when not set - * manually or in a plist. - */ -@property(nonatomic, copy) NSString *bundleID; - -/** - * The OAuth2 client ID for iOS application used to authenticate Google users, for example - * @"12345.apps.googleusercontent.com", used for signing in with Google. - */ -@property(nonatomic, copy, nullable) NSString *clientID; - -/** - * The tracking ID for Google Analytics, e.g. @"UA-12345678-1", used to configure Google Analytics. - */ -@property(nonatomic, copy, nullable) NSString *trackingID; - -/** - * The Project Number from the Google Developer's console, for example @"012345678901", used to - * configure Google Cloud Messaging. - */ -@property(nonatomic, copy) NSString *GCMSenderID NS_SWIFT_NAME(gcmSenderID); - -/** - * The Project ID from the Firebase console, for example @"abc-xyz-123". - */ -@property(nonatomic, copy, nullable) NSString *projectID; - -/** - * The Android client ID used in Google AppInvite when an iOS app has its Android version, for - * example @"12345.apps.googleusercontent.com". - */ -@property(nonatomic, copy, nullable) NSString *androidClientID; - -/** - * The Google App ID that is used to uniquely identify an instance of an app. - */ -@property(nonatomic, copy) NSString *googleAppID; - -/** - * The database root URL, e.g. @"http://abc-xyz-123.firebaseio.com". - */ -@property(nonatomic, copy, nullable) NSString *databaseURL; - -/** - * The URL scheme used to set up Durable Deep Link service. - */ -@property(nonatomic, copy, nullable) NSString *deepLinkURLScheme; - -/** - * The Google Cloud Storage bucket name, e.g. @"abc-xyz-123.storage.firebase.com". - */ -@property(nonatomic, copy, nullable) NSString *storageBucket; - -/** - * Initializes a customized instance of FIROptions from the file at the given plist file path. This - * will read the file synchronously from disk. - * For example, - * NSString *filePath = - * [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"]; - * FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath]; - * Returns nil if the plist file does not exist or is invalid. - */ -- (nullable instancetype)initWithContentsOfFile:(NSString *)plistPath; - -/** - * Initializes a customized instance of FIROptions with required fields. Use the mutable properties - * to modify fields for configuring specific services. - */ -// clang-format off -- (instancetype)initWithGoogleAppID:(NSString *)googleAppID - GCMSenderID:(NSString *)GCMSenderID - NS_SWIFT_NAME(init(googleAppID:gcmSenderID:)); -// clang-format on - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FirebaseCore.h b/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FirebaseCore.h deleted file mode 100644 index fa26f694b..000000000 --- a/src/ios/Firebase/Analytics/FirebaseCore.framework/Headers/FirebaseCore.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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 "FIRAnalyticsConfiguration.h" -#import "FIRApp.h" -#import "FIRConfiguration.h" -#import "FIRLoggerLevel.h" -#import "FIROptions.h" diff --git a/src/ios/Firebase/Analytics/FirebaseCore.framework/Modules/module.modulemap b/src/ios/Firebase/Analytics/FirebaseCore.framework/Modules/module.modulemap deleted file mode 100644 index 62dba511b..000000000 --- a/src/ios/Firebase/Analytics/FirebaseCore.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module FirebaseCore { - umbrella header "FirebaseCore.h" - export * - module * { export *} - link framework "Foundation" -} diff --git a/src/ios/Firebase/Analytics/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics b/src/ios/Firebase/Analytics/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics deleted file mode 100755 index 87c0ade05..000000000 Binary files a/src/ios/Firebase/Analytics/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics and /dev/null differ diff --git a/src/ios/Firebase/Analytics/FirebaseCoreDiagnostics.framework/Modules/module.modulemap b/src/ios/Firebase/Analytics/FirebaseCoreDiagnostics.framework/Modules/module.modulemap deleted file mode 100755 index bbcb94e31..000000000 --- a/src/ios/Firebase/Analytics/FirebaseCoreDiagnostics.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module FirebaseCoreDiagnostics { - export * - module * { export *} - link "z" - link framework "Security" - link framework "SystemConfiguration"} diff --git a/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/FirebaseInstanceID b/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/FirebaseInstanceID deleted file mode 100755 index 733eccb16..000000000 Binary files a/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/FirebaseInstanceID and /dev/null differ diff --git a/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FIRInstanceID.h b/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FIRInstanceID.h deleted file mode 100755 index 97777e1c3..000000000 --- a/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FIRInstanceID.h +++ /dev/null @@ -1,304 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -@class FIRInstanceIDResult; -/** - * @memberof FIRInstanceID - * - * The scope to be used when fetching/deleting a token for Firebase Messaging. - */ -FOUNDATION_EXPORT NSString *const kFIRInstanceIDScopeFirebaseMessaging - NS_SWIFT_NAME(InstanceIDScopeFirebaseMessaging); - -#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 -/** - * Called when the system determines that tokens need to be refreshed. - * This method is also called if Instance ID has been reset in which - * case, tokens and FCM topic subscriptions also need to be refreshed. - * - * Instance ID service will throttle the refresh event across all devices - * to control the rate of token updates on application servers. - */ -FOUNDATION_EXPORT const NSNotificationName kFIRInstanceIDTokenRefreshNotification - NS_SWIFT_NAME(InstanceIDTokenRefresh); -#else -/** - * Called when the system determines that tokens need to be refreshed. - * This method is also called if Instance ID has been reset in which - * case, tokens and FCM topic subscriptions also need to be refreshed. - * - * Instance ID service will throttle the refresh event across all devices - * to control the rate of token updates on application servers. - */ -FOUNDATION_EXPORT NSString *const kFIRInstanceIDTokenRefreshNotification - NS_SWIFT_NAME(InstanceIDTokenRefreshNotification); -#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 - -/** - * @related FIRInstanceID - * - * The completion handler invoked when the InstanceID token returns. If - * the call fails we return the appropriate `error code` as described below. - * - * @param token The valid token as returned by InstanceID backend. - * - * @param error The error describing why generating a new token - * failed. See the error codes below for a more detailed - * description. - */ -typedef void (^FIRInstanceIDTokenHandler)(NSString *__nullable token, NSError *__nullable error) - NS_SWIFT_NAME(InstanceIDTokenHandler); - -/** - * @related FIRInstanceID - * - * The completion handler invoked when the InstanceID `deleteToken` returns. If - * the call fails we return the appropriate `error code` as described below - * - * @param error The error describing why deleting the token failed. - * See the error codes below for a more detailed description. - */ -typedef void (^FIRInstanceIDDeleteTokenHandler)(NSError *error) - NS_SWIFT_NAME(InstanceIDDeleteTokenHandler); - -/** - * @related FIRInstanceID - * - * The completion handler invoked when the app identity is created. If the - * identity wasn't created for some reason we return the appropriate error code. - * - * @param identity A valid identity for the app instance, nil if there was an error - * while creating an identity. - * @param error The error if fetching the identity fails else nil. - */ -typedef void (^FIRInstanceIDHandler)(NSString *__nullable identity, NSError *__nullable error) - NS_SWIFT_NAME(InstanceIDHandler); - -/** - * @related FIRInstanceID - * - * The completion handler invoked when the app identity and all the tokens associated - * with it are deleted. Returns a valid error object in case of failure else nil. - * - * @param error The error if deleting the identity and all the tokens associated with - * it fails else nil. - */ -typedef void (^FIRInstanceIDDeleteHandler)(NSError *__nullable error) - NS_SWIFT_NAME(InstanceIDDeleteHandler); - -/** - * @related FIRInstanceID - * - * The completion handler invoked when the app identity and token are fetched. If the - * identity wasn't created for some reason we return the appropriate error code. - * - * @param result The result containing an identity for the app instance and a valid token, - * nil if there was an error while creating the result. - * @param error The error if fetching the identity or token fails else nil. - */ -typedef void (^FIRInstanceIDResultHandler)(FIRInstanceIDResult *__nullable result, - NSError *__nullable error) - NS_SWIFT_NAME(InstanceIDResultHandler); - -/** - * Public errors produced by InstanceID. - */ -typedef NS_ENUM(NSUInteger, FIRInstanceIDError) { - // Http related errors. - - /// Unknown error. - FIRInstanceIDErrorUnknown = 0, - - /// Auth Error -- GCM couldn't validate request from this client. - FIRInstanceIDErrorAuthentication = 1, - - /// NoAccess -- InstanceID service cannot be accessed. - FIRInstanceIDErrorNoAccess = 2, - - /// Timeout -- Request to InstanceID backend timed out. - FIRInstanceIDErrorTimeout = 3, - - /// Network -- No network available to reach the servers. - FIRInstanceIDErrorNetwork = 4, - - /// OperationInProgress -- Another similar operation in progress, - /// bailing this one. - FIRInstanceIDErrorOperationInProgress = 5, - - /// InvalidRequest -- Some parameters of the request were invalid. - FIRInstanceIDErrorInvalidRequest = 7, -} NS_SWIFT_NAME(InstanceIDError); - -/** - * A class contains the results of InstanceID and token query. - */ -NS_SWIFT_NAME(InstanceIDResult) -@interface FIRInstanceIDResult : NSObject - -/** - * An instanceID uniquely identifies the app instance. - */ -@property(nonatomic, readonly, copy) NSString *instanceID; - -/* - * Returns a Firebase Messaging scoped token for the firebase app. - */ -@property(nonatomic, readonly, copy) NSString *token; - -@end - -/** - * Instance ID provides a unique identifier for each app instance and a mechanism - * to authenticate and authorize actions (for example, sending an FCM message). - * - * Once an InstanceID is generated, the library periodically sends information about the - * application and the device where it's running to the Firebase backend. To stop this. see - * `[FIRInstanceID deleteIDWithHandler:]`. - * - * Instance ID is long lived but, may be reset if the device is not used for - * a long time or the Instance ID service detects a problem. - * If Instance ID is reset, the app will be notified via - * `kFIRInstanceIDTokenRefreshNotification`. - * - * If the Instance ID has become invalid, the app can request a new one and - * send it to the app server. - * To prove ownership of Instance ID and to allow servers to access data or - * services associated with the app, call - * `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`. - */ -NS_SWIFT_NAME(InstanceID) -@interface FIRInstanceID : NSObject - -/** - * FIRInstanceID. - * - * @return A shared instance of FIRInstanceID. - */ -+ (instancetype)instanceID NS_SWIFT_NAME(instanceID()); - -/** - * Unavailable. Use +instanceID instead. - */ -- (instancetype)init __attribute__((unavailable("Use +instanceID instead."))); - -#pragma mark - Tokens - -/** - * Returns a result of app instance identifier InstanceID and a Firebase Messaging scoped token. - * param handler The callback handler invoked when an app instanceID and a default token - * are generated and returned. If instanceID and token fetching fail for some - * reason the callback is invoked with nil `result` and the appropriate error. - */ -- (void)instanceIDWithHandler:(FIRInstanceIDResultHandler)handler; - -/** - * Returns a Firebase Messaging scoped token for the firebase app. - * - * @return Returns the stored token if the device has registered with Firebase Messaging, otherwise - * returns nil. - */ -- (nullable NSString *)token __deprecated_msg("Use instanceIDWithHandler: instead."); - -/** - * Returns a token that authorizes an Entity (example: cloud service) to perform - * an action on behalf of the application identified by Instance ID. - * - * This is similar to an OAuth2 token except, it applies to the - * application instance instead of a user. - * - * This is an asynchronous call. If the token fetching fails for some reason - * we invoke the completion callback with nil `token` and the appropriate - * error. - * - * This generates an Instance ID if it does not exist yet, which starts periodically sending - * information to the Firebase backend (see `[FIRInstanceID getIDWithHandler:]`). - * - * Note, you can only have one `token` or `deleteToken` call for a given - * authorizedEntity and scope at any point of time. Making another such call with the - * same authorizedEntity and scope before the last one finishes will result in an - * error with code `OperationInProgress`. - * - * @see FIRInstanceID deleteTokenWithAuthorizedEntity:scope:handler: - * - * @param authorizedEntity Entity authorized by the token. - * @param scope Action authorized for authorizedEntity. - * @param options The extra options to be sent with your token request. The - * value for the `apns_token` should be the NSData object - * passed to the UIApplicationDelegate's - * `didRegisterForRemoteNotificationsWithDeviceToken` method. - * The value for `apns_sandbox` should be a boolean (or an - * NSNumber representing a BOOL in Objective C) set to true if - * your app is a debug build, which means that the APNs - * device token is for the sandbox environment. It should be - * set to false otherwise. If the `apns_sandbox` key is not - * provided, an automatically-detected value shall be used. - * @param handler The callback handler which is invoked when the token is - * successfully fetched. In case of success a valid `token` and - * `nil` error are returned. In case of any error the `token` - * is nil and a valid `error` is returned. The valid error - * codes have been documented above. - */ -- (void)tokenWithAuthorizedEntity:(NSString *)authorizedEntity - scope:(NSString *)scope - options:(nullable NSDictionary *)options - handler:(FIRInstanceIDTokenHandler)handler; - -/** - * Revokes access to a scope (action) for an entity previously - * authorized by `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`. - * - * This is an asynchronous call. Call this on the main thread since InstanceID lib - * is not thread safe. In case token deletion fails for some reason we invoke the - * `handler` callback passed in with the appropriate error code. - * - * Note, you can only have one `token` or `deleteToken` call for a given - * authorizedEntity and scope at a point of time. Making another such call with the - * same authorizedEntity and scope before the last one finishes will result in an error - * with code `OperationInProgress`. - * - * @param authorizedEntity Entity that must no longer have access. - * @param scope Action that entity is no longer authorized to perform. - * @param handler The handler that is invoked once the unsubscribe call ends. - * In case of error an appropriate error object is returned - * else error is nil. - */ -- (void)deleteTokenWithAuthorizedEntity:(NSString *)authorizedEntity - scope:(NSString *)scope - handler:(FIRInstanceIDDeleteTokenHandler)handler; - -#pragma mark - Identity - -/** - * Asynchronously fetch a stable identifier that uniquely identifies the app - * instance. If the identifier has been revoked or has expired, this method will - * return a new identifier. - * - * Once an InstanceID is generated, the library periodically sends information about the - * application and the device where it's running to the Firebase backend. To stop this. see - * `[FIRInstanceID deleteIDWithHandler:]`. - * - * @param handler The handler to invoke once the identifier has been fetched. - * In case of error an appropriate error object is returned else - * a valid identifier is returned and a valid identifier for the - * application instance. - */ -- (void)getIDWithHandler:(FIRInstanceIDHandler)handler NS_SWIFT_NAME(getID(handler:)); - -/** - * Resets Instance ID and revokes all tokens. - * - * This method also triggers a request to fetch a new Instance ID and Firebase Messaging scope - * token. Please listen to kFIRInstanceIDTokenRefreshNotification when the new ID and token are - * ready. - * - * This stops the periodic sending of data to the Firebase backend that began when the Instance ID - * was generated. No more data is sent until another library calls Instance ID internally again - * (like FCM, RemoteConfig or Analytics) or user explicitly calls Instance ID APIs to get an - * Instance ID and token again. - */ -- (void)deleteIDWithHandler:(FIRInstanceIDDeleteHandler)handler NS_SWIFT_NAME(deleteID(handler:)); - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h b/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h deleted file mode 100755 index 053ec2b1c..000000000 --- a/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h +++ /dev/null @@ -1 +0,0 @@ -#import "FIRInstanceID.h" diff --git a/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Modules/module.modulemap b/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Modules/module.modulemap deleted file mode 100755 index 2058956c1..000000000 --- a/src/ios/Firebase/Analytics/FirebaseInstanceID.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module FirebaseInstanceID { - umbrella header "FirebaseInstanceID.h" - export * - module * { export *} - link framework "Security" - link framework "SystemConfiguration"} diff --git a/src/ios/Firebase/Analytics/GoogleAppMeasurement.framework/GoogleAppMeasurement b/src/ios/Firebase/Analytics/GoogleAppMeasurement.framework/GoogleAppMeasurement deleted file mode 100755 index f744bef24..000000000 Binary files a/src/ios/Firebase/Analytics/GoogleAppMeasurement.framework/GoogleAppMeasurement and /dev/null differ diff --git a/src/ios/Firebase/Analytics/GoogleAppMeasurement.framework/Modules/module.modulemap b/src/ios/Firebase/Analytics/GoogleAppMeasurement.framework/Modules/module.modulemap deleted file mode 100755 index ea1e687dd..000000000 --- a/src/ios/Firebase/Analytics/GoogleAppMeasurement.framework/Modules/module.modulemap +++ /dev/null @@ -1,9 +0,0 @@ -framework module GoogleAppMeasurement { - export * - module * { export *} - link "sqlite3" - link "z" - link framework "Security" - link framework "StoreKit" - link framework "SystemConfiguration" - link framework "UIKit"} diff --git a/src/ios/Firebase/Analytics/GoogleUtilities.framework/GoogleUtilities b/src/ios/Firebase/Analytics/GoogleUtilities.framework/GoogleUtilities deleted file mode 100644 index 44e59ad98..000000000 Binary files a/src/ios/Firebase/Analytics/GoogleUtilities.framework/GoogleUtilities and /dev/null differ diff --git a/src/ios/Firebase/Analytics/GoogleUtilities.framework/Headers/GULLoggerCodes.h b/src/ios/Firebase/Analytics/GoogleUtilities.framework/Headers/GULLoggerCodes.h deleted file mode 100644 index b71c03797..000000000 --- a/src/ios/Firebase/Analytics/GoogleUtilities.framework/Headers/GULLoggerCodes.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2018 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. - */ - -typedef NS_ENUM(NSInteger, GULSwizzlerMessageCode) { - // App Delegate Swizzling. - kGULSwizzlerMessageCodeAppDelegateSwizzling000 = 1000, // I-SWZ001000 - kGULSwizzlerMessageCodeAppDelegateSwizzling001 = 1001, // I-SWZ001001 - kGULSwizzlerMessageCodeAppDelegateSwizzling002 = 1002, // I-SWZ001002 - kGULSwizzlerMessageCodeAppDelegateSwizzling003 = 1003, // I-SWZ001003 - kGULSwizzlerMessageCodeAppDelegateSwizzling004 = 1004, // I-SWZ001004 - kGULSwizzlerMessageCodeAppDelegateSwizzling005 = 1005, // I-SWZ001005 - kGULSwizzlerMessageCodeAppDelegateSwizzling006 = 1006, // I-SWZ001006 - kGULSwizzlerMessageCodeAppDelegateSwizzling007 = 1007, // I-SWZ001007 - kGULSwizzlerMessageCodeAppDelegateSwizzling008 = 1008, // I-SWZ001008 - kGULSwizzlerMessageCodeAppDelegateSwizzling009 = 1009, // I-SWZ001009 - kGULSwizzlerMessageCodeAppDelegateSwizzling010 = 1010, // I-SWZ001010 - kGULSwizzlerMessageCodeAppDelegateSwizzling011 = 1011, // I-SWZ001011 - kGULSwizzlerMessageCodeAppDelegateSwizzling012 = 1012, // I-SWZ001012 - kGULSwizzlerMessageCodeAppDelegateSwizzling013 = 1013, // I-SWZ001013 - - // Method Swizzling. - kGULSwizzlerMessageCodeMethodSwizzling000 = 2000, // I-SWZ002000 -}; diff --git a/src/ios/Firebase/Analytics/GoogleUtilities.framework/Headers/GULLoggerLevel.h b/src/ios/Firebase/Analytics/GoogleUtilities.framework/Headers/GULLoggerLevel.h deleted file mode 100644 index 81ff212d7..000000000 --- a/src/ios/Firebase/Analytics/GoogleUtilities.framework/Headers/GULLoggerLevel.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. - */ - -/** - * The log levels used by internal logging. - */ -typedef NS_ENUM(NSInteger, GULLoggerLevel) { - /** Error level, matches ASL_LEVEL_ERR. */ - GULLoggerLevelError = 3, - /** Warning level, matches ASL_LEVEL_WARNING. */ - GULLoggerLevelWarning = 4, - /** Notice level, matches ASL_LEVEL_NOTICE. */ - GULLoggerLevelNotice = 5, - /** Info level, matches ASL_LEVEL_INFO. */ - GULLoggerLevelInfo = 6, - /** Debug level, matches ASL_LEVEL_DEBUG. */ - GULLoggerLevelDebug = 7, - /** Minimum log level. */ - GULLoggerLevelMin = GULLoggerLevelError, - /** Maximum log level. */ - GULLoggerLevelMax = GULLoggerLevelDebug -} NS_SWIFT_NAME(GoogleLoggerLevel); diff --git a/src/ios/Firebase/Analytics/GoogleUtilities.framework/Headers/GULNSData+zlib.h b/src/ios/Firebase/Analytics/GoogleUtilities.framework/Headers/GULNSData+zlib.h deleted file mode 100644 index 36f94a709..000000000 --- a/src/ios/Firebase/Analytics/GoogleUtilities.framework/Headers/GULNSData+zlib.h +++ /dev/null @@ -1,49 +0,0 @@ -// 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 - -/// This is a copy of Google Toolbox for Mac library to avoid creating an extra framework. - -// NOTE: For 64bit, none of these apis handle input sizes >32bits, they will return nil when given -// such data. To handle data of that size you really should be streaming it rather then doing it all -// in memory. - -@interface NSData (GULGzip) - -/// Returns an data as the result of decompressing the payload of |data|.The data to decompress must -/// be a gzipped payloads. -+ (NSData *)gul_dataByInflatingGzippedData:(NSData *)data error:(NSError **)error; - -/// Returns an compressed data with the result of gzipping the payload of |data|. Uses the default -/// compression level. -+ (NSData *)gul_dataByGzippingData:(NSData *)data error:(NSError **)error; - -FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorDomain; -FOUNDATION_EXPORT NSString *const GULNSDataZlibErrorKey; // NSNumber -FOUNDATION_EXPORT NSString *const GULNSDataZlibRemainingBytesKey; // NSNumber - -typedef NS_ENUM(NSInteger, GULNSDataZlibError) { - GULNSDataZlibErrorGreaterThan32BitsToCompress = 1024, - // An internal zlib error. - // GULNSDataZlibErrorKey will contain the error value. - // NSLocalizedDescriptionKey may contain an error string from zlib. - // Look in zlib.h for list of errors. - GULNSDataZlibErrorInternal, - // There was left over data in the buffer that was not used. - // GULNSDataZlibRemainingBytesKey will contain number of remaining bytes. - GULNSDataZlibErrorDataRemaining -}; - -@end diff --git a/src/ios/Firebase/Analytics/GoogleUtilities.framework/Modules/module.modulemap b/src/ios/Firebase/Analytics/GoogleUtilities.framework/Modules/module.modulemap deleted file mode 100644 index c92676541..000000000 --- a/src/ios/Firebase/Analytics/GoogleUtilities.framework/Modules/module.modulemap +++ /dev/null @@ -1,8 +0,0 @@ -framework module GoogleUtilities { - umbrella header "GoogleUtilities.h" - export * - module * { export *} - link framework "Security" - link framework "SystemConfiguration" - link "z" -} diff --git a/src/ios/Firebase/Analytics/MeasurementNanoPB.framework/MeasurementNanoPB b/src/ios/Firebase/Analytics/MeasurementNanoPB.framework/MeasurementNanoPB deleted file mode 100755 index 65ef51df7..000000000 Binary files a/src/ios/Firebase/Analytics/MeasurementNanoPB.framework/MeasurementNanoPB and /dev/null differ diff --git a/src/ios/Firebase/Analytics/nanopb.framework/Headers/pb.h b/src/ios/Firebase/Analytics/nanopb.framework/Headers/pb.h deleted file mode 100644 index bf05a63c7..000000000 --- a/src/ios/Firebase/Analytics/nanopb.framework/Headers/pb.h +++ /dev/null @@ -1,583 +0,0 @@ -/* Common parts of the nanopb library. Most of these are quite low-level - * stuff. For the high-level interface, see pb_encode.h and pb_decode.h. - */ - -#ifndef PB_H_INCLUDED -#define PB_H_INCLUDED - -/***************************************************************** - * Nanopb compilation time options. You can change these here by * - * uncommenting the lines, or on the compiler command line. * - *****************************************************************/ - -/* Enable support for dynamically allocated fields */ -/* #define PB_ENABLE_MALLOC 1 */ - -/* Define this if your CPU / compiler combination does not support - * unaligned memory access to packed structures. */ -/* #define PB_NO_PACKED_STRUCTS 1 */ - -/* Increase the number of required fields that are tracked. - * A compiler warning will tell if you need this. */ -/* #define PB_MAX_REQUIRED_FIELDS 256 */ - -/* Add support for tag numbers > 255 and fields larger than 255 bytes. */ -/* #define PB_FIELD_16BIT 1 */ - -/* Add support for tag numbers > 65536 and fields larger than 65536 bytes. */ -/* #define PB_FIELD_32BIT 1 */ - -/* Disable support for error messages in order to save some code space. */ -/* #define PB_NO_ERRMSG 1 */ - -/* Disable support for custom streams (support only memory buffers). */ -/* #define PB_BUFFER_ONLY 1 */ - -/* Switch back to the old-style callback function signature. - * This was the default until nanopb-0.2.1. */ -/* #define PB_OLD_CALLBACK_STYLE */ - - -/****************************************************************** - * You usually don't need to change anything below this line. * - * Feel free to look around and use the defined macros, though. * - ******************************************************************/ - - -/* Version of the nanopb library. Just in case you want to check it in - * your own program. */ -#define NANOPB_VERSION nanopb-0.3.8 - -/* Include all the system headers needed by nanopb. You will need the - * definitions of the following: - * - strlen, memcpy, memset functions - * - [u]int_least8_t, uint_fast8_t, [u]int_least16_t, [u]int32_t, [u]int64_t - * - size_t - * - bool - * - * If you don't have the standard header files, you can instead provide - * a custom header that defines or includes all this. In that case, - * define PB_SYSTEM_HEADER to the path of this file. - */ -#ifdef PB_SYSTEM_HEADER -#include PB_SYSTEM_HEADER -#else -#include -#include -#include -#include - -#ifdef PB_ENABLE_MALLOC -#include -#endif -#endif - -/* Macro for defining packed structures (compiler dependent). - * This just reduces memory requirements, but is not required. - */ -#if defined(PB_NO_PACKED_STRUCTS) - /* Disable struct packing */ -# define PB_PACKED_STRUCT_START -# define PB_PACKED_STRUCT_END -# define pb_packed -#elif defined(__GNUC__) || defined(__clang__) - /* For GCC and clang */ -# define PB_PACKED_STRUCT_START -# define PB_PACKED_STRUCT_END -# define pb_packed __attribute__((packed)) -#elif defined(__ICCARM__) || defined(__CC_ARM) - /* For IAR ARM and Keil MDK-ARM compilers */ -# define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)") -# define PB_PACKED_STRUCT_END _Pragma("pack(pop)") -# define pb_packed -#elif defined(_MSC_VER) && (_MSC_VER >= 1500) - /* For Microsoft Visual C++ */ -# define PB_PACKED_STRUCT_START __pragma(pack(push, 1)) -# define PB_PACKED_STRUCT_END __pragma(pack(pop)) -# define pb_packed -#else - /* Unknown compiler */ -# define PB_PACKED_STRUCT_START -# define PB_PACKED_STRUCT_END -# define pb_packed -#endif - -/* Handly macro for suppressing unreferenced-parameter compiler warnings. */ -#ifndef PB_UNUSED -#define PB_UNUSED(x) (void)(x) -#endif - -/* Compile-time assertion, used for checking compatible compilation options. - * If this does not work properly on your compiler, use - * #define PB_NO_STATIC_ASSERT to disable it. - * - * But before doing that, check carefully the error message / place where it - * comes from to see if the error has a real cause. Unfortunately the error - * message is not always very clear to read, but you can see the reason better - * in the place where the PB_STATIC_ASSERT macro was called. - */ -#ifndef PB_NO_STATIC_ASSERT -#ifndef PB_STATIC_ASSERT -#define PB_STATIC_ASSERT(COND,MSG) typedef char PB_STATIC_ASSERT_MSG(MSG, __LINE__, __COUNTER__)[(COND)?1:-1]; -#define PB_STATIC_ASSERT_MSG(MSG, LINE, COUNTER) PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) -#define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##LINE##COUNTER -#endif -#else -#define PB_STATIC_ASSERT(COND,MSG) -#endif - -/* Number of required fields to keep track of. */ -#ifndef PB_MAX_REQUIRED_FIELDS -#define PB_MAX_REQUIRED_FIELDS 64 -#endif - -#if PB_MAX_REQUIRED_FIELDS < 64 -#error You should not lower PB_MAX_REQUIRED_FIELDS from the default value (64). -#endif - -/* List of possible field types. These are used in the autogenerated code. - * Least-significant 4 bits tell the scalar type - * Most-significant 4 bits specify repeated/required/packed etc. - */ - -typedef uint_least8_t pb_type_t; - -/**** Field data types ****/ - -/* Numeric types */ -#define PB_LTYPE_VARINT 0x00 /* int32, int64, enum, bool */ -#define PB_LTYPE_UVARINT 0x01 /* uint32, uint64 */ -#define PB_LTYPE_SVARINT 0x02 /* sint32, sint64 */ -#define PB_LTYPE_FIXED32 0x03 /* fixed32, sfixed32, float */ -#define PB_LTYPE_FIXED64 0x04 /* fixed64, sfixed64, double */ - -/* Marker for last packable field type. */ -#define PB_LTYPE_LAST_PACKABLE 0x04 - -/* Byte array with pre-allocated buffer. - * data_size is the length of the allocated PB_BYTES_ARRAY structure. */ -#define PB_LTYPE_BYTES 0x05 - -/* String with pre-allocated buffer. - * data_size is the maximum length. */ -#define PB_LTYPE_STRING 0x06 - -/* Submessage - * submsg_fields is pointer to field descriptions */ -#define PB_LTYPE_SUBMESSAGE 0x07 - -/* Extension pseudo-field - * The field contains a pointer to pb_extension_t */ -#define PB_LTYPE_EXTENSION 0x08 - -/* Byte array with inline, pre-allocated byffer. - * data_size is the length of the inline, allocated buffer. - * This differs from PB_LTYPE_BYTES by defining the element as - * pb_byte_t[data_size] rather than pb_bytes_array_t. */ -#define PB_LTYPE_FIXED_LENGTH_BYTES 0x09 - -/* Number of declared LTYPES */ -#define PB_LTYPES_COUNT 0x0A -#define PB_LTYPE_MASK 0x0F - -/**** Field repetition rules ****/ - -#define PB_HTYPE_REQUIRED 0x00 -#define PB_HTYPE_OPTIONAL 0x10 -#define PB_HTYPE_REPEATED 0x20 -#define PB_HTYPE_ONEOF 0x30 -#define PB_HTYPE_MASK 0x30 - -/**** Field allocation types ****/ - -#define PB_ATYPE_STATIC 0x00 -#define PB_ATYPE_POINTER 0x80 -#define PB_ATYPE_CALLBACK 0x40 -#define PB_ATYPE_MASK 0xC0 - -#define PB_ATYPE(x) ((x) & PB_ATYPE_MASK) -#define PB_HTYPE(x) ((x) & PB_HTYPE_MASK) -#define PB_LTYPE(x) ((x) & PB_LTYPE_MASK) - -/* Data type used for storing sizes of struct fields - * and array counts. - */ -#if defined(PB_FIELD_32BIT) - typedef uint32_t pb_size_t; - typedef int32_t pb_ssize_t; -#elif defined(PB_FIELD_16BIT) - typedef uint_least16_t pb_size_t; - typedef int_least16_t pb_ssize_t; -#else - typedef uint_least8_t pb_size_t; - typedef int_least8_t pb_ssize_t; -#endif -#define PB_SIZE_MAX ((pb_size_t)-1) - -/* Data type for storing encoded data and other byte streams. - * This typedef exists to support platforms where uint8_t does not exist. - * You can regard it as equivalent on uint8_t on other platforms. - */ -typedef uint_least8_t pb_byte_t; - -/* This structure is used in auto-generated constants - * to specify struct fields. - * You can change field sizes if you need structures - * larger than 256 bytes or field tags larger than 256. - * The compiler should complain if your .proto has such - * structures. Fix that by defining PB_FIELD_16BIT or - * PB_FIELD_32BIT. - */ -PB_PACKED_STRUCT_START -typedef struct pb_field_s pb_field_t; -struct pb_field_s { - pb_size_t tag; - pb_type_t type; - pb_size_t data_offset; /* Offset of field data, relative to previous field. */ - pb_ssize_t size_offset; /* Offset of array size or has-boolean, relative to data */ - pb_size_t data_size; /* Data size in bytes for a single item */ - pb_size_t array_size; /* Maximum number of entries in array */ - - /* Field definitions for submessage - * OR default value for all other non-array, non-callback types - * If null, then field will zeroed. */ - const void *ptr; -} pb_packed; -PB_PACKED_STRUCT_END - -/* Make sure that the standard integer types are of the expected sizes. - * Otherwise fixed32/fixed64 fields can break. - * - * If you get errors here, it probably means that your stdint.h is not - * correct for your platform. - */ -PB_STATIC_ASSERT(sizeof(int64_t) == 2 * sizeof(int32_t), INT64_T_WRONG_SIZE) -PB_STATIC_ASSERT(sizeof(uint64_t) == 2 * sizeof(uint32_t), UINT64_T_WRONG_SIZE) - -/* This structure is used for 'bytes' arrays. - * It has the number of bytes in the beginning, and after that an array. - * Note that actual structs used will have a different length of bytes array. - */ -#define PB_BYTES_ARRAY_T(n) struct { pb_size_t size; pb_byte_t bytes[n]; } -#define PB_BYTES_ARRAY_T_ALLOCSIZE(n) ((size_t)n + offsetof(pb_bytes_array_t, bytes)) - -struct pb_bytes_array_s { - pb_size_t size; - pb_byte_t bytes[1]; -}; -typedef struct pb_bytes_array_s pb_bytes_array_t; - -/* This structure is used for giving the callback function. - * It is stored in the message structure and filled in by the method that - * calls pb_decode. - * - * The decoding callback will be given a limited-length stream - * If the wire type was string, the length is the length of the string. - * If the wire type was a varint/fixed32/fixed64, the length is the length - * of the actual value. - * The function may be called multiple times (especially for repeated types, - * but also otherwise if the message happens to contain the field multiple - * times.) - * - * The encoding callback will receive the actual output stream. - * It should write all the data in one call, including the field tag and - * wire type. It can write multiple fields. - * - * The callback can be null if you want to skip a field. - */ -typedef struct pb_istream_s pb_istream_t; -typedef struct pb_ostream_s pb_ostream_t; -typedef struct pb_callback_s pb_callback_t; -struct pb_callback_s { -#ifdef PB_OLD_CALLBACK_STYLE - /* Deprecated since nanopb-0.2.1 */ - union { - bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void *arg); - bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, const void *arg); - } funcs; -#else - /* New function signature, which allows modifying arg contents in callback. */ - union { - bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg); - bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg); - } funcs; -#endif - - /* Free arg for use by callback */ - void *arg; -}; - -/* Wire types. Library user needs these only in encoder callbacks. */ -typedef enum { - PB_WT_VARINT = 0, - PB_WT_64BIT = 1, - PB_WT_STRING = 2, - PB_WT_32BIT = 5 -} pb_wire_type_t; - -/* Structure for defining the handling of unknown/extension fields. - * Usually the pb_extension_type_t structure is automatically generated, - * while the pb_extension_t structure is created by the user. However, - * if you want to catch all unknown fields, you can also create a custom - * pb_extension_type_t with your own callback. - */ -typedef struct pb_extension_type_s pb_extension_type_t; -typedef struct pb_extension_s pb_extension_t; -struct pb_extension_type_s { - /* Called for each unknown field in the message. - * If you handle the field, read off all of its data and return true. - * If you do not handle the field, do not read anything and return true. - * If you run into an error, return false. - * Set to NULL for default handler. - */ - bool (*decode)(pb_istream_t *stream, pb_extension_t *extension, - uint32_t tag, pb_wire_type_t wire_type); - - /* Called once after all regular fields have been encoded. - * If you have something to write, do so and return true. - * If you do not have anything to write, just return true. - * If you run into an error, return false. - * Set to NULL for default handler. - */ - bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension); - - /* Free field for use by the callback. */ - const void *arg; -}; - -struct pb_extension_s { - /* Type describing the extension field. Usually you'll initialize - * this to a pointer to the automatically generated structure. */ - const pb_extension_type_t *type; - - /* Destination for the decoded data. This must match the datatype - * of the extension field. */ - void *dest; - - /* Pointer to the next extension handler, or NULL. - * If this extension does not match a field, the next handler is - * automatically called. */ - pb_extension_t *next; - - /* The decoder sets this to true if the extension was found. - * Ignored for encoding. */ - bool found; -}; - -/* Memory allocation functions to use. You can define pb_realloc and - * pb_free to custom functions if you want. */ -#ifdef PB_ENABLE_MALLOC -# ifndef pb_realloc -# define pb_realloc(ptr, size) realloc(ptr, size) -# endif -# ifndef pb_free -# define pb_free(ptr) free(ptr) -# endif -#endif - -/* This is used to inform about need to regenerate .pb.h/.pb.c files. */ -#define PB_PROTO_HEADER_VERSION 30 - -/* These macros are used to declare pb_field_t's in the constant array. */ -/* Size of a structure member, in bytes. */ -#define pb_membersize(st, m) (sizeof ((st*)0)->m) -/* Number of entries in an array. */ -#define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0])) -/* Delta from start of one member to the start of another member. */ -#define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2)) -/* Marks the end of the field list */ -#define PB_LAST_FIELD {0,(pb_type_t) 0,0,0,0,0,0} - -/* Macros for filling in the data_offset field */ -/* data_offset for first field in a message */ -#define PB_DATAOFFSET_FIRST(st, m1, m2) (offsetof(st, m1)) -/* data_offset for subsequent fields */ -#define PB_DATAOFFSET_OTHER(st, m1, m2) (offsetof(st, m1) - offsetof(st, m2) - pb_membersize(st, m2)) -/* data offset for subsequent fields inside an union (oneof) */ -#define PB_DATAOFFSET_UNION(st, m1, m2) (PB_SIZE_MAX) -/* Choose first/other based on m1 == m2 (deprecated, remains for backwards compatibility) */ -#define PB_DATAOFFSET_CHOOSE(st, m1, m2) (int)(offsetof(st, m1) == offsetof(st, m2) \ - ? PB_DATAOFFSET_FIRST(st, m1, m2) \ - : PB_DATAOFFSET_OTHER(st, m1, m2)) - -/* Required fields are the simplest. They just have delta (padding) from - * previous field end, and the size of the field. Pointer is used for - * submessages and default values. - */ -#define PB_REQUIRED_STATIC(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ - fd, 0, pb_membersize(st, m), 0, ptr} - -/* Optional fields add the delta to the has_ variable. */ -#define PB_OPTIONAL_STATIC(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ - fd, \ - pb_delta(st, has_ ## m, m), \ - pb_membersize(st, m), 0, ptr} - -#define PB_SINGULAR_STATIC(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \ - fd, 0, pb_membersize(st, m), 0, ptr} - -/* Repeated fields have a _count field and also the maximum number of entries. */ -#define PB_REPEATED_STATIC(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | ltype, \ - fd, \ - pb_delta(st, m ## _count, m), \ - pb_membersize(st, m[0]), \ - pb_arraysize(st, m), ptr} - -/* Allocated fields carry the size of the actual data, not the pointer */ -#define PB_REQUIRED_POINTER(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_POINTER | PB_HTYPE_REQUIRED | ltype, \ - fd, 0, pb_membersize(st, m[0]), 0, ptr} - -/* Optional fields don't need a has_ variable, as information would be redundant */ -#define PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ - fd, 0, pb_membersize(st, m[0]), 0, ptr} - -/* Same as optional fields*/ -#define PB_SINGULAR_POINTER(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \ - fd, 0, pb_membersize(st, m[0]), 0, ptr} - -/* Repeated fields have a _count field and a pointer to array of pointers */ -#define PB_REPEATED_POINTER(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_POINTER | PB_HTYPE_REPEATED | ltype, \ - fd, pb_delta(st, m ## _count, m), \ - pb_membersize(st, m[0]), 0, ptr} - -/* Callbacks are much like required fields except with special datatype. */ -#define PB_REQUIRED_CALLBACK(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REQUIRED | ltype, \ - fd, 0, pb_membersize(st, m), 0, ptr} - -#define PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ - fd, 0, pb_membersize(st, m), 0, ptr} - -#define PB_SINGULAR_CALLBACK(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \ - fd, 0, pb_membersize(st, m), 0, ptr} - -#define PB_REPEATED_CALLBACK(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REPEATED | ltype, \ - fd, 0, pb_membersize(st, m), 0, ptr} - -/* Optional extensions don't have the has_ field, as that would be redundant. - * Furthermore, the combination of OPTIONAL without has_ field is used - * for indicating proto3 style fields. Extensions exist in proto2 mode only, - * so they should be encoded according to proto2 rules. To avoid the conflict, - * extensions are marked as REQUIRED instead. - */ -#define PB_OPTEXT_STATIC(tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \ - 0, \ - 0, \ - pb_membersize(st, m), 0, ptr} - -#define PB_OPTEXT_POINTER(tag, st, m, fd, ltype, ptr) \ - PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) - -#define PB_OPTEXT_CALLBACK(tag, st, m, fd, ltype, ptr) \ - PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) - -/* The mapping from protobuf types to LTYPEs is done using these macros. */ -#define PB_LTYPE_MAP_BOOL PB_LTYPE_VARINT -#define PB_LTYPE_MAP_BYTES PB_LTYPE_BYTES -#define PB_LTYPE_MAP_DOUBLE PB_LTYPE_FIXED64 -#define PB_LTYPE_MAP_ENUM PB_LTYPE_VARINT -#define PB_LTYPE_MAP_UENUM PB_LTYPE_UVARINT -#define PB_LTYPE_MAP_FIXED32 PB_LTYPE_FIXED32 -#define PB_LTYPE_MAP_FIXED64 PB_LTYPE_FIXED64 -#define PB_LTYPE_MAP_FLOAT PB_LTYPE_FIXED32 -#define PB_LTYPE_MAP_INT32 PB_LTYPE_VARINT -#define PB_LTYPE_MAP_INT64 PB_LTYPE_VARINT -#define PB_LTYPE_MAP_MESSAGE PB_LTYPE_SUBMESSAGE -#define PB_LTYPE_MAP_SFIXED32 PB_LTYPE_FIXED32 -#define PB_LTYPE_MAP_SFIXED64 PB_LTYPE_FIXED64 -#define PB_LTYPE_MAP_SINT32 PB_LTYPE_SVARINT -#define PB_LTYPE_MAP_SINT64 PB_LTYPE_SVARINT -#define PB_LTYPE_MAP_STRING PB_LTYPE_STRING -#define PB_LTYPE_MAP_UINT32 PB_LTYPE_UVARINT -#define PB_LTYPE_MAP_UINT64 PB_LTYPE_UVARINT -#define PB_LTYPE_MAP_EXTENSION PB_LTYPE_EXTENSION -#define PB_LTYPE_MAP_FIXED_LENGTH_BYTES PB_LTYPE_FIXED_LENGTH_BYTES - -/* This is the actual macro used in field descriptions. - * It takes these arguments: - * - Field tag number - * - Field type: BOOL, BYTES, DOUBLE, ENUM, UENUM, FIXED32, FIXED64, - * FLOAT, INT32, INT64, MESSAGE, SFIXED32, SFIXED64 - * SINT32, SINT64, STRING, UINT32, UINT64 or EXTENSION - * - Field rules: REQUIRED, OPTIONAL or REPEATED - * - Allocation: STATIC, CALLBACK or POINTER - * - Placement: FIRST or OTHER, depending on if this is the first field in structure. - * - Message name - * - Field name - * - Previous field name (or field name again for first field) - * - Pointer to default value or submsg fields. - */ - -#define PB_FIELD(tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ - PB_ ## rules ## _ ## allocation(tag, message, field, \ - PB_DATAOFFSET_ ## placement(message, field, prevfield), \ - PB_LTYPE_MAP_ ## type, ptr) - -/* Field description for oneof fields. This requires taking into account the - * union name also, that's why a separate set of macros is needed. - */ -#define PB_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ - fd, pb_delta(st, which_ ## u, u.m), \ - pb_membersize(st, u.m), 0, ptr} - -#define PB_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ - fd, pb_delta(st, which_ ## u, u.m), \ - pb_membersize(st, u.m[0]), 0, ptr} - -#define PB_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ - PB_ONEOF_ ## allocation(union_name, tag, message, field, \ - PB_DATAOFFSET_ ## placement(message, union_name.field, prevfield), \ - PB_LTYPE_MAP_ ## type, ptr) - -#define PB_ANONYMOUS_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \ - fd, pb_delta(st, which_ ## u, m), \ - pb_membersize(st, m), 0, ptr} - -#define PB_ANONYMOUS_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \ - {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \ - fd, pb_delta(st, which_ ## u, m), \ - pb_membersize(st, m[0]), 0, ptr} - -#define PB_ANONYMOUS_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \ - PB_ANONYMOUS_ONEOF_ ## allocation(union_name, tag, message, field, \ - PB_DATAOFFSET_ ## placement(message, field, prevfield), \ - PB_LTYPE_MAP_ ## type, ptr) - -/* These macros are used for giving out error messages. - * They are mostly a debugging aid; the main error information - * is the true/false return value from functions. - * Some code space can be saved by disabling the error - * messages if not used. - * - * PB_SET_ERROR() sets the error message if none has been set yet. - * msg must be a constant string literal. - * PB_GET_ERROR() always returns a pointer to a string. - * PB_RETURN_ERROR() sets the error and returns false from current - * function. - */ -#ifdef PB_NO_ERRMSG -#define PB_SET_ERROR(stream, msg) PB_UNUSED(stream) -#define PB_GET_ERROR(stream) "(errmsg disabled)" -#else -#define PB_SET_ERROR(stream, msg) (stream->errmsg = (stream)->errmsg ? (stream)->errmsg : (msg)) -#define PB_GET_ERROR(stream) ((stream)->errmsg ? (stream)->errmsg : "(none)") -#endif - -#define PB_RETURN_ERROR(stream, msg) return PB_SET_ERROR(stream, msg), false - -#endif diff --git a/src/ios/Firebase/Analytics/nanopb.framework/Headers/pb_common.h b/src/ios/Firebase/Analytics/nanopb.framework/Headers/pb_common.h deleted file mode 100644 index 60b3d3749..000000000 --- a/src/ios/Firebase/Analytics/nanopb.framework/Headers/pb_common.h +++ /dev/null @@ -1,42 +0,0 @@ -/* pb_common.h: Common support functions for pb_encode.c and pb_decode.c. - * These functions are rarely needed by applications directly. - */ - -#ifndef PB_COMMON_H_INCLUDED -#define PB_COMMON_H_INCLUDED - -#include "pb.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* Iterator for pb_field_t list */ -struct pb_field_iter_s { - const pb_field_t *start; /* Start of the pb_field_t array */ - const pb_field_t *pos; /* Current position of the iterator */ - unsigned required_field_index; /* Zero-based index that counts only the required fields */ - void *dest_struct; /* Pointer to start of the structure */ - void *pData; /* Pointer to current field value */ - void *pSize; /* Pointer to count/has field */ -}; -typedef struct pb_field_iter_s pb_field_iter_t; - -/* Initialize the field iterator structure to beginning. - * Returns false if the message type is empty. */ -bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_field_t *fields, void *dest_struct); - -/* Advance the iterator to the next field. - * Returns false when the iterator wraps back to the first field. */ -bool pb_field_iter_next(pb_field_iter_t *iter); - -/* Advance the iterator until it points at a field with the given tag. - * Returns false if no such field exists. */ -bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif - diff --git a/src/ios/Firebase/Analytics/nanopb.framework/Headers/pb_decode.h b/src/ios/Firebase/Analytics/nanopb.framework/Headers/pb_decode.h deleted file mode 100644 index a426bdd70..000000000 --- a/src/ios/Firebase/Analytics/nanopb.framework/Headers/pb_decode.h +++ /dev/null @@ -1,153 +0,0 @@ -/* pb_decode.h: Functions to decode protocol buffers. Depends on pb_decode.c. - * The main function is pb_decode. You also need an input stream, and the - * field descriptions created by nanopb_generator.py. - */ - -#ifndef PB_DECODE_H_INCLUDED -#define PB_DECODE_H_INCLUDED - -#include "pb.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* Structure for defining custom input streams. You will need to provide - * a callback function to read the bytes from your storage, which can be - * for example a file or a network socket. - * - * The callback must conform to these rules: - * - * 1) Return false on IO errors. This will cause decoding to abort. - * 2) You can use state to store your own data (e.g. buffer pointer), - * and rely on pb_read to verify that no-body reads past bytes_left. - * 3) Your callback may be used with substreams, in which case bytes_left - * is different than from the main stream. Don't use bytes_left to compute - * any pointers. - */ -struct pb_istream_s -{ -#ifdef PB_BUFFER_ONLY - /* Callback pointer is not used in buffer-only configuration. - * Having an int pointer here allows binary compatibility but - * gives an error if someone tries to assign callback function. - */ - int *callback; -#else - bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); -#endif - - void *state; /* Free field for use by callback implementation */ - size_t bytes_left; - -#ifndef PB_NO_ERRMSG - const char *errmsg; -#endif -}; - -/*************************** - * Main decoding functions * - ***************************/ - -/* Decode a single protocol buffers message from input stream into a C structure. - * Returns true on success, false on any failure. - * The actual struct pointed to by dest must match the description in fields. - * Callback fields of the destination structure must be initialized by caller. - * All other fields will be initialized by this function. - * - * Example usage: - * MyMessage msg = {}; - * uint8_t buffer[64]; - * pb_istream_t stream; - * - * // ... read some data into buffer ... - * - * stream = pb_istream_from_buffer(buffer, count); - * pb_decode(&stream, MyMessage_fields, &msg); - */ -bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); - -/* Same as pb_decode, except does not initialize the destination structure - * to default values. This is slightly faster if you need no default values - * and just do memset(struct, 0, sizeof(struct)) yourself. - * - * This can also be used for 'merging' two messages, i.e. update only the - * fields that exist in the new message. - * - * Note: If this function returns with an error, it will not release any - * dynamically allocated fields. You will need to call pb_release() yourself. - */ -bool pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); - -/* Same as pb_decode, except expects the stream to start with the message size - * encoded as varint. Corresponds to parseDelimitedFrom() in Google's - * protobuf API. - */ -bool pb_decode_delimited(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct); - -#ifdef PB_ENABLE_MALLOC -/* Release any allocated pointer fields. If you use dynamic allocation, you should - * call this for any successfully decoded message when you are done with it. If - * pb_decode() returns with an error, the message is already released. - */ -void pb_release(const pb_field_t fields[], void *dest_struct); -#endif - - -/************************************** - * Functions for manipulating streams * - **************************************/ - -/* Create an input stream for reading from a memory buffer. - * - * Alternatively, you can use a custom stream that reads directly from e.g. - * a file or a network socket. - */ -pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t bufsize); - -/* Function to read from a pb_istream_t. You can use this if you need to - * read some custom header data, or to read data in field callbacks. - */ -bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); - - -/************************************************ - * Helper functions for writing field callbacks * - ************************************************/ - -/* Decode the tag for the next field in the stream. Gives the wire type and - * field tag. At end of the message, returns false and sets eof to true. */ -bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof); - -/* Skip the field payload data, given the wire type. */ -bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type); - -/* Decode an integer in the varint format. This works for bool, enum, int32, - * int64, uint32 and uint64 field types. */ -bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest); - -/* Decode an integer in the varint format. This works for bool, enum, int32, - * and uint32 field types. */ -bool pb_decode_varint32(pb_istream_t *stream, uint32_t *dest); - -/* Decode an integer in the zig-zagged svarint format. This works for sint32 - * and sint64. */ -bool pb_decode_svarint(pb_istream_t *stream, int64_t *dest); - -/* Decode a fixed32, sfixed32 or float value. You need to pass a pointer to - * a 4-byte wide C variable. */ -bool pb_decode_fixed32(pb_istream_t *stream, void *dest); - -/* Decode a fixed64, sfixed64 or double value. You need to pass a pointer to - * a 8-byte wide C variable. */ -bool pb_decode_fixed64(pb_istream_t *stream, void *dest); - -/* Make a limited-length substream for reading a PB_WT_STRING field. */ -bool pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream); -bool pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/src/ios/Firebase/Analytics/nanopb.framework/Headers/pb_encode.h b/src/ios/Firebase/Analytics/nanopb.framework/Headers/pb_encode.h deleted file mode 100644 index d9909fb01..000000000 --- a/src/ios/Firebase/Analytics/nanopb.framework/Headers/pb_encode.h +++ /dev/null @@ -1,154 +0,0 @@ -/* pb_encode.h: Functions to encode protocol buffers. Depends on pb_encode.c. - * The main function is pb_encode. You also need an output stream, and the - * field descriptions created by nanopb_generator.py. - */ - -#ifndef PB_ENCODE_H_INCLUDED -#define PB_ENCODE_H_INCLUDED - -#include "pb.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* Structure for defining custom output streams. You will need to provide - * a callback function to write the bytes to your storage, which can be - * for example a file or a network socket. - * - * The callback must conform to these rules: - * - * 1) Return false on IO errors. This will cause encoding to abort. - * 2) You can use state to store your own data (e.g. buffer pointer). - * 3) pb_write will update bytes_written after your callback runs. - * 4) Substreams will modify max_size and bytes_written. Don't use them - * to calculate any pointers. - */ -struct pb_ostream_s -{ -#ifdef PB_BUFFER_ONLY - /* Callback pointer is not used in buffer-only configuration. - * Having an int pointer here allows binary compatibility but - * gives an error if someone tries to assign callback function. - * Also, NULL pointer marks a 'sizing stream' that does not - * write anything. - */ - int *callback; -#else - bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); -#endif - void *state; /* Free field for use by callback implementation. */ - size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */ - size_t bytes_written; /* Number of bytes written so far. */ - -#ifndef PB_NO_ERRMSG - const char *errmsg; -#endif -}; - -/*************************** - * Main encoding functions * - ***************************/ - -/* Encode a single protocol buffers message from C structure into a stream. - * Returns true on success, false on any failure. - * The actual struct pointed to by src_struct must match the description in fields. - * All required fields in the struct are assumed to have been filled in. - * - * Example usage: - * MyMessage msg = {}; - * uint8_t buffer[64]; - * pb_ostream_t stream; - * - * msg.field1 = 42; - * stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); - * pb_encode(&stream, MyMessage_fields, &msg); - */ -bool pb_encode(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); - -/* Same as pb_encode, but prepends the length of the message as a varint. - * Corresponds to writeDelimitedTo() in Google's protobuf API. - */ -bool pb_encode_delimited(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); - -/* Encode the message to get the size of the encoded data, but do not store - * the data. */ -bool pb_get_encoded_size(size_t *size, const pb_field_t fields[], const void *src_struct); - -/************************************** - * Functions for manipulating streams * - **************************************/ - -/* Create an output stream for writing into a memory buffer. - * The number of bytes written can be found in stream.bytes_written after - * encoding the message. - * - * Alternatively, you can use a custom stream that writes directly to e.g. - * a file or a network socket. - */ -pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); - -/* Pseudo-stream for measuring the size of a message without actually storing - * the encoded data. - * - * Example usage: - * MyMessage msg = {}; - * pb_ostream_t stream = PB_OSTREAM_SIZING; - * pb_encode(&stream, MyMessage_fields, &msg); - * printf("Message size is %d\n", stream.bytes_written); - */ -#ifndef PB_NO_ERRMSG -#define PB_OSTREAM_SIZING {0,0,0,0,0} -#else -#define PB_OSTREAM_SIZING {0,0,0,0} -#endif - -/* Function to write into a pb_ostream_t stream. You can use this if you need - * to append or prepend some custom headers to the message. - */ -bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); - - -/************************************************ - * Helper functions for writing field callbacks * - ************************************************/ - -/* Encode field header based on type and field number defined in the field - * structure. Call this from the callback before writing out field contents. */ -bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_t *field); - -/* Encode field header by manually specifing wire type. You need to use this - * if you want to write out packed arrays from a callback field. */ -bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number); - -/* Encode an integer in the varint format. - * This works for bool, enum, int32, int64, uint32 and uint64 field types. */ -bool pb_encode_varint(pb_ostream_t *stream, uint64_t value); - -/* Encode an integer in the zig-zagged svarint format. - * This works for sint32 and sint64. */ -bool pb_encode_svarint(pb_ostream_t *stream, int64_t value); - -/* Encode a string or bytes type field. For strings, pass strlen(s) as size. */ -bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size); - -/* Encode a fixed32, sfixed32 or float value. - * You need to pass a pointer to a 4-byte wide C variable. */ -bool pb_encode_fixed32(pb_ostream_t *stream, const void *value); - -/* Encode a fixed64, sfixed64 or double value. - * You need to pass a pointer to a 8-byte wide C variable. */ -bool pb_encode_fixed64(pb_ostream_t *stream, const void *value); - -/* Encode a submessage field. - * You need to pass the pb_field_t array and pointer to struct, just like - * with pb_encode(). This internally encodes the submessage twice, first to - * calculate message size and then to actually write it out. - */ -bool pb_encode_submessage(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/src/ios/Firebase/Analytics/nanopb.framework/Modules/module.modulemap b/src/ios/Firebase/Analytics/nanopb.framework/Modules/module.modulemap deleted file mode 100644 index 91c3a63de..000000000 --- a/src/ios/Firebase/Analytics/nanopb.framework/Modules/module.modulemap +++ /dev/null @@ -1,5 +0,0 @@ -framework module nanopb { - umbrella header "nanopb.h" - export * - module * { export *} -} diff --git a/src/ios/Firebase/Analytics/nanopb.framework/nanopb b/src/ios/Firebase/Analytics/nanopb.framework/nanopb deleted file mode 100644 index 5d7ba43dc..000000000 Binary files a/src/ios/Firebase/Analytics/nanopb.framework/nanopb and /dev/null differ diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/FirebaseAuth b/src/ios/Firebase/Auth/FirebaseAuth.framework/FirebaseAuth deleted file mode 100644 index 2cb4f8acf..000000000 Binary files a/src/ios/Firebase/Auth/FirebaseAuth.framework/FirebaseAuth and /dev/null differ diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRActionCodeSettings.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRActionCodeSettings.h deleted file mode 100644 index 6eb4c89d9..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRActionCodeSettings.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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/LICENSE2.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 - - /** @class FIRActionCodeSettings - @brief Used to set and retrieve settings related to handling action codes. - */ - NS_SWIFT_NAME(ActionCodeSettings) - @interface FIRActionCodeSettings : NSObject - - /** @property URL - @brief This URL represents the state/Continue URL in the form of a universal link. - @remarks This URL can should be contructed as a universal link that would either directly open - the app where the action code would be handled or continue to the app after the action code - is handled by Firebase. - */ - @property(nonatomic, copy, nullable) NSURL *URL; - - /** @property handleCodeInApp - @brief Indicates whether the action code link will open the app directly or after being - redirected from a Firebase owned web widget. - */ - @property(assign, nonatomic) BOOL handleCodeInApp; - - /** @property iOSBundleID - @brief The iOS bundle ID, if available. The default value is the current app's bundle ID. - */ - @property(copy, nonatomic, readonly, nullable) NSString *iOSBundleID; - - /** @property androidPackageName - @brief The Android package name, if available. - */ - @property(nonatomic, copy, readonly, nullable) NSString *androidPackageName; - - /** @property androidMinimumVersion - @brief The minimum Android version supported, if available. - */ - @property(nonatomic, copy, readonly, nullable) NSString *androidMinimumVersion; - - /** @property androidInstallIfNotAvailable - @brief Indicates whether the Android app should be installed on a device where it is not - available. - */ - @property(nonatomic, assign, readonly) BOOL androidInstallIfNotAvailable; - - /** @fn setIOSBundleID - @brief Sets the iOS bundle Id. - @param iOSBundleID The iOS bundle ID. - */ - - (void)setIOSBundleID:(NSString *)iOSBundleID; - - /** @fn setAndroidPackageName:installIfNotAvailable:minimumVersion: - @brief Sets the Android package name, the flag to indicate whether or not to install the app and - the minimum Android version supported. - @param androidPackageName The Android package name. - @param installIfNotAvailable Indicates whether or not the app should be installed if not - available. - @param minimumVersion The minimum version of Android supported. - @remarks If installIfNotAvailable is set to YES and the link is opened on an android device, it - will try to install the app if not already available. Otherwise the web URL is used. - */ - - (void)setAndroidPackageName:(NSString *)androidPackageName - installIfNotAvailable:(BOOL)installIfNotAvailable - minimumVersion:(nullable NSString *)minimumVersion; - - @end - - NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAdditionalUserInfo.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAdditionalUserInfo.h deleted file mode 100644 index 4f6947ac8..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAdditionalUserInfo.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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 - -@class FIRVerifyAssertionResponse; - -NS_ASSUME_NONNULL_BEGIN - -/** @class FIRAdditionalUserInfo - @brief Represents additional user data returned from an identity provider. - */ -NS_SWIFT_NAME(AdditionalUserInfo) -@interface FIRAdditionalUserInfo : NSObject - -/** @fn init - @brief This class should not be initialized manually. `FIRAdditionalUserInfo` can be retrieved - from from an instance of `FIRAuthDataResult`. - */ -- (instancetype)init NS_UNAVAILABLE; - -/** @property providerID - @brief The provider identifier. - */ -@property(nonatomic, readonly) NSString *providerID; - -/** @property profile - @brief Dictionary containing the additional IdP specific information. - */ -@property(nonatomic, readonly, nullable) NSDictionary *profile; - -/** @property username - @brief username The name of the user. - */ -@property(nonatomic, readonly, nullable) NSString *username; - -/** @property newUser - @brief Indicates whether or not the current user was signed in for the first time. - */ -@property(nonatomic, readonly, getter=isNewUser) BOOL newUser; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuth.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuth.h deleted file mode 100644 index cfc59b1f3..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuth.h +++ /dev/null @@ -1,864 +0,0 @@ -/* - * 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 -#import - -#import "FIRAuthErrors.h" - -#if TARGET_OS_IOS -#import "FIRAuthAPNSTokenType.h" -#endif - -@class FIRActionCodeSettings; -@class FIRApp; -@class FIRAuth; -@class FIRAuthCredential; -@class FIRAuthDataResult; -@class FIRAuthSettings; -@class FIRUser; -@protocol FIRAuthStateListener; - -NS_ASSUME_NONNULL_BEGIN - -/** @typedef FIRUserUpdateCallback - @brief The type of block invoked when a request to update the current user is completed. - */ -typedef void (^FIRUserUpdateCallback)(NSError *_Nullable error) NS_SWIFT_NAME(UserUpdateCallback); - -/** @typedef FIRAuthStateDidChangeListenerHandle - @brief The type of handle returned by `FIRAuth.addAuthStateDidChangeListener:`. - */ -typedef id FIRAuthStateDidChangeListenerHandle - NS_SWIFT_NAME(AuthStateDidChangeListenerHandle); - -/** @typedef FIRAuthStateDidChangeListenerBlock - @brief The type of block which can be registered as a listener for auth state did change events. - - @param auth The FIRAuth object on which state changes occurred. - @param user Optionally; the current signed in user, if any. - */ -typedef void(^FIRAuthStateDidChangeListenerBlock)(FIRAuth *auth, FIRUser *_Nullable user) - NS_SWIFT_NAME(AuthStateDidChangeListenerBlock); - -/** @typedef FIRIDTokenDidChangeListenerHandle - @brief The type of handle returned by `FIRAuth.addIDTokenDidChangeListener:`. - */ -typedef id FIRIDTokenDidChangeListenerHandle - NS_SWIFT_NAME(IDTokenDidChangeListenerHandle); - -/** @typedef FIRIDTokenDidChangeListenerBlock - @brief The type of block which can be registered as a listener for ID token did change events. - - @param auth The FIRAuth object on which ID token changes occurred. - @param user Optionally; the current signed in user, if any. - */ -typedef void(^FIRIDTokenDidChangeListenerBlock)(FIRAuth *auth, FIRUser *_Nullable user) - NS_SWIFT_NAME(IDTokenDidChangeListenerBlock); - -/** @typedef FIRAuthDataResultCallback - @brief The type of block invoked when sign-in related events complete. - - @param authResult Optionally; Result of sign-in request containing both the user and - the additional user info associated with the user. - @param error Optionally; the error which occurred - or nil if the request was successful. - */ -typedef void (^FIRAuthDataResultCallback)(FIRAuthDataResult *_Nullable authResult, - NSError *_Nullable error) - NS_SWIFT_NAME(AuthDataResultCallback); - -#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 -/** - @brief The name of the `NSNotificationCenter` notification which is posted when the auth state - changes (for example, a new token has been produced, a user signs in or signs out). The - object parameter of the notification is the sender `FIRAuth` instance. - */ -extern const NSNotificationName FIRAuthStateDidChangeNotification - NS_SWIFT_NAME(AuthStateDidChange); -#else -/** - @brief The name of the `NSNotificationCenter` notification which is posted when the auth state - changes (for example, a new token has been produced, a user signs in or signs out). The - object parameter of the notification is the sender `FIRAuth` instance. - */ -extern NSString *const FIRAuthStateDidChangeNotification - NS_SWIFT_NAME(AuthStateDidChangeNotification); -#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 - -/** @typedef FIRAuthResultCallback - @brief The type of block invoked when sign-in related events complete. - - @param user Optionally; the signed in user, if any. - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRAuthResultCallback)(FIRUser *_Nullable user, NSError *_Nullable error) - NS_SWIFT_NAME(AuthResultCallback); - -/** @typedef FIRProviderQueryCallback - @brief The type of block invoked when a list of identity providers for a given email address is - requested. - - @param providers Optionally; a list of provider identifiers, if any. - @see FIRGoogleAuthProviderID etc. - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRProviderQueryCallback)(NSArray *_Nullable providers, - NSError *_Nullable error) - NS_SWIFT_NAME(ProviderQueryCallback); - -/** @typedef FIRSignInMethodQueryCallback - @brief The type of block invoked when a list of sign-in methods for a given email address is - requested. - */ -typedef void (^FIRSignInMethodQueryCallback)(NSArray *_Nullable, - NSError *_Nullable) - NS_SWIFT_NAME(SignInMethodQueryCallback); - -/** @typedef FIRSendPasswordResetCallback - @brief The type of block invoked when sending a password reset email. - - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRSendPasswordResetCallback)(NSError *_Nullable error) - NS_SWIFT_NAME(SendPasswordResetCallback); - -/** @typedef FIRSendSignInLinkToEmailCallback - @brief The type of block invoked when sending an email sign-in link email. - */ -typedef void (^FIRSendSignInLinkToEmailCallback)(NSError *_Nullable error) - NS_SWIFT_NAME(SendSignInLinkToEmailCallback); - -/** @typedef FIRConfirmPasswordResetCallback - @brief The type of block invoked when performing a password reset. - - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRConfirmPasswordResetCallback)(NSError *_Nullable error) - NS_SWIFT_NAME(ConfirmPasswordResetCallback); - -/** @typedef FIRVerifyPasswordResetCodeCallback - @brief The type of block invoked when verifying that an out of band code should be used to - perform password reset. - - @param email Optionally; the email address of the user for which the out of band code applies. - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRVerifyPasswordResetCodeCallback)(NSString *_Nullable email, - NSError *_Nullable error) - NS_SWIFT_NAME(VerifyPasswordResetCodeCallback); - -/** @typedef FIRApplyActionCodeCallback - @brief The type of block invoked when applying an action code. - - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRApplyActionCodeCallback)(NSError *_Nullable error) - NS_SWIFT_NAME(ApplyActionCodeCallback); - -/** - @brief Keys used to retrieve operation data from a `FIRActionCodeInfo` object by the - `dataForKey` method. - */ -typedef NS_ENUM(NSInteger, FIRActionDataKey) { - /** - * The email address to which the code was sent. - * For FIRActionCodeOperationRecoverEmail, the new email address for the account. - */ - FIRActionCodeEmailKey = 0, - - /** For FIRActionCodeOperationRecoverEmail, the current email address for the account. */ - FIRActionCodeFromEmailKey = 1 -} NS_SWIFT_NAME(ActionDataKey); - -/** @class FIRActionCodeInfo - @brief Manages information regarding action codes. - */ -NS_SWIFT_NAME(ActionCodeInfo) -@interface FIRActionCodeInfo : NSObject - -/** - @brief Operations which can be performed with action codes. - */ -typedef NS_ENUM(NSInteger, FIRActionCodeOperation) { - /** Action code for unknown operation. */ - FIRActionCodeOperationUnknown = 0, - - /** Action code for password reset operation. */ - FIRActionCodeOperationPasswordReset = 1, - - /** Action code for verify email operation. */ - FIRActionCodeOperationVerifyEmail = 2, - - /** Action code for recover email operation. */ - FIRActionCodeOperationRecoverEmail = 3, - - /** Action code for email link operation. */ - FIRActionCodeOperationEmailLink = 4, - - -} NS_SWIFT_NAME(ActionCodeOperation); - -/** - @brief The operation being performed. - */ -@property(nonatomic, readonly) FIRActionCodeOperation operation; - -/** @fn dataForKey: - @brief The operation being performed. - - @param key The FIRActionDataKey value used to retrieve the operation data. - - @return The operation data pertaining to the provided action code key. - */ -- (NSString *)dataForKey:(FIRActionDataKey)key; - -/** @fn init - @brief please use initWithOperation: instead. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -/** @typedef FIRCheckActionCodeCallBack - @brief The type of block invoked when performing a check action code operation. - - @param info Metadata corresponding to the action code. - @param error Optionally; if an error occurs, this is the NSError object that describes the - problem. Set to nil otherwise. - */ -typedef void (^FIRCheckActionCodeCallBack)(FIRActionCodeInfo *_Nullable info, - NSError *_Nullable error) - NS_SWIFT_NAME(CheckActionCodeCallback); - -/** @class FIRAuth - @brief Manages authentication for Firebase apps. - @remarks This class is thread-safe. - */ -NS_SWIFT_NAME(Auth) -@interface FIRAuth : NSObject - -/** @fn auth - @brief Gets the auth object for the default Firebase app. - @remarks The default Firebase app must have already been configured or an exception will be - raised. - */ -+ (FIRAuth *)auth NS_SWIFT_NAME(auth()); - -/** @fn authWithApp: - @brief Gets the auth object for a `FIRApp`. - - @param app The FIRApp for which to retrieve the associated FIRAuth instance. - @return The FIRAuth instance associated with the given FIRApp. - */ -+ (FIRAuth *)authWithApp:(FIRApp *)app NS_SWIFT_NAME(auth(app:)); - -/** @property app - @brief Gets the `FIRApp` object that this auth object is connected to. - */ -@property(nonatomic, weak, readonly, nullable) FIRApp *app; - -/** @property currentUser - @brief Synchronously gets the cached current user, or null if there is none. - */ -@property(nonatomic, strong, readonly, nullable) FIRUser *currentUser; - -/** @property languageCode - @brief The current user language code. This property can be set to the app's current language by - calling `useAppLanguage`. - - @remarks The string used to set this property must be a language code that follows BCP 47. - */ -@property (nonatomic, copy, nullable) NSString *languageCode; - -/** @property settings - @brief Contains settings related to the auth object. - */ -@property (nonatomic, copy, nullable) FIRAuthSettings *settings; - -#if TARGET_OS_IOS -/** @property APNSToken - @brief The APNs token used for phone number authentication. The type of the token (production - or sandbox) will be attempted to be automatcially detected. - @remarks If swizzling is disabled, the APNs Token must be set for phone number auth to work, - by either setting this property or by calling `setAPNSToken:type:` - */ -@property(nonatomic, strong, nullable) NSData *APNSToken; -#endif - -/** @fn init - @brief Please access auth instances using `FIRAuth.auth` and `FIRAuth.authForApp:`. - */ -- (instancetype)init NS_UNAVAILABLE; - -/** @fn updateCurrentUser:completion: - @brief Sets the currentUser on the calling Auth instance to the provided user object. - @param user The user object to be set as the current user of the calling Auth instance. - @param completion Optionally; a block invoked after the user of the calling Auth instance has - been updated or an error was encountered. - */ -- (void)updateCurrentUser:(FIRUser *)user completion:(nullable FIRUserUpdateCallback)completion; - -/** @fn fetchProvidersForEmail:completion: - @brief Fetches the list of IdPs that can be used for signing in with the provided email address. - Useful for an "identifier-first" sign-in flow. - - @param email The email address for which to obtain a list of identity providers. - @param completion Optionally; a block which is invoked when the list of providers for the - specified email address is ready or an error was encountered. Invoked asynchronously on the - main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)fetchProvidersForEmail:(NSString *)email - completion:(nullable FIRProviderQueryCallback)completion; - -/** @fn fetchSignInMethodsForEmail:completion: - @brief Fetches the list of all sign-in methods previously used for the provided email address. - - @param email The email address for which to obtain a list of sign-in methods. - @param completion Optionally; a block which is invoked when the list of sign in methods for the - specified email address is ready or an error was encountered. Invoked asynchronously on the - main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed. - - @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods. - */ - -- (void)fetchSignInMethodsForEmail:(NSString *)email - completion:(nullable FIRSignInMethodQueryCallback)completion; - -/** @fn signInWithEmail:password:completion: - @brief Signs in using an email address and password. - - @param email The user's email address. - @param password The user's password. - @param completion Optionally; a block which is invoked when the sign in flow finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that email and password - accounts are not enabled. Enable them in the Auth section of the - Firebase console. - + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled. - + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted - sign in with an incorrect password. - + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed. - - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)signInWithEmail:(NSString *)email - password:(NSString *)password - completion:(nullable FIRAuthDataResultCallback)completion; - -/** @fn signInWithEmail:link:completion: - @brief Signs in using an email address and email sign-in link. - - @param email The user's email address. - @param link The email sign-in link. - @param completion Optionally; a block which is invoked when the sign in flow finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that email and email sign-in link - accounts are not enabled. Enable them in the Auth section of the - Firebase console. - + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled. - + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is invalid. - - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ - -- (void)signInWithEmail:(NSString *)email - link:(NSString *)link - completion:(nullable FIRAuthDataResultCallback)completion; - -/** @fn signInAndRetrieveDataWithEmail:password:completion: - @brief Please use `signInWithEmail:password:completion:` for Objective-C or - `signIn(withEmail:password:completion:)` for Swift instead. - - @param email The user's email address. - @param password The user's password. - @param completion Optionally; a block which is invoked when the sign in flow finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - */ -- (void)signInAndRetrieveDataWithEmail:(NSString *)email - password:(NSString *)password - completion:(nullable FIRAuthDataResultCallback)completion - DEPRECATED_MSG_ATTRIBUTE( - "Please use signInWithEmail:password:completion: for" - " Objective-C or signIn(withEmail:password:completion:) for" - " Swift instead."); - -/** @fn signInWithCredential:completion: - @brief Please use `signInAndRetrieveDataWithCredential:completion:` for Objective-C or - `signInAndRetrieveData(with:completion:)` for swift instead - - @param credential The credential supplied by the IdP. - @param completion Optionally; a block which is invoked when the sign in flow finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeInvalidCredential` - Indicates the supplied credential is invalid. - This could happen if it has expired or it is malformed. - + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that accounts - with the identity provider represented by the credential are not enabled. - Enable them in the Auth section of the Firebase console. - + `FIRAuthErrorCodeAccountExistsWithDifferentCredential` - Indicates the email asserted - by the credential (e.g. the email in a Facebook access token) is already in use by an - existing account, that cannot be authenticated with this sign-in method. Call - fetchProvidersForEmail for this user’s email and then prompt them to sign in with any of - the sign-in providers returned. This error will only be thrown if the "One account per - email address" setting is enabled in the Firebase console, under Auth settings. - + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled. - + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted sign in with an - incorrect password, if credential is of the type EmailPasswordAuthCredential. - + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed. - + `FIRAuthErrorCodeMissingVerificationID` - Indicates that the phone auth credential was - created with an empty verification ID. - + `FIRAuthErrorCodeMissingVerificationCode` - Indicates that the phone auth credential - was created with an empty verification code. - + `FIRAuthErrorCodeInvalidVerificationCode` - Indicates that the phone auth credential - was created with an invalid verification Code. - + `FIRAuthErrorCodeInvalidVerificationID` - Indicates that the phone auth credential was - created with an invalid verification ID. - + `FIRAuthErrorCodeSessionExpired` - Indicates that the SMS code has expired. - - - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods - */ -- (void)signInWithCredential:(FIRAuthCredential *)credential - completion:(nullable FIRAuthResultCallback)completion DEPRECATED_MSG_ATTRIBUTE( - "Please use signInAndRetrieveDataWithCredential:completion:" - " for Objective-C or signInAndRetrieveData(with:completion:)" - " for Swift instead."); - -/** @fn signInAndRetrieveDataWithCredential:completion: - @brief Asynchronously signs in to Firebase with the given 3rd-party credentials (e.g. a Facebook - login Access Token, a Google ID Token/Access Token pair, etc.) and returns additional - identity provider data. - - @param credential The credential supplied by the IdP. - @param completion Optionally; a block which is invoked when the sign in flow finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeInvalidCredential` - Indicates the supplied credential is invalid. - This could happen if it has expired or it is malformed. - + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that accounts - with the identity provider represented by the credential are not enabled. - Enable them in the Auth section of the Firebase console. - + `FIRAuthErrorCodeAccountExistsWithDifferentCredential` - Indicates the email asserted - by the credential (e.g. the email in a Facebook access token) is already in use by an - existing account, that cannot be authenticated with this sign-in method. Call - fetchProvidersForEmail for this user’s email and then prompt them to sign in with any of - the sign-in providers returned. This error will only be thrown if the "One account per - email address" setting is enabled in the Firebase console, under Auth settings. - + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled. - + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted sign in with an - incorrect password, if credential is of the type EmailPasswordAuthCredential. - + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed. - + `FIRAuthErrorCodeMissingVerificationID` - Indicates that the phone auth credential was - created with an empty verification ID. - + `FIRAuthErrorCodeMissingVerificationCode` - Indicates that the phone auth credential - was created with an empty verification code. - + `FIRAuthErrorCodeInvalidVerificationCode` - Indicates that the phone auth credential - was created with an invalid verification Code. - + `FIRAuthErrorCodeInvalidVerificationID` - Indicates that the phone auth credential was - created with an invalid verification ID. - + `FIRAuthErrorCodeSessionExpired` - Indicates that the SMS code has expired. - - - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods - */ -- (void)signInAndRetrieveDataWithCredential:(FIRAuthCredential *)credential - completion:(nullable FIRAuthDataResultCallback)completion; - -/** @fn signInAnonymouslyWithCompletion: - @brief Asynchronously creates and becomes an anonymous user. - @param completion Optionally; a block which is invoked when the sign in finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - - @remarks If there is already an anonymous user signed in, that user will be returned instead. - If there is any other existing user signed in, that user will be signed out. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that anonymous accounts are - not enabled. Enable them in the Auth section of the Firebase console. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)signInAnonymouslyWithCompletion:(nullable FIRAuthDataResultCallback)completion; - -/** @fn signInAnonymouslyAndRetrieveDataWithCompletion: - @brief `Please use sign `signInAnonymouslyWithCompletion:` for Objective-C or - `signInAnonymously(Completion:)` for Swift instead. - @param completion Optionally; a block which is invoked when the sign in finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - */ -- (void)signInAnonymouslyAndRetrieveDataWithCompletion: - (nullable FIRAuthDataResultCallback)completion - DEPRECATED_MSG_ATTRIBUTE("Please use signInAnonymouslyWithCompletion: for Objective-C or" - " signInAnonymously(Completion:) for swift instead."); - -/** @fn signInWithCustomToken:completion: - @brief Asynchronously signs in to Firebase with the given Auth token. - - @param token A self-signed custom auth token. - @param completion Optionally; a block which is invoked when the sign in finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeInvalidCustomToken` - Indicates a validation error with - the custom token. - + `FIRAuthErrorCodeCustomTokenMismatch` - Indicates the service account and the API key - belong to different projects. - - - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)signInWithCustomToken:(NSString *)token - completion:(nullable FIRAuthDataResultCallback)completion; - -/** @fn signInAndRetrieveDataWithCustomToken:completion: - @brief Please use `signInWithCustomToken:completion:` or `signIn(withCustomToken:completion:)` - for Swift instead. - - @param token A self-signed custom auth token. - @param completion Optionally; a block which is invoked when the sign in finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - */ -- (void)signInAndRetrieveDataWithCustomToken:(NSString *)token - completion:(nullable FIRAuthDataResultCallback)completion - DEPRECATED_MSG_ATTRIBUTE( - "Please use signInWithCustomToken:completion:" - "for Objective-C or signIn(withCustomToken:completion:) for" - " Swift instead."); - -/** @fn createUserWithEmail:password:completion: - @brief Creates and, on success, signs in a user with the given email address and password. - - @param email The user's email address. - @param password The user's desired password. - @param completion Optionally; a block which is invoked when the sign up flow finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed. - + `FIRAuthErrorCodeEmailAlreadyInUse` - Indicates the email used to attempt sign up - already exists. Call fetchProvidersForEmail to check which sign-in mechanisms the user - used, and prompt the user to sign in with one of those. - + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that email and password accounts - are not enabled. Enable them in the Auth section of the Firebase console. - + `FIRAuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is - considered too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo - dictionary object will contain more detailed explanation that can be shown to the user. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)createUserWithEmail:(NSString *)email - password:(NSString *)password - completion:(nullable FIRAuthDataResultCallback)completion; - -/** @fn createUserAndRetrieveDataWithEmail:password:completion: - @brief Please use `createUserAndRetrieveDataWithEmail:password:completion:` or - `createUser(withEmail:password:completion:)` for Swift instead. - - @param email The user's email address. - @param password The user's desired password. - @param completion Optionally; a block which is invoked when the sign up flow finishes, or is - canceled. Invoked asynchronously on the main thread in the future. - */ -- (void)createUserAndRetrieveDataWithEmail:(NSString *)email - password:(NSString *)password - completion:(nullable FIRAuthDataResultCallback)completion - DEPRECATED_MSG_ATTRIBUTE( - "Please use createUserWithEmail:password:completion: for" - " Objective-C or createUser(withEmail:password:completion:)" - " for Swift instead."); - -/** @fn confirmPasswordResetWithCode:newPassword:completion: - @brief Resets the password given a code sent to the user outside of the app and a new password - for the user. - - @param newPassword The new password. - @param completion Optionally; a block which is invoked when the request finishes. Invoked - asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is - considered too weak. - + `FIRAuthErrorCodeOperationNotAllowed` - Indicates the administrator disabled sign - in with the specified identity provider. - + `FIRAuthErrorCodeExpiredActionCode` - Indicates the OOB code is expired. - + `FIRAuthErrorCodeInvalidActionCode` - Indicates the OOB code is invalid. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)confirmPasswordResetWithCode:(NSString *)code - newPassword:(NSString *)newPassword - completion:(FIRConfirmPasswordResetCallback)completion; - -/** @fn checkActionCode:completion: - @brief Checks the validity of an out of band code. - - @param code The out of band code to check validity. - @param completion Optionally; a block which is invoked when the request finishes. Invoked - asynchronously on the main thread in the future. - */ -- (void)checkActionCode:(NSString *)code completion:(FIRCheckActionCodeCallBack)completion; - -/** @fn verifyPasswordResetCode:completion: - @brief Checks the validity of a verify password reset code. - - @param code The password reset code to be verified. - @param completion Optionally; a block which is invoked when the request finishes. Invoked - asynchronously on the main thread in the future. - */ -- (void)verifyPasswordResetCode:(NSString *)code - completion:(FIRVerifyPasswordResetCodeCallback)completion; - -/** @fn applyActionCode:completion: - @brief Applies out of band code. - - @param code The out of band code to be applied. - @param completion Optionally; a block which is invoked when the request finishes. Invoked - asynchronously on the main thread in the future. - - @remarks This method will not work for out of band codes which require an additional parameter, - such as password reset code. - */ -- (void)applyActionCode:(NSString *)code - completion:(FIRApplyActionCodeCallback)completion; - -/** @fn sendPasswordResetWithEmail:completion: - @brief Initiates a password reset for the given email address. - - @param email The email address of the user. - @param completion Optionally; a block which is invoked when the request finishes. Invoked - asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was - sent in the request. - + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in - the console for this action. - + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for - sending update email. - - - */ -- (void)sendPasswordResetWithEmail:(NSString *)email - completion:(nullable FIRSendPasswordResetCallback)completion; - -/** @fn sendPasswordResetWithEmail:actionCodeSetting:completion: - @brief Initiates a password reset for the given email address and @FIRActionCodeSettings object. - - @param email The email address of the user. - @param actionCodeSettings An `FIRActionCodeSettings` object containing settings related to - handling action codes. - @param completion Optionally; a block which is invoked when the request finishes. Invoked - asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was - sent in the request. - + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in - the console for this action. - + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for - sending update email. - + `FIRAuthErrorCodeMissingIosBundleID` - Indicates that the iOS bundle ID is missing when - `handleCodeInApp` is set to YES. - + `FIRAuthErrorCodeMissingAndroidPackageName` - Indicates that the android package name - is missing when the `androidInstallApp` flag is set to true. - + `FIRAuthErrorCodeUnauthorizedDomain` - Indicates that the domain specified in the - continue URL is not whitelisted in the Firebase console. - + `FIRAuthErrorCodeInvalidContinueURI` - Indicates that the domain specified in the - continue URI is not valid. - - - */ - - (void)sendPasswordResetWithEmail:(NSString *)email - actionCodeSettings:(FIRActionCodeSettings *)actionCodeSettings - completion:(nullable FIRSendPasswordResetCallback)completion; - -/** @fn sendSignInLinkToEmail:actionCodeSettings:completion: - @brief Sends a sign in with email link to provided email address. - - @param email The email address of the user. - @param actionCodeSettings An `FIRActionCodeSettings` object containing settings related to - handling action codes. - @param completion Optionally; a block which is invoked when the request finishes. Invoked - asynchronously on the main thread in the future. - */ -- (void)sendSignInLinkToEmail:(NSString *)email - actionCodeSettings:(FIRActionCodeSettings *)actionCodeSettings - completion:(nullable FIRSendSignInLinkToEmailCallback)completion; - -/** @fn signOut: - @brief Signs out the current user. - - @param error Optionally; if an error occurs, upon return contains an NSError object that - describes the problem; is nil otherwise. - @return @YES when the sign out request was successful. @NO otherwise. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeKeychainError` - Indicates an error occurred when accessing the - keychain. The `NSLocalizedFailureReasonErrorKey` field in the `NSError.userInfo` - dictionary will contain more information about the error encountered. - - - - */ -- (BOOL)signOut:(NSError *_Nullable *_Nullable)error; - -/** @fn isSignInWithEmailLink - @brief Checks if link is an email sign-in link. - - @param link The email sign-in link. - @return @YES when the link passed matches the expected format of an email sign-in link. - */ -- (BOOL)isSignInWithEmailLink:(NSString *)link; - -/** @fn addAuthStateDidChangeListener: - @brief Registers a block as an "auth state did change" listener. To be invoked when: - - + The block is registered as a listener, - + A user with a different UID from the current user has signed in, or - + The current user has signed out. - - @param listener The block to be invoked. The block is always invoked asynchronously on the main - thread, even for it's initial invocation after having been added as a listener. - - @remarks The block is invoked immediately after adding it according to it's standard invocation - semantics, asynchronously on the main thread. Users should pay special attention to - making sure the block does not inadvertently retain objects which should not be retained by - the long-lived block. The block itself will be retained by `FIRAuth` until it is - unregistered or until the `FIRAuth` instance is otherwise deallocated. - - @return A handle useful for manually unregistering the block as a listener. - */ -- (FIRAuthStateDidChangeListenerHandle)addAuthStateDidChangeListener: - (FIRAuthStateDidChangeListenerBlock)listener; - -/** @fn removeAuthStateDidChangeListener: - @brief Unregisters a block as an "auth state did change" listener. - - @param listenerHandle The handle for the listener. - */ -- (void)removeAuthStateDidChangeListener:(FIRAuthStateDidChangeListenerHandle)listenerHandle; - -/** @fn addIDTokenDidChangeListener: - @brief Registers a block as an "ID token did change" listener. To be invoked when: - - + The block is registered as a listener, - + A user with a different UID from the current user has signed in, - + The ID token of the current user has been refreshed, or - + The current user has signed out. - - @param listener The block to be invoked. The block is always invoked asynchronously on the main - thread, even for it's initial invocation after having been added as a listener. - - @remarks The block is invoked immediately after adding it according to it's standard invocation - semantics, asynchronously on the main thread. Users should pay special attention to - making sure the block does not inadvertently retain objects which should not be retained by - the long-lived block. The block itself will be retained by `FIRAuth` until it is - unregistered or until the `FIRAuth` instance is otherwise deallocated. - - @return A handle useful for manually unregistering the block as a listener. - */ -- (FIRIDTokenDidChangeListenerHandle)addIDTokenDidChangeListener: - (FIRIDTokenDidChangeListenerBlock)listener; - -/** @fn removeIDTokenDidChangeListener: - @brief Unregisters a block as an "ID token did change" listener. - - @param listenerHandle The handle for the listener. - */ -- (void)removeIDTokenDidChangeListener:(FIRIDTokenDidChangeListenerHandle)listenerHandle; - -/** @fn useAppLanguage - @brief Sets `languageCode` to the app's current language. - */ -- (void)useAppLanguage; - -#if TARGET_OS_IOS - -/** @fn canHandleURL: - @brief Whether the specific URL is handled by `FIRAuth` . - @param URL The URL received by the application delegate from any of the openURL method. - @return Whether or the URL is handled. YES means the URL is for Firebase Auth - so the caller should ignore the URL from further processing, and NO means the - the URL is for the app (or another libaray) so the caller should continue handling - this URL as usual. - @remarks If swizzling is disabled, URLs received by the application delegate must be forwarded - to this method for phone number auth to work. - */ -- (BOOL)canHandleURL:(nonnull NSURL *)URL; - -/** @fn setAPNSToken:type: - @brief Sets the APNs token along with its type. - @remarks If swizzling is disabled, the APNs Token must be set for phone number auth to work, - by either setting calling this method or by setting the `APNSToken` property. - */ -- (void)setAPNSToken:(NSData *)token type:(FIRAuthAPNSTokenType)type; - -/** @fn canHandleNotification: - @brief Whether the specific remote notification is handled by `FIRAuth` . - @param userInfo A dictionary that contains information related to the - notification in question. - @return Whether or the notification is handled. YES means the notification is for Firebase Auth - so the caller should ignore the notification from further processing, and NO means the - the notification is for the app (or another libaray) so the caller should continue handling - this notification as usual. - @remarks If swizzling is disabled, related remote notifications must be forwarded to this method - for phone number auth to work. - */ -- (BOOL)canHandleNotification:(NSDictionary *)userInfo; - -#endif // TARGET_OS_IOS - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthAPNSTokenType.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthAPNSTokenType.h deleted file mode 100644 index 4f3c9f6a8..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthAPNSTokenType.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 - -NS_ASSUME_NONNULL_BEGIN - -/** - * @brief The APNs token type for the app. - */ -typedef NS_ENUM(NSInteger, FIRAuthAPNSTokenType) { - - /** Unknown token type. - The actual token type will be detected from the provisioning profile in the app's bundle. - */ - FIRAuthAPNSTokenTypeUnknown, - - /** Sandbox token type. - */ - FIRAuthAPNSTokenTypeSandbox, - - /** Production token type. - */ - FIRAuthAPNSTokenTypeProd, -} NS_SWIFT_NAME(AuthAPNSTokenType); - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthCredential.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthCredential.h deleted file mode 100644 index 106d844f7..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthCredential.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 - -NS_ASSUME_NONNULL_BEGIN - -/** @class FIRAuthCredential - @brief Represents a credential. - */ -NS_SWIFT_NAME(AuthCredential) -@interface FIRAuthCredential : NSObject - -/** @property provider - @brief Gets the name of the identity provider for the credential. - */ -@property(nonatomic, copy, readonly) NSString *provider; - -/** @fn init - @brief This is an abstract base class. Concrete instances should be created via factory - methods available in the various authentication provider libraries (like the Facebook - provider or the Google provider libraries.) - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthDataResult.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthDataResult.h deleted file mode 100644 index bc4fa4a2a..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthDataResult.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 - -@class FIRAdditionalUserInfo; -@class FIRUser; - -NS_ASSUME_NONNULL_BEGIN - -/** @class FIRAuthDataResult - @brief Helper object that contains the result of a successful sign-in, link and reauthenticate - action. It contains references to a FIRUser instance and a FIRAdditionalUserInfo instance. - */ -NS_SWIFT_NAME(AuthDataResult) -@interface FIRAuthDataResult : NSObject - -/** @fn init - @brief This class should not be initialized manually. `FIRAuthDataResult` instance is - returned as part of `FIRAuthDataResultCallback`. - */ -- (instancetype)init NS_UNAVAILABLE; - -/** @property user - @brief The signed in user. - */ -@property(nonatomic, readonly) FIRUser *user; - -/** @property additionalUserInfo - @brief If available contains the additional IdP specific information about signed in user. - */ -@property(nonatomic, readonly, nullable) FIRAdditionalUserInfo *additionalUserInfo; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthErrors.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthErrors.h deleted file mode 100644 index a3fbe26a3..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthErrors.h +++ /dev/null @@ -1,321 +0,0 @@ -/* - * 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 - -/** @class FIRAuthErrors - @remarks Error Codes common to all API Methods: - - + `FIRAuthErrorCodeNetworkError` - + `FIRAuthErrorCodeUserNotFound` - + `FIRAuthErrorCodeUserTokenExpired` - + `FIRAuthErrorCodeTooManyRequests` - + `FIRAuthErrorCodeInvalidAPIKey` - + `FIRAuthErrorCodeAppNotAuthorized` - + `FIRAuthErrorCodeKeychainError` - + `FIRAuthErrorCodeInternalError` - - @remarks Common error codes for `FIRUser` operations: - - + `FIRAuthErrorCodeInvalidUserToken` - + `FIRAuthErrorCodeUserDisabled` - - */ -NS_SWIFT_NAME(AuthErrors) -@interface FIRAuthErrors - -/** - @brief The Firebase Auth error domain. - */ -extern NSString *const FIRAuthErrorDomain NS_SWIFT_NAME(AuthErrorDomain); - -/** - @brief The key used to read the updated credential from the userinfo dictionary of the NSError - object returned in the case that the credential being linked in already in use. - */ -extern NSString *const FIRAuthUpdatedCredentialKey NS_SWIFT_NAME(AuthUpdatedCredentialKey); - -/** - @brief The name of the key for the "error_name" string in the NSError userinfo dictionary. - */ -extern NSString *const FIRAuthErrorNameKey NS_SWIFT_NAME(AuthErrorNameKey); - -/** - @brief Errors with the code `FIRAuthErrorCodeAccountExistsWithDifferentCredential` may contain - an `NSError.userInfo` dictinary object which contains this key. The value associated with - this key is an NSString of the email address of the account that already exists. - */ -extern NSString *const FIRAuthErrorUserInfoEmailKey NS_SWIFT_NAME(AuthErrorUserInfoEmailKey); - -/** - @brief Error codes used by Firebase Auth. - */ -typedef NS_ENUM(NSInteger, FIRAuthErrorCode) { - /** Indicates a validation error with the custom token. - */ - FIRAuthErrorCodeInvalidCustomToken = 17000, - - /** Indicates the service account and the API key belong to different projects. - */ - FIRAuthErrorCodeCustomTokenMismatch = 17002, - - /** Indicates the IDP token or requestUri is invalid. - */ - FIRAuthErrorCodeInvalidCredential = 17004, - - /** Indicates the user's account is disabled on the server. - */ - FIRAuthErrorCodeUserDisabled = 17005, - - /** Indicates the administrator disabled sign in with the specified identity provider. - */ - FIRAuthErrorCodeOperationNotAllowed = 17006, - - /** Indicates the email used to attempt a sign up is already in use. - */ - FIRAuthErrorCodeEmailAlreadyInUse = 17007, - - /** Indicates the email is invalid. - */ - FIRAuthErrorCodeInvalidEmail = 17008, - - /** Indicates the user attempted sign in with a wrong password. - */ - FIRAuthErrorCodeWrongPassword = 17009, - - /** Indicates that too many requests were made to a server method. - */ - FIRAuthErrorCodeTooManyRequests = 17010, - - /** Indicates the user account was not found. - */ - FIRAuthErrorCodeUserNotFound = 17011, - - /** Indicates account linking is required. - */ - FIRAuthErrorCodeAccountExistsWithDifferentCredential = 17012, - - /** Indicates the user has attemped to change email or password more than 5 minutes after - signing in. - */ - FIRAuthErrorCodeRequiresRecentLogin = 17014, - - /** Indicates an attempt to link a provider to which the account is already linked. - */ - FIRAuthErrorCodeProviderAlreadyLinked = 17015, - - /** Indicates an attempt to unlink a provider that is not linked. - */ - FIRAuthErrorCodeNoSuchProvider = 17016, - - /** Indicates user's saved auth credential is invalid, the user needs to sign in again. - */ - FIRAuthErrorCodeInvalidUserToken = 17017, - - /** Indicates a network error occurred (such as a timeout, interrupted connection, or - unreachable host). These types of errors are often recoverable with a retry. The - `NSUnderlyingError` field in the `NSError.userInfo` dictionary will contain the error - encountered. - */ - FIRAuthErrorCodeNetworkError = 17020, - - /** Indicates the saved token has expired, for example, the user may have changed account - password on another device. The user needs to sign in again on the device that made this - request. - */ - FIRAuthErrorCodeUserTokenExpired = 17021, - - /** Indicates an invalid API key was supplied in the request. - */ - FIRAuthErrorCodeInvalidAPIKey = 17023, - - /** Indicates that an attempt was made to reauthenticate with a user which is not the current - user. - */ - FIRAuthErrorCodeUserMismatch = 17024, - - /** Indicates an attempt to link with a credential that has already been linked with a - different Firebase account - */ - FIRAuthErrorCodeCredentialAlreadyInUse = 17025, - - /** Indicates an attempt to set a password that is considered too weak. - */ - FIRAuthErrorCodeWeakPassword = 17026, - - /** Indicates the App is not authorized to use Firebase Authentication with the - provided API Key. - */ - FIRAuthErrorCodeAppNotAuthorized = 17028, - - /** Indicates the OOB code is expired. - */ - FIRAuthErrorCodeExpiredActionCode = 17029, - - /** Indicates the OOB code is invalid. - */ - FIRAuthErrorCodeInvalidActionCode = 17030, - - /** Indicates that there are invalid parameters in the payload during a "send password reset - * email" attempt. - */ - FIRAuthErrorCodeInvalidMessagePayload = 17031, - - /** Indicates that the sender email is invalid during a "send password reset email" attempt. - */ - FIRAuthErrorCodeInvalidSender = 17032, - - /** Indicates that the recipient email is invalid. - */ - FIRAuthErrorCodeInvalidRecipientEmail = 17033, - - /** Indicates that an email address was expected but one was not provided. - */ - FIRAuthErrorCodeMissingEmail = 17034, - - // The enum values 17035 is reserved and should NOT be used for new error codes. - - /** Indicates that the iOS bundle ID is missing when a iOS App Store ID is provided. - */ - FIRAuthErrorCodeMissingIosBundleID = 17036, - - /** Indicates that the android package name is missing when the `androidInstallApp` flag is set - to true. - */ - FIRAuthErrorCodeMissingAndroidPackageName = 17037, - - /** Indicates that the domain specified in the continue URL is not whitelisted in the Firebase - console. - */ - FIRAuthErrorCodeUnauthorizedDomain = 17038, - - /** Indicates that the domain specified in the continue URI is not valid. - */ - FIRAuthErrorCodeInvalidContinueURI = 17039, - - /** Indicates that a continue URI was not provided in a request to the backend which requires - one. - */ - FIRAuthErrorCodeMissingContinueURI = 17040, - - /** Indicates that a phone number was not provided in a call to - `verifyPhoneNumber:completion:`. - */ - FIRAuthErrorCodeMissingPhoneNumber = 17041, - - /** Indicates that an invalid phone number was provided in a call to - `verifyPhoneNumber:completion:`. - */ - FIRAuthErrorCodeInvalidPhoneNumber = 17042, - - /** Indicates that the phone auth credential was created with an empty verification code. - */ - FIRAuthErrorCodeMissingVerificationCode = 17043, - - /** Indicates that an invalid verification code was used in the verifyPhoneNumber request. - */ - FIRAuthErrorCodeInvalidVerificationCode = 17044, - - /** Indicates that the phone auth credential was created with an empty verification ID. - */ - FIRAuthErrorCodeMissingVerificationID = 17045, - - /** Indicates that an invalid verification ID was used in the verifyPhoneNumber request. - */ - FIRAuthErrorCodeInvalidVerificationID = 17046, - - /** Indicates that the APNS device token is missing in the verifyClient request. - */ - FIRAuthErrorCodeMissingAppCredential = 17047, - - /** Indicates that an invalid APNS device token was used in the verifyClient request. - */ - FIRAuthErrorCodeInvalidAppCredential = 17048, - - // The enum values between 17048 and 17051 are reserved and should NOT be used for new error - // codes. - - /** Indicates that the SMS code has expired. - */ - FIRAuthErrorCodeSessionExpired = 17051, - - /** Indicates that the quota of SMS messages for a given project has been exceeded. - */ - FIRAuthErrorCodeQuotaExceeded = 17052, - - /** Indicates that the APNs device token could not be obtained. The app may not have set up - remote notification correctly, or may fail to forward the APNs device token to FIRAuth - if app delegate swizzling is disabled. - */ - FIRAuthErrorCodeMissingAppToken = 17053, - - /** Indicates that the app fails to forward remote notification to FIRAuth. - */ - FIRAuthErrorCodeNotificationNotForwarded = 17054, - - /** Indicates that the app could not be verified by Firebase during phone number authentication. - */ - FIRAuthErrorCodeAppNotVerified = 17055, - - /** Indicates that the reCAPTCHA token is not valid. - */ - FIRAuthErrorCodeCaptchaCheckFailed = 17056, - - /** Indicates that an attempt was made to present a new web context while one was already being - presented. - */ - FIRAuthErrorCodeWebContextAlreadyPresented = 17057, - - /** Indicates that the URL presentation was cancelled prematurely by the user. - */ - FIRAuthErrorCodeWebContextCancelled = 17058, - - /** Indicates a general failure during the app verification flow. - */ - FIRAuthErrorCodeAppVerificationUserInteractionFailure = 17059, - - /** Indicates that the clientID used to invoke a web flow is invalid. - */ - FIRAuthErrorCodeInvalidClientID = 17060, - - /** Indicates that a network request within a SFSafariViewController or UIWebview failed. - */ - FIRAuthErrorCodeWebNetworkRequestFailed = 17061, - - /** Indicates that an internal error occurred within a SFSafariViewController or UIWebview. - */ - FIRAuthErrorCodeWebInternalError = 17062, - - /** Indicates that a non-null user was expected as an argmument to the operation but a null - user was provided. - */ - FIRAuthErrorCodeNullUser = 17067, - - /** Indicates an error occurred while attempting to access the keychain. - */ - FIRAuthErrorCodeKeychainError = 17995, - - /** Indicates an internal error occurred. - */ - FIRAuthErrorCodeInternalError = 17999, - - /** Raised when a JWT fails to parse correctly. May be accompanied by an underlying error - describing which step of the JWT parsing process failed. - */ - FIRAuthErrorCodeMalformedJWT = 18000, -} NS_SWIFT_NAME(AuthErrorCode); - -@end diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthSettings.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthSettings.h deleted file mode 100644 index d3fee3ea9..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthSettings.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 FIRAuthSettings - @brief Determines settings related to an auth object. - */ -@interface FIRAuthSettings : NSObject - -/** @property appVerificationDisabledForTesting - @brief Flag to determine whether app verification should be disabled for testing or not. - */ -@property (nonatomic, assign, getter=isAppVerificationDisabledForTesting) BOOL - appVerificationDisabledForTesting; - -@end diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthTokenResult.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthTokenResult.h deleted file mode 100644 index 82a5f1e0b..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthTokenResult.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 - -/** @class FIRAuthTokenResult - @brief A data class containing the ID token JWT string and other properties associated with the - token including the decoded payload claims. - */ -NS_SWIFT_NAME(AuthTokenResult) -@interface FIRAuthTokenResult : NSObject - -/** @property token - @brief Stores the JWT string of the ID token. - */ -@property (nonatomic, readonly) NSString *token; - -/** @property expirationDate - @brief Stores the ID token's expiration date. - */ -@property (nonatomic, readonly) NSDate *expirationDate; - -/** @property authDate - @brief Stores the ID token's authentication date. - @remarks This is the date the user was signed in and NOT the date the token was refreshed. - */ -@property (nonatomic, readonly) NSDate *authDate; - -/** @property issuedAtDate - @brief Stores the date that the ID token was issued. - @remarks This is the date last refreshed and NOT the last authentication date. - */ -@property (nonatomic, readonly) NSDate *issuedAtDate; - -/** @property signInProvider - @brief Stores sign-in provider through which the token was obtained. - @remarks This does not necesssarily map to provider IDs. - */ -@property (nonatomic, readonly) NSString *signInProvider; - -/** @property claims - @brief Stores the entire payload of claims found on the ID token. This includes the standard - reserved claims as well as custom claims set by the developer via the Admin SDK. - */ -@property (nonatomic, readonly) NSDictionary *claims; - - - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthUIDelegate.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthUIDelegate.h deleted file mode 100644 index 9b3296826..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRAuthUIDelegate.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 -#import - -NS_ASSUME_NONNULL_BEGIN - -/** @protocol FIRAuthUIDelegate - @brief A protocol to handle user interface interactions for Firebase Auth. - */ -NS_SWIFT_NAME(AuthUIDelegate) -@protocol FIRAuthUIDelegate - -/** @fn presentViewController:animated:completion: - @brief If implemented, this method will be invoked when Firebase Auth needs to display a view - controller. - @param viewControllerToPresent The view controller to be presented. - @param flag Decides whether the view controller presentation should be animated or not. - @param completion The block to execute after the presentation finishes. This block has no return - value and takes no parameters. -*/ -- (void)presentViewController:(UIViewController *)viewControllerToPresent - animated:(BOOL)flag - completion:(void (^ _Nullable)(void))completion; - -/** @fn dismissViewControllerAnimated:completion: - @brief If implemented, this method will be invoked when Firebase Auth needs to display a view - controller. - @param flag Decides whether removing the view controller should be animated or not. - @param completion The block to execute after the presentation finishes. This block has no return - value and takes no parameters. -*/ -- (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^ _Nullable)(void))completion - NS_SWIFT_NAME(dismiss(animated:completion:)); - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIREmailAuthProvider.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIREmailAuthProvider.h deleted file mode 100644 index b6375bd2a..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIREmailAuthProvider.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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 - -@class FIRAuthCredential; - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief A string constant identifying the email & password identity provider. - */ -extern NSString *const FIREmailAuthProviderID NS_SWIFT_NAME(EmailAuthProviderID); - -/** - @brief A string constant identifying the email-link sign-in method. - */ -extern NSString *const FIREmailLinkAuthSignInMethod NS_SWIFT_NAME(EmailLinkAuthSignInMethod); - -/** - @brief A string constant identifying the email & password sign-in method. - */ -extern NSString *const FIREmailPasswordAuthSignInMethod - NS_SWIFT_NAME(EmailPasswordAuthSignInMethod); - -/** - @brief Please use `FIREmailAuthProviderID` for Objective-C or `EmailAuthProviderID` for Swift instead. - */ -extern NSString *const FIREmailPasswordAuthProviderID __attribute__((deprecated)); - -/** @class FIREmailAuthProvider - @brief A concrete implementation of `FIRAuthProvider` for Email & Password Sign In. - */ -NS_SWIFT_NAME(EmailAuthProvider) -@interface FIREmailAuthProvider : NSObject - -/** @typedef FIREmailPasswordAuthProvider - @brief Please use `FIREmailAuthProvider` instead. - */ -typedef FIREmailAuthProvider FIREmailPasswordAuthProvider __attribute__((deprecated)); - - -/** @fn credentialWithEmail:password: - @brief Creates an `FIRAuthCredential` for an email & password sign in. - - @param email The user's email address. - @param password The user's password. - @return A FIRAuthCredential containing the email & password credential. - */ -+ (FIRAuthCredential *)credentialWithEmail:(NSString *)email password:(NSString *)password; - -/** @fn credentialWithEmail:Link: - @brief Creates an `FIRAuthCredential` for an email & link sign in. - - @param email The user's email address. - @param link The email sign-in link. - @return A FIRAuthCredential containing the email & link credential. - */ -+ (FIRAuthCredential *)credentialWithEmail:(NSString *)email link:(NSString *)link; - -/** @fn init - @brief This class is not meant to be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h deleted file mode 100644 index 75efe13f4..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRFacebookAuthProvider.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 - -@class FIRAuthCredential; - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief A string constant identifying the Facebook identity provider. - */ -extern NSString *const FIRFacebookAuthProviderID NS_SWIFT_NAME(FacebookAuthProviderID); - -/** - @brief A string constant identifying the Facebook sign-in method. - */ -extern NSString *const _Nonnull FIRFacebookAuthSignInMethod NS_SWIFT_NAME(FacebookAuthSignInMethod); - -/** @class FIRFacebookAuthProvider - @brief Utility class for constructing Facebook credentials. - */ -NS_SWIFT_NAME(FacebookAuthProvider) -@interface FIRFacebookAuthProvider : NSObject - -/** @fn credentialWithAccessToken: - @brief Creates an `FIRAuthCredential` for a Facebook sign in. - - @param accessToken The Access Token from Facebook. - @return A FIRAuthCredential containing the Facebook credentials. - */ -+ (FIRAuthCredential *)credentialWithAccessToken:(NSString *)accessToken; - -/** @fn init - @brief This class should not be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h deleted file mode 100644 index 0610427a4..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRGitHubAuthProvider.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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 - -@class FIRAuthCredential; - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief A string constant identifying the GitHub identity provider. - */ -extern NSString *const FIRGitHubAuthProviderID NS_SWIFT_NAME(GitHubAuthProviderID); - -/** - @brief A string constant identifying the GitHub sign-in method. - */ -extern NSString *const _Nonnull FIRGitHubAuthSignInMethod NS_SWIFT_NAME(GitHubAuthSignInMethod); - - -/** @class FIRGitHubAuthProvider - @brief Utility class for constructing GitHub credentials. - */ -NS_SWIFT_NAME(GitHubAuthProvider) -@interface FIRGitHubAuthProvider : NSObject - -/** @fn credentialWithToken: - @brief Creates an `FIRAuthCredential` for a GitHub sign in. - - @param token The GitHub OAuth access token. - @return A FIRAuthCredential containing the GitHub credential. - */ -+ (FIRAuthCredential *)credentialWithToken:(NSString *)token; - -/** @fn init - @brief This class is not meant to be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h deleted file mode 100644 index 7d6fa226e..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRGoogleAuthProvider.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 - -@class FIRAuthCredential; - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief A string constant identifying the Google identity provider. - */ -extern NSString *const FIRGoogleAuthProviderID NS_SWIFT_NAME(GoogleAuthProviderID); - -/** - @brief A string constant identifying the Google sign-in method. - */ -extern NSString *const _Nonnull FIRGoogleAuthSignInMethod NS_SWIFT_NAME(GoogleAuthSignInMethod); - -/** @class FIRGoogleAuthProvider - @brief Utility class for constructing Google Sign In credentials. - */ -NS_SWIFT_NAME(GoogleAuthProvider) -@interface FIRGoogleAuthProvider : NSObject - -/** @fn credentialWithIDToken:accessToken: - @brief Creates an `FIRAuthCredential` for a Google sign in. - - @param IDToken The ID Token from Google. - @param accessToken The Access Token from Google. - @return A FIRAuthCredential containing the Google credentials. - */ -+ (FIRAuthCredential *)credentialWithIDToken:(NSString *)IDToken - accessToken:(NSString *)accessToken; - -/** @fn init - @brief This class should not be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIROAuthProvider.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIROAuthProvider.h deleted file mode 100644 index cc628f8c6..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIROAuthProvider.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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 - -@class FIRAuthCredential; - -NS_ASSUME_NONNULL_BEGIN - -/** @class FIROAuthProvider - @brief A concrete implementation of `FIRAuthProvider` for generic OAuth Providers. - */ -NS_SWIFT_NAME(OAuthProvider) -@interface FIROAuthProvider : NSObject - -/** @fn credentialWithProviderID:IDToken:accessToken: - @brief Creates an `FIRAuthCredential` for that OAuth 2 provider identified by providerID, ID - token and access token. - - @param providerID The provider ID associated with the Auth credential being created. - @param IDToken The IDToken associated with the Auth credential being created. - @param accessToken The accessstoken associated with the Auth credential be created, if - available. - @return A FIRAuthCredential for the specified provider ID, ID token and access token. - */ -+ (FIRAuthCredential *)credentialWithProviderID:(NSString *)providerID - IDToken:(NSString *)IDToken - accessToken:(nullable NSString *)accessToken; - - -/** @fn credentialWithProviderID:accessToken: - @brief Creates an `FIRAuthCredential` for that OAuth 2 provider identified by providerID using - an ID token. - - @param providerID The provider ID associated with the Auth credential being created. - @param accessToken The accessstoken associated with the Auth credential be created - @return A FIRAuthCredential. - */ -+ (FIRAuthCredential *)credentialWithProviderID:(NSString *)providerID - accessToken:(NSString *)accessToken; - -/** @fn init - @brief This class is not meant to be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRPhoneAuthCredential.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRPhoneAuthCredential.h deleted file mode 100644 index 26dfca85a..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRPhoneAuthCredential.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 - -#import "FIRAuthCredential.h" - -NS_ASSUME_NONNULL_BEGIN - -/** @class FIRPhoneAuthCredential - @brief Implementation of FIRAuthCredential for Phone Auth credentials. - */ -NS_SWIFT_NAME(PhoneAuthCredential) -@interface FIRPhoneAuthCredential : FIRAuthCredential - -/** @fn init - @brief This class is not supposed to be instantiated directly. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRPhoneAuthProvider.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRPhoneAuthProvider.h deleted file mode 100644 index 28757f5e7..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRPhoneAuthProvider.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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 - -@class FIRAuth; -@class FIRPhoneAuthCredential; -@protocol FIRAuthUIDelegate; - -NS_ASSUME_NONNULL_BEGIN - -/** @var FIRPhoneAuthProviderID - @brief A string constant identifying the phone identity provider. - */ -extern NSString *const FIRPhoneAuthProviderID NS_SWIFT_NAME(PhoneAuthProviderID); - -/** @var FIRPhoneAuthProviderID - @brief A string constant identifying the phone sign-in method. - */ -extern NSString *const _Nonnull FIRPhoneAuthSignInMethod NS_SWIFT_NAME(PhoneAuthSignInMethod); - - -/** @typedef FIRVerificationResultCallback - @brief The type of block invoked when a request to send a verification code has finished. - - @param verificationID On success, the verification ID provided, nil otherwise. - @param error On error, the error that occured, nil otherwise. - */ -typedef void (^FIRVerificationResultCallback)(NSString *_Nullable verificationID, - NSError *_Nullable error) - NS_SWIFT_NAME(VerificationResultCallback); - -/** @class FIRPhoneAuthProvider - @brief A concrete implementation of `FIRAuthProvider` for phone auth providers. - */ -NS_SWIFT_NAME(PhoneAuthProvider) -@interface FIRPhoneAuthProvider : NSObject - -/** @fn provider - @brief Returns an instance of `FIRPhoneAuthProvider` for the default `FIRAuth` object. - */ -+ (instancetype)provider NS_SWIFT_NAME(provider()); - -/** @fn providerWithAuth: - @brief Returns an instance of `FIRPhoneAuthProvider` for the provided `FIRAuth` object. - - @param auth The auth object to associate with the phone auth provider instance. - */ -+ (instancetype)providerWithAuth:(FIRAuth *)auth NS_SWIFT_NAME(provider(auth:)); - -/** @fn verifyPhoneNumber:UIDelegate:completion: - @brief Starts the phone number authentication flow by sending a verifcation code to the - specified phone number. - @param phoneNumber The phone number to be verified. - @param UIDelegate An object used to present the SFSafariViewController. The object is retained - by this method until the completion block is executed. - @param completion The callback to be invoked when the verification flow is finished. - @remarks Possible error codes: - - + `FIRAuthErrorCodeCaptchaCheckFailed` - Indicates that the reCAPTCHA token obtained by - the Firebase Auth is invalid or has expired. - + `FIRAuthErrorCodeQuotaExceeded` - Indicates that the phone verification quota for this - project has been exceeded. - + `FIRAuthErrorCodeInvalidPhoneNumber` - Indicates that the phone number provided is - invalid. - + `FIRAuthErrorCodeMissingPhoneNumber` - Indicates that a phone number was not provided. - */ -- (void)verifyPhoneNumber:(NSString *)phoneNumber - UIDelegate:(nullable id)UIDelegate - completion:(nullable FIRVerificationResultCallback)completion; - -/** @fn credentialWithVerificationID:verificationCode: - @brief Creates an `FIRAuthCredential` for the phone number provider identified by the - verification ID and verification code. - - @param verificationID The verification ID obtained from invoking - verifyPhoneNumber:completion: - @param verificationCode The verification code obtained from the user. - @return The corresponding phone auth credential for the verification ID and verification code - provided. - */ -- (FIRPhoneAuthCredential *)credentialWithVerificationID:(NSString *)verificationID - verificationCode:(NSString *)verificationCode; - -/** @fn init - @brief Please use the `provider` or `providerWithAuth:` methods to obtain an instance of - `FIRPhoneAuthProvider`. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h deleted file mode 100644 index a0d1166f1..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRTwitterAuthProvider.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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 - -@class FIRAuthCredential; - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief A string constant identifying the Twitter identity provider. - */ -extern NSString *const FIRTwitterAuthProviderID NS_SWIFT_NAME(TwitterAuthProviderID); - -/** - @brief A string constant identifying the Twitter sign-in method. - */ -extern NSString *const _Nonnull FIRTwitterAuthSignInMethod NS_SWIFT_NAME(TwitterAuthSignInMethod); - - -/** @class FIRTwitterAuthProvider - @brief Utility class for constructing Twitter credentials. - */ -NS_SWIFT_NAME(TwitterAuthProvider) -@interface FIRTwitterAuthProvider : NSObject - -/** @fn credentialWithToken:secret: - @brief Creates an `FIRAuthCredential` for a Twitter sign in. - - @param token The Twitter OAuth token. - @param secret The Twitter OAuth secret. - @return A FIRAuthCredential containing the Twitter credential. - */ -+ (FIRAuthCredential *)credentialWithToken:(NSString *)token secret:(NSString *)secret; - -/** @fn init - @brief This class is not meant to be initialized. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRUser.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRUser.h deleted file mode 100644 index cc5d0a001..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRUser.h +++ /dev/null @@ -1,495 +0,0 @@ -/* - * 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 - -#import "FIRAuth.h" -#import "FIRAuthDataResult.h" -#import "FIRUserInfo.h" - -@class FIRAuthTokenResult; -@class FIRPhoneAuthCredential; -@class FIRUserProfileChangeRequest; -@class FIRUserMetadata; - -NS_ASSUME_NONNULL_BEGIN - -/** @typedef FIRAuthTokenCallback - @brief The type of block called when a token is ready for use. - @see FIRUser.getIDTokenWithCompletion: - @see FIRUser.getIDTokenForcingRefresh:withCompletion: - - @param token Optionally; an access token if the request was successful. - @param error Optionally; the error which occurred - or nil if the request was successful. - - @remarks One of: `token` or `error` will always be non-nil. - */ -typedef void (^FIRAuthTokenCallback)(NSString *_Nullable token, NSError *_Nullable error) - NS_SWIFT_NAME(AuthTokenCallback); - -/** @typedef FIRAuthTokenResultCallback - @brief The type of block called when a token is ready for use. - @see FIRUser.getIDTokenResultWithCompletion: - @see FIRUser.getIDTokenResultForcingRefresh:withCompletion: - - @param tokenResult Optionally; an object containing the raw access token string as well as other - useful data pertaining to the token. - @param error Optionally; the error which occurred - or nil if the request was successful. - - @remarks One of: `token` or `error` will always be non-nil. - */ -typedef void (^FIRAuthTokenResultCallback)(FIRAuthTokenResult *_Nullable tokenResult, - NSError *_Nullable error) - NS_SWIFT_NAME(AuthTokenResultCallback); - -/** @typedef FIRUserProfileChangeCallback - @brief The type of block called when a user profile change has finished. - - @param error Optionally; the error which occurred - or nil if the request was successful. - */ -typedef void (^FIRUserProfileChangeCallback)(NSError *_Nullable error) - NS_SWIFT_NAME(UserProfileChangeCallback); - -/** @typedef FIRSendEmailVerificationCallback - @brief The type of block called when a request to send an email verification has finished. - - @param error Optionally; the error which occurred - or nil if the request was successful. - */ -typedef void (^FIRSendEmailVerificationCallback)(NSError *_Nullable error) - NS_SWIFT_NAME(SendEmailVerificationCallback); - -/** @class FIRUser - @brief Represents a user. Firebase Auth does not attempt to validate users - when loading them from the keychain. Invalidated users (such as those - whose passwords have been changed on another client) are automatically - logged out when an auth-dependent operation is attempted or when the - ID token is automatically refreshed. - @remarks This class is thread-safe. - */ -NS_SWIFT_NAME(User) -@interface FIRUser : NSObject - -/** @property anonymous - @brief Indicates the user represents an anonymous user. - */ -@property(nonatomic, readonly, getter=isAnonymous) BOOL anonymous; - -/** @property emailVerified - @brief Indicates the email address associated with this user has been verified. - */ -@property(nonatomic, readonly, getter=isEmailVerified) BOOL emailVerified; - -/** @property refreshToken - @brief A refresh token; useful for obtaining new access tokens independently. - @remarks This property should only be used for advanced scenarios, and is not typically needed. - */ -@property(nonatomic, readonly, nullable) NSString *refreshToken; - -/** @property providerData - @brief Profile data for each identity provider, if any. - @remarks This data is cached on sign-in and updated when linking or unlinking. - */ -@property(nonatomic, readonly, nonnull) NSArray> *providerData; - -/** @property metadata - @brief Metadata associated with the Firebase user in question. - */ -@property(nonatomic, readonly, nonnull) FIRUserMetadata *metadata; - -/** @fn init - @brief This class should not be instantiated. - @remarks To retrieve the current user, use `FIRAuth.currentUser`. To sign a user - in or out, use the methods on `FIRAuth`. - */ -- (instancetype)init NS_UNAVAILABLE; - -/** @fn updateEmail:completion: - @brief Updates the email address for the user. On success, the cached user profile data is - updated. - @remarks May fail if there is already an account with this email address that was created using - email and password authentication. - - @param email The email address for the user. - @param completion Optionally; the block invoked when the user profile change has finished. - Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was - sent in the request. - + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in - the console for this action. - + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for - sending update email. - + `FIRAuthErrorCodeEmailAlreadyInUse` - Indicates the email is already in use by another - account. - + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed. - + `FIRAuthErrorCodeRequiresRecentLogin` - Updating a user’s email is a security - sensitive operation that requires a recent login from the user. This error indicates - the user has not signed in recently enough. To resolve, reauthenticate the user by - invoking reauthenticateWithCredential:completion: on FIRUser. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods. - */ -- (void)updateEmail:(NSString *)email completion:(nullable FIRUserProfileChangeCallback)completion - NS_SWIFT_NAME(updateEmail(to:completion:)); - -/** @fn updatePassword:completion: - @brief Updates the password for the user. On success, the cached user profile data is updated. - - @param password The new password for the user. - @param completion Optionally; the block invoked when the user profile change has finished. - Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeOperationNotAllowed` - Indicates the administrator disabled - sign in with the specified identity provider. - + `FIRAuthErrorCodeRequiresRecentLogin` - Updating a user’s password is a security - sensitive operation that requires a recent login from the user. This error indicates - the user has not signed in recently enough. To resolve, reauthenticate the user by - invoking reauthenticateWithCredential:completion: on FIRUser. - + `FIRAuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is - considered too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo - dictionary object will contain more detailed explanation that can be shown to the user. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods. - */ -- (void)updatePassword:(NSString *)password - completion:(nullable FIRUserProfileChangeCallback)completion - NS_SWIFT_NAME(updatePassword(to:completion:)); - -#if TARGET_OS_IOS -/** @fn updatePhoneNumberCredential:completion: - @brief Updates the phone number for the user. On success, the cached user profile data is - updated. - - @param phoneNumberCredential The new phone number credential corresponding to the phone number - to be added to the Firebase account, if a phone number is already linked to the account this - new phone number will replace it. - @param completion Optionally; the block invoked when the user profile change has finished. - Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeRequiresRecentLogin` - Updating a user’s phone number is a security - sensitive operation that requires a recent login from the user. This error indicates - the user has not signed in recently enough. To resolve, reauthenticate the user by - invoking reauthenticateWithCredential:completion: on FIRUser. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods. - */ -- (void)updatePhoneNumberCredential:(FIRPhoneAuthCredential *)phoneNumberCredential - completion:(nullable FIRUserProfileChangeCallback)completion; -#endif - -/** @fn profileChangeRequest - @brief Creates an object which may be used to change the user's profile data. - - @remarks Set the properties of the returned object, then call - `FIRUserProfileChangeRequest.commitChangesWithCallback:` to perform the updates atomically. - - @return An object which may be used to change the user's profile data atomically. - */ -- (FIRUserProfileChangeRequest *)profileChangeRequest NS_SWIFT_NAME(createProfileChangeRequest()); - -/** @fn reloadWithCompletion: - @brief Reloads the user's profile data from the server. - - @param completion Optionally; the block invoked when the reload has finished. Invoked - asynchronously on the main thread in the future. - - @remarks May fail with a `FIRAuthErrorCodeRequiresRecentLogin` error code. In this case - you should call `FIRUser.reauthenticateWithCredential:completion:` before re-invoking - `FIRUser.updateEmail:completion:`. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)reloadWithCompletion:(nullable FIRUserProfileChangeCallback)completion; - -/** @fn reauthenticateWithCredential:completion: - @brief Please use reauthenticateAndRetrieveDataWithCredential:completion: for Objective-C or - reauthenticateAndRetrieveData(WithCredential:completion:) for Swift instead. - */ -- (void)reauthenticateWithCredential:(FIRAuthCredential *)credential - completion:(nullable FIRUserProfileChangeCallback)completion - DEPRECATED_MSG_ATTRIBUTE( "Please use" - " reauthenticateAndRetrieveDataWithCredential:completion: for" - " Objective-C or" - " reauthenticateAndRetrieveData(WithCredential:completion:)" - " for Swift instead."); - -/** @fn reauthenticateAndRetrieveDataWithCredential:completion: - @brief Renews the user's authentication tokens by validating a fresh set of credentials supplied - by the user and returns additional identity provider data. - - @param credential A user-supplied credential, which will be validated by the server. This can be - a successful third-party identity provider sign-in, or an email address and password. - @param completion Optionally; the block invoked when the re-authentication operation has - finished. Invoked asynchronously on the main thread in the future. - - @remarks If the user associated with the supplied credential is different from the current user, - or if the validation of the supplied credentials fails; an error is returned and the current - user remains signed in. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeInvalidCredential` - Indicates the supplied credential is invalid. - This could happen if it has expired or it is malformed. - + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that accounts with the - identity provider represented by the credential are not enabled. Enable them in the - Auth section of the Firebase console. - + `FIRAuthErrorCodeEmailAlreadyInUse` - Indicates the email asserted by the credential - (e.g. the email in a Facebook access token) is already in use by an existing account, - that cannot be authenticated with this method. Call fetchProvidersForEmail for - this user’s email and then prompt them to sign in with any of the sign-in providers - returned. This error will only be thrown if the "One account per email address" - setting is enabled in the Firebase console, under Auth settings. Please note that the - error code raised in this specific situation may not be the same on Web and Android. - + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled. - + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted reauthentication with - an incorrect password, if credential is of the type EmailPasswordAuthCredential. - + `FIRAuthErrorCodeUserMismatch` - Indicates that an attempt was made to - reauthenticate with a user which is not the current user. - + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)reauthenticateAndRetrieveDataWithCredential:(FIRAuthCredential *) credential - completion:(nullable FIRAuthDataResultCallback) completion; - -/** @fn getIDTokenResultWithCompletion: - @brief Retrieves the Firebase authentication token, possibly refreshing it if it has expired. - - @param completion Optionally; the block invoked when the token is available. Invoked - asynchronously on the main thread in the future. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)getIDTokenResultWithCompletion:(nullable FIRAuthTokenResultCallback)completion - NS_SWIFT_NAME(getIDTokenResult(completion:)); - -/** @fn getIDTokenResultForcingRefresh:completion: - @brief Retrieves the Firebase authentication token, possibly refreshing it if it has expired. - - @param forceRefresh Forces a token refresh. Useful if the token becomes invalid for some reason - other than an expiration. - @param completion Optionally; the block invoked when the token is available. Invoked - asynchronously on the main thread in the future. - - @remarks The authentication token will be refreshed (by making a network request) if it has - expired, or if `forceRefresh` is YES. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)getIDTokenResultForcingRefresh:(BOOL)forceRefresh - completion:(nullable FIRAuthTokenResultCallback)completion - NS_SWIFT_NAME(getIDTokenResult(forcingRefresh:completion:)); - -/** @fn getIDTokenWithCompletion: - @brief Retrieves the Firebase authentication token, possibly refreshing it if it has expired. - - @param completion Optionally; the block invoked when the token is available. Invoked - asynchronously on the main thread in the future. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)getIDTokenWithCompletion:(nullable FIRAuthTokenCallback)completion - NS_SWIFT_NAME(getIDToken(completion:)); - -/** @fn getIDTokenForcingRefresh:completion: - @brief Retrieves the Firebase authentication token, possibly refreshing it if it has expired. - - @param forceRefresh Forces a token refresh. Useful if the token becomes invalid for some reason - other than an expiration. - @param completion Optionally; the block invoked when the token is available. Invoked - asynchronously on the main thread in the future. - - @remarks The authentication token will be refreshed (by making a network request) if it has - expired, or if `forceRefresh` is YES. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods. - */ -- (void)getIDTokenForcingRefresh:(BOOL)forceRefresh - completion:(nullable FIRAuthTokenCallback)completion; - -/** @fn linkWithCredential:completion: - @brief Please use linkAndRetrieveDataWithCredential:completion: for Objective-C or - linkAndRetrieveData(WithCredential:completion:) for Swift instead. - */ -- (void)linkWithCredential:(FIRAuthCredential *)credential - completion:(nullable FIRAuthResultCallback)completion DEPRECATED_MSG_ATTRIBUTE( - "Please use linkAndRetrieveDataWithCredential:completion: for" - " Objective-C or" - " linkAndRetrieveData(WithCredential:completion:) for" - " Swift instead."); - -/** @fn linkAndRetrieveDataWithCredential:completion: - @brief Associates a user account from a third-party identity provider with this user and - returns additional identity provider data. - - @param credential The credential for the identity provider. - @param completion Optionally; the block invoked when the unlinking is complete, or fails. - Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeProviderAlreadyLinked` - Indicates an attempt to link a provider of a - type already linked to this account. - + `FIRAuthErrorCodeCredentialAlreadyInUse` - Indicates an attempt to link with a - credential - that has already been linked with a different Firebase account. - + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that accounts with the identity - provider represented by the credential are not enabled. Enable them in the Auth section - of the Firebase console. - - @remarks This method may also return error codes associated with updateEmail:completion: and - updatePassword:completion: on FIRUser. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods. - */ -- (void)linkAndRetrieveDataWithCredential:(FIRAuthCredential *) credential - completion:(nullable FIRAuthDataResultCallback) completion; - -/** @fn unlinkFromProvider:completion: - @brief Disassociates a user account from a third-party identity provider with this user. - - @param provider The provider ID of the provider to unlink. - @param completion Optionally; the block invoked when the unlinking is complete, or fails. - Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeNoSuchProvider` - Indicates an attempt to unlink a provider - that is not linked to the account. - + `FIRAuthErrorCodeRequiresRecentLogin` - Updating email is a security sensitive - operation that requires a recent login from the user. This error indicates the user - has not signed in recently enough. To resolve, reauthenticate the user by invoking - reauthenticateWithCredential:completion: on FIRUser. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods. - */ -- (void)unlinkFromProvider:(NSString *)provider - completion:(nullable FIRAuthResultCallback)completion; - -/** @fn sendEmailVerificationWithCompletion: - @brief Initiates email verification for the user. - - @param completion Optionally; the block invoked when the request to send an email verification - is complete, or fails. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was - sent in the request. - + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in - the console for this action. - + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for - sending update email. - + `FIRAuthErrorCodeUserNotFound` - Indicates the user account was not found. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods. - */ -- (void)sendEmailVerificationWithCompletion:(nullable FIRSendEmailVerificationCallback)completion; - -/** @fn sendEmailVerificationWithActionCodeSettings:completion: - @brief Initiates email verification for the user. - - @param actionCodeSettings An `FIRActionCodeSettings` object containing settings related to - handling action codes. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was - sent in the request. - + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in - the console for this action. - + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for - sending update email. - + `FIRAuthErrorCodeUserNotFound` - Indicates the user account was not found. - + `FIRAuthErrorCodeMissingIosBundleID` - Indicates that the iOS bundle ID is missing when - a iOS App Store ID is provided. - + `FIRAuthErrorCodeMissingAndroidPackageName` - Indicates that the android package name - is missing when the `androidInstallApp` flag is set to true. - + `FIRAuthErrorCodeUnauthorizedDomain` - Indicates that the domain specified in the - continue URL is not whitelisted in the Firebase console. - + `FIRAuthErrorCodeInvalidContinueURI` - Indicates that the domain specified in the - continue URI is not valid. - */ -- (void)sendEmailVerificationWithActionCodeSettings:(FIRActionCodeSettings *)actionCodeSettings - completion:(nullable FIRSendEmailVerificationCallback) - completion; - -/** @fn deleteWithCompletion: - @brief Deletes the user account (also signs out the user, if this was the current user). - - @param completion Optionally; the block invoked when the request to delete the account is - complete, or fails. Invoked asynchronously on the main thread in the future. - - @remarks Possible error codes: - - + `FIRAuthErrorCodeRequiresRecentLogin` - Updating email is a security sensitive - operation that requires a recent login from the user. This error indicates the user - has not signed in recently enough. To resolve, reauthenticate the user by invoking - reauthenticateWithCredential:completion: on FIRUser. - - @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods. - - */ -- (void)deleteWithCompletion:(nullable FIRUserProfileChangeCallback)completion; - -@end - -/** @class FIRUserProfileChangeRequest - @brief Represents an object capable of updating a user's profile data. - @remarks Properties are marked as being part of a profile update when they are set. Setting a - property value to nil is not the same as leaving the property unassigned. - */ -NS_SWIFT_NAME(UserProfileChangeRequest) -@interface FIRUserProfileChangeRequest : NSObject - -/** @fn init - @brief Please use `FIRUser.profileChangeRequest` - */ -- (instancetype)init NS_UNAVAILABLE; - -/** @property displayName - @brief The user's display name. - @remarks It is an error to set this property after calling - `FIRUserProfileChangeRequest.commitChangesWithCallback:` - */ -@property(nonatomic, copy, nullable) NSString *displayName; - -/** @property photoURL - @brief The user's photo URL. - @remarks It is an error to set this property after calling - `FIRUserProfileChangeRequest.commitChangesWithCallback:` - */ -@property(nonatomic, copy, nullable) NSURL *photoURL; - -/** @fn commitChangesWithCompletion: - @brief Commits any pending changes. - @remarks This method should only be called once. Once called, property values should not be - changed. - - @param completion Optionally; the block invoked when the user profile change has been applied. - Invoked asynchronously on the main thread in the future. - */ -- (void)commitChangesWithCompletion:(nullable FIRUserProfileChangeCallback)completion; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRUserInfo.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRUserInfo.h deleted file mode 100644 index 04eca495d..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRUserInfo.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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 - -NS_ASSUME_NONNULL_BEGIN - -/** - @brief Represents user data returned from an identity provider. - */ -NS_SWIFT_NAME(UserInfo) -@protocol FIRUserInfo - -/** @property providerID - @brief The provider identifier. - */ -@property(nonatomic, copy, readonly) NSString *providerID; - -/** @property uid - @brief The provider's user ID for the user. - */ -@property(nonatomic, copy, readonly) NSString *uid; - -/** @property displayName - @brief The name of the user. - */ -@property(nonatomic, copy, readonly, nullable) NSString *displayName; - -/** @property photoURL - @brief The URL of the user's profile photo. - */ -@property(nonatomic, copy, readonly, nullable) NSURL *photoURL; - -/** @property email - @brief The user's email address. - */ -@property(nonatomic, copy, readonly, nullable) NSString *email; - -/** @property phoneNumber - @brief A phone number associated with the user. - @remarks This property is only available for users authenticated via phone number auth. - */ -@property(nonatomic, readonly, nullable) NSString *phoneNumber; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRUserMetadata.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRUserMetadata.h deleted file mode 100644 index 25331718d..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FIRUserMetadata.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 - -NS_ASSUME_NONNULL_BEGIN - -/** @class FIRUserMetdata - @brief A data class representing the metadata corresponding to a Firebase user. - */ -NS_SWIFT_NAME(UserMetadata) -@interface FIRUserMetadata : NSObject - -/** @property lastSignInDate - @brief Stores the last sign in date for the corresponding Firebase user. - */ -@property (copy, nonatomic, readonly, nullable) NSDate *lastSignInDate; - -/** @property creationDate - @brief Stores the creation date for the corresponding Firebase user. - */ -@property (copy, nonatomic, readonly, nullable) NSDate *creationDate; - -/** @fn init - @brief This class should not be initialized manually, an instance of this class can be obtained - from a Firebase user object. - */ -- (instancetype)init NS_UNAVAILABLE; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FirebaseAuth.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FirebaseAuth.h deleted file mode 100644 index c8837f83d..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FirebaseAuth.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 - -#import "FIRActionCodeSettings.h" -#import "FIRAdditionalUserInfo.h" -#import "FIRAuth.h" -#import "FIRAuthCredential.h" -#import "FIRAuthDataResult.h" -#import "FIRAuthErrors.h" -#import "FIRAuthTokenResult.h" -#import "FirebaseAuthVersion.h" -#import "FIREmailAuthProvider.h" -#import "FIRFacebookAuthProvider.h" -#import "FIRGitHubAuthProvider.h" -#import "FIRGoogleAuthProvider.h" -#import "FIROAuthProvider.h" -#import "FIRTwitterAuthProvider.h" -#import "FIRUser.h" -#import "FIRUserInfo.h" -#import "FIRUserMetadata.h" - -#if TARGET_OS_IOS -#import "FIRAuthUIDelegate.h" -#import "FIRPhoneAuthCredential.h" -#import "FIRPhoneAuthProvider.h" -#import "FIRAuthAPNSTokenType.h" -#import "FIRAuthSettings.h" -#endif diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h b/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h deleted file mode 100644 index 2999384d1..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Headers/FirebaseAuthVersion.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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 - -/** - Version number for FirebaseAuth. - */ -extern const double FirebaseAuthVersionNum; - -/** - Version string for FirebaseAuth. - */ -extern const unsigned char *const FirebaseAuthVersionStr; diff --git a/src/ios/Firebase/Auth/FirebaseAuth.framework/Modules/module.modulemap b/src/ios/Firebase/Auth/FirebaseAuth.framework/Modules/module.modulemap deleted file mode 100644 index 8311bcce3..000000000 --- a/src/ios/Firebase/Auth/FirebaseAuth.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module FirebaseAuth { - umbrella header "FirebaseAuth.h" - export * - module * { export *} - link framework "Security" -} diff --git a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher b/src/ios/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher deleted file mode 100644 index bab7d8646..000000000 Binary files a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/GTMSessionFetcher and /dev/null differ diff --git a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMGatherInputStream.h b/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMGatherInputStream.h deleted file mode 100644 index ec3c0125d..000000000 --- a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMGatherInputStream.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * 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. - */ - -// The GTMGatherInput stream is an input stream implementation that is to be -// instantiated with an NSArray of NSData objects. It works in the traditional -// scatter/gather vector I/O model. Rather than allocating a big NSData object -// to hold all of the data and performing a copy into that object, the -// GTMGatherInputStream will maintain a reference to the NSArray and read from -// each NSData in turn as the read method is called. You should not alter the -// underlying set of NSData objects until all read operations on this input -// stream have completed. - -#import - -#ifndef GTM_NONNULL - #if defined(__has_attribute) - #if __has_attribute(nonnull) - #define GTM_NONNULL(x) __attribute__((nonnull x)) - #else - #define GTM_NONNULL(x) - #endif - #else - #define GTM_NONNULL(x) - #endif -#endif - -// Avoid multiple declaration of this class. -// -// Note: This should match the declaration of GTMGatherInputStream in GTMMIMEDocument.m - -#ifndef GTM_GATHERINPUTSTREAM_DECLARED -#define GTM_GATHERINPUTSTREAM_DECLARED - -@interface GTMGatherInputStream : NSInputStream - -+ (NSInputStream *)streamWithArray:(NSArray *)dataArray GTM_NONNULL((1)); - -@end - -#endif // GTM_GATHERINPUTSTREAM_DECLARED diff --git a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMMIMEDocument.h b/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMMIMEDocument.h deleted file mode 100644 index 451e13239..000000000 --- a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMMIMEDocument.h +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * 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. - */ - -// This is a simple class to create or parse a MIME document. - -// To create a MIME document, allocate a new GTMMIMEDocument and start adding parts. -// When you are done adding parts, call generateInputStream or generateDispatchData. -// -// A good reference for MIME is http://en.wikipedia.org/wiki/MIME - -#import - -#ifndef GTM_NONNULL - #if defined(__has_attribute) - #if __has_attribute(nonnull) - #define GTM_NONNULL(x) __attribute__((nonnull x)) - #else - #define GTM_NONNULL(x) - #endif - #else - #define GTM_NONNULL(x) - #endif -#endif - -#ifndef GTM_DECLARE_GENERICS - #if __has_feature(objc_generics) - #define GTM_DECLARE_GENERICS 1 - #else - #define GTM_DECLARE_GENERICS 0 - #endif -#endif - -#ifndef GTM_NSArrayOf - #if GTM_DECLARE_GENERICS - #define GTM_NSArrayOf(value) NSArray - #define GTM_NSDictionaryOf(key, value) NSDictionary - #else - #define GTM_NSArrayOf(value) NSArray - #define GTM_NSDictionaryOf(key, value) NSDictionary - #endif // GTM_DECLARE_GENERICS -#endif // GTM_NSArrayOf - - -// GTMMIMEDocumentPart represents a part of a MIME document. -// -// +[GTMMIMEDocument MIMEPartsWithBoundary:data:] returns an array of these. -@interface GTMMIMEDocumentPart : NSObject - -@property(nonatomic, readonly) GTM_NSDictionaryOf(NSString *, NSString *) *headers; -@property(nonatomic, readonly) NSData *headerData; -@property(nonatomic, readonly) NSData *body; -@property(nonatomic, readonly) NSUInteger length; - -+ (instancetype)partWithHeaders:(NSDictionary *)headers body:(NSData *)body; - -@end - -@interface GTMMIMEDocument : NSObject - -// Get or set the unique boundary for the parts that have been added. -// -// When creating a MIME document from parts, this is typically calculated -// automatically after all parts have been added. -@property(nonatomic, copy) NSString *boundary; - -#pragma mark - Methods for Creating a MIME Document - -+ (instancetype)MIMEDocument; - -// Adds a new part to this mime document with the given headers and body. -// The headers keys and values should be NSStrings. -// Adding a part may cause the boundary string to change. -- (void)addPartWithHeaders:(GTM_NSDictionaryOf(NSString *, NSString *) *)headers - body:(NSData *)body GTM_NONNULL((1,2)); - -// An inputstream that can be used to efficiently read the contents of the MIME document. -// -// Any parameter may be null if the result is not wanted. -- (void)generateInputStream:(NSInputStream **)outStream - length:(unsigned long long *)outLength - boundary:(NSString **)outBoundary; - -// A dispatch_data_t with the contents of the MIME document. -// -// Note: dispatch_data_t is one-way toll-free bridged so the result -// may be cast directly to NSData *. -// -// Any parameter may be null if the result is not wanted. -- (void)generateDispatchData:(dispatch_data_t *)outDispatchData - length:(unsigned long long *)outLength - boundary:(NSString **)outBoundary; - -// Utility method for making a header section, including trailing newlines. -+ (NSData *)dataWithHeaders:(GTM_NSDictionaryOf(NSString *, NSString *) *)headers; - -#pragma mark - Methods for Parsing a MIME Document - -// Method for parsing out an array of MIME parts from a MIME document. -// -// Returns an array of GTMMIMEDocumentParts. Returns nil if no part can -// be found. -+ (GTM_NSArrayOf(GTMMIMEDocumentPart *) *)MIMEPartsWithBoundary:(NSString *)boundary - data:(NSData *)fullDocumentData; - -// Utility method for efficiently searching possibly discontiguous NSData -// for occurrences of target byte. This method does not "flatten" an NSData -// that is composed of discontiguous blocks. -// -// The byte offsets of non-overlapping occurrences of the target are returned as -// NSNumbers in the array. -+ (void)searchData:(NSData *)data - targetBytes:(const void *)targetBytes - targetLength:(NSUInteger)targetLength - foundOffsets:(GTM_NSArrayOf(NSNumber *) **)outFoundOffsets; - -// Utility method to parse header bytes into an NSDictionary. -+ (GTM_NSDictionaryOf(NSString *, NSString *) *)headersWithData:(NSData *)data; - -// ------ UNIT TESTING ONLY BELOW ------ - -// Internal methods, exposed for unit testing only. -- (void)seedRandomWith:(u_int32_t)seed; - -+ (NSUInteger)findBytesWithNeedle:(const unsigned char *)needle - needleLength:(NSUInteger)needleLength - haystack:(const unsigned char *)haystack - haystackLength:(NSUInteger)haystackLength - foundOffset:(NSUInteger *)foundOffset; - -+ (void)searchData:(NSData *)data - targetBytes:(const void *)targetBytes - targetLength:(NSUInteger)targetLength - foundOffsets:(GTM_NSArrayOf(NSNumber *) **)outFoundOffsets - foundBlockNumbers:(GTM_NSArrayOf(NSNumber *) **)outFoundBlockNumbers; - -@end diff --git a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMReadMonitorInputStream.h b/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMReadMonitorInputStream.h deleted file mode 100644 index 4e306428a..000000000 --- a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMReadMonitorInputStream.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * 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 - -#ifndef GTM_NONNULL - #if defined(__has_attribute) - #if __has_attribute(nonnull) - #define GTM_NONNULL(x) __attribute__((nonnull x)) - #else - #define GTM_NONNULL(x) - #endif - #else - #define GTM_NONNULL(x) - #endif -#endif - - -@interface GTMReadMonitorInputStream : NSInputStream - -+ (instancetype)inputStreamWithStream:(NSInputStream *)input GTM_NONNULL((1)); - -- (instancetype)initWithStream:(NSInputStream *)input GTM_NONNULL((1)); - -// The read monitor selector is called when bytes have been read. It should have this signature: -// -// - (void)inputStream:(GTMReadMonitorInputStream *)stream -// readIntoBuffer:(uint8_t *)buffer -// length:(int64_t)length; - -@property(atomic, weak) id readDelegate; -@property(atomic, assign) SEL readSelector; - -// Modes for invoking callbacks, when necessary. -@property(atomic, strong) NSArray *runLoopModes; - -@end diff --git a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMSessionFetcher.h b/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMSessionFetcher.h deleted file mode 100644 index 56eb1ca99..000000000 --- a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMSessionFetcher.h +++ /dev/null @@ -1,1309 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * 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. - */ - -// GTMSessionFetcher is a wrapper around NSURLSession for http operations. -// -// What does this offer on top of of NSURLSession? -// -// - Block-style callbacks for useful functionality like progress rather -// than delegate methods. -// - Out-of-process uploads and downloads using NSURLSession, including -// management of fetches after relaunch. -// - Integration with GTMAppAuth for invisible management and refresh of -// authorization tokens. -// - Pretty-printed http logging. -// - Cookies handling that does not interfere with or get interfered with -// by WebKit cookies or on Mac by Safari and other apps. -// - Credentials handling for the http operation. -// - Rate-limiting and cookie grouping when fetchers are created with -// GTMSessionFetcherService. -// -// If the bodyData or bodyFileURL property is set, then a POST request is assumed. -// -// Each fetcher is assumed to be for a one-shot fetch request; don't reuse the object -// for a second fetch. -// -// The fetcher will be self-retained as long as a connection is pending. -// -// To keep user activity private, URLs must have an https scheme (unless the property -// allowedInsecureSchemes is set to permit the scheme.) -// -// Callbacks will be released when the fetch completes or is stopped, so there is no need -// to use weak self references in the callback blocks. -// -// Sample usage: -// -// _fetcherService = [[GTMSessionFetcherService alloc] init]; -// -// GTMSessionFetcher *myFetcher = [_fetcherService fetcherWithURLString:myURLString]; -// myFetcher.retryEnabled = YES; -// myFetcher.comment = @"First profile image"; -// -// // Optionally specify a file URL or NSData for the request body to upload. -// myFetcher.bodyData = [postString dataUsingEncoding:NSUTF8StringEncoding]; -// -// [myFetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { -// if (error != nil) { -// // Server status code or network error. -// // -// // If the domain is kGTMSessionFetcherStatusDomain then the error code -// // is a failure status from the server. -// } else { -// // Fetch succeeded. -// } -// }]; -// -// There is also a beginFetch call that takes a pointer and selector for the completion handler; -// a pointer and selector is a better style when the callback is a substantial, separate method. -// -// NOTE: Fetches may retrieve data from the server even though the server -// returned an error, so the criteria for success is a non-nil error. -// The completion handler is called when the server status is >= 300 with an NSError -// having domain kGTMSessionFetcherStatusDomain and code set to the server status. -// -// Status codes are at -// -// -// Background session support: -// -// Out-of-process uploads and downloads may be created by setting the fetcher's -// useBackgroundSession property. Data to be uploaded should be provided via -// the uploadFileURL property; the download destination should be specified with -// the destinationFileURL. NOTE: Background upload files should be in a location -// that will be valid even after the device is restarted, so the file should not -// be uploaded from a system temporary or cache directory. -// -// Background session transfers are slower, and should typically be used only -// for very large downloads or uploads (hundreds of megabytes). -// -// When background sessions are used in iOS apps, the application delegate must -// pass through the parameters from UIApplicationDelegate's -// application:handleEventsForBackgroundURLSession:completionHandler: to the -// fetcher class. -// -// When the application has been relaunched, it may also create a new fetcher -// instance to handle completion of the transfers. -// -// - (void)application:(UIApplication *)application -// handleEventsForBackgroundURLSession:(NSString *)identifier -// completionHandler:(void (^)())completionHandler { -// // Application was re-launched on completing an out-of-process download. -// -// // Pass the URLSession info related to this re-launch to the fetcher class. -// [GTMSessionFetcher application:application -// handleEventsForBackgroundURLSession:identifier -// completionHandler:completionHandler]; -// -// // Get a fetcher related to this re-launch and re-hook up a completionHandler to it. -// GTMSessionFetcher *fetcher = [GTMSessionFetcher fetcherWithSessionIdentifier:identifier]; -// NSURL *destinationFileURL = fetcher.destinationFileURL; -// fetcher.completionHandler = ^(NSData *data, NSError *error) { -// [self downloadCompletedToFile:destinationFileURL error:error]; -// }; -// } -// -// -// Threading and queue support: -// -// Networking always happens on a background thread; there is no advantage to -// changing thread or queue to create or start a fetcher. -// -// Callbacks are run on the main thread; alternatively, the app may set the -// fetcher's callbackQueue to a dispatch queue. -// -// Once the fetcher's beginFetch method has been called, the fetcher's methods and -// properties may be accessed from any thread. -// -// Downloading to disk: -// -// To have downloaded data saved directly to disk, specify a file URL for the -// destinationFileURL property. -// -// HTTP methods and headers: -// -// Alternative HTTP methods, like PUT, and custom headers can be specified by -// creating the fetcher with an appropriate NSMutableURLRequest. -// -// -// Caching: -// -// The fetcher avoids caching. That is best for API requests, but may hurt -// repeat fetches of static data. Apps may enable a persistent disk cache by -// customizing the config: -// -// fetcher.configurationBlock = ^(GTMSessionFetcher *configFetcher, -// NSURLSessionConfiguration *config) { -// config.URLCache = [NSURLCache sharedURLCache]; -// }; -// -// Or use the standard system config to share cookie storage with web views -// and to enable disk caching: -// -// fetcher.configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; -// -// -// Cookies: -// -// There are three supported mechanisms for remembering cookies between fetches. -// -// By default, a standalone GTMSessionFetcher uses a mutable array held -// statically to track cookies for all instantiated fetchers. This avoids -// cookies being set by servers for the application from interfering with -// Safari and WebKit cookie settings, and vice versa. -// The fetcher cookies are lost when the application quits. -// -// To rely instead on WebKit's global NSHTTPCookieStorage, set the fetcher's -// cookieStorage property: -// myFetcher.cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; -// -// To share cookies with other apps, use the method introduced in iOS 9/OS X 10.11: -// myFetcher.cookieStorage = -// [NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier:kMyCompanyContainedID]; -// -// To ignore existing cookies and only have cookies related to the single fetch -// be applied, make a temporary cookie storage object: -// myFetcher.cookieStorage = [[GTMSessionCookieStorage alloc] init]; -// -// Note: cookies set while following redirects will be sent to the server, as -// the redirects are followed by the fetcher. -// -// To completely disable cookies, similar to setting cookieStorageMethod to -// kGTMHTTPFetcherCookieStorageMethodNone, adjust the session configuration -// appropriately in the fetcher or fetcher service: -// fetcher.configurationBlock = ^(GTMSessionFetcher *configFetcher, -// NSURLSessionConfiguration *config) { -// config.HTTPCookieAcceptPolicy = NSHTTPCookieAcceptPolicyNever; -// config.HTTPShouldSetCookies = NO; -// }; -// -// If the fetcher is created from a GTMSessionFetcherService object -// then the cookie storage mechanism is set to use the cookie storage in the -// service object rather than the static storage. Disabling cookies in the -// session configuration set on a service object will disable cookies for all -// fetchers created from that GTMSessionFetcherService object, since the session -// configuration is propagated to the fetcher. -// -// -// Monitoring data transfers. -// -// The fetcher supports a variety of properties for progress monitoring -// progress with callback blocks. -// GTMSessionFetcherSendProgressBlock sendProgressBlock -// GTMSessionFetcherReceivedProgressBlock receivedProgressBlock -// GTMSessionFetcherDownloadProgressBlock downloadProgressBlock -// -// If supplied by the server, the anticipated total download size is available -// as [[myFetcher response] expectedContentLength] (and may be -1 for unknown -// download sizes.) -// -// -// Automatic retrying of fetches -// -// The fetcher can optionally create a timer and reattempt certain kinds of -// fetch failures (status codes 408, request timeout; 502, gateway failure; -// 503, service unavailable; 504, gateway timeout; networking errors -// NSURLErrorTimedOut and NSURLErrorNetworkConnectionLost.) The user may -// set a retry selector to customize the type of errors which will be retried. -// -// Retries are done in an exponential-backoff fashion (that is, after 1 second, -// 2, 4, 8, and so on.) -// -// Enabling automatic retries looks like this: -// myFetcher.retryEnabled = YES; -// -// With retries enabled, the completion callbacks are called only -// when no more retries will be attempted. Calling the fetcher's stopFetching -// method will terminate the retry timer, without the finished or failure -// selectors being invoked. -// -// Optionally, the client may set the maximum retry interval: -// myFetcher.maxRetryInterval = 60.0; // in seconds; default is 60 seconds -// // for downloads, 600 for uploads -// -// Servers should never send a 400 or 500 status for errors that are retryable -// by clients, as those values indicate permanent failures. In nearly all -// cases, the default standard retry behavior is correct for clients, and no -// custom client retry behavior is needed or appropriate. Servers that send -// non-retryable status codes and expect the client to retry the request are -// faulty. -// -// Still, the client may provide a block to determine if a status code or other -// error should be retried. The block returns YES to set the retry timer or NO -// to fail without additional fetch attempts. -// -// The retry method may return the |suggestedWillRetry| argument to get the -// default retry behavior. Server status codes are present in the -// error argument, and have the domain kGTMSessionFetcherStatusDomain. The -// user's method may look something like this: -// -// myFetcher.retryBlock = ^(BOOL suggestedWillRetry, NSError *error, -// GTMSessionFetcherRetryResponse response) { -// // Perhaps examine error.domain and error.code, or fetcher.retryCount -// // -// // Respond with YES to start the retry timer, NO to proceed to the failure -// // callback, or suggestedWillRetry to get default behavior for the -// // current error domain and code values. -// response(suggestedWillRetry); -// }; - - -#import - -#if TARGET_OS_IPHONE -#import -#endif -#if TARGET_OS_WATCH -#import -#endif - -// By default it is stripped from non DEBUG builds. Developers can override -// this in their project settings. -#ifndef STRIP_GTM_FETCH_LOGGING - #if !DEBUG - #define STRIP_GTM_FETCH_LOGGING 1 - #else - #define STRIP_GTM_FETCH_LOGGING 0 - #endif -#endif - -// Logs in debug builds. -#ifndef GTMSESSION_LOG_DEBUG - #if DEBUG - #define GTMSESSION_LOG_DEBUG(...) NSLog(__VA_ARGS__) - #else - #define GTMSESSION_LOG_DEBUG(...) do { } while (0) - #endif -#endif - -// Asserts in debug builds (or logs in debug builds if GTMSESSION_ASSERT_AS_LOG -// or NS_BLOCK_ASSERTIONS are defined.) -#ifndef GTMSESSION_ASSERT_DEBUG - #if DEBUG && !defined(NS_BLOCK_ASSERTIONS) && !GTMSESSION_ASSERT_AS_LOG - #undef GTMSESSION_ASSERT_AS_LOG - #define GTMSESSION_ASSERT_AS_LOG 1 - #endif - - #if DEBUG && !GTMSESSION_ASSERT_AS_LOG - #define GTMSESSION_ASSERT_DEBUG(...) NSAssert(__VA_ARGS__) - #elif DEBUG - #define GTMSESSION_ASSERT_DEBUG(pred, ...) if (!(pred)) { NSLog(__VA_ARGS__); } - #else - #define GTMSESSION_ASSERT_DEBUG(pred, ...) do { } while (0) - #endif -#endif - -// Asserts in debug builds, logs in release builds (or logs in debug builds if -// GTMSESSION_ASSERT_AS_LOG is defined.) -#ifndef GTMSESSION_ASSERT_DEBUG_OR_LOG - #if DEBUG && !GTMSESSION_ASSERT_AS_LOG - #define GTMSESSION_ASSERT_DEBUG_OR_LOG(...) NSAssert(__VA_ARGS__) - #else - #define GTMSESSION_ASSERT_DEBUG_OR_LOG(pred, ...) if (!(pred)) { NSLog(__VA_ARGS__); } - #endif -#endif - -// Macro useful for examining messages from NSURLSession during debugging. -#if 0 -#define GTM_LOG_SESSION_DELEGATE(...) GTMSESSION_LOG_DEBUG(__VA_ARGS__) -#else -#define GTM_LOG_SESSION_DELEGATE(...) -#endif - -#ifndef GTM_NULLABLE - #if __has_feature(nullability) // Available starting in Xcode 6.3 - #define GTM_NULLABLE_TYPE __nullable - #define GTM_NONNULL_TYPE __nonnull - #define GTM_NULLABLE nullable - #define GTM_NONNULL_DECL nonnull // GTM_NONNULL is used by GTMDefines.h - #define GTM_NULL_RESETTABLE null_resettable - - #define GTM_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN - #define GTM_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END - #else - #define GTM_NULLABLE_TYPE - #define GTM_NONNULL_TYPE - #define GTM_NULLABLE - #define GTM_NONNULL_DECL - #define GTM_NULL_RESETTABLE - #define GTM_ASSUME_NONNULL_BEGIN - #define GTM_ASSUME_NONNULL_END - #endif // __has_feature(nullability) -#endif // GTM_NULLABLE - -#if (TARGET_OS_TV \ - || TARGET_OS_WATCH \ - || (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12) \ - || (TARGET_OS_IPHONE && defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0)) -#define GTMSESSION_DEPRECATE_ON_2016_SDKS(_MSG) __attribute__((deprecated("" _MSG))) -#else -#define GTMSESSION_DEPRECATE_ON_2016_SDKS(_MSG) -#endif - -#ifndef GTM_DECLARE_GENERICS - #if __has_feature(objc_generics) - #define GTM_DECLARE_GENERICS 1 - #else - #define GTM_DECLARE_GENERICS 0 - #endif -#endif - -#ifndef GTM_NSArrayOf - #if GTM_DECLARE_GENERICS - #define GTM_NSArrayOf(value) NSArray - #define GTM_NSDictionaryOf(key, value) NSDictionary - #else - #define GTM_NSArrayOf(value) NSArray - #define GTM_NSDictionaryOf(key, value) NSDictionary - #endif // __has_feature(objc_generics) -#endif // GTM_NSArrayOf - -// For iOS, the fetcher can declare itself a background task to allow fetches -// to finish when the app leaves the foreground. -// -// (This is unrelated to providing a background configuration, which allows -// out-of-process uploads and downloads.) -// -// To disallow use of background tasks during fetches, the target should define -// GTM_BACKGROUND_TASK_FETCHING to 0, or alternatively may set the -// skipBackgroundTask property to YES. -#if TARGET_OS_IPHONE && !TARGET_OS_WATCH && !defined(GTM_BACKGROUND_TASK_FETCHING) - #define GTM_BACKGROUND_TASK_FETCHING 1 -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#if (TARGET_OS_TV \ - || TARGET_OS_WATCH \ - || (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_11) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_11) \ - || (TARGET_OS_IPHONE && defined(__IPHONE_9_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0)) - #ifndef GTM_USE_SESSION_FETCHER - #define GTM_USE_SESSION_FETCHER 1 - #endif -#endif - -#if !defined(GTMBridgeFetcher) - // These bridge macros should be identical in GTMHTTPFetcher.h and GTMSessionFetcher.h - #if GTM_USE_SESSION_FETCHER - // Macros to new fetcher class. - #define GTMBridgeFetcher GTMSessionFetcher - #define GTMBridgeFetcherService GTMSessionFetcherService - #define GTMBridgeFetcherServiceProtocol GTMSessionFetcherServiceProtocol - #define GTMBridgeAssertValidSelector GTMSessionFetcherAssertValidSelector - #define GTMBridgeCookieStorage GTMSessionCookieStorage - #define GTMBridgeCleanedUserAgentString GTMFetcherCleanedUserAgentString - #define GTMBridgeSystemVersionString GTMFetcherSystemVersionString - #define GTMBridgeApplicationIdentifier GTMFetcherApplicationIdentifier - #define kGTMBridgeFetcherStatusDomain kGTMSessionFetcherStatusDomain - #define kGTMBridgeFetcherStatusBadRequest GTMSessionFetcherStatusBadRequest - #else - // Macros to old fetcher class. - #define GTMBridgeFetcher GTMHTTPFetcher - #define GTMBridgeFetcherService GTMHTTPFetcherService - #define GTMBridgeFetcherServiceProtocol GTMHTTPFetcherServiceProtocol - #define GTMBridgeAssertValidSelector GTMAssertSelectorNilOrImplementedWithArgs - #define GTMBridgeCookieStorage GTMCookieStorage - #define GTMBridgeCleanedUserAgentString GTMCleanedUserAgentString - #define GTMBridgeSystemVersionString GTMSystemVersionString - #define GTMBridgeApplicationIdentifier GTMApplicationIdentifier - #define kGTMBridgeFetcherStatusDomain kGTMHTTPFetcherStatusDomain - #define kGTMBridgeFetcherStatusBadRequest kGTMHTTPFetcherStatusBadRequest - #endif // GTM_USE_SESSION_FETCHER -#endif - -GTM_ASSUME_NONNULL_BEGIN - -// Notifications -// -// Fetch started and stopped, and fetch retry delay started and stopped. -extern NSString *const kGTMSessionFetcherStartedNotification; -extern NSString *const kGTMSessionFetcherStoppedNotification; -extern NSString *const kGTMSessionFetcherRetryDelayStartedNotification; -extern NSString *const kGTMSessionFetcherRetryDelayStoppedNotification; - -// Completion handler notification. This is intended for use by code capturing -// and replaying fetch requests and results for testing. For fetches where -// destinationFileURL or accumulateDataBlock is set for the fetcher, the data -// will be nil for successful fetches. -// -// This notification is posted on the main thread. -extern NSString *const kGTMSessionFetcherCompletionInvokedNotification; -extern NSString *const kGTMSessionFetcherCompletionDataKey; -extern NSString *const kGTMSessionFetcherCompletionErrorKey; - -// Constants for NSErrors created by the fetcher (excluding server status errors, -// and error objects originating in the OS.) -extern NSString *const kGTMSessionFetcherErrorDomain; - -// The fetcher turns server error status values (3XX, 4XX, 5XX) into NSErrors -// with domain kGTMSessionFetcherStatusDomain. -// -// Any server response body data accompanying the status error is added to the -// userInfo dictionary with key kGTMSessionFetcherStatusDataKey. -extern NSString *const kGTMSessionFetcherStatusDomain; -extern NSString *const kGTMSessionFetcherStatusDataKey; -extern NSString *const kGTMSessionFetcherStatusDataContentTypeKey; - -// When a fetch fails with an error, these keys are included in the error userInfo -// dictionary if retries were attempted. -extern NSString *const kGTMSessionFetcherNumberOfRetriesDoneKey; -extern NSString *const kGTMSessionFetcherElapsedIntervalWithRetriesKey; - -// Background session support requires access to NSUserDefaults. -// If [NSUserDefaults standardUserDefaults] doesn't yield the correct NSUserDefaults for your usage, -// ie for an App Extension, then implement this class/method to return the correct NSUserDefaults. -// https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html#//apple_ref/doc/uid/TP40014214-CH21-SW6 -@interface GTMSessionFetcherUserDefaultsFactory : NSObject - -+ (NSUserDefaults *)fetcherUserDefaults; - -@end - -#ifdef __cplusplus -} -#endif - -typedef NS_ENUM(NSInteger, GTMSessionFetcherError) { - GTMSessionFetcherErrorDownloadFailed = -1, - GTMSessionFetcherErrorUploadChunkUnavailable = -2, - GTMSessionFetcherErrorBackgroundExpiration = -3, - GTMSessionFetcherErrorBackgroundFetchFailed = -4, - GTMSessionFetcherErrorInsecureRequest = -5, - GTMSessionFetcherErrorTaskCreationFailed = -6, -}; - -typedef NS_ENUM(NSInteger, GTMSessionFetcherStatus) { - // Standard http status codes. - GTMSessionFetcherStatusNotModified = 304, - GTMSessionFetcherStatusBadRequest = 400, - GTMSessionFetcherStatusUnauthorized = 401, - GTMSessionFetcherStatusForbidden = 403, - GTMSessionFetcherStatusPreconditionFailed = 412 -}; - -#ifdef __cplusplus -extern "C" { -#endif - -@class GTMSessionCookieStorage; -@class GTMSessionFetcher; - -// The configuration block is for modifying the NSURLSessionConfiguration only. -// DO NOT change any fetcher properties in the configuration block. -typedef void (^GTMSessionFetcherConfigurationBlock)(GTMSessionFetcher *fetcher, - NSURLSessionConfiguration *configuration); -typedef void (^GTMSessionFetcherSystemCompletionHandler)(void); -typedef void (^GTMSessionFetcherCompletionHandler)(NSData * GTM_NULLABLE_TYPE data, - NSError * GTM_NULLABLE_TYPE error); -typedef void (^GTMSessionFetcherBodyStreamProviderResponse)(NSInputStream *bodyStream); -typedef void (^GTMSessionFetcherBodyStreamProvider)(GTMSessionFetcherBodyStreamProviderResponse response); -typedef void (^GTMSessionFetcherDidReceiveResponseDispositionBlock)(NSURLSessionResponseDisposition disposition); -typedef void (^GTMSessionFetcherDidReceiveResponseBlock)(NSURLResponse *response, - GTMSessionFetcherDidReceiveResponseDispositionBlock dispositionBlock); -typedef void (^GTMSessionFetcherChallengeDispositionBlock)(NSURLSessionAuthChallengeDisposition disposition, - NSURLCredential * GTM_NULLABLE_TYPE credential); -typedef void (^GTMSessionFetcherChallengeBlock)(GTMSessionFetcher *fetcher, - NSURLAuthenticationChallenge *challenge, - GTMSessionFetcherChallengeDispositionBlock dispositionBlock); -typedef void (^GTMSessionFetcherWillRedirectResponse)(NSURLRequest * GTM_NULLABLE_TYPE redirectedRequest); -typedef void (^GTMSessionFetcherWillRedirectBlock)(NSHTTPURLResponse *redirectResponse, - NSURLRequest *redirectRequest, - GTMSessionFetcherWillRedirectResponse response); -typedef void (^GTMSessionFetcherAccumulateDataBlock)(NSData * GTM_NULLABLE_TYPE buffer); -typedef void (^GTMSessionFetcherSimulateByteTransferBlock)(NSData * GTM_NULLABLE_TYPE buffer, - int64_t bytesWritten, - int64_t totalBytesWritten, - int64_t totalBytesExpectedToWrite); -typedef void (^GTMSessionFetcherReceivedProgressBlock)(int64_t bytesWritten, - int64_t totalBytesWritten); -typedef void (^GTMSessionFetcherDownloadProgressBlock)(int64_t bytesWritten, - int64_t totalBytesWritten, - int64_t totalBytesExpectedToWrite); -typedef void (^GTMSessionFetcherSendProgressBlock)(int64_t bytesSent, - int64_t totalBytesSent, - int64_t totalBytesExpectedToSend); -typedef void (^GTMSessionFetcherWillCacheURLResponseResponse)(NSCachedURLResponse * GTM_NULLABLE_TYPE cachedResponse); -typedef void (^GTMSessionFetcherWillCacheURLResponseBlock)(NSCachedURLResponse *proposedResponse, - GTMSessionFetcherWillCacheURLResponseResponse responseBlock); -typedef void (^GTMSessionFetcherRetryResponse)(BOOL shouldRetry); -typedef void (^GTMSessionFetcherRetryBlock)(BOOL suggestedWillRetry, - NSError * GTM_NULLABLE_TYPE error, - GTMSessionFetcherRetryResponse response); - -typedef void (^GTMSessionFetcherTestResponse)(NSHTTPURLResponse * GTM_NULLABLE_TYPE response, - NSData * GTM_NULLABLE_TYPE data, - NSError * GTM_NULLABLE_TYPE error); -typedef void (^GTMSessionFetcherTestBlock)(GTMSessionFetcher *fetcherToTest, - GTMSessionFetcherTestResponse testResponse); - -void GTMSessionFetcherAssertValidSelector(id GTM_NULLABLE_TYPE obj, SEL GTM_NULLABLE_TYPE sel, ...); - -// Utility functions for applications self-identifying to servers via a -// user-agent header - -// The "standard" user agent includes the application identifier, taken from the bundle, -// followed by a space and the system version string. Pass nil to use +mainBundle as the source -// of the bundle identifier. -// -// Applications may use this as a starting point for their own user agent strings, perhaps -// with additional sections appended. Use GTMFetcherCleanedUserAgentString() below to -// clean up any string being added to the user agent. -NSString *GTMFetcherStandardUserAgentString(NSBundle * GTM_NULLABLE_TYPE bundle); - -// Make a generic name and version for the current application, like -// com.example.MyApp/1.2.3 relying on the bundle identifier and the -// CFBundleShortVersionString or CFBundleVersion. -// -// The bundle ID may be overridden as the base identifier string by -// adding to the bundle's Info.plist a "GTMUserAgentID" key. -// -// If no bundle ID or override is available, the process name preceded -// by "proc_" is used. -NSString *GTMFetcherApplicationIdentifier(NSBundle * GTM_NULLABLE_TYPE bundle); - -// Make an identifier like "MacOSX/10.7.1" or "iPod_Touch/4.1 hw/iPod1_1" -NSString *GTMFetcherSystemVersionString(void); - -// Make a parseable user-agent identifier from the given string, replacing whitespace -// and commas with underscores, and removing other characters that may interfere -// with parsing of the full user-agent string. -// -// For example, @"[My App]" would become @"My_App" -NSString *GTMFetcherCleanedUserAgentString(NSString *str); - -// Grab the data from an input stream. Since streams cannot be assumed to be rewindable, -// this may be destructive; the caller can try to rewind the stream (by setting the -// NSStreamFileCurrentOffsetKey property) or can just use the NSData to make a new -// NSInputStream. This function is intended to facilitate testing rather than be used in -// production. -// -// This function operates synchronously on the current thread. Depending on how the -// input stream is implemented, it may be appropriate to dispatch to a different -// queue before calling this function. -// -// Failure is indicated by a returned data value of nil. -NSData * GTM_NULLABLE_TYPE GTMDataFromInputStream(NSInputStream *inputStream, NSError **outError); - -#ifdef __cplusplus -} // extern "C" -#endif - - -#if !GTM_USE_SESSION_FETCHER -@protocol GTMHTTPFetcherServiceProtocol; -#endif - -// This protocol allows abstract references to the fetcher service, primarily for -// fetchers (which may be compiled without the fetcher service class present.) -// -// Apps should not need to use this protocol. -@protocol GTMSessionFetcherServiceProtocol -// This protocol allows us to call into the service without requiring -// GTMSessionFetcherService sources in this project - -@property(atomic, strong) dispatch_queue_t callbackQueue; - -- (BOOL)fetcherShouldBeginFetching:(GTMSessionFetcher *)fetcher; -- (void)fetcherDidCreateSession:(GTMSessionFetcher *)fetcher; -- (void)fetcherDidBeginFetching:(GTMSessionFetcher *)fetcher; -- (void)fetcherDidStop:(GTMSessionFetcher *)fetcher; - -- (GTMSessionFetcher *)fetcherWithRequest:(NSURLRequest *)request; -- (BOOL)isDelayingFetcher:(GTMSessionFetcher *)fetcher; - -@property(atomic, assign) BOOL reuseSession; -- (GTM_NULLABLE NSURLSession *)session; -- (GTM_NULLABLE NSURLSession *)sessionForFetcherCreation; -- (GTM_NULLABLE id)sessionDelegate; -- (GTM_NULLABLE NSDate *)stoppedAllFetchersDate; - -// Methods for compatibility with the old GTMHTTPFetcher. -@property(readonly, strong, GTM_NULLABLE) NSOperationQueue *delegateQueue; - -@end // @protocol GTMSessionFetcherServiceProtocol - -#ifndef GTM_FETCHER_AUTHORIZATION_PROTOCOL -#define GTM_FETCHER_AUTHORIZATION_PROTOCOL 1 -@protocol GTMFetcherAuthorizationProtocol -@required -// This protocol allows us to call the authorizer without requiring its sources -// in this project. -- (void)authorizeRequest:(GTM_NULLABLE NSMutableURLRequest *)request - delegate:(id)delegate - didFinishSelector:(SEL)sel; - -- (void)stopAuthorization; - -- (void)stopAuthorizationForRequest:(NSURLRequest *)request; - -- (BOOL)isAuthorizingRequest:(NSURLRequest *)request; - -- (BOOL)isAuthorizedRequest:(NSURLRequest *)request; - -@property(strong, readonly, GTM_NULLABLE) NSString *userEmail; - -@optional - -// Indicate if authorization may be attempted. Even if this succeeds, -// authorization may fail if the user's permissions have been revoked. -@property(readonly) BOOL canAuthorize; - -// For development only, allow authorization of non-SSL requests, allowing -// transmission of the bearer token unencrypted. -@property(assign) BOOL shouldAuthorizeAllRequests; - -- (void)authorizeRequest:(GTM_NULLABLE NSMutableURLRequest *)request - completionHandler:(void (^)(NSError * GTM_NULLABLE_TYPE error))handler; - -#if GTM_USE_SESSION_FETCHER -@property (weak, GTM_NULLABLE) id fetcherService; -#else -@property (weak, GTM_NULLABLE) id fetcherService; -#endif - -- (BOOL)primeForRefresh; - -@end -#endif // GTM_FETCHER_AUTHORIZATION_PROTOCOL - -#if GTM_BACKGROUND_TASK_FETCHING -// A protocol for an alternative target for messages from GTMSessionFetcher to UIApplication. -// Set the target using +[GTMSessionFetcher setSubstituteUIApplication:] -@protocol GTMUIApplicationProtocol -- (UIBackgroundTaskIdentifier)beginBackgroundTaskWithName:(nullable NSString *)taskName - expirationHandler:(void(^ __nullable)(void))handler; -- (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier; -@end -#endif - -#pragma mark - - -// GTMSessionFetcher objects are used for async retrieval of an http get or post -// -// See additional comments at the beginning of this file -@interface GTMSessionFetcher : NSObject - -// Create a fetcher -// -// fetcherWithRequest will return an autoreleased fetcher, but if -// the connection is successfully created, the connection should retain the -// fetcher for the life of the connection as well. So the caller doesn't have -// to retain the fetcher explicitly unless they want to be able to cancel it. -+ (instancetype)fetcherWithRequest:(GTM_NULLABLE NSURLRequest *)request; - -// Convenience methods that make a request, like +fetcherWithRequest -+ (instancetype)fetcherWithURL:(NSURL *)requestURL; -+ (instancetype)fetcherWithURLString:(NSString *)requestURLString; - -// Methods for creating fetchers to continue previous fetches. -+ (instancetype)fetcherWithDownloadResumeData:(NSData *)resumeData; -+ (GTM_NULLABLE instancetype)fetcherWithSessionIdentifier:(NSString *)sessionIdentifier; - -// Returns an array of currently active fetchers for background sessions, -// both restarted and newly created ones. -+ (GTM_NSArrayOf(GTMSessionFetcher *) *)fetchersForBackgroundSessions; - -// Designated initializer. -// -// Applications should create fetchers with a "fetcherWith..." method on a fetcher -// service or a class method, not with this initializer. -// -// The configuration should typically be nil. Applications needing to customize -// the configuration may do so by setting the configurationBlock property. -- (instancetype)initWithRequest:(GTM_NULLABLE NSURLRequest *)request - configuration:(GTM_NULLABLE NSURLSessionConfiguration *)configuration; - -// The fetcher's request. This may not be set after beginFetch has been invoked. The request -// may change due to redirects. -@property(strong, GTM_NULLABLE) NSURLRequest *request; - -// Set a header field value on the request. Header field value changes will not -// affect a fetch after the fetch has begun. -- (void)setRequestValue:(GTM_NULLABLE NSString *)value forHTTPHeaderField:(NSString *)field; - -// The fetcher's request (deprecated.) -// -// Exposing a mutable object in the interface was convenient but a bad design decision due -// to thread-safety requirements. Clients should use the request property and -// setRequestValue:forHTTPHeaderField: instead. -@property(atomic, readonly, GTM_NULLABLE) NSMutableURLRequest *mutableRequest - GTMSESSION_DEPRECATE_ON_2016_SDKS("use 'request' or '-setRequestValue:forHTTPHeaderField:'"); - -// Data used for resuming a download task. -@property(atomic, readonly, GTM_NULLABLE) NSData *downloadResumeData; - -// The configuration; this must be set before the fetch begins. If no configuration is -// set or inherited from the fetcher service, then the fetcher uses an ephemeral config. -// -// NOTE: This property should typically be nil. Applications needing to customize -// the configuration should do so by setting the configurationBlock property. -// That allows the fetcher to pick an appropriate base configuration, with the -// application setting only the configuration properties it needs to customize. -@property(atomic, strong, GTM_NULLABLE) NSURLSessionConfiguration *configuration; - -// A block the client may use to customize the configuration used to create the session. -// -// This is called synchronously, either on the thread that begins the fetch or, during a retry, -// on the main thread. The configuration block may be called repeatedly if multiple fetchers are -// created. -// -// The configuration block is for modifying the NSURLSessionConfiguration only. -// DO NOT change any fetcher properties in the configuration block. Fetcher properties -// may be set in the fetcher service prior to fetcher creation, or on the fetcher prior -// to invoking beginFetch. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherConfigurationBlock configurationBlock; - -// A session is created as needed by the fetcher. A fetcher service object -// may maintain sessions for multiple fetches to the same host. -@property(atomic, strong, GTM_NULLABLE) NSURLSession *session; - -// The task in flight. -@property(atomic, readonly, GTM_NULLABLE) NSURLSessionTask *sessionTask; - -// The background session identifier. -@property(atomic, readonly, GTM_NULLABLE) NSString *sessionIdentifier; - -// Indicates a fetcher created to finish a background session task. -@property(atomic, readonly) BOOL wasCreatedFromBackgroundSession; - -// Additional user-supplied data to encode into the session identifier. Since session identifier -// length limits are unspecified, this should be kept small. Key names beginning with an underscore -// are reserved for use by the fetcher. -@property(atomic, strong, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, NSString *) *sessionUserInfo; - -// The human-readable description to be assigned to the task. -@property(atomic, copy, GTM_NULLABLE) NSString *taskDescription; - -// The priority assigned to the task, if any. Use NSURLSessionTaskPriorityLow, -// NSURLSessionTaskPriorityDefault, or NSURLSessionTaskPriorityHigh. -@property(atomic, assign) float taskPriority; - -// The fetcher encodes information used to resume a session in the session identifier. -// This method, intended for internal use returns the encoded information. The sessionUserInfo -// dictionary is stored as identifier metadata. -- (GTM_NULLABLE GTM_NSDictionaryOf(NSString *, NSString *) *)sessionIdentifierMetadata; - -#if TARGET_OS_IPHONE && !TARGET_OS_WATCH -// The app should pass to this method the completion handler passed in the app delegate method -// application:handleEventsForBackgroundURLSession:completionHandler: -+ (void)application:(UIApplication *)application - handleEventsForBackgroundURLSession:(NSString *)identifier - completionHandler:(GTMSessionFetcherSystemCompletionHandler)completionHandler; -#endif - -// Indicate that a newly created session should be a background session. -// A new session identifier will be created by the fetcher. -// -// Warning: The only thing background sessions are for is rare download -// of huge, batched files of data. And even just for those, there's a lot -// of pain and hackery needed to get transfers to actually happen reliably -// with background sessions. -// -// Don't try to upload or download in many background sessions, since the system -// will impose an exponentially increasing time penalty to prevent the app from -// getting too much background execution time. -// -// References: -// -// "Moving to Fewer, Larger Transfers" -// https://forums.developer.apple.com/thread/14853 -// -// "NSURLSession’s Resume Rate Limiter" -// https://forums.developer.apple.com/thread/14854 -// -// "Background Session Task state persistence" -// https://forums.developer.apple.com/thread/11554 -// -@property(assign) BOOL useBackgroundSession; - -// Indicates if the fetcher was started using a background session. -@property(atomic, readonly, getter=isUsingBackgroundSession) BOOL usingBackgroundSession; - -// Indicates if uploads should use an upload task. This is always set for file or stream-provider -// bodies, but may be set explicitly for NSData bodies. -@property(atomic, assign) BOOL useUploadTask; - -// Indicates that the fetcher is using a session that may be shared with other fetchers. -@property(atomic, readonly) BOOL canShareSession; - -// By default, the fetcher allows only secure (https) schemes unless this -// property is set, or the GTM_ALLOW_INSECURE_REQUESTS build flag is set. -// -// For example, during debugging when fetching from a development server that lacks SSL support, -// this may be set to @[ @"http" ], or when the fetcher is used to retrieve local files, -// this may be set to @[ @"file" ]. -// -// This should be left as nil for release builds to avoid creating the opportunity for -// leaking private user behavior and data. If a server is providing insecure URLs -// for fetching by the client app, report the problem as server security & privacy bug. -// -// For builds with the iOS 9/OS X 10.11 and later SDKs, this property is required only when -// the app specifies NSAppTransportSecurity/NSAllowsArbitraryLoads in the main bundle's Info.plist. -@property(atomic, copy, GTM_NULLABLE) GTM_NSArrayOf(NSString *) *allowedInsecureSchemes; - -// By default, the fetcher prohibits localhost requests unless this property is set, -// or the GTM_ALLOW_INSECURE_REQUESTS build flag is set. -// -// For localhost requests, the URL scheme is not checked when this property is set. -// -// For builds with the iOS 9/OS X 10.11 and later SDKs, this property is required only when -// the app specifies NSAppTransportSecurity/NSAllowsArbitraryLoads in the main bundle's Info.plist. -@property(atomic, assign) BOOL allowLocalhostRequest; - -// By default, the fetcher requires valid server certs. This may be bypassed -// temporarily for development against a test server with an invalid cert. -@property(atomic, assign) BOOL allowInvalidServerCertificates; - -// Cookie storage object for this fetcher. If nil, the fetcher will use a static cookie -// storage instance shared among fetchers. If this fetcher was created by a fetcher service -// object, it will be set to use the service object's cookie storage. See Cookies section above for -// the full discussion. -// -// Because as of Jan 2014 standalone instances of NSHTTPCookieStorage do not actually -// store any cookies (Radar 15735276) we use our own subclass, GTMSessionCookieStorage, -// to hold cookies in memory. -@property(atomic, strong, GTM_NULLABLE) NSHTTPCookieStorage *cookieStorage; - -// Setting the credential is optional; it is used if the connection receives -// an authentication challenge. -@property(atomic, strong, GTM_NULLABLE) NSURLCredential *credential; - -// Setting the proxy credential is optional; it is used if the connection -// receives an authentication challenge from a proxy. -@property(atomic, strong, GTM_NULLABLE) NSURLCredential *proxyCredential; - -// If body data, body file URL, or body stream provider is not set, then a GET request -// method is assumed. -@property(atomic, strong, GTM_NULLABLE) NSData *bodyData; - -// File to use as the request body. This forces use of an upload task. -@property(atomic, strong, GTM_NULLABLE) NSURL *bodyFileURL; - -// Length of body to send, expected or actual. -@property(atomic, readonly) int64_t bodyLength; - -// The body stream provider may be called repeatedly to provide a body. -// Setting a body stream provider forces use of an upload task. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherBodyStreamProvider bodyStreamProvider; - -// Object to add authorization to the request, if needed. -// -// This may not be changed once beginFetch has been invoked. -@property(atomic, strong, GTM_NULLABLE) id authorizer; - -// The service object that created and monitors this fetcher, if any. -@property(atomic, strong) id service; - -// The host, if any, used to classify this fetcher in the fetcher service. -@property(atomic, copy, GTM_NULLABLE) NSString *serviceHost; - -// The priority, if any, used for starting fetchers in the fetcher service. -// -// Lower values are higher priority; the default is 0, and values may -// be negative or positive. This priority affects only the start order of -// fetchers that are being delayed by a fetcher service when the running fetchers -// exceeds the service's maxRunningFetchersPerHost. A priority of NSIntegerMin will -// exempt this fetcher from delay. -@property(atomic, assign) NSInteger servicePriority; - -// The delegate's optional didReceiveResponse block may be used to inspect or alter -// the session task response. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherDidReceiveResponseBlock didReceiveResponseBlock; - -// The delegate's optional challenge block may be used to inspect or alter -// the session task challenge. -// -// If this block is not set, the fetcher's default behavior for the NSURLSessionTask -// didReceiveChallenge: delegate method is to use the fetcher's respondToChallenge: method -// which relies on the fetcher's credential and proxyCredential properties. -// -// Warning: This may be called repeatedly if the challenge fails. Check -// challenge.previousFailureCount to identify repeated invocations. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherChallengeBlock challengeBlock; - -// The delegate's optional willRedirect block may be used to inspect or alter -// the redirection. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherWillRedirectBlock willRedirectBlock; - -// The optional send progress block reports body bytes uploaded. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherSendProgressBlock sendProgressBlock; - -// The optional accumulate block may be set by clients wishing to accumulate data -// themselves rather than let the fetcher append each buffer to an NSData. -// -// When this is called with nil data (such as on redirect) the client -// should empty its accumulation buffer. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherAccumulateDataBlock accumulateDataBlock; - -// The optional received progress block may be used to monitor data -// received from a data task. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherReceivedProgressBlock receivedProgressBlock; - -// The delegate's optional downloadProgress block may be used to monitor download -// progress in writing to disk. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherDownloadProgressBlock downloadProgressBlock; - -// The delegate's optional willCacheURLResponse block may be used to alter the cached -// NSURLResponse. The user may prevent caching by passing nil to the block's response. -// -// This is called on the callback queue. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherWillCacheURLResponseBlock willCacheURLResponseBlock; - -// Enable retrying; see comments at the top of this file. Setting -// retryEnabled=YES resets the min and max retry intervals. -@property(atomic, assign, getter=isRetryEnabled) BOOL retryEnabled; - -// Retry block is optional for retries. -// -// If present, this block should call the response block with YES to cause a retry or NO to end the -// fetch. -// See comments at the top of this file. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherRetryBlock retryBlock; - -// Retry intervals must be strictly less than maxRetryInterval, else -// they will be limited to maxRetryInterval and no further retries will -// be attempted. Setting maxRetryInterval to 0.0 will reset it to the -// default value, 60 seconds for downloads and 600 seconds for uploads. -@property(atomic, assign) NSTimeInterval maxRetryInterval; - -// Starting retry interval. Setting minRetryInterval to 0.0 will reset it -// to a random value between 1.0 and 2.0 seconds. Clients should normally not -// set this except for unit testing. -@property(atomic, assign) NSTimeInterval minRetryInterval; - -// Multiplier used to increase the interval between retries, typically 2.0. -// Clients should not need to set this. -@property(atomic, assign) double retryFactor; - -// Number of retries attempted. -@property(atomic, readonly) NSUInteger retryCount; - -// Interval delay to precede next retry. -@property(atomic, readonly) NSTimeInterval nextRetryInterval; - -#if GTM_BACKGROUND_TASK_FETCHING -// Skip use of a UIBackgroundTask, thus requiring fetches to complete when the app is in the -// foreground. -// -// Targets should define GTM_BACKGROUND_TASK_FETCHING to 0 to avoid use of a UIBackgroundTask -// on iOS to allow fetches to complete in the background. This property is available when -// it's not practical to set the preprocessor define. -@property(atomic, assign) BOOL skipBackgroundTask; -#endif // GTM_BACKGROUND_TASK_FETCHING - -// Begin fetching the request -// -// The delegate may optionally implement the callback or pass nil for the selector or handler. -// -// The delegate and all callback blocks are retained between the beginFetch call until after the -// finish callback, or until the fetch is stopped. -// -// An error is passed to the callback for server statuses 300 or -// higher, with the status stored as the error object's code. -// -// finishedSEL has a signature like: -// - (void)fetcher:(GTMSessionFetcher *)fetcher -// finishedWithData:(NSData *)data -// error:(NSError *)error; -// -// If the application has specified a destinationFileURL or an accumulateDataBlock -// for the fetcher, the data parameter passed to the callback will be nil. - -- (void)beginFetchWithDelegate:(GTM_NULLABLE id)delegate - didFinishSelector:(GTM_NULLABLE SEL)finishedSEL; - -- (void)beginFetchWithCompletionHandler:(GTM_NULLABLE GTMSessionFetcherCompletionHandler)handler; - -// Returns YES if this fetcher is in the process of fetching a URL. -@property(atomic, readonly, getter=isFetching) BOOL fetching; - -// Cancel the fetch of the request that's currently in progress. The completion handler -// will not be called. -- (void)stopFetching; - -// A block to be called when the fetch completes. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherCompletionHandler completionHandler; - -// A block to be called if download resume data becomes available. -@property(atomic, strong, GTM_NULLABLE) void (^resumeDataBlock)(NSData *); - -// Return the status code from the server response. -@property(atomic, readonly) NSInteger statusCode; - -// Return the http headers from the response. -@property(atomic, strong, readonly, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, NSString *) *responseHeaders; - -// The response, once it's been received. -@property(atomic, strong, readonly, GTM_NULLABLE) NSURLResponse *response; - -// Bytes downloaded so far. -@property(atomic, readonly) int64_t downloadedLength; - -// Buffer of currently-downloaded data, if available. -@property(atomic, readonly, strong, GTM_NULLABLE) NSData *downloadedData; - -// Local path to which the downloaded file will be moved. -// -// If a file already exists at the path, it will be overwritten. -// Will create the enclosing folders if they are not present. -@property(atomic, strong, GTM_NULLABLE) NSURL *destinationFileURL; - -// The time this fetcher originally began fetching. This is useful as a time -// barrier for ignoring irrelevant fetch notifications or callbacks. -@property(atomic, strong, readonly, GTM_NULLABLE) NSDate *initialBeginFetchDate; - -// userData is retained solely for the convenience of the client. -@property(atomic, strong, GTM_NULLABLE) id userData; - -// Stored property values are retained solely for the convenience of the client. -@property(atomic, copy, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, id) *properties; - -- (void)setProperty:(GTM_NULLABLE id)obj forKey:(NSString *)key; // Pass nil for obj to remove the property. -- (GTM_NULLABLE id)propertyForKey:(NSString *)key; - -- (void)addPropertiesFromDictionary:(GTM_NSDictionaryOf(NSString *, id) *)dict; - -// Comments are useful for logging, so are strongly recommended for each fetcher. -@property(atomic, copy, GTM_NULLABLE) NSString *comment; - -- (void)setCommentWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1, 2); - -// Log of request and response, if logging is enabled -@property(atomic, copy, GTM_NULLABLE) NSString *log; - -// Callbacks are run on this queue. If none is supplied, the main queue is used. -@property(atomic, strong, GTM_NULL_RESETTABLE) dispatch_queue_t callbackQueue; - -// The queue used internally by the session to invoke its delegate methods in the fetcher. -// -// Application callbacks are always called by the fetcher on the callbackQueue above, -// not on this queue. Apps should generally not change this queue. -// -// The default delegate queue is the main queue. -// -// This value is ignored after the session has been created, so this -// property should be set in the fetcher service rather in the fetcher as it applies -// to a shared session. -@property(atomic, strong, GTM_NULL_RESETTABLE) NSOperationQueue *sessionDelegateQueue; - -// Spin the run loop or sleep the thread, discarding events, until the fetch has completed. -// -// This is only for use in testing or in tools without a user interface. -// -// Note: Synchronous fetches should never be used by shipping apps; they are -// sufficient reason for rejection from the app store. -// -// Returns NO if timed out. -- (BOOL)waitForCompletionWithTimeout:(NSTimeInterval)timeoutInSeconds; - -// Test block is optional for testing. -// -// If present, this block will cause the fetcher to skip starting the session, and instead -// use the test block response values when calling the completion handler and delegate code. -// -// Test code can set this on the fetcher or on the fetcher service. For testing libraries -// that use a fetcher without exposing either the fetcher or the fetcher service, the global -// method setGlobalTestBlock: will set the block for all fetchers that do not have a test -// block set. -// -// The test code can pass nil for all response parameters to indicate that the fetch -// should proceed. -// -// Applications can exclude test block support by setting GTM_DISABLE_FETCHER_TEST_BLOCK. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherTestBlock testBlock; - -+ (void)setGlobalTestBlock:(GTM_NULLABLE GTMSessionFetcherTestBlock)block; - -// When using the testBlock, |testBlockAccumulateDataChunkCount| is the desired number of chunks to -// divide the response data into if the client has streaming enabled. The data will be divided up to -// |testBlockAccumulateDataChunkCount| chunks; however, the exact amount may vary depending on the -// size of the response data (e.g. a 1-byte response can only be divided into one chunk). -@property(atomic, readwrite) NSUInteger testBlockAccumulateDataChunkCount; - -#if GTM_BACKGROUND_TASK_FETCHING -// For testing or to override UIApplication invocations, apps may specify an alternative -// target for messages to UIApplication. -+ (void)setSubstituteUIApplication:(nullable id)substituteUIApplication; -+ (nullable id)substituteUIApplication; -#endif // GTM_BACKGROUND_TASK_FETCHING - -// Exposed for testing. -+ (GTMSessionCookieStorage *)staticCookieStorage; -+ (BOOL)appAllowsInsecureRequests; - -#if STRIP_GTM_FETCH_LOGGING -// If logging is stripped, provide a stub for the main method -// for controlling logging. -+ (void)setLoggingEnabled:(BOOL)flag; -+ (BOOL)isLoggingEnabled; - -#else - -// These methods let an application log specific body text, such as the text description of a binary -// request or response. The application should set the fetcher to defer response body logging until -// the response has been received and the log response body has been set by the app. For example: -// -// fetcher.logRequestBody = [binaryObject stringDescription]; -// fetcher.deferResponseBodyLogging = YES; -// [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { -// if (error == nil) { -// fetcher.logResponseBody = [[[MyThing alloc] initWithData:data] stringDescription]; -// } -// fetcher.deferResponseBodyLogging = NO; -// }]; - -@property(atomic, copy, GTM_NULLABLE) NSString *logRequestBody; -@property(atomic, assign) BOOL deferResponseBodyLogging; -@property(atomic, copy, GTM_NULLABLE) NSString *logResponseBody; - -// Internal logging support. -@property(atomic, readonly) NSData *loggedStreamData; -@property(atomic, assign) BOOL hasLoggedError; -@property(atomic, strong, GTM_NULLABLE) NSURL *redirectedFromURL; -- (void)appendLoggedStreamData:(NSData *)dataToAdd; -- (void)clearLoggedStreamData; - -#endif // STRIP_GTM_FETCH_LOGGING - -@end - -@interface GTMSessionFetcher (BackwardsCompatibilityOnly) -// Clients using GTMSessionFetcher should set the cookie storage explicitly themselves. -// This method is just for compatibility with the old GTMHTTPFetcher class. -- (void)setCookieStorageMethod:(NSInteger)method; -@end - -// Until we can just instantiate NSHTTPCookieStorage for local use, we'll -// implement all the public methods ourselves. This stores cookies only in -// memory. Additional methods are provided for testing. -// -// iOS 9/OS X 10.11 added +[NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier:] -// which may also be used to create cookie storage. -@interface GTMSessionCookieStorage : NSHTTPCookieStorage - -// Add the array off cookies to the storage, replacing duplicates. -// Also removes expired cookies from the storage. -- (void)setCookies:(GTM_NULLABLE GTM_NSArrayOf(NSHTTPCookie *) *)cookies; - -- (void)removeAllCookies; - -@end - -// Macros to monitor synchronization blocks in debug builds. -// These report problems using GTMSessionCheckDebug. -// -// GTMSessionMonitorSynchronized Start monitoring a top-level-only -// @sync scope. -// GTMSessionMonitorRecursiveSynchronized Start monitoring a top-level or -// recursive @sync scope. -// GTMSessionCheckSynchronized Verify that the current execution -// is inside a @sync scope. -// GTMSessionCheckNotSynchronized Verify that the current execution -// is not inside a @sync scope. -// -// Example usage: -// -// - (void)myExternalMethod { -// @synchronized(self) { -// GTMSessionMonitorSynchronized(self) -// -// - (void)myInternalMethod { -// GTMSessionCheckSynchronized(self); -// -// - (void)callMyCallbacks { -// GTMSessionCheckNotSynchronized(self); -// -// GTMSessionCheckNotSynchronized is available for verifying the code isn't -// in a deadlockable @sync state when posting notifications and invoking -// callbacks. Don't use GTMSessionCheckNotSynchronized immediately before a -// @sync scope; the normal recursiveness check of GTMSessionMonitorSynchronized -// can catch those. - -#ifdef __OBJC__ -#if DEBUG - #define __GTMSessionMonitorSynchronizedVariableInner(varname, counter) \ - varname ## counter - #define __GTMSessionMonitorSynchronizedVariable(varname, counter) \ - __GTMSessionMonitorSynchronizedVariableInner(varname, counter) - - #define GTMSessionMonitorSynchronized(obj) \ - NS_VALID_UNTIL_END_OF_SCOPE id \ - __GTMSessionMonitorSynchronizedVariable(__monitor, __COUNTER__) = \ - [[GTMSessionSyncMonitorInternal alloc] initWithSynchronizationObject:obj \ - allowRecursive:NO \ - functionName:__func__] - - #define GTMSessionMonitorRecursiveSynchronized(obj) \ - NS_VALID_UNTIL_END_OF_SCOPE id \ - __GTMSessionMonitorSynchronizedVariable(__monitor, __COUNTER__) = \ - [[GTMSessionSyncMonitorInternal alloc] initWithSynchronizationObject:obj \ - allowRecursive:YES \ - functionName:__func__] - - #define GTMSessionCheckSynchronized(obj) { \ - GTMSESSION_ASSERT_DEBUG( \ - [GTMSessionSyncMonitorInternal functionsHoldingSynchronizationOnObject:obj], \ - @"GTMSessionCheckSynchronized(" #obj ") failed: not sync'd" \ - @" on " #obj " in %s. Call stack:\n%@", \ - __func__, [NSThread callStackSymbols]); \ - } - - #define GTMSessionCheckNotSynchronized(obj) { \ - GTMSESSION_ASSERT_DEBUG( \ - ![GTMSessionSyncMonitorInternal functionsHoldingSynchronizationOnObject:obj], \ - @"GTMSessionCheckNotSynchronized(" #obj ") failed: was sync'd" \ - @" on " #obj " in %s by %@. Call stack:\n%@", __func__, \ - [GTMSessionSyncMonitorInternal functionsHoldingSynchronizationOnObject:obj], \ - [NSThread callStackSymbols]); \ - } - -// GTMSessionSyncMonitorInternal is a private class that keeps track of the -// beginning and end of synchronized scopes. -// -// This class should not be used directly, but only via the -// GTMSessionMonitorSynchronized macro. -@interface GTMSessionSyncMonitorInternal : NSObject -- (instancetype)initWithSynchronizationObject:(id)object - allowRecursive:(BOOL)allowRecursive - functionName:(const char *)functionName; -// Return the names of the functions that hold sync on the object, or nil if none. -+ (NSArray *)functionsHoldingSynchronizationOnObject:(id)object; -@end - -#else - #define GTMSessionMonitorSynchronized(obj) do { } while (0) - #define GTMSessionMonitorRecursiveSynchronized(obj) do { } while (0) - #define GTMSessionCheckSynchronized(obj) do { } while (0) - #define GTMSessionCheckNotSynchronized(obj) do { } while (0) -#endif // !DEBUG -#endif // __OBJC__ - - -GTM_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMSessionFetcherLogging.h b/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMSessionFetcherLogging.h deleted file mode 100644 index 5ccea78e5..000000000 --- a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMSessionFetcherLogging.h +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * 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 "GTMSessionFetcher.h" - -// GTM HTTP Logging -// -// All traffic using GTMSessionFetcher can be easily logged. Call -// -// [GTMSessionFetcher setLoggingEnabled:YES]; -// -// to begin generating log files. -// -// Unless explicitly set by the application using +setLoggingDirectory:, -// logs are put into a default directory, located at: -// * macOS: ~/Desktop/GTMHTTPDebugLogs -// * iOS simulator: ~/GTMHTTPDebugLogs (in application sandbox) -// * iOS device: ~/Documents/GTMHTTPDebugLogs (in application sandbox) -// -// Tip: use the Finder's "Sort By Date" to find the most recent logs. -// -// Each run of an application gets a separate set of log files. An html -// file is generated to simplify browsing the run's http transactions. -// The html file includes javascript links for inline viewing of uploaded -// and downloaded data. -// -// A symlink is created in the logs folder to simplify finding the html file -// for the latest run of the application; the symlink is called -// -// AppName_http_log_newest.html -// -// For better viewing of XML logs, use Camino or Firefox rather than Safari. -// -// Each fetcher may be given a comment to be inserted as a label in the logs, -// such as -// [fetcher setCommentWithFormat:@"retrieve item %@", itemName]; -// -// Projects may define STRIP_GTM_FETCH_LOGGING to remove logging code. - -#if !STRIP_GTM_FETCH_LOGGING - -@interface GTMSessionFetcher (GTMSessionFetcherLogging) - -// Note: on macOS the default logs directory is ~/Desktop/GTMHTTPDebugLogs; on -// iOS simulators it will be the ~/GTMHTTPDebugLogs (in the app sandbox); on -// iOS devices it will be in ~/Documents/GTMHTTPDebugLogs (in the app sandbox). -// These directories will be created as needed, and are excluded from backups -// to iCloud and iTunes. -// -// If a custom directory is set, the directory should already exist. It is -// the application's responsibility to exclude any custom directory from -// backups, if desired. -+ (void)setLoggingDirectory:(NSString *)path; -+ (NSString *)loggingDirectory; - -// client apps can turn logging on and off -+ (void)setLoggingEnabled:(BOOL)isLoggingEnabled; -+ (BOOL)isLoggingEnabled; - -// client apps can turn off logging to a file if they want to only check -// the fetcher's log property -+ (void)setLoggingToFileEnabled:(BOOL)isLoggingToFileEnabled; -+ (BOOL)isLoggingToFileEnabled; - -// client apps can optionally specify process name and date string used in -// log file names -+ (void)setLoggingProcessName:(NSString *)processName; -+ (NSString *)loggingProcessName; - -+ (void)setLoggingDateStamp:(NSString *)dateStamp; -+ (NSString *)loggingDateStamp; - -// client apps can specify the directory for the log for this specific run, -// typically to match the directory used by another fetcher class, like: -// -// [GTMSessionFetcher setLogDirectoryForCurrentRun:[GTMHTTPFetcher logDirectoryForCurrentRun]]; -// -// Setting this overrides the logging directory, process name, and date stamp when writing -// the log file. -+ (void)setLogDirectoryForCurrentRun:(NSString *)logDirectoryForCurrentRun; -+ (NSString *)logDirectoryForCurrentRun; - -// Prunes old log directories that have not been modified since the provided date. -// This will not delete the current run's log directory. -+ (void)deleteLogDirectoriesOlderThanDate:(NSDate *)date; - -// internal; called by fetcher -- (void)logFetchWithError:(NSError *)error; -- (NSInputStream *)loggedInputStreamForInputStream:(NSInputStream *)inputStream; -- (GTMSessionFetcherBodyStreamProvider)loggedStreamProviderForStreamProvider: - (GTMSessionFetcherBodyStreamProvider)streamProvider; - -// internal; accessors useful for viewing logs -+ (NSString *)processNameLogPrefix; -+ (NSString *)symlinkNameSuffix; -+ (NSString *)htmlFileName; - -@end - -#endif // !STRIP_GTM_FETCH_LOGGING diff --git a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMSessionFetcherService.h b/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMSessionFetcherService.h deleted file mode 100644 index a696ac7e4..000000000 --- a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMSessionFetcherService.h +++ /dev/null @@ -1,190 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * 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. - */ - -// For best performance and convenient usage, fetchers should be generated by a common -// GTMSessionFetcherService instance, like -// -// _fetcherService = [[GTMSessionFetcherService alloc] init]; -// GTMSessionFetcher* myFirstFetcher = [_fetcherService fetcherWithRequest:request1]; -// GTMSessionFetcher* mySecondFetcher = [_fetcherService fetcherWithRequest:request2]; - -#import "GTMSessionFetcher.h" - -GTM_ASSUME_NONNULL_BEGIN - -// Notifications. - -// This notification indicates a reusable session has become invalid. It is intended mainly for the -// service's unit tests. -// -// The notification object is the fetcher service. -// The invalid session is provided via the userInfo kGTMSessionFetcherServiceSessionKey key. -extern NSString *const kGTMSessionFetcherServiceSessionBecameInvalidNotification; -extern NSString *const kGTMSessionFetcherServiceSessionKey; - -@interface GTMSessionFetcherService : NSObject - -// Queues of delayed and running fetchers. Each dictionary contains arrays -// of GTMSessionFetcher *fetchers, keyed by NSString *host -@property(atomic, strong, readonly, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, NSArray *) *delayedFetchersByHost; -@property(atomic, strong, readonly, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, NSArray *) *runningFetchersByHost; - -// A max value of 0 means no fetchers should be delayed. -// The default limit is 10 simultaneous fetchers targeting each host. -// This does not apply to fetchers whose useBackgroundSession property is YES. Since services are -// not resurrected on an app relaunch, delayed fetchers would effectively be abandoned. -@property(atomic, assign) NSUInteger maxRunningFetchersPerHost; - -// Properties to be applied to each fetcher; see GTMSessionFetcher.h for descriptions -@property(atomic, strong, GTM_NULLABLE) NSURLSessionConfiguration *configuration; -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherConfigurationBlock configurationBlock; -@property(atomic, strong, GTM_NULLABLE) NSHTTPCookieStorage *cookieStorage; -@property(atomic, strong, GTM_NULL_RESETTABLE) dispatch_queue_t callbackQueue; -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherChallengeBlock challengeBlock; -@property(atomic, strong, GTM_NULLABLE) NSURLCredential *credential; -@property(atomic, strong) NSURLCredential *proxyCredential; -@property(atomic, copy, GTM_NULLABLE) GTM_NSArrayOf(NSString *) *allowedInsecureSchemes; -@property(atomic, assign) BOOL allowLocalhostRequest; -@property(atomic, assign) BOOL allowInvalidServerCertificates; -@property(atomic, assign, getter=isRetryEnabled) BOOL retryEnabled; -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherRetryBlock retryBlock; -@property(atomic, assign) NSTimeInterval maxRetryInterval; -@property(atomic, assign) NSTimeInterval minRetryInterval; -@property(atomic, copy, GTM_NULLABLE) GTM_NSDictionaryOf(NSString *, id) *properties; - -#if GTM_BACKGROUND_TASK_FETCHING -@property(atomic, assign) BOOL skipBackgroundTask; -#endif - -// A default useragent of GTMFetcherStandardUserAgentString(nil) will be given to each fetcher -// created by this service unless the request already has a user-agent header set. -// This default will be added starting with builds with the SDKs for OS X 10.11 and iOS 9. -// -// To use the configuration's default user agent, set this property to nil. -@property(atomic, copy, GTM_NULLABLE) NSString *userAgent; - -// The authorizer to attach to the created fetchers. If a specific fetcher should -// not authorize its requests, the fetcher's authorizer property may be set to nil -// before the fetch begins. -@property(atomic, strong, GTM_NULLABLE) id authorizer; - -// Delegate queue used by the session when calling back to the fetcher. The default -// is the main queue. Changing this does not affect the queue used to call back to the -// application; that is specified by the callbackQueue property above. -@property(atomic, strong, GTM_NULL_RESETTABLE) NSOperationQueue *sessionDelegateQueue; - -// When enabled, indicates the same session should be used by subsequent fetchers. -// -// This is enabled by default. -@property(atomic, assign) BOOL reuseSession; - -// Sets the delay until an unused session is invalidated. -// The default interval is 60 seconds. -// -// If the interval is set to 0, then any reused session is not invalidated except by -// explicitly invoking -resetSession. Be aware that setting the interval to 0 thus -// causes the session's delegate to be retained until the session is explicitly reset. -@property(atomic, assign) NSTimeInterval unusedSessionTimeout; - -// If shouldReuseSession is enabled, this will force creation of a new session when future -// fetchers begin. -- (void)resetSession; - -// Create a fetcher -// -// These methods will return a fetcher. If successfully created, the connection -// will hold a strong reference to it for the life of the connection as well. -// So the caller doesn't have to hold onto the fetcher explicitly unless they -// want to be able to monitor or cancel it. -- (GTMSessionFetcher *)fetcherWithRequest:(NSURLRequest *)request; -- (GTMSessionFetcher *)fetcherWithURL:(NSURL *)requestURL; -- (GTMSessionFetcher *)fetcherWithURLString:(NSString *)requestURLString; - -// Common method for fetcher creation. -// -// -fetcherWithRequest:fetcherClass: may be overridden to customize creation of -// fetchers. This is the ONLY method in the GTMSessionFetcher library intended to -// be overridden. -- (id)fetcherWithRequest:(NSURLRequest *)request - fetcherClass:(Class)fetcherClass; - -- (BOOL)isDelayingFetcher:(GTMSessionFetcher *)fetcher; - -- (NSUInteger)numberOfFetchers; // running + delayed fetchers -- (NSUInteger)numberOfRunningFetchers; -- (NSUInteger)numberOfDelayedFetchers; - -// Return a list of all running or delayed fetchers. This includes fetchers created -// by the service which have been started and have not yet stopped. -// -// Returns an array of fetcher objects, or nil if none. -- (GTM_NULLABLE GTM_NSArrayOf(GTMSessionFetcher *) *)issuedFetchers; - -// Search for running or delayed fetchers with the specified URL. -// -// Returns an array of fetcher objects found, or nil if none found. -- (GTM_NULLABLE GTM_NSArrayOf(GTMSessionFetcher *) *)issuedFetchersWithRequestURL:(NSURL *)requestURL; - -- (void)stopAllFetchers; - -// Methods for use by the fetcher class only. -- (GTM_NULLABLE NSURLSession *)session; -- (GTM_NULLABLE NSURLSession *)sessionForFetcherCreation; -- (GTM_NULLABLE id)sessionDelegate; -- (GTM_NULLABLE NSDate *)stoppedAllFetchersDate; - -// The testBlock can inspect its fetcher parameter's request property to -// determine which fetcher is being faked. -@property(atomic, copy, GTM_NULLABLE) GTMSessionFetcherTestBlock testBlock; - -@end - -@interface GTMSessionFetcherService (TestingSupport) - -// Convenience method to create a fetcher service for testing. -// -// Fetchers generated by this mock fetcher service will not perform any -// network operation, but will invoke callbacks and provide the supplied data -// or error to the completion handler. -// -// You can make more customized mocks by setting the test block property of the service -// or fetcher; the test block can inspect the fetcher's request or other properties. -// -// See the description of the testBlock property below. -+ (instancetype)mockFetcherServiceWithFakedData:(GTM_NULLABLE NSData *)fakedDataOrNil - fakedError:(GTM_NULLABLE NSError *)fakedErrorOrNil; - -// Spin the run loop and discard events (or, if not on the main thread, just sleep the thread) -// until all running and delayed fetchers have completed. -// -// This is only for use in testing or in tools without a user interface. -// -// Synchronous fetches should never be done by shipping apps; they are -// sufficient reason for rejection from the app store. -// -// Returns NO if timed out. -- (BOOL)waitForCompletionOfAllFetchersWithTimeout:(NSTimeInterval)timeoutInSeconds; - -@end - -@interface GTMSessionFetcherService (BackwardsCompatibilityOnly) - -// Clients using GTMSessionFetcher should set the cookie storage explicitly themselves. -// This method is just for compatibility with the old fetcher. -@property(atomic, assign) NSInteger cookieStorageMethod; - -@end - -GTM_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMSessionUploadFetcher.h b/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMSessionUploadFetcher.h deleted file mode 100644 index a098ce9bf..000000000 --- a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Headers/GTMSessionUploadFetcher.h +++ /dev/null @@ -1,166 +0,0 @@ -/* Copyright 2014 Google Inc. All rights reserved. - * - * 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. - */ - -// GTMSessionUploadFetcher implements Google's resumable upload protocol. - -// -// This subclass of GTMSessionFetcher simulates the series of fetches -// needed for chunked upload as a single fetch operation. -// -// Protocol document: TBD -// -// To the client, the only fetcher that exists is this class; the subsidiary -// fetchers needed for uploading chunks are not visible (though the most recent -// chunk fetcher may be accessed via the -activeFetcher or -chunkFetcher methods, and -// -responseHeaders and -statusCode reflect results from the most recent chunk -// fetcher.) -// -// Chunk fetchers are discarded as soon as they have completed. -// -// The protocol also allows for a cancellation notification request to be sent to the -// server to allow discarding of the currently uploaded data and this will be sent -// automatically upon calling stopFetching if the upload has already started. -// -// Note: Unlike the fetcher superclass, the methods of GTMSessionUploadFetcher should -// only be used from the main thread until further work is done to make this subclass -// thread-safe. - -#import "GTMSessionFetcher.h" -#import "GTMSessionFetcherService.h" - -GTM_ASSUME_NONNULL_BEGIN - -// The value to use for file size parameters when the file size is not yet known. -extern int64_t const kGTMSessionUploadFetcherUnknownFileSize; - -// Unless an application knows it needs a smaller chunk size, it should use the standard -// chunk size, which sends the entire file as a single chunk to minimize upload overhead. -// Setting an explicit chunk size that comfortably fits in memory is advisable for large -// uploads. -extern int64_t const kGTMSessionUploadFetcherStandardChunkSize; - -// When uploading requires data buffer allocations (such as uploading from an NSData or -// an NSFileHandle) this is the maximum buffer size that will be created by the fetcher. -extern int64_t const kGTMSessionUploadFetcherMaximumDemandBufferSize; - -// Notification that the upload location URL was provided by the server. -extern NSString *const kGTMSessionFetcherUploadLocationObtainedNotification; - -// Block to provide data during uploads. -// -// Response data may be allocated with dataWithBytesNoCopy:length:freeWhenDone: for efficiency, -// and released after the response block returns. -// -// If the length of the file being uploaded is unknown or already set, send -// kGTMSessionUploadFetcherUnknownFileSize for |fullUploadLength|. Otherwise, set |fullUploadLength| -// to its proper value. -// -// Pass nil as the data (and optionally an NSError) for a failure. -typedef void (^GTMSessionUploadFetcherDataProviderResponse)(NSData * GTM_NULLABLE_TYPE data, - int64_t fullUploadLength, - NSError * GTM_NULLABLE_TYPE error); -// Do not call the response with an NSData object with less data than the requested length unless -// you are passing the fullUploadLength to the fetcher for the first time and it is the last chunk -// of data in the file being uploaded. -typedef void (^GTMSessionUploadFetcherDataProvider)(int64_t offset, int64_t length, - GTMSessionUploadFetcherDataProviderResponse response); - -// Block to be notified about the final status of the cancellation request started in stopFetching. -// -// |fetcher| will be the cancel request that was sent to the server, or nil if stopFetching is not -// going to send a cancel request. If |fetcher| is provided, the other parameters correspond to the -// completion handler of the cancellation request fetcher. -typedef void (^GTMSessionUploadFetcherCancellationHandler)( - GTMSessionFetcher * GTM_NULLABLE_TYPE fetcher, - NSData * GTM_NULLABLE_TYPE data, - NSError * GTM_NULLABLE_TYPE error); - -@interface GTMSessionUploadFetcher : GTMSessionFetcher - -// Create an upload fetcher specifying either the request or the resume location URL, -// then set an upload data source using one of these: -// -// setUploadFileURL: -// setUploadDataLength:provider: -// setUploadFileHandle: -// setUploadData: - -+ (instancetype)uploadFetcherWithRequest:(NSURLRequest *)request - uploadMIMEType:(NSString *)uploadMIMEType - chunkSize:(int64_t)chunkSize - fetcherService:(GTM_NULLABLE GTMSessionFetcherService *)fetcherServiceOrNil; - -+ (instancetype)uploadFetcherWithLocation:(NSURL * GTM_NULLABLE_TYPE)uploadLocationURL - uploadMIMEType:(NSString *)uploadMIMEType - chunkSize:(int64_t)chunkSize - fetcherService:(GTM_NULLABLE GTMSessionFetcherService *)fetcherServiceOrNil; - -// Allows dataProviders for files of unknown length. Pass kGTMSessionUploadFetcherUnknownFileSize as -// |fullLength| if the length is unknown. -- (void)setUploadDataLength:(int64_t)fullLength - provider:(GTM_NULLABLE GTMSessionUploadFetcherDataProvider)block; - -+ (NSArray *)uploadFetchersForBackgroundSessions; -+ (GTM_NULLABLE instancetype)uploadFetcherForSessionIdentifier:(NSString *)sessionIdentifier; - -- (void)pauseFetching; -- (void)resumeFetching; -- (BOOL)isPaused; - -@property(atomic, strong, GTM_NULLABLE) NSURL *uploadLocationURL; -@property(atomic, strong, GTM_NULLABLE) NSData *uploadData; -@property(atomic, strong, GTM_NULLABLE) NSURL *uploadFileURL; -@property(atomic, strong, GTM_NULLABLE) NSFileHandle *uploadFileHandle; -@property(atomic, copy, readonly, GTM_NULLABLE) GTMSessionUploadFetcherDataProvider uploadDataProvider; -@property(atomic, copy) NSString *uploadMIMEType; -@property(atomic, assign) int64_t chunkSize; -@property(atomic, readonly, assign) int64_t currentOffset; - -// The fetcher for the current data chunk, if any -@property(atomic, strong, GTM_NULLABLE) GTMSessionFetcher *chunkFetcher; - -// The active fetcher is the current chunk fetcher, or the upload fetcher itself -// if no chunk fetcher has yet been created. -@property(atomic, readonly) GTMSessionFetcher *activeFetcher; - -// The last request made by an active fetcher. Useful for testing. -@property(atomic, readonly, GTM_NULLABLE) NSURLRequest *lastChunkRequest; - -// The status code from the most recently-completed fetch. -@property(atomic, assign) NSInteger statusCode; - -// Invoked as part of the stop fetching process. Invoked immediately if there is no upload in -// progress, otherwise invoked with the results of the attempt to notify the server that the -// upload will not continue. -// -// Unlike other callbacks, since this is related specifically to the stopFetching flow it is not -// cleared by stopFetching. It will instead clear itself after it is invoked or if the completion -// has occured before stopFetching is called. -@property(atomic, copy, GTM_NULLABLE) GTMSessionUploadFetcherCancellationHandler - cancellationHandler; - -// Exposed for testing only. -@property(atomic, readonly, GTM_NULLABLE) dispatch_queue_t delegateCallbackQueue; -@property(atomic, readonly, GTM_NULLABLE) GTMSessionFetcherCompletionHandler delegateCompletionHandler; - -@end - -@interface GTMSessionFetcher (GTMSessionUploadFetcherMethods) - -@property(readonly, GTM_NULLABLE) GTMSessionUploadFetcher *parentUploadFetcher; - -@end - -GTM_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Modules/module.modulemap b/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Modules/module.modulemap deleted file mode 100644 index a0449c56d..000000000 --- a/src/ios/Firebase/Auth/GTMSessionFetcher.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module GTMSessionFetcher { - umbrella header "GTMSessionFetcher.h" - export * - module * { export *} - link framework "Security" -} diff --git a/src/ios/Firebase/Firebase.h b/src/ios/Firebase/Firebase.h deleted file mode 100644 index 6461547d8..000000000 --- a/src/ios/Firebase/Firebase.h +++ /dev/null @@ -1,105 +0,0 @@ -#import - -#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 - #else - #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING - #warning "FirebaseAnalytics.framework is not included in your target. Please add \ -`Firebase/Core` to your Podfile or add FirebaseAnalytics.framework to your project to ensure \ -Firebase services work as intended." - #endif // #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - - #if __has_include() - #import - #endif - -#endif // defined(__has_include) diff --git a/src/ios/Firebase/Messaging/FirebaseMessaging.framework/FirebaseMessaging b/src/ios/Firebase/Messaging/FirebaseMessaging.framework/FirebaseMessaging deleted file mode 100644 index fb7ee7636..000000000 Binary files a/src/ios/Firebase/Messaging/FirebaseMessaging.framework/FirebaseMessaging and /dev/null differ diff --git a/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FIRMessaging.h b/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FIRMessaging.h deleted file mode 100644 index e58a216c2..000000000 --- a/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FIRMessaging.h +++ /dev/null @@ -1,527 +0,0 @@ -/* - * 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 - -NS_ASSUME_NONNULL_BEGIN - -/** - * @related FIRMessaging - * - * The completion handler invoked when the registration token returns. - * If the call fails we return the appropriate `error code`, described by - * `FIRMessagingError`. - * - * @param FCMToken The valid registration token returned by FCM. - * @param error The error describing why a token request failed. The error code - * will match a value from the FIRMessagingError enumeration. - */ -typedef void(^FIRMessagingFCMTokenFetchCompletion)(NSString * _Nullable FCMToken, - NSError * _Nullable error) - NS_SWIFT_NAME(MessagingFCMTokenFetchCompletion); - - -/** - * @related FIRMessaging - * - * The completion handler invoked when the registration token deletion request is - * completed. If the call fails we return the appropriate `error code`, described - * by `FIRMessagingError`. - * - * @param error The error describing why a token deletion failed. The error code - * will match a value from the FIRMessagingError enumeration. - */ -typedef void(^FIRMessagingDeleteFCMTokenCompletion)(NSError * _Nullable error) - NS_SWIFT_NAME(MessagingDeleteFCMTokenCompletion); - -/** - * Callback to invoke once the HTTP call to FIRMessaging backend for updating - * subscription finishes. - * - * @param error The error which occurred while updating the subscription topic - * on the FIRMessaging server. This will be nil in case the operation - * was successful, or if the operation was cancelled. - */ -typedef void (^FIRMessagingTopicOperationCompletion)(NSError *_Nullable error); - -/** - * The completion handler invoked once the data connection with FIRMessaging is - * established. The data connection is used to send a continous stream of - * data and all the FIRMessaging data notifications arrive through this connection. - * Once the connection is established we invoke the callback with `nil` error. - * Correspondingly if we get an error while trying to establish a connection - * we invoke the handler with an appropriate error object and do an - * exponential backoff to try and connect again unless successful. - * - * @param error The error object if any describing why the data connection - * to FIRMessaging failed. - */ -typedef void(^FIRMessagingConnectCompletion)(NSError * __nullable error) - NS_SWIFT_NAME(MessagingConnectCompletion) - __deprecated_msg("Please listen for the FIRMessagingConnectionStateChangedNotification " - "NSNotification instead."); - -#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 -/** - * Notification sent when the upstream message has been delivered - * successfully to the server. The notification object will be the messageID - * of the successfully delivered message. - */ -FOUNDATION_EXPORT const NSNotificationName FIRMessagingSendSuccessNotification - NS_SWIFT_NAME(MessagingSendSuccess); - -/** - * Notification sent when the upstream message was failed to be sent to the - * server. The notification object will be the messageID of the failed - * message. The userInfo dictionary will contain the relevant error - * information for the failure. - */ -FOUNDATION_EXPORT const NSNotificationName FIRMessagingSendErrorNotification - NS_SWIFT_NAME(MessagingSendError); - -/** - * Notification sent when the Firebase messaging server deletes pending - * messages due to exceeded storage limits. This may occur, for example, when - * the device cannot be reached for an extended period of time. - * - * It is recommended to retrieve any missing messages directly from the - * server. - */ -FOUNDATION_EXPORT const NSNotificationName FIRMessagingMessagesDeletedNotification - NS_SWIFT_NAME(MessagingMessagesDeleted); - -/** - * Notification sent when Firebase Messaging establishes or disconnects from - * an FCM socket connection. You can query the connection state in this - * notification by checking the `isDirectChannelEstablished` property of FIRMessaging. - */ -FOUNDATION_EXPORT const NSNotificationName FIRMessagingConnectionStateChangedNotification - NS_SWIFT_NAME(MessagingConnectionStateChanged); - -/** - * Notification sent when the FCM registration token has been refreshed. Please use the - * FIRMessaging delegate method `messaging:didReceiveRegistrationToken:` to receive current and - * updated tokens. - */ -FOUNDATION_EXPORT const NSNotificationName - FIRMessagingRegistrationTokenRefreshedNotification - NS_SWIFT_NAME(MessagingRegistrationTokenRefreshed); -#else -/** - * Notification sent when the upstream message has been delivered - * successfully to the server. The notification object will be the messageID - * of the successfully delivered message. - */ -FOUNDATION_EXPORT NSString *const FIRMessagingSendSuccessNotification - NS_SWIFT_NAME(MessagingSendSuccessNotification); - -/** - * Notification sent when the upstream message was failed to be sent to the - * server. The notification object will be the messageID of the failed - * message. The userInfo dictionary will contain the relevant error - * information for the failure. - */ -FOUNDATION_EXPORT NSString *const FIRMessagingSendErrorNotification - NS_SWIFT_NAME(MessagingSendErrorNotification); - -/** - * Notification sent when the Firebase messaging server deletes pending - * messages due to exceeded storage limits. This may occur, for example, when - * the device cannot be reached for an extended period of time. - * - * It is recommended to retrieve any missing messages directly from the - * server. - */ -FOUNDATION_EXPORT NSString *const FIRMessagingMessagesDeletedNotification - NS_SWIFT_NAME(MessagingMessagesDeletedNotification); - -/** - * Notification sent when Firebase Messaging establishes or disconnects from - * an FCM socket connection. You can query the connection state in this - * notification by checking the `isDirectChannelEstablished` property of FIRMessaging. - */ -FOUNDATION_EXPORT NSString *const FIRMessagingConnectionStateChangedNotification - NS_SWIFT_NAME(MessagingConnectionStateChangedNotification); - -/** - * Notification sent when the FCM registration token has been refreshed. Please use the - * FIRMessaging delegate method `messaging:didReceiveRegistrationToken:` to receive current and - * updated tokens. - */ -FOUNDATION_EXPORT NSString *const FIRMessagingRegistrationTokenRefreshedNotification - NS_SWIFT_NAME(MessagingRegistrationTokenRefreshedNotification); -#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 - -/** - * @enum FIRMessagingError - */ -typedef NS_ENUM(NSUInteger, FIRMessagingError) { - /// Unknown error. - FIRMessagingErrorUnknown = 0, - - /// FIRMessaging couldn't validate request from this client. - FIRMessagingErrorAuthentication = 1, - - /// InstanceID service cannot be accessed. - FIRMessagingErrorNoAccess = 2, - - /// Request to InstanceID backend timed out. - FIRMessagingErrorTimeout = 3, - - /// No network available to reach the servers. - FIRMessagingErrorNetwork = 4, - - /// Another similar operation in progress, bailing this one. - FIRMessagingErrorOperationInProgress = 5, - - /// Some parameters of the request were invalid. - FIRMessagingErrorInvalidRequest = 7, -} NS_SWIFT_NAME(MessagingError); - -/// Status for the downstream message received by the app. -typedef NS_ENUM(NSInteger, FIRMessagingMessageStatus) { - /// Unknown status. - FIRMessagingMessageStatusUnknown, - /// New downstream message received by the app. - FIRMessagingMessageStatusNew, -} NS_SWIFT_NAME(MessagingMessageStatus); - -/** - * The APNS token type for the app. If the token type is set to `UNKNOWN` - * Firebase Messaging will implicitly try to figure out what the actual token type - * is from the provisioning profile. - * Unless you really need to specify the type, you should use the `APNSToken` - * property instead. - */ -typedef NS_ENUM(NSInteger, FIRMessagingAPNSTokenType) { - /// Unknown token type. - FIRMessagingAPNSTokenTypeUnknown, - /// Sandbox token type. - FIRMessagingAPNSTokenTypeSandbox, - /// Production token type. - FIRMessagingAPNSTokenTypeProd, -} NS_SWIFT_NAME(MessagingAPNSTokenType); - -/// Information about a downstream message received by the app. -NS_SWIFT_NAME(MessagingMessageInfo) -@interface FIRMessagingMessageInfo : NSObject - -/// The status of the downstream message -@property(nonatomic, readonly, assign) FIRMessagingMessageStatus status; - -@end - -/** - * A remote data message received by the app via FCM (not just the APNs interface). - * - * This is only for devices running iOS 10 or above. To support devices running iOS 9 or below, use - * the local and remote notifications handlers defined in UIApplicationDelegate protocol. - */ -NS_SWIFT_NAME(MessagingRemoteMessage) -@interface FIRMessagingRemoteMessage : NSObject - -/// The downstream message received by the application. -@property(nonatomic, readonly, strong) NSDictionary *appData; -@end - -@class FIRMessaging; -/** - * A protocol to handle token update or data message delivery from FCM. - * - */ -NS_SWIFT_NAME(MessagingDelegate) -@protocol FIRMessagingDelegate - -@optional -/// This method will be called once a token is available, or has been refreshed. Typically it -/// will be called once per app start, but may be called more often, if token is invalidated or -/// updated. In this method, you should perform operations such as: -/// -/// * Uploading the FCM token to your application server, so targeted notifications can be sent. -/// -/// * Subscribing to any topics. -- (void)messaging:(FIRMessaging *)messaging - didReceiveRegistrationToken:(NSString *)fcmToken - NS_SWIFT_NAME(messaging(_:didReceiveRegistrationToken:)); - -/// This method is called on iOS 10 devices to handle data messages received via FCM through its -/// direct channel (not via APNS). For iOS 9 and below, the FCM data message is delivered via the -/// UIApplicationDelegate's -application:didReceiveRemoteNotification: method. -- (void)messaging:(FIRMessaging *)messaging - didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage - NS_SWIFT_NAME(messaging(_:didReceive:)) - __IOS_AVAILABLE(10.0); - -@end - -/** - * Firebase Messaging lets you reliably deliver messages at no cost. - * - * To send or receive messages, the app must get a - * registration token from FIRInstanceID. This token authorizes an - * app server to send messages to an app instance. - * - * In order to receive FIRMessaging messages, declare `application:didReceiveRemoteNotification:`. - */ -NS_SWIFT_NAME(Messaging) -@interface FIRMessaging : NSObject - -/** - * Delegate to handle FCM token refreshes, and remote data messages received via FCM for devices - * running iOS 10 or above. - */ -@property(nonatomic, weak, nullable) id delegate; - -/** - * When set to `YES`, Firebase Messaging will automatically establish a socket-based, direct - * channel to the FCM server. Enable this only if you are sending upstream messages or - * receiving non-APNS, data-only messages in foregrounded apps. - * Default is `NO`. - */ -@property(nonatomic) BOOL shouldEstablishDirectChannel; - -/** - * Returns `YES` if the direct channel to the FCM server is active, and `NO` otherwise. - */ -@property(nonatomic, readonly) BOOL isDirectChannelEstablished; - -/** - * FIRMessaging - * - * @return An instance of FIRMessaging. - */ -+ (instancetype)messaging NS_SWIFT_NAME(messaging()); - -/** - * Unavailable. Use +messaging instead. - */ -- (instancetype)init __attribute__((unavailable("Use +messaging instead."))); - -#pragma mark - APNS - -/** - * This property is used to set the APNS Token received by the application delegate. - * - * FIRMessaging uses method swizzling to ensure that the APNS token is set - * automatically. However, if you have disabled swizzling by setting - * `FirebaseAppDelegateProxyEnabled` to `NO` in your app's - * Info.plist, you should manually set the APNS token in your application - * delegate's `-application:didRegisterForRemoteNotificationsWithDeviceToken:` - * method. - * - * If you would like to set the type of the APNS token, rather than relying on - * automatic detection, see: `-setAPNSToken:type:`. - */ -@property(nonatomic, copy, nullable) NSData *APNSToken NS_SWIFT_NAME(apnsToken); - -/** - * Set APNS token for the application. This APNS token will be used to register - * with Firebase Messaging using `FCMToken` or - * `tokenWithAuthorizedEntity:scope:options:handler`. - * - * @param apnsToken The APNS token for the application. - * @param type The type of APNS token. Debug builds should use - * FIRMessagingAPNSTokenTypeSandbox. Alternatively, you can supply - * FIRMessagingAPNSTokenTypeUnknown to have the type automatically - * detected based on your provisioning profile. - */ -- (void)setAPNSToken:(NSData *)apnsToken type:(FIRMessagingAPNSTokenType)type; - -#pragma mark - FCM Tokens - -/** - * Is Firebase Messaging token auto generation enabled? If this flag is disabled, - * Firebase Messaging will not generate token automatically for message delivery. - * - * If this flag is disabled, Firebase Messaging does not generate new tokens automatically for - * message delivery. If this flag is enabled, FCM generates a registration token on application - * start when there is no existing valid token. FCM also generates a new token when an existing - * token is deleted. - * - * This setting is persisted, and is applied on future - * invocations of your application. Once explicitly set, it overrides any - * settings in your Info.plist. - * - * By default, FCM automatic initialization is enabled. If you need to change the - * default (for example, because you want to prompt the user before getting token) - * set FirebaseMessagingAutoInitEnabled to false in your application's Info.plist. - */ -@property(nonatomic, assign, getter=isAutoInitEnabled) BOOL autoInitEnabled; - -/** - * The FCM token is used to identify this device so that FCM can send notifications to it. - * It is associated with your APNS token when the APNS token is supplied, so that sending - * messages to the FCM token will be delivered over APNS. - * - * The FCM token is sometimes refreshed automatically. In your FIRMessaging delegate, the - * delegate method `messaging:didReceiveRegistrationToken:` will be called once a token is - * available, or has been refreshed. Typically it should be called once per app start, but - * may be called more often, if token is invalidated or updated. - * - * Once you have an FCM token, you should send it to your application server, so it can use - * the FCM token to send notifications to your device. - */ -@property(nonatomic, readonly, nullable) NSString *FCMToken NS_SWIFT_NAME(fcmToken); - - -/** - * Retrieves an FCM registration token for a particular Sender ID. This can be used to allow - * multiple senders to send notifications to the same device. By providing a different Sender - * ID than your default when fetching a token, you can create a new FCM token which you can - * give to a different sender. Both tokens will deliver notifications to your device, and you - * can revoke a token when you need to. - * - * This registration token is not cached by FIRMessaging. FIRMessaging should have an APNS - * token set before calling this to ensure that notifications can be delivered via APNS using - * this FCM token. You may re-retrieve the FCM token once you have the APNS token set, to - * associate it with the FCM token. The default FCM token is automatically associated with - * the APNS token, if the APNS token data is available. - * - * @param senderID The Sender ID for a particular Firebase project. - * @param completion The completion handler to handle the token request. - */ -- (void)retrieveFCMTokenForSenderID:(NSString *)senderID - completion:(FIRMessagingFCMTokenFetchCompletion)completion - NS_SWIFT_NAME(retrieveFCMToken(forSenderID:completion:)); - - -/** - * Invalidates an FCM token for a particular Sender ID. That Sender ID cannot no longer send - * notifications to that FCM token. - * - * @param senderID The senderID for a particular Firebase project. - * @param completion The completion handler to handle the token deletion. - */ -- (void)deleteFCMTokenForSenderID:(NSString *)senderID - completion:(FIRMessagingDeleteFCMTokenCompletion)completion - NS_SWIFT_NAME(deleteFCMToken(forSenderID:completion:)); - - -#pragma mark - Connect - -/** - * Create a FIRMessaging data connection which will be used to send the data notifications - * sent by your server. It will also be used to send ACKS and other messages based - * on the FIRMessaging ACKS and other messages based on the FIRMessaging protocol. - * - * - * @param handler The handler to be invoked once the connection is established. - * If the connection fails we invoke the handler with an - * appropriate error code letting you know why it failed. At - * the same time, FIRMessaging performs exponential backoff to retry - * establishing a connection and invoke the handler when successful. - */ -- (void)connectWithCompletion:(FIRMessagingConnectCompletion)handler - NS_SWIFT_NAME(connect(handler:)) - __deprecated_msg("Please use the shouldEstablishDirectChannel property instead."); - -/** - * Disconnect the current FIRMessaging data connection. This stops any attempts to - * connect to FIRMessaging. Calling this on an already disconnected client is a no-op. - * - * Call this before `teardown` when your app is going to the background. - * Since the FIRMessaging connection won't be allowed to live when in the background, it is - * prudent to close the connection. - */ -- (void)disconnect - __deprecated_msg("Please use the shouldEstablishDirectChannel property instead."); - -#pragma mark - Topics - -/** - * Asynchronously subscribes to a topic. - * - * @param topic The name of the topic, for example, @"sports". - */ -- (void)subscribeToTopic:(NSString *)topic NS_SWIFT_NAME(subscribe(toTopic:)); - -/** - * Asynchronously subscribe to the provided topic, retrying on failure. - * - * @param topic The topic name to subscribe to, for example, @"sports". - * @param completion The completion that is invoked once the subscribe call ends. - * In case of success, nil error is returned. Otherwise, an - * appropriate error object is returned. - */ -- (void)subscribeToTopic:(nonnull NSString *)topic - completion:(nullable FIRMessagingTopicOperationCompletion)completion; - -/** - * Asynchronously unsubscribe from a topic. - * - * @param topic The name of the topic, for example @"sports". - */ -- (void)unsubscribeFromTopic:(NSString *)topic NS_SWIFT_NAME(unsubscribe(fromTopic:)); - -/** - * Asynchronously unsubscribe from the provided topic, retrying on failure. - * - * @param topic The topic name to unsubscribe from, for example @"sports". - * @param completion The completion that is invoked once the unsubscribe call ends. - * In case of success, nil error is returned. Otherwise, an - * appropriate error object is returned. - */ -- (void)unsubscribeFromTopic:(nonnull NSString *)topic - completion:(nullable FIRMessagingTopicOperationCompletion)completion; - -#pragma mark - Upstream - -/** - * Sends an upstream ("device to cloud") message. - * - * The message is queued if we don't have an active connection. - * You can only use the upstream feature if your FCM implementation - * uses the XMPP server protocol. - * - * @param message Key/Value pairs to be sent. Values must be String, any - * other type will be ignored. - * @param receiver A string identifying the receiver of the message. For FCM - * project IDs the value is `SENDER_ID@gcm.googleapis.com`. - * @param messageID The ID of the message. This is generated by the application. It - * must be unique for each message generated by this application. - * It allows error callbacks and debugging, to uniquely identify - * each message. - * @param ttl The time to live for the message. In case we aren't able to - * send the message before the TTL expires we will send you a - * callback. If 0, we'll attempt to send immediately and return - * an error if we're not connected. Otherwise, the message will - * be queued. As for server-side messages, we don't return an error - * if the message has been dropped because of TTL; this can happen - * on the server side, and it would require extra communication. - */ -- (void)sendMessage:(NSDictionary *)message - to:(NSString *)receiver - withMessageID:(NSString *)messageID - timeToLive:(int64_t)ttl; - -#pragma mark - Analytics - -/** - * Use this to track message delivery and analytics for messages, typically - * when you receive a notification in `application:didReceiveRemoteNotification:`. - * However, you only need to call this if you set the `FirebaseAppDelegateProxyEnabled` - * flag to `NO` in your Info.plist. If `FirebaseAppDelegateProxyEnabled` is either missing - * or set to `YES` in your Info.plist, the library will call this automatically. - * - * @param message The downstream message received by the application. - * - * @return Information about the downstream message. - */ -- (FIRMessagingMessageInfo *)appDidReceiveMessage:(NSDictionary *)message; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FirebaseMessaging.h b/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FirebaseMessaging.h deleted file mode 100755 index ef081c90f..000000000 --- a/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Headers/FirebaseMessaging.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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 "FIRMessaging.h" diff --git a/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Modules/module.modulemap b/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Modules/module.modulemap deleted file mode 100644 index 14c966d22..000000000 --- a/src/ios/Firebase/Messaging/FirebaseMessaging.framework/Modules/module.modulemap +++ /dev/null @@ -1,7 +0,0 @@ -framework module FirebaseMessaging { - umbrella header "FirebaseMessaging.h" - export * - module * { export *} - link framework "SystemConfiguration" - link "sqlite3" -} diff --git a/src/ios/Firebase/NOTICES b/src/ios/Firebase/NOTICES deleted file mode 100644 index ad93dba4e..000000000 --- a/src/ios/Firebase/NOTICES +++ /dev/null @@ -1,375 +0,0 @@ -Google LevelDB -Copyright (c) 2011 The LevelDB Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation andor other materials provided with the distribution. - -Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --- - -Square Socket Rocket -Copyright 2012 Square Inc. - -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. - --- - -APLevelDB -Created by Adam Preble on 12312. -Copyright (c) 2012 Adam Preble. All rights reserved. - -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, andor 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. - -Portions of APLevelDB are based on LevelDB-ObjC: -https://github.com/hoisie/LevelDB-ObjC -Specifically the SliceFromString/StringFromSlice macros, and the structure of -the enumeration methods. License for those potions follows: -Copyright (c) 2011 Pave Labs -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. - --- - -sqlite3 -2001 September 15 - -The author disclaims copyright to this source code. In place of -a legal notice, here is a blessing: - - May you do good and not evil. - May you find forgiveness for yourself and forgive others. - May you share freely, never taking more than you give. - - -This header file defines the interface that the SQLite library -presents to client programs. If a C-function, structure, datatype, -or constant definition does not appear in this file, then it is -not a published API of SQLite, is subject to change without -notice, and should not be referenced by programs that use SQLite. - -Some of the definitions that are in this file are marked as -"experimental". Experimental interfaces are normally new -features recently added to SQLite. We do not anticipate changes -to experimental interfaces but reserve the right to make minor changes -if experience from use "in the wild" suggest such changes are prudent. - -The official C-language API documentation for SQLite is derived -from comments in this file. This file is the authoritative source -on how SQLite interfaces are suppose to operate. - -The name of this file under configuration management is "sqlite.h.in". -The makefile makes some minor changes to this file (such as inserting -the version number) and changes its name to "sqlite3.h" as -part of the build process. - --- - -sysutsname.h -Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - -This file contains Original Code andor Modifications of Original Code -as defined in and that are subject to the Apple Public Source License -Version 2.0 (the 'License'). You may not use this file except in -compliance with the License. The rights granted to you under the License -may not be used to create, or enable the creation or redistribution of, -unlawful or unlicensed copies of an Apple operating system, or to -circumvent, violate, or enable the circumvention or violation of, any -terms of an Apple operating system software license agreement. - -Please obtain a copy of the License at -http://www.opensource.apple.com/apsl and read it before using this file. - -The Original Code and all software distributed under the License are -distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER -EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, -INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. -Please see the License for the specific language governing rights and -limitations under the License. - -Copyright 1993,1995 NeXT Computer Inc. All Rights Reserved -Copyright (c) 1994 The Regents of the University of California. All rights reserved. -This code is derived from software contributed to Berkeley by -Chuck Karish of Mindcraft, Inc. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation andor other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: -* This product includes software developed by the University of -* California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - --- - -GTMNSData+zlib.h -Copyright 2007-2008 Google Inc. - -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. - --- - -GTMDefines.h -Copyright 2008 Google Inc. - -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. - --- - -ProtocolBuffer -Copyright 2008 Cyrus Najmabadi -Copyright 2011 Google Inc. - -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. - --- - -GTMDefines.h -Copyright 2008 Google Inc. - -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. - --- - -fbase64.c - -Copyright (c) 1996 by Internet Software Consortium. -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS -ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE -CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -Portions Copyright (c) 1995 by International Business Machines, Inc. -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -OPENBSD ORIGINAL: lib/libc/net/base64.c */ - --- - -FIRAppEnvironmentUtil.m - -The following copyright from Landon J. Fuller applies to the isAppEncrypted function. -Copyright (c) 2017 Landon J. Fuller -All rights reserved. -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. -Comment from iPhone Dev Wiki -Crack Prevention: -App Store binaries are signed by both their developer and Apple. This encrypts the binary so -that decryption keys are needed in order to make the binary readable. When iOS executes the -binary, the decryption keys are used to decrypt the binary into a readable state where it is -then loaded into memory and executed. iOS can tell the encryption status of a binary via the -cryptid structure member of LC_ENCRYPTION_INFO MachO load command. If cryptid is a non-zero -value then the binary is encrypted. -'Cracking' works by letting the kernel decrypt the binary then siphoning the decrypted data into -a new binary file, resigning, and repackaging. This will only work on jailbroken devices as -codesignature validation has been removed. Resigning takes place because while the codesignature -doesn't have to be valid thanks to the jailbreak, it does have to be in place unless you have -AppSync or similar to disable codesignature checks. -More information at Landon Fuller's blog - --- - -tflite - -Copyright 2017 The TensorFlow Authors. All Rights Reserved. - -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. - --- - -FirebaseCore - -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. - --- - -google_api_objectivec_client_for_rest - -Copyright 2011 Google Inc. - -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. - --- - -ocmock - -Copyright (c) 2006-2016 Erik Doernenburg and contributors - -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/src/ios/Firebase/Performance/FirebasePerformance.framework/FirebasePerformance b/src/ios/Firebase/Performance/FirebasePerformance.framework/FirebasePerformance deleted file mode 100755 index 6c37fbb39..000000000 Binary files a/src/ios/Firebase/Performance/FirebasePerformance.framework/FirebasePerformance and /dev/null differ diff --git a/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FIRHTTPMetric.h b/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FIRHTTPMetric.h deleted file mode 100755 index 91264eda4..000000000 --- a/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FIRHTTPMetric.h +++ /dev/null @@ -1,68 +0,0 @@ -#import - -#import "FIRPerformanceAttributable.h" - -/* Different HTTP methods. */ -typedef NS_ENUM(NSInteger, FIRHTTPMethod) { - FIRHTTPMethodGET NS_SWIFT_NAME(get), - FIRHTTPMethodPUT NS_SWIFT_NAME(put), - FIRHTTPMethodPOST NS_SWIFT_NAME(post), - FIRHTTPMethodDELETE NS_SWIFT_NAME(delete), - FIRHTTPMethodHEAD NS_SWIFT_NAME(head), - FIRHTTPMethodPATCH NS_SWIFT_NAME(patch), - FIRHTTPMethodOPTIONS NS_SWIFT_NAME(options), - FIRHTTPMethodTRACE NS_SWIFT_NAME(trace), - FIRHTTPMethodCONNECT NS_SWIFT_NAME(connect) -} NS_SWIFT_NAME(HTTPMethod); - -/** - * FIRHTTPMetric object can be used to make the SDK record information about a HTTP network request. - */ -NS_SWIFT_NAME(HTTPMetric) -@interface FIRHTTPMetric : NSObject - -/** - * Creates HTTPMetric object for a network request. - * @param URL The URL for which the metrics are recorded. - * @param httpMethod HTTP method used by the request. - */ -- (nullable instancetype)initWithURL:(nonnull NSURL *)URL HTTPMethod:(FIRHTTPMethod)httpMethod - NS_SWIFT_NAME(init(url:httpMethod:)); - -/** - * Use `initWithURL:HTTPMethod:` for Objective-C and `init(url:httpMethod:)` for Swift. - */ -- (nonnull instancetype)init NS_UNAVAILABLE; - -/** - * @brief HTTP Response code. Values are greater than 0. - */ -@property(nonatomic, assign) NSInteger responseCode; - -/** - * @brief Size of the request payload. - */ -@property(nonatomic, assign) long requestPayloadSize; - -/** - * @brief Size of the response payload. - */ -@property(nonatomic, assign) long responsePayloadSize; - -/** - * @brief HTTP Response content type. - */ -@property(nonatomic, nullable, copy) NSString *responseContentType; - -/** - * Marks the start time of the request. - */ -- (void)start; - -/** - * Marks the end time of the response and queues the network request metric on the device for - * transmission. Check the logs if the metric is valid. - */ -- (void)stop; - -@end diff --git a/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FIRPerformance.h b/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FIRPerformance.h deleted file mode 100755 index e7444a3cf..000000000 --- a/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FIRPerformance.h +++ /dev/null @@ -1,62 +0,0 @@ -#import - -#import "FIRTrace.h" - -/** This class allows you to configure the Firebase Performance Reporting SDK. It also provides the - * interfaces to create timers and enable or disable automatic metrics capture. - * - * This SDK uses a Firebase Instance ID token to identify the app instance and periodically sends - * data to the Firebase backend. (see `[FIRInstanceID getIDWithHandler:]`). - * To stop the periodic sync, call `[FIRInstanceID deleteIDWithHandler:]` and - * either disable this SDK or set FIRPerformance.dataCollectionEnabled to NO. - */ -NS_EXTENSION_UNAVAILABLE("FirebasePerformance does not support app extensions at this time.") -NS_SWIFT_NAME(Performance) -@interface FIRPerformance : NSObject - -/** - * Controls the capture of performance data. When this value is set to NO, none of the performance - * data will sent to the server. Default is YES. - * - * This setting is persisted, and is applied on future invocations of your application. Once - * explicitly set, it overrides any settings in your Info.plist. - */ -@property(nonatomic, assign, getter=isDataCollectionEnabled) BOOL dataCollectionEnabled; - -/** - * Controls the instrumentation of the app to capture performance data. Setting this value to NO has - * immediate effect only if it is done so before calling [FIRApp configure]. Otherwise it takes - * effect after the app starts again the next time. - * - * If set to NO, the app will not be instrumented to collect performance - * data (in scenarios like app_start, networking monitoring). Default is YES. - * - * This setting is persisted, and is applied on future invocations of your application. Once - * explicitly set, it overrides any settings in your Info.plist. - */ -@property(nonatomic, assign, getter=isInstrumentationEnabled) BOOL instrumentationEnabled; - -/** @return The shared instance. */ -+ (nonnull instancetype)sharedInstance NS_SWIFT_NAME(sharedInstance()); - -/** - * Creates an instance of FIRTrace after creating the shared instance of FIRPerformance. The trace - * will automatically be started on a successful creation of the instance. The |name| of the trace - * cannot be an empty string. - * - * @param name The name of the Trace. - * @return The FIRTrace object. - */ -+ (nullable FIRTrace *)startTraceWithName:(nonnull NSString *)name - NS_SWIFT_NAME(startTrace(name:)); - -/** - * Creates an instance of FIRTrace. This API does not start the trace. To start the trace, use the - * -start API on the returned |FIRTrace| object. The |name| cannot be an empty string. - * - * @param name The name of the Trace. - * @return The FIRTrace object. - */ -- (nullable FIRTrace *)traceWithName:(nonnull NSString *)name NS_SWIFT_NAME(trace(name:)); - -@end diff --git a/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FIRPerformanceAttributable.h b/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FIRPerformanceAttributable.h deleted file mode 100755 index 5bf68717b..000000000 --- a/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FIRPerformanceAttributable.h +++ /dev/null @@ -1,38 +0,0 @@ -#import - -/** Defines the interface that allows adding/removing attributes to any object. - */ -NS_SWIFT_NAME(PerformanceAttributable) -@protocol FIRPerformanceAttributable - -/** List of attributes. */ -@property(nonatomic, nonnull, readonly) NSDictionary *attributes; - -/** - * Sets a value as a string for the specified attribute. Updates the value of the attribute if a - * value had already existed. - * - * @param value The value that needs to be set/updated for an attribute. If the length of the value - * exceeds the maximum allowed, the value will be truncated to the maximum allowed. - * @param attribute The name of the attribute. If the length of the value exceeds the maximum - * allowed, the value will be truncated to the maximum allowed. - */ -- (void)setValue:(nonnull NSString *)value forAttribute:(nonnull NSString *)attribute; - -/** - * Reads the value for the specified attribute. If the attribute does not exist, returns nil. - * - * @param attribute The name of the attribute. - * @return The value for the attribute. Returns nil if the attribute does not exist. - */ -- (nullable NSString *)valueForAttribute:(nonnull NSString *)attribute; - -/** - * Removes an attribute from the list. Does nothing if the attribute does not exist. - * - * @param attribute The name of the attribute. - */ -- (void)removeAttribute:(nonnull NSString *)attribute; - -@end - diff --git a/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FIRTrace.h b/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FIRTrace.h deleted file mode 100755 index a226cda59..000000000 --- a/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FIRTrace.h +++ /dev/null @@ -1,91 +0,0 @@ -#import - -#import "FIRPerformanceAttributable.h" - -/** - * FIRTrace objects contain information about a "Trace", which is a sequence of steps. Traces can be - * used to measure the time taken for a sequence of steps. - * Traces also include "Counters". Counters are used to track information which is cumulative in - * nature (e.g., Bytes downloaded). Counters are scoped to an FIRTrace object. - */ -NS_EXTENSION_UNAVAILABLE("FirebasePerformance does not support app extensions at this time.") -NS_SWIFT_NAME(Trace) -@interface FIRTrace : NSObject - -/** @brief Name of the trace. */ -@property(nonatomic, copy, readonly, nonnull) NSString *name; - -/** @brief Not a valid initializer. */ -- (nonnull instancetype)init NS_UNAVAILABLE; - -/** - * Starts the trace. - */ -- (void)start; - -/** - * Stops the trace if the trace is active. - */ -- (void)stop; - -/** - * Increments the counter for the provided counter name by 1. If it is a new counter name, the - * counter value will be initialized to 1. Does nothing if the trace has not been started or has - * already been stopped. - * - * Note: This API has been deprecated. Please use -incrementMetric:byInt: instead. - * - * @param counterName The name of the counter to increment. - */ -- (void)incrementCounterNamed:(nonnull NSString *)counterName - NS_SWIFT_NAME(incrementCounter(named:)) - DEPRECATED_MSG_ATTRIBUTE("Please use -incrementMetric:byInt: instead."); - -/** - * Increments the counter for the provided counter name with the provided value. If it is a new - * counter name, the counter value will be initialized to the value. Does nothing if the trace has - * not been started or has already been stopped. - * - * Note: This API has been deprecated. Please use -incrementMetric:byInt: instead. - * - * @param counterName The name of the counter to increment. - * @param incrementValue The value the counter would be incremented with. - */ -- (void)incrementCounterNamed:(nonnull NSString *)counterName by:(NSInteger)incrementValue - NS_SWIFT_NAME(incrementCounter(named:by:)) - DEPRECATED_MSG_ATTRIBUTE("Please use -incrementMetric:byInt: instead."); - -#pragma mark - Metrics API - -/** - * Atomically increments the metric for the provided metric name with the provided value. If it is a - * new metric name, the metric value will be initialized to the value. Does nothing if the trace - * has not been started or has already been stopped. - * - * @param metricName The name of the metric to increment. - * @param incrementValue The value to increment the metric by. - */ -- (void)incrementMetric:(nonnull NSString *)metricName byInt:(int64_t)incrementValue - NS_SWIFT_NAME(incrementMetric(_:by:)); - -/** - * Gets the value of the metric for the provided metric name. If the metric doesn't exist, a 0 is - * returned. - * - * @param metricName The name of metric whose value to get. - * @return The value of the given metric or 0 if it hasn't yet been set. - */ -- (int64_t)valueForIntMetric:(nonnull NSString *)metricName - NS_SWIFT_NAME(valueForMetric(_:)); - -/** - * Sets the value of the metric for the provided metric name to the provided value. Does nothing if - * the trace has not been started or has already been stopped. - * - * @param metricName The name of the metric to set. - * @param value The value to set the metric to. - */ -- (void)setIntValue:(int64_t)value forMetric:(nonnull NSString *)metricName - NS_SWIFT_NAME(setValue(_:forMetric:)); - -@end diff --git a/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FirebasePerformance.h b/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FirebasePerformance.h deleted file mode 100755 index 8654e87d7..000000000 --- a/src/ios/Firebase/Performance/FirebasePerformance.framework/Headers/FirebasePerformance.h +++ /dev/null @@ -1,4 +0,0 @@ -#import "FIRHTTPMetric.h" -#import "FIRPerformance.h" -#import "FIRPerformanceAttributable.h" -#import "FIRTrace.h" diff --git a/src/ios/Firebase/Performance/FirebasePerformance.framework/Modules/module.modulemap b/src/ios/Firebase/Performance/FirebasePerformance.framework/Modules/module.modulemap deleted file mode 100755 index 25f5c4315..000000000 --- a/src/ios/Firebase/Performance/FirebasePerformance.framework/Modules/module.modulemap +++ /dev/null @@ -1,13 +0,0 @@ -framework module FirebasePerformance { - umbrella header "FirebasePerformance.h" - export * - module * { export *} - link "c++" - link "sqlite3" - link "z" - link framework "CoreTelephony" - link framework "QuartzCore" - link framework "Security" - link framework "StoreKit" - link framework "SystemConfiguration" - link framework "UIKit"} diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/GoogleToolboxForMac b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/GoogleToolboxForMac deleted file mode 100644 index 8a7c51ef8..000000000 Binary files a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/GoogleToolboxForMac and /dev/null differ diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMDebugSelectorValidation.h b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMDebugSelectorValidation.h deleted file mode 100644 index c90caeb1f..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMDebugSelectorValidation.h +++ /dev/null @@ -1,100 +0,0 @@ -// -// GTMDebugSelectorValidation.h -// -// This file should only be included within an implimation file. In any -// function that takes an object and selector to invoke, you should call: -// -// GTMAssertSelectorNilOrImplementedWithArguments(obj, sel, @encode(arg1type), ..., NULL) -// or -// GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(obj, sel, @encode(returnType), @encode(arg1type), ..., NULL) -// -// This will then validate that the selector is defined and using the right -// type(s), this can help catch errors much earlier then waiting for the -// selector to actually fire (and in the case of error selectors, might never -// really be tested until in the field). -// -// Copyright 2007-2008 Google Inc. -// -// 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 DEBUG - -#import -#import "GTMDefines.h" - -static void GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(id obj, SEL sel, const char *retType, ...) { - - // verify that the object's selector is implemented with the proper - // number and type of arguments - va_list argList; - va_start(argList, retType); - - if (obj && sel) { - // check that the selector is implemented - _GTMDevAssert([obj respondsToSelector:sel], - @"\"%@\" selector \"%@\" is unimplemented or misnamed", - NSStringFromClass([obj class]), - NSStringFromSelector(sel)); - - const char *expectedArgType; - NSUInteger argCount = 2; // skip self and _cmd - NSMethodSignature *sig = [obj methodSignatureForSelector:sel]; - - // check that each expected argument is present and of the correct type - while ((expectedArgType = va_arg(argList, const char*)) != 0) { - - if ([sig numberOfArguments] > argCount) { - const char *foundArgType = [sig getArgumentTypeAtIndex:argCount]; - - _GTMDevAssert(0 == strncmp(foundArgType, expectedArgType, strlen(expectedArgType)), - @"\"%@\" selector \"%@\" argument %u should be type %s", - NSStringFromClass([obj class]), - NSStringFromSelector(sel), - (uint32_t)(argCount - 2), - expectedArgType); - } - argCount++; - } - - // check that the proper number of arguments are present in the selector - _GTMDevAssert(argCount == [sig numberOfArguments], - @"\"%@\" selector \"%@\" should have %u arguments", - NSStringFromClass([obj class]), - NSStringFromSelector(sel), - (uint32_t)(argCount - 2)); - - // if asked, validate the return type - if (retType && (strcmp("gtm_skip_return_test", retType) != 0)) { - const char *foundRetType = [sig methodReturnType]; - _GTMDevAssert(0 == strncmp(foundRetType, retType, strlen(retType)), - @"\"%@\" selector \"%@\" return type should be type %s", - NSStringFromClass([obj class]), - NSStringFromSelector(sel), - retType); - } - } - - va_end(argList); -} - -#define GTMAssertSelectorNilOrImplementedWithArguments(obj, sel, ...) \ - GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments((obj), (sel), "gtm_skip_return_test", __VA_ARGS__) - -#else // DEBUG - -// make it go away if not debug -#define GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(obj, sel, retType, ...) do { } while (0) -#define GTMAssertSelectorNilOrImplementedWithArguments(obj, sel, ...) do { } while (0) - -#endif // DEBUG diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMDebugThreadValidation.h b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMDebugThreadValidation.h deleted file mode 100644 index 8d116d940..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMDebugThreadValidation.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// GTMDebugThreadValidation.h -// -// Copyright 2016 Google Inc. -// -// 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 "GTMDefines.h" -#import - -// GTMCheckCurrentQueue, GTMIsCurrentQueue -// -// GTMCheckCurrentQueue takes a target queue and uses _GTMDevAssert to -// report if that is not the currently executing queue. -// -// GTMIsCurrentQueue takes a target queue and returns true if the target queue -// is the currently executing dispatch queue. This can be passed to another -// assertion call in debug builds; it should never be used in release code. -// -// The dispatch queue must have a label. -#define GTMCheckCurrentQueue(targetQueue) \ - _GTMDevAssert(GTMIsCurrentQueue(targetQueue), \ - @"Current queue is %s (expected %s)", \ - _GTMQueueName(DISPATCH_CURRENT_QUEUE_LABEL), \ - _GTMQueueName(targetQueue)) - -#define GTMIsCurrentQueue(targetQueue) \ - (strcmp(_GTMQueueName(DISPATCH_CURRENT_QUEUE_LABEL), \ - _GTMQueueName(targetQueue)) == 0) - -#define _GTMQueueName(queue) \ - (strlen(dispatch_queue_get_label(queue)) > 0 ? \ - dispatch_queue_get_label(queue) : "unnamed") diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMDefines.h b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMDefines.h deleted file mode 100644 index 7feb1cbd8..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMDefines.h +++ /dev/null @@ -1,398 +0,0 @@ -// -// GTMDefines.h -// -// Copyright 2008 Google Inc. -// -// 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 - -#ifdef __OBJC__ -#include -#endif // __OBJC__ - -#if TARGET_OS_IPHONE -#include -#endif // TARGET_OS_IPHONE - -// ---------------------------------------------------------------------------- -// CPP symbols that can be overridden in a prefix to control how the toolbox -// is compiled. -// ---------------------------------------------------------------------------- - - -// By setting the GTM_CONTAINERS_VALIDATION_FAILED_LOG and -// GTM_CONTAINERS_VALIDATION_FAILED_ASSERT macros you can control what happens -// when a validation fails. If you implement your own validators, you may want -// to control their internals using the same macros for consistency. -#ifndef GTM_CONTAINERS_VALIDATION_FAILED_ASSERT - #define GTM_CONTAINERS_VALIDATION_FAILED_ASSERT 0 -#endif - -// Ensure __has_feature and __has_extension are safe to use. -// See http://clang-analyzer.llvm.org/annotations.html -#ifndef __has_feature // Optional. - #define __has_feature(x) 0 // Compatibility with non-clang compilers. -#endif - -#ifndef __has_extension - #define __has_extension __has_feature // Compatibility with pre-3.0 compilers. -#endif - -// Give ourselves a consistent way to do inlines. Apple's macros even use -// a few different actual definitions, so we're based off of the foundation -// one. -#if !defined(GTM_INLINE) - #if (defined (__GNUC__) && (__GNUC__ == 4)) || defined (__clang__) - #define GTM_INLINE static __inline__ __attribute__((always_inline)) - #else - #define GTM_INLINE static __inline__ - #endif -#endif - -// Give ourselves a consistent way of doing externs that links up nicely -// when mixing objc and objc++ -#if !defined (GTM_EXTERN) - #if defined __cplusplus - #define GTM_EXTERN extern "C" - #define GTM_EXTERN_C_BEGIN extern "C" { - #define GTM_EXTERN_C_END } - #else - #define GTM_EXTERN extern - #define GTM_EXTERN_C_BEGIN - #define GTM_EXTERN_C_END - #endif -#endif - -// Give ourselves a consistent way of exporting things if we have visibility -// set to hidden. -#if !defined (GTM_EXPORT) - #define GTM_EXPORT __attribute__((visibility("default"))) -#endif - -// Give ourselves a consistent way of declaring something as unused. This -// doesn't use __unused because that is only supported in gcc 4.2 and greater. -#if !defined (GTM_UNUSED) -#define GTM_UNUSED(x) ((void)(x)) -#endif - -// _GTMDevLog & _GTMDevAssert -// -// _GTMDevLog & _GTMDevAssert are meant to be a very lightweight shell for -// developer level errors. This implementation simply macros to NSLog/NSAssert. -// It is not intended to be a general logging/reporting system. -// -// Please see http://code.google.com/p/google-toolbox-for-mac/wiki/DevLogNAssert -// for a little more background on the usage of these macros. -// -// _GTMDevLog log some error/problem in debug builds -// _GTMDevAssert assert if condition isn't met w/in a method/function -// in all builds. -// -// To replace this system, just provide different macro definitions in your -// prefix header. Remember, any implementation you provide *must* be thread -// safe since this could be called by anything in what ever situtation it has -// been placed in. -// - -// Ignore the "Macro name is a reserved identifier" warning in this section -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wreserved-id-macro" - -// We only define the simple macros if nothing else has defined this. -#ifndef _GTMDevLog - -#ifdef DEBUG - #define _GTMDevLog(...) NSLog(__VA_ARGS__) -#else - #define _GTMDevLog(...) do { } while (0) -#endif - -#endif // _GTMDevLog - -#ifndef _GTMDevAssert -// we directly invoke the NSAssert handler so we can pass on the varargs -// (NSAssert doesn't have a macro we can use that takes varargs) -#if !defined(NS_BLOCK_ASSERTIONS) - #define _GTMDevAssert(condition, ...) \ - do { \ - if (!(condition)) { \ - [[NSAssertionHandler currentHandler] \ - handleFailureInFunction:(NSString *) \ - [NSString stringWithUTF8String:__PRETTY_FUNCTION__] \ - file:(NSString *)[NSString stringWithUTF8String:__FILE__] \ - lineNumber:__LINE__ \ - description:__VA_ARGS__]; \ - } \ - } while(0) -#else // !defined(NS_BLOCK_ASSERTIONS) - #define _GTMDevAssert(condition, ...) do { } while (0) -#endif // !defined(NS_BLOCK_ASSERTIONS) - -#endif // _GTMDevAssert - -// _GTMCompileAssert -// -// Note: Software for current compilers should just use _Static_assert directly -// instead of this macro. -// -// _GTMCompileAssert is an assert that is meant to fire at compile time if you -// want to check things at compile instead of runtime. For example if you -// want to check that a wchar is 4 bytes instead of 2 you would use -// _GTMCompileAssert(sizeof(wchar_t) == 4, wchar_t_is_4_bytes_on_OS_X) -// Note that the second "arg" is not in quotes, and must be a valid processor -// symbol in it's own right (no spaces, punctuation etc). - -// Wrapping this in an #ifndef allows external groups to define their own -// compile time assert scheme. -#ifndef _GTMCompileAssert - #if __has_feature(c_static_assert) || __has_extension(c_static_assert) - #define _GTMCompileAssert(test, msg) _Static_assert((test), #msg) - #else - // Pre-Xcode 7 support. - // - // We got this technique from here: - // http://unixjunkie.blogspot.com/2007/10/better-compile-time-asserts_29.html - #define _GTMCompileAssertSymbolInner(line, msg) _GTMCOMPILEASSERT ## line ## __ ## msg - #define _GTMCompileAssertSymbol(line, msg) _GTMCompileAssertSymbolInner(line, msg) - #define _GTMCompileAssert(test, msg) \ - typedef char _GTMCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ] - #endif // __has_feature(c_static_assert) || __has_extension(c_static_assert) -#endif // _GTMCompileAssert - -#pragma clang diagnostic pop - -// ---------------------------------------------------------------------------- -// CPP symbols defined based on the project settings so the GTM code has -// simple things to test against w/o scattering the knowledge of project -// setting through all the code. -// ---------------------------------------------------------------------------- - -// Provide a single constant CPP symbol that all of GTM uses for ifdefing -// iPhone code. -#if TARGET_OS_IPHONE // iPhone SDK - // For iPhone specific stuff - #define GTM_IPHONE_SDK 1 - #if TARGET_IPHONE_SIMULATOR - #define GTM_IPHONE_DEVICE 0 - #define GTM_IPHONE_SIMULATOR 1 - #else - #define GTM_IPHONE_DEVICE 1 - #define GTM_IPHONE_SIMULATOR 0 - #endif // TARGET_IPHONE_SIMULATOR - // By default, GTM has provided it's own unittesting support, define this - // to use the support provided by Xcode, especially for the Xcode4 support - // for unittesting. - #ifndef GTM_USING_XCTEST - #define GTM_USING_XCTEST 0 - #endif - #define GTM_MACOS_SDK 0 -#else - // For MacOS specific stuff - #define GTM_MACOS_SDK 1 - #define GTM_IPHONE_SDK 0 - #define GTM_IPHONE_SIMULATOR 0 - #define GTM_IPHONE_DEVICE 0 - #ifndef GTM_USING_XCTEST - #define GTM_USING_XCTEST 0 - #endif -#endif - -// Some of our own availability macros -#if GTM_MACOS_SDK -#define GTM_AVAILABLE_ONLY_ON_IPHONE UNAVAILABLE_ATTRIBUTE -#define GTM_AVAILABLE_ONLY_ON_MACOS -#else -#define GTM_AVAILABLE_ONLY_ON_IPHONE -#define GTM_AVAILABLE_ONLY_ON_MACOS UNAVAILABLE_ATTRIBUTE -#endif - -// GC was dropped by Apple, define the old constant incase anyone still keys -// off of it. -#ifndef GTM_SUPPORT_GC - #define GTM_SUPPORT_GC 0 -#endif - -// Some support for advanced clang static analysis functionality -#ifndef NS_RETURNS_RETAINED - #if __has_feature(attribute_ns_returns_retained) - #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained)) - #else - #define NS_RETURNS_RETAINED - #endif -#endif - -#ifndef NS_RETURNS_NOT_RETAINED - #if __has_feature(attribute_ns_returns_not_retained) - #define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) - #else - #define NS_RETURNS_NOT_RETAINED - #endif -#endif - -#ifndef CF_RETURNS_RETAINED - #if __has_feature(attribute_cf_returns_retained) - #define CF_RETURNS_RETAINED __attribute__((cf_returns_retained)) - #else - #define CF_RETURNS_RETAINED - #endif -#endif - -#ifndef CF_RETURNS_NOT_RETAINED - #if __has_feature(attribute_cf_returns_not_retained) - #define CF_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained)) - #else - #define CF_RETURNS_NOT_RETAINED - #endif -#endif - -#ifndef NS_CONSUMED - #if __has_feature(attribute_ns_consumed) - #define NS_CONSUMED __attribute__((ns_consumed)) - #else - #define NS_CONSUMED - #endif -#endif - -#ifndef CF_CONSUMED - #if __has_feature(attribute_cf_consumed) - #define CF_CONSUMED __attribute__((cf_consumed)) - #else - #define CF_CONSUMED - #endif -#endif - -#ifndef NS_CONSUMES_SELF - #if __has_feature(attribute_ns_consumes_self) - #define NS_CONSUMES_SELF __attribute__((ns_consumes_self)) - #else - #define NS_CONSUMES_SELF - #endif -#endif - -#ifndef GTM_NONNULL - #if defined(__has_attribute) - #if __has_attribute(nonnull) - #define GTM_NONNULL(x) __attribute__((nonnull x)) - #else - #define GTM_NONNULL(x) - #endif - #else - #define GTM_NONNULL(x) - #endif -#endif - -// Invalidates the initializer from which it's called. -#ifndef GTMInvalidateInitializer - #if __has_feature(objc_arc) - #define GTMInvalidateInitializer() \ - do { \ - [self class]; /* Avoid warning of dead store to |self|. */ \ - _GTMDevAssert(NO, @"Invalid initializer."); \ - return nil; \ - } while (0) - #else - #define GTMInvalidateInitializer() \ - do { \ - [self release]; \ - _GTMDevAssert(NO, @"Invalid initializer."); \ - return nil; \ - } while (0) - #endif -#endif - -#ifndef GTMCFAutorelease - // GTMCFAutorelease returns an id. In contrast, Apple's CFAutorelease returns - // a CFTypeRef. - #if __has_feature(objc_arc) - #define GTMCFAutorelease(x) CFBridgingRelease(x) - #else - #define GTMCFAutorelease(x) ([(id)x autorelease]) - #endif -#endif - -#ifdef __OBJC__ - - -// Macro to allow you to create NSStrings out of other macros. -// #define FOO foo -// NSString *fooString = GTM_NSSTRINGIFY(FOO); -#if !defined (GTM_NSSTRINGIFY) - #define GTM_NSSTRINGIFY_INNER(x) @#x - #define GTM_NSSTRINGIFY(x) GTM_NSSTRINGIFY_INNER(x) -#endif - -// Macro to allow fast enumeration when building for 10.5 or later, and -// reliance on NSEnumerator for 10.4. Remember, NSDictionary w/ FastEnumeration -// does keys, so pick the right thing, nothing is done on the FastEnumeration -// side to be sure you're getting what you wanted. -#ifndef GTM_FOREACH_OBJECT - #if TARGET_OS_IPHONE || !(MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) - #define GTM_FOREACH_ENUMEREE(element, enumeration) \ - for (element in enumeration) - #define GTM_FOREACH_OBJECT(element, collection) \ - for (element in collection) - #define GTM_FOREACH_KEY(element, collection) \ - for (element in collection) - #else - #define GTM_FOREACH_ENUMEREE(element, enumeration) \ - for (NSEnumerator *_ ## element ## _enum = enumeration; \ - (element = [_ ## element ## _enum nextObject]) != nil; ) - #define GTM_FOREACH_OBJECT(element, collection) \ - GTM_FOREACH_ENUMEREE(element, [collection objectEnumerator]) - #define GTM_FOREACH_KEY(element, collection) \ - GTM_FOREACH_ENUMEREE(element, [collection keyEnumerator]) - #endif -#endif - -// ============================================================================ - -// GTM_SEL_STRING is for specifying selector (usually property) names to KVC -// or KVO methods. -// In debug it will generate warnings for undeclared selectors if -// -Wunknown-selector is turned on. -// In release it will have no runtime overhead. -#ifndef GTM_SEL_STRING - #ifdef DEBUG - #define GTM_SEL_STRING(selName) NSStringFromSelector(@selector(selName)) - #else - #define GTM_SEL_STRING(selName) @#selName - #endif // DEBUG -#endif // GTM_SEL_STRING - -#ifndef GTM_WEAK -#if __has_feature(objc_arc_weak) - // With ARC enabled, __weak means a reference that isn't implicitly - // retained. __weak objects are accessed through runtime functions, so - // they are zeroed out, but this requires OS X 10.7+. - // At clang r251041+, ARC-style zeroing weak references even work in - // non-ARC mode. - #define GTM_WEAK __weak - #elif __has_feature(objc_arc) - // ARC, but targeting 10.6 or older, where zeroing weak references don't - // exist. - #define GTM_WEAK __unsafe_unretained - #else - // With manual reference counting, __weak used to be silently ignored. - // clang r251041 gives it the ARC semantics instead. This means they - // now require a deployment target of 10.7, while some clients of GTM - // still target 10.6. In these cases, expand to __unsafe_unretained instead - #define GTM_WEAK - #endif -#endif - -#endif // __OBJC__ diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMLocalizedString.h b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMLocalizedString.h deleted file mode 100644 index c49b8a9da..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMLocalizedString.h +++ /dev/null @@ -1,79 +0,0 @@ -// -// GTMLocalizedString.h -// -// Copyright (c) 2010 Google Inc. All rights reserved. -// -// 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 -#import "GTMDefines.h" - -// The NSLocalizedString macros do not have NS_FORMAT_ARGUMENT modifiers put -// on them which means you get warnings on Snow Leopard with when -// GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES and you do things like: -// NSString *foo -// = [NSString stringWithFormat:NSLocalizedString(@"blah %@", nil), @"bar"]; -// The GTMLocalizedString functions fix that for you so you can do: -// NSString *foo -// = [NSString stringWithFormat:GTMLocalizedString(@"blah %@", nil), @"bar"]; -// and you will compile cleanly. -// If you use genstrings you can call it with -// genstrings -s GTMLocalizedString ... -// and it should work as expected. -// You can override how GTM gets its localized strings (if you are using -// something other than NSLocalizedString) by redefining -// GTMLocalizedStringWithDefaultValueInternal. - -#ifndef GTMLocalizedStringWithDefaultValueInternal - #define GTMLocalizedStringWithDefaultValueInternal \ - NSLocalizedStringWithDefaultValue -#endif - -GTM_INLINE NS_FORMAT_ARGUMENT(1) NSString *GTMLocalizedString( - NSString *key, NSString *comment) { - return GTMLocalizedStringWithDefaultValueInternal(key, - nil, - [NSBundle mainBundle], - @"", - comment); -} - -GTM_INLINE NS_FORMAT_ARGUMENT(1) NSString *GTMLocalizedStringFromTable( - NSString *key, NSString *tableName, NSString *comment) { - return GTMLocalizedStringWithDefaultValueInternal(key, - tableName, - [NSBundle mainBundle], - @"", - comment); -} - -GTM_INLINE NS_FORMAT_ARGUMENT(1) NSString *GTMLocalizedStringFromTableInBundle( - NSString *key, NSString *tableName, NSBundle *bundle, NSString *comment) { - return GTMLocalizedStringWithDefaultValueInternal(key, - tableName, - bundle, - @"", - comment); -} - -GTM_INLINE NS_FORMAT_ARGUMENT(1) NSString *GTMLocalizedStringWithDefaultValue( - NSString *key, NSString *tableName, NSBundle *bundle, NSString *value, - NSString *comment) { - return GTMLocalizedStringWithDefaultValueInternal(key, - tableName, - bundle, - value, - comment); -} - diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMLogger.h b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMLogger.h deleted file mode 100644 index 16f0eafb9..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMLogger.h +++ /dev/null @@ -1,508 +0,0 @@ -// -// GTMLogger.h -// -// Copyright 2007-2008 Google Inc. -// -// 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. -// - -// Key Abstractions -// ---------------- -// -// This file declares multiple classes and protocols that are used by the -// GTMLogger logging system. The 4 main abstractions used in this file are the -// following: -// -// * logger (GTMLogger) - The main logging class that users interact with. It -// has methods for logging at different levels and uses a log writer, a log -// formatter, and a log filter to get the job done. -// -// * log writer (GTMLogWriter) - Writes a given string to some log file, where -// a "log file" can be a physical file on disk, a POST over HTTP to some URL, -// or even some in-memory structure (e.g., a ring buffer). -// -// * log formatter (GTMLogFormatter) - Given a format string and arguments as -// a va_list, returns a single formatted NSString. A "formatted string" could -// be a string with the date prepended, a string with values in a CSV format, -// or even a string of XML. -// -// * log filter (GTMLogFilter) - Given a formatted log message as an NSString -// and the level at which the message is to be logged, this class will decide -// whether the given message should be logged or not. This is a flexible way -// to filter out messages logged at a certain level, messages that contain -// certain text, or filter nothing out at all. This gives the caller the -// flexibility to dynamically enable debug logging in Release builds. -// -// This file also declares some classes to handle the common log writer, log -// formatter, and log filter cases. Callers can also create their own writers, -// formatters, and filters and they can even build them on top of the ones -// declared here. Keep in mind that your custom writer/formatter/filter may be -// called from multiple threads, so it must be thread-safe. - -#import -#import "GTMDefines.h" - -// Predeclaration of used protocols that are declared later in this file. -@protocol GTMLogWriter, GTMLogFormatter, GTMLogFilter; - -// GTMLogger -// -// GTMLogger is the primary user-facing class for an object-oriented logging -// system. It is built on the concept of log formatters (GTMLogFormatter), log -// writers (GTMLogWriter), and log filters (GTMLogFilter). When a message is -// sent to a GTMLogger to log a message, the message is formatted using the log -// formatter, then the log filter is consulted to see if the message should be -// logged, and if so, the message is sent to the log writer to be written out. -// -// GTMLogger is intended to be a flexible and thread-safe logging solution. Its -// flexibility comes from the fact that GTMLogger instances can be customized -// with user defined formatters, filters, and writers. And these writers, -// filters, and formatters can be combined, stacked, and customized in arbitrary -// ways to suit the needs at hand. For example, multiple writers can be used at -// the same time, and a GTMLogger instance can even be used as another -// GTMLogger's writer. This allows for arbitrarily deep logging trees. -// -// A standard GTMLogger uses a writer that sends messages to standard out, a -// formatter that smacks a timestamp and a few other bits of interesting -// information on the message, and a filter that filters out debug messages from -// release builds. Using the standard log settings, a log message will look like -// the following: -// -// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] foo= -// -// The output contains the date and time of the log message, the name of the -// process followed by its process ID/thread ID, the log level at which the -// message was logged (in the previous example the level was 1: -// kGTMLoggerLevelDebug), and finally, the user-specified log message itself (in -// this case, the log message was @"foo=%@", foo). -// -// Multiple instances of GTMLogger can be created, each configured their own -// way. Though GTMLogger is not a singleton (in the GoF sense), it does provide -// access to a shared (i.e., globally accessible) GTMLogger instance. This makes -// it convenient for all code in a process to use the same GTMLogger instance. -// The shared GTMLogger instance can also be configured in an arbitrary, and -// these configuration changes will affect all code that logs through the shared -// instance. - -// -// Log Levels -// ---------- -// GTMLogger has 3 different log levels: Debug, Info, and Error. GTMLogger -// doesn't take any special action based on the log level; it simply forwards -// this information on to formatters, filters, and writers, each of which may -// optionally take action based on the level. Since log level filtering is -// performed at runtime, log messages are typically not filtered out at compile -// time. The exception to this rule is that calls to the GTMLoggerDebug() macro -// *ARE* filtered out of non-DEBUG builds. This is to be backwards compatible -// with behavior that many developers are currently used to. Note that this -// means that GTMLoggerDebug(@"hi") will be compiled out of Release builds, but -// [[GTMLogger sharedLogger] logDebug:@"hi"] will NOT be compiled out. -// -// Standard loggers are created with the GTMLogLevelFilter log filter, which -// filters out certain log messages based on log level, and some other settings. -// -// In addition to the -logDebug:, -logInfo:, and -logError: methods defined on -// GTMLogger itself, there are also C macros that make usage of the shared -// GTMLogger instance very convenient. These macros are: -// -// GTMLoggerDebug(...) -// GTMLoggerInfo(...) -// GTMLoggerError(...) -// -// Again, a notable feature of these macros is that GTMLogDebug() calls *will be -// compiled out of non-DEBUG builds*. -// -// Standard Loggers -// ---------------- -// GTMLogger has the concept of "standard loggers". A standard logger is simply -// a logger that is pre-configured with some standard/common writer, formatter, -// and filter combination. Standard loggers are created using the creation -// methods beginning with "standard". The alternative to a standard logger is a -// regular logger, which will send messages to stdout, with no special -// formatting, and no filtering. -// -// How do I use GTMLogger? -// ---------------------- -// The typical way you will want to use GTMLogger is to simply use the -// GTMLogger*() macros for logging from code. That way we can easily make -// changes to the GTMLogger class and simply update the macros accordingly. Only -// your application startup code (perhaps, somewhere in main()) should use the -// GTMLogger class directly in order to configure the shared logger, which all -// of the code using the macros will be using. Again, this is just the typical -// situation. -// -// To be complete, there are cases where you may want to use GTMLogger directly, -// or even create separate GTMLogger instances for some reason. That's fine, -// too. -// -// Examples -// -------- -// The following show some common GTMLogger use cases. -// -// 1. You want to log something as simply as possible. Also, this call will only -// appear in debug builds. In non-DEBUG builds it will be completely removed. -// -// GTMLoggerDebug(@"foo = %@", foo); -// -// 2. The previous example is similar to the following. The major difference is -// that the previous call (example 1) will be compiled out of Release builds -// but this statement will not be compiled out. -// -// [[GTMLogger sharedLogger] logDebug:@"foo = %@", foo]; -// -// 3. Send all logging output from the shared logger to a file. We do this by -// creating an NSFileHandle for writing associated with a file, and setting -// that file handle as the logger's writer. -// -// NSFileHandle *f = [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" -// create:YES]; -// [[GTMLogger sharedLogger] setWriter:f]; -// GTMLoggerError(@"hi"); // This will be sent to /tmp/f.log -// -// 4. Create a new GTMLogger that will log to a file. This example differs from -// the previous one because here we create a new GTMLogger that is different -// from the shared logger. -// -// GTMLogger *logger = [GTMLogger standardLoggerWithPath:@"/tmp/temp.log"]; -// [logger logInfo:@"hi temp log file"]; -// -// 5. Create a logger that writes to stdout and does NOT do any formatting to -// the log message. This might be useful, for example, when writing a help -// screen for a command-line tool to standard output. -// -// GTMLogger *logger = [GTMLogger logger]; -// [logger logInfo:@"%@ version 0.1 usage", progName]; -// -// 6. Send log output to stdout AND to a log file. The trick here is that -// NSArrays function as composite log writers, which means when an array is -// set as the log writer, it forwards all logging messages to all of its -// contained GTMLogWriters. -// -// // Create array of GTMLogWriters -// NSArray *writers = [NSArray arrayWithObjects: -// [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" create:YES], -// [NSFileHandle fileHandleWithStandardOutput], nil]; -// -// GTMLogger *logger = [GTMLogger standardLogger]; -// [logger setWriter:writers]; -// [logger logInfo:@"hi"]; // Output goes to stdout and /tmp/f.log -// -// For futher details on log writers, formatters, and filters, see the -// documentation below. -// -// NOTE: GTMLogger is application level logging. By default it does nothing -// with _GTMDevLog/_GTMDevAssert (see GTMDefines.h). An application can choose -// to bridge _GTMDevLog/_GTMDevAssert to GTMLogger by providing macro -// definitions in its prefix header (see GTMDefines.h for how one would do -// that). -// -@interface GTMLogger : NSObject { - @private - id writer_; - id formatter_; - id filter_; -} - -// -// Accessors for the shared logger instance -// - -// Returns a shared/global standard GTMLogger instance. Callers should typically -// use this method to get a GTMLogger instance, unless they explicitly want -// their own instance to configure for their own needs. This is the only method -// that returns a shared instance; all the rest return new GTMLogger instances. -+ (id)sharedLogger; - -// Sets the shared logger instance to |logger|. Future calls to +sharedLogger -// will return |logger| instead. -+ (void)setSharedLogger:(GTMLogger *)logger; - -// -// Creation methods -// - -// Returns a new autoreleased GTMLogger instance that will log to stdout, using -// the GTMLogStandardFormatter, and the GTMLogLevelFilter filter. -+ (id)standardLogger; - -// Same as +standardLogger, but logs to stderr. -+ (id)standardLoggerWithStderr; - -// Same as +standardLogger but levels >= kGTMLoggerLevelError are routed to -// stderr, everything else goes to stdout. -+ (id)standardLoggerWithStdoutAndStderr; - -// Returns a new standard GTMLogger instance with a log writer that will -// write to the file at |path|, and will use the GTMLogStandardFormatter and -// GTMLogLevelFilter classes. If |path| does not exist, it will be created. -+ (id)standardLoggerWithPath:(NSString *)path; - -// Returns an autoreleased GTMLogger instance that will use the specified -// |writer|, |formatter|, and |filter|. -+ (id)loggerWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter; - -// Returns an autoreleased GTMLogger instance that logs to stdout, with the -// basic formatter, and no filter. The returned logger differs from the logger -// returned by +standardLogger because this one does not do any filtering and -// does not do any special log formatting; this is the difference between a -// "regular" logger and a "standard" logger. -+ (id)logger; - -// Designated initializer. This method returns a GTMLogger initialized with the -// specified |writer|, |formatter|, and |filter|. See the setter methods below -// for what values will be used if nil is passed for a parameter. -- (id)initWithWriter:(id)writer - formatter:(id)formatter - filter:(id)filter; - -// -// Logging methods -// - -// Logs a message at the debug level (kGTMLoggerLevelDebug). -- (void)logDebug:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); -// Logs a message at the info level (kGTMLoggerLevelInfo). -- (void)logInfo:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); -// Logs a message at the error level (kGTMLoggerLevelError). -- (void)logError:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); -// Logs a message at the assert level (kGTMLoggerLevelAssert). -- (void)logAssert:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2); - - -// -// Accessors -// - -// Accessor methods for the log writer. If the log writer is set to nil, -// [NSFileHandle fileHandleWithStandardOutput] is used. -- (id)writer; -- (void)setWriter:(id)writer; - -// Accessor methods for the log formatter. If the log formatter is set to nil, -// GTMLogBasicFormatter is used. This formatter will format log messages in a -// plain printf style. -- (id)formatter; -- (void)setFormatter:(id)formatter; - -// Accessor methods for the log filter. If the log filter is set to nil, -// GTMLogNoFilter is used, which allows all log messages through. -- (id)filter; -- (void)setFilter:(id)filter; - -@end // GTMLogger - - -// Helper functions that are used by the convenience GTMLogger*() macros that -// enable the logging of function names. -@interface GTMLogger (GTMLoggerMacroHelpers) -- (void)logFuncDebug:(const char *)func msg:(NSString *)fmt, ... - NS_FORMAT_FUNCTION(2, 3); -- (void)logFuncInfo:(const char *)func msg:(NSString *)fmt, ... - NS_FORMAT_FUNCTION(2, 3); -- (void)logFuncError:(const char *)func msg:(NSString *)fmt, ... - NS_FORMAT_FUNCTION(2, 3); -- (void)logFuncAssert:(const char *)func msg:(NSString *)fmt, ... - NS_FORMAT_FUNCTION(2, 3); -@end // GTMLoggerMacroHelpers - - -// The convenience macros are only defined if they haven't already been defined. -#ifndef GTMLoggerInfo - -// Convenience macros that log to the shared GTMLogger instance. These macros -// are how users should typically log to GTMLogger. Notice that GTMLoggerDebug() -// calls will be compiled out of non-Debug builds. -#define GTMLoggerDebug(...) \ - [[GTMLogger sharedLogger] logFuncDebug:__func__ msg:__VA_ARGS__] -#define GTMLoggerInfo(...) \ - [[GTMLogger sharedLogger] logFuncInfo:__func__ msg:__VA_ARGS__] -#define GTMLoggerError(...) \ - [[GTMLogger sharedLogger] logFuncError:__func__ msg:__VA_ARGS__] -#define GTMLoggerAssert(...) \ - [[GTMLogger sharedLogger] logFuncAssert:__func__ msg:__VA_ARGS__] - -// If we're not in a debug build, remove the GTMLoggerDebug statements. This -// makes calls to GTMLoggerDebug "compile out" of Release builds -#ifndef DEBUG -#undef GTMLoggerDebug -#define GTMLoggerDebug(...) do {} while(0) -#endif - -#endif // !defined(GTMLoggerInfo) - -// Log levels. -typedef enum { - kGTMLoggerLevelUnknown, - kGTMLoggerLevelDebug, - kGTMLoggerLevelInfo, - kGTMLoggerLevelError, - kGTMLoggerLevelAssert, -} GTMLoggerLevel; - - -// -// Log Writers -// - -// Protocol to be implemented by a GTMLogWriter instance. -@protocol GTMLogWriter -// Writes the given log message to where the log writer is configured to write. -- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level; -@end // GTMLogWriter - - -// Simple category on NSFileHandle that makes NSFileHandles valid log writers. -// This is convenient because something like, say, +fileHandleWithStandardError -// now becomes a valid log writer. Log messages are written to the file handle -// with a newline appended. -@interface NSFileHandle (GTMFileHandleLogWriter) -// Opens the file at |path| in append mode, and creates the file with |mode| -// if it didn't previously exist. -+ (id)fileHandleForLoggingAtPath:(NSString *)path mode:(mode_t)mode; -@end // NSFileHandle - - -// This category makes NSArray a GTMLogWriter that can be composed of other -// GTMLogWriters. This is the classic Composite GoF design pattern. When the -// GTMLogWriter -logMessage:level: message is sent to the array, the array -// forwards the message to all of its elements that implement the GTMLogWriter -// protocol. -// -// This is useful in situations where you would like to send log output to -// multiple log writers at the same time. Simply create an NSArray of the log -// writers you wish to use, then set the array as the "writer" for your -// GTMLogger instance. -@interface NSArray (GTMArrayCompositeLogWriter) -@end // GTMArrayCompositeLogWriter - - -// This category adapts the GTMLogger interface so that it can be used as a log -// writer; it's an "adapter" in the GoF Adapter pattern sense. -// -// This is useful when you want to configure a logger to log to a specific -// writer with a specific formatter and/or filter. But you want to also compose -// that with a different log writer that may have its own formatter and/or -// filter. -@interface GTMLogger (GTMLoggerLogWriter) -@end // GTMLoggerLogWriter - - -// -// Log Formatters -// - -// Protocol to be implemented by a GTMLogFormatter instance. -@protocol GTMLogFormatter -// Returns a formatted string using the format specified in |fmt| and the va -// args specified in |args|. -- (NSString *)stringForFunc:(NSString *)func - withFormat:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level NS_FORMAT_FUNCTION(2, 0); -@end // GTMLogFormatter - - -// A basic log formatter that formats a string the same way that NSLog (or -// printf) would. It does not do anything fancy, nor does it add any data of its -// own. -@interface GTMLogBasicFormatter : NSObject - -// Helper method for prettying C99 __func__ and GCC __PRETTY_FUNCTION__ -- (NSString *)prettyNameForFunc:(NSString *)func; - -@end // GTMLogBasicFormatter - - -// A log formatter that formats the log string like the basic formatter, but -// also prepends a timestamp and some basic process info to the message, as -// shown in the following sample output. -// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] log mesage here -@interface GTMLogStandardFormatter : GTMLogBasicFormatter { - @private - NSDateFormatter *dateFormatter_; // yyyy-MM-dd HH:mm:ss.SSS - NSString *pname_; - pid_t pid_; -} -@end // GTMLogStandardFormatter - - -// -// Log Filters -// - -// Protocol to be implemented by a GTMLogFilter instance. -@protocol GTMLogFilter -// Returns YES if |msg| at |level| should be logged; NO otherwise. -- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level; -@end // GTMLogFilter - - -// A log filter that filters messages at the kGTMLoggerLevelDebug level out of -// non-debug builds. Messages at the kGTMLoggerLevelInfo level are also filtered -// out of non-debug builds unless GTMVerboseLogging is set in the environment or -// the processes's defaults. Messages at the kGTMLoggerLevelError level are -// never filtered. -@interface GTMLogLevelFilter : NSObject { - @private - BOOL verboseLoggingEnabled_; - NSUserDefaults *userDefaults_; -} -@end // GTMLogLevelFilter - -// A simple log filter that does NOT filter anything out; -// -filterAllowsMessage:level will always return YES. This can be a convenient -// way to enable debug-level logging in release builds (if you so desire). -@interface GTMLogNoFilter : NSObject -@end // GTMLogNoFilter - - -// Base class for custom level filters. Not for direct use, use the minimum -// or maximum level subclasses below. -@interface GTMLogAllowedLevelFilter : NSObject { - @private - NSIndexSet *allowedLevels_; -} -@end - -// A log filter that allows you to set a minimum log level. Messages below this -// level will be filtered. -@interface GTMLogMininumLevelFilter : GTMLogAllowedLevelFilter - -// Designated initializer, logs at levels < |level| will be filtered. -- (id)initWithMinimumLevel:(GTMLoggerLevel)level; - -@end - -// A log filter that allows you to set a maximum log level. Messages whose level -// exceeds this level will be filtered. This is really only useful if you have -// a composite GTMLogger that is sending the other messages elsewhere. -@interface GTMLogMaximumLevelFilter : GTMLogAllowedLevelFilter - -// Designated initializer, logs at levels > |level| will be filtered. -- (id)initWithMaximumLevel:(GTMLoggerLevel)level; - -@end - - -// For subclasses only -@interface GTMLogger (PrivateMethods) - -- (void)logInternalFunc:(const char *)func - format:(NSString *)fmt - valist:(va_list)args - level:(GTMLoggerLevel)level NS_FORMAT_FUNCTION(2, 0); - -@end - diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMMethodCheck.h b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMMethodCheck.h deleted file mode 100644 index 9fad81d8c..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMMethodCheck.h +++ /dev/null @@ -1,69 +0,0 @@ -// -// GTMMethodCheck.h -// -// Copyright 2006-2016 Google Inc. -// -// 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 -#import -#import - -/// A macro for enforcing debug time checks to make sure all required methods are linked in -// -// When using categories, it can be very easy to forget to include the -// implementation of a category. -// Let's say you had a class foo that depended on method bar of class baz, and -// method bar was implemented as a member of a category. -// You could add the following code: -// -// GTM_METHOD_CHECK(baz, bar) -// -// and the code would check to make sure baz was implemented just before main -// was called. This works for both dynamic libraries, and executables. -// -// -// This is not compiled into release builds. - -#ifdef DEBUG - -// This is the "magic". -// A) we need a multi layer define here so that the preprocessor expands -// __LINE__ the way we want it. We need __LINE__ so that each of our -// GTM_METHOD_CHECKs generates a unique function name. -#define GTM_METHOD_CHECK(class, method) GTM_METHOD_CHECK_INNER(class, method, __LINE__) -#define GTM_METHOD_CHECK_INNER(class, method, line) \ - GTM_METHOD_CHECK_INNER_INNER(class, method, line) - -// B) define a function that is called at startup to check that |class| has an -// implementation for |method| (either a class method or an instance method). -#define GTM_METHOD_CHECK_INNER_INNER(class, method, line) \ -__attribute__ ((constructor, visibility("hidden"))) \ - static void xxGTMMethodCheckMethod ## class ## line () { \ - @autoreleasepool { \ - if (![class instancesRespondToSelector:@selector(method)] \ - && ![class respondsToSelector:@selector(method)]) { \ - fprintf(stderr, "%s:%d: error: We need method '%s' to be linked in for class '%s'\n", \ - __FILE__, line, #method, #class); \ - exit(EX_SOFTWARE); \ - } \ - } \ -} - -#else // DEBUG - -// Do nothing in release. -#define GTM_METHOD_CHECK(class, method) - -#endif // DEBUG diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMNSData+zlib.h b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMNSData+zlib.h deleted file mode 100644 index dceadc444..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMNSData+zlib.h +++ /dev/null @@ -1,199 +0,0 @@ -// -// GTMNSData+zlib.h -// -// Copyright 2007-2008 Google Inc. -// -// 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 -#import "GTMDefines.h" - -/// Helpers for dealing w/ zlib inflate/deflate calls. -@interface NSData (GTMZLibAdditions) - -// NOTE: For 64bit, none of these apis handle input sizes >32bits, they will -// return nil when given such data. To handle data of that size you really -// should be streaming it rather then doing it all in memory. - -#pragma mark Gzip Compression - -/// Return an autoreleased NSData w/ the result of gzipping the bytes. -// -// Uses the default compression level. -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length; -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of gzipping the payload of |data|. -// -// Uses the default compression level. -+ (NSData *)gtm_dataByGzippingData:(NSData *)data __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByGzippingData:(NSData *)data - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of gzipping the bytes using |level| compression level. -// -// |level| can be 1-9, any other values will be clipped to that range. -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of gzipping the payload of |data| using |level| compression level. -+ (NSData *)gtm_dataByGzippingData:(NSData *)data - compressionLevel:(int)level __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByGzippingData:(NSData *)data - compressionLevel:(int)level - error:(NSError **)error; - -#pragma mark Zlib "Stream" Compression - -// NOTE: deflate is *NOT* gzip. deflate is a "zlib" stream. pick which one -// you really want to create. (the inflate api will handle either) - -/// Return an autoreleased NSData w/ the result of deflating the bytes. -// -// Uses the default compression level. -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of deflating the payload of |data|. -// -// Uses the default compression level. -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of deflating the bytes using |level| compression level. -// -// |level| can be 1-9, any other values will be clipped to that range. -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of deflating the payload of |data| using |level| compression level. -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data - compressionLevel:(int)level __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByDeflatingData:(NSData *)data - compressionLevel:(int)level - error:(NSError **)error; - -#pragma mark Uncompress of Gzip or Zlib - -/// Return an autoreleased NSData w/ the result of decompressing the bytes. -// -// The bytes to decompress can be zlib or gzip payloads. -+ (NSData *)gtm_dataByInflatingBytes:(const void *)bytes - length:(NSUInteger)length __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByInflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of decompressing the payload of |data|. -// -// The data to decompress can be zlib or gzip payloads. -+ (NSData *)gtm_dataByInflatingData:(NSData *)data __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByInflatingData:(NSData *)data - error:(NSError **)error; - -#pragma mark "Raw" Compression Support - -// NOTE: raw deflate is *NOT* gzip or deflate. it does not include a header -// of any form and should only be used within streams here an external crc/etc. -// is done to validate the data. The RawInflate apis can be used on data -// processed like this. - -/// Return an autoreleased NSData w/ the result of *raw* deflating the bytes. -// -// Uses the default compression level. -// *No* header is added to the resulting data. -+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of *raw* deflating the payload of |data|. -// -// Uses the default compression level. -// *No* header is added to the resulting data. -+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of *raw* deflating the bytes using |level| compression level. -// -// |level| can be 1-9, any other values will be clipped to that range. -// *No* header is added to the resulting data. -+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes - length:(NSUInteger)length - compressionLevel:(int)level - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of *raw* deflating the payload of |data| using |level| compression level. -// *No* header is added to the resulting data. -+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data - compressionLevel:(int)level __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data - compressionLevel:(int)level - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of *raw* decompressing the bytes. -// -// The data to decompress, it should *not* have any header (zlib nor gzip). -+ (NSData *)gtm_dataByRawInflatingBytes:(const void *)bytes - length:(NSUInteger)length __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByRawInflatingBytes:(const void *)bytes - length:(NSUInteger)length - error:(NSError **)error; - -/// Return an autoreleased NSData w/ the result of *raw* decompressing the payload of |data|. -// -// The data to decompress, it should *not* have any header (zlib nor gzip). -+ (NSData *)gtm_dataByRawInflatingData:(NSData *)data __attribute__((deprecated("Use error variant"))); -+ (NSData *)gtm_dataByRawInflatingData:(NSData *)data - error:(NSError **)error; - -@end - -FOUNDATION_EXPORT NSString *const GTMNSDataZlibErrorDomain; -FOUNDATION_EXPORT NSString *const GTMNSDataZlibErrorKey; // NSNumber -FOUNDATION_EXPORT NSString *const GTMNSDataZlibRemainingBytesKey; // NSNumber - -typedef NS_ENUM(NSInteger, GTMNSDataZlibError) { - GTMNSDataZlibErrorGreaterThan32BitsToCompress = 1024, - // An internal zlib error. - // GTMNSDataZlibErrorKey will contain the error value. - // NSLocalizedDescriptionKey may contain an error string from zlib. - // Look in zlib.h for list of errors. - GTMNSDataZlibErrorInternal, - // There was left over data in the buffer that was not used. - // GTMNSDataZlibRemainingBytesKey will contain number of remaining bytes. - GTMNSDataZlibErrorDataRemaining -}; diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMNSDictionary+URLArguments.h b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMNSDictionary+URLArguments.h deleted file mode 100644 index 734edeadb..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMNSDictionary+URLArguments.h +++ /dev/null @@ -1,40 +0,0 @@ -// -// GTMNSDictionary+URLArguments.h -// -// Copyright 2006-2008 Google Inc. -// -// 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 - -/// Utility for building a URL or POST argument string. -@interface NSDictionary (GTMNSDictionaryURLArgumentsAdditions) - -/// Returns a dictionary of the decoded key-value pairs in a http arguments -/// string of the form key1=value1&key2=value2&...&keyN=valueN. -/// Keys and values will be unescaped automatically. -/// Only the first value for a repeated key is returned. -/// -/// NOTE: Apps targeting iOS 8 or OS X 10.10 and later should use -/// NSURLComponents and NSURLQueryItem to create URLs with -/// query arguments instead of using these category methods. -+ (NSDictionary *)gtm_dictionaryWithHttpArgumentsString:(NSString *)argString; - -/// Gets a string representation of the dictionary in the form -/// key1=value1&key2=value2&...&keyN=valueN, suitable for use as either -/// URL arguments (after a '?') or POST body. Keys and values will be escaped -/// automatically, so should be unescaped in the dictionary. -- (NSString *)gtm_httpArgumentsString; - -@end diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMNSString+URLArguments.h b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMNSString+URLArguments.h deleted file mode 100644 index 0cb7f3027..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMNSString+URLArguments.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// GTMNSString+URLArguments.h -// -// Copyright 2006-2008 Google Inc. -// -// 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 - -/// Utilities for encoding and decoding URL arguments. -@interface NSString (GTMNSStringURLArgumentsAdditions) - -/// Returns a string that is escaped properly to be a URL argument. -/// -/// This differs from stringByAddingPercentEscapesUsingEncoding: in that it -/// will escape all the reserved characters (per RFC 3986 -/// ) which -/// stringByAddingPercentEscapesUsingEncoding would leave. -/// -/// This will also escape '%', so this should not be used on a string that has -/// already been escaped unless double-escaping is the desired result. -/// -/// NOTE: Apps targeting iOS 8 or OS X 10.10 and later should use -/// NSURLComponents and NSURLQueryItem to create properly-escaped -/// URLs instead of using these category methods. -- (NSString*)gtm_stringByEscapingForURLArgument; - -/// Returns the unescaped version of a URL argument -/// -/// This has the same behavior as stringByReplacingPercentEscapesUsingEncoding:, -/// except that it will also convert '+' to space. -- (NSString*)gtm_stringByUnescapingFromURLArgument; - -@end diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMStringEncoding.h b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMStringEncoding.h deleted file mode 100644 index 24fa0bc75..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMStringEncoding.h +++ /dev/null @@ -1,112 +0,0 @@ -// -// GTMStringEncoding.h -// -// Copyright 2010 Google Inc. -// -// 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 -#import "GTMDefines.h" - -// A generic class for arbitrary base-2 to 128 string encoding and decoding. -@interface GTMStringEncoding : NSObject { - @private - NSData *charMapData_; - char *charMap_; - int reverseCharMap_[128]; - int shift_; - int mask_; - BOOL doPad_; - char paddingChar_; - int padLen_; -} - -// Create a new, autoreleased GTMStringEncoding object with a standard encoding. -+ (id)binaryStringEncoding; -+ (id)hexStringEncoding; -+ (id)rfc4648Base32StringEncoding; -+ (id)rfc4648Base32HexStringEncoding; -+ (id)crockfordBase32StringEncoding; -+ (id)rfc4648Base64StringEncoding; -+ (id)rfc4648Base64WebsafeStringEncoding; - -// Create a new, autoreleased GTMStringEncoding object with the given string, -// as described below. -+ (id)stringEncodingWithString:(NSString *)string; - -// Initialize a new GTMStringEncoding object with the string. -// -// The length of the string must be a power of 2, at least 2 and at most 128. -// Only 7-bit ASCII characters are permitted in the string. -// -// These characters are the canonical set emitted during encoding. -// If the characters have alternatives (e.g. case, easily transposed) then use -// addDecodeSynonyms: to configure them. -- (id)initWithString:(NSString *)string; - -// Add decoding synonyms as specified in the synonyms argument. -// -// It should be a sequence of one previously reverse mapped character, -// followed by one or more non-reverse mapped character synonyms. -// Only 7-bit ASCII characters are permitted in the string. -// -// e.g. If a GTMStringEncoder object has already been initialised with a set -// of characters excluding I, L and O (to avoid confusion with digits) and you -// want to accept them as digits you can call addDecodeSynonyms:@"0oO1iIlL". -- (void)addDecodeSynonyms:(NSString *)synonyms; - -// A sequence of characters to ignore if they occur during encoding. -// Only 7-bit ASCII characters are permitted in the string. -- (void)ignoreCharacters:(NSString *)chars; - -// Indicates whether padding is performed during encoding. -- (BOOL)doPad; -- (void)setDoPad:(BOOL)doPad; - -// Sets the padding character to use during encoding. -- (void)setPaddingChar:(char)c; - -// Encode a raw binary buffer to a 7-bit ASCII string. -- (NSString *)encode:(NSData *)data __attribute__((deprecated("Use encode:error:"))); -- (NSString *)encodeString:(NSString *)string __attribute__((deprecated("Use encodeString:error:"))); - -- (NSString *)encode:(NSData *)data error:(NSError **)error; -- (NSString *)encodeString:(NSString *)string error:(NSError **)error; - -// Decode a 7-bit ASCII string to a raw binary buffer. -- (NSData *)decode:(NSString *)string __attribute__((deprecated("Use decode:error:"))); -- (NSString *)stringByDecoding:(NSString *)string __attribute__((deprecated("Use stringByDecoding:error:"))); - -- (NSData *)decode:(NSString *)string error:(NSError **)error; -- (NSString *)stringByDecoding:(NSString *)string error:(NSError **)error; - -@end - -FOUNDATION_EXPORT NSString *const GTMStringEncodingErrorDomain; -FOUNDATION_EXPORT NSString *const GTMStringEncodingBadCharacterIndexKey; // NSNumber - -typedef NS_ENUM(NSInteger, GTMStringEncodingError) { - // Unable to convert a buffer to NSASCIIStringEncoding. - GTMStringEncodingErrorUnableToConverToAscii = 1024, - // Unable to convert a buffer to NSUTF8StringEncoding. - GTMStringEncodingErrorUnableToConverToUTF8, - // Encountered a bad character. - // GTMStringEncodingBadCharacterIndexKey will have the index of the character. - GTMStringEncodingErrorUnknownCharacter, - // The data had a padding character in the middle of the data. Padding characters - // can only be at the end. - GTMStringEncodingErrorExpectedPadding, - // There is unexpected data at the end of the data that could not be decoded. - GTMStringEncodingErrorIncompleteTrailingData, -}; diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMTypeCasting.h b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMTypeCasting.h deleted file mode 100644 index 0c5899fe4..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMTypeCasting.h +++ /dev/null @@ -1,71 +0,0 @@ -// -// GTMTypeCasting.h -// -// Copyright 2010 Google Inc. -// -// 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 -#import "GTMDefines.h" - -// These are some basic macros for making down-casting safer in Objective C. -// They are loosely based on the same cast types with similar names in C++. -// A typical usage would look like this: -// -// Bar* b = [[Bar alloc] init]; -// Foo* a = GTM_STATIC_CAST(Foo, b); -// -// Note that it's GTM_STATIC_CAST(Foo, b) and not GTM_STATIC_CAST(Foo*, b). -// -// GTM_STATIC_CAST runs only in debug mode, and will assert if and only if: -// - object is non nil -// - [object isKindOfClass:[cls class]] returns nil -// -// otherwise it returns object. -// -// GTM_DYNAMIC_CAST runs in both debug and release and will return nil if -// - object is nil -// - [object isKindOfClass:[cls class]] returns nil -// -// otherwise it returns object. -// - -// Support functions for dealing with casting. -GTM_INLINE id GTMDynamicCastSupport(Class cls, id object) { - _GTMDevAssert(cls, @"Nil Class"); - return [object isKindOfClass:cls] ? object : nil; -} - -GTM_INLINE id GTMStaticCastSupport(Class cls, id object) { - id value = nil; - if (object) { - value = GTMDynamicCastSupport(cls, object); - _GTMDevAssert(value, @"Could not cast %@ to class %@", object, cls); - } - return value; -} - -#ifndef GTM_STATIC_CAST - #ifdef DEBUG - #define GTM_STATIC_CAST(type, object) \ - ((type *) GTMStaticCastSupport([type class], object)) - #else - #define GTM_STATIC_CAST(type, object) ((type *) (object)) - #endif -#endif - -#ifndef GTM_DYNAMIC_CAST - #define GTM_DYNAMIC_CAST(type, object) \ - ((type *) GTMDynamicCastSupport([type class], object)) -#endif diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMURLBuilder.h b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMURLBuilder.h deleted file mode 100644 index f333ec44a..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Headers/GTMURLBuilder.h +++ /dev/null @@ -1,73 +0,0 @@ -// -// GTMURLBuilder.h -// -// Copyright 2012 Google Inc. -// -// 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. -// - -// -// Class for creating URLs. It handles URL encoding of parameters. -// -// Usage example: -// -// GTMURLBuilder *URLBuilder = -// [GTMURLBuilder builderWithString:@"http://www.google.com"]; -// [URLBuilder setValue:@"abc" forParameter:@"q"]; -// NSURL *URL = [URLBuilder URL]; -// -// NOTE: Apps targeting iOS 8 or OS X 10.10 and later should use -// NSURLComponents and NSURLQueryItem to create URLs with -// query arguments instead of using this class. - - -#import -#import "GTMDefines.h" - -#if (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_10) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10) \ -|| (TARGET_OS_IPHONE && defined(__IPHONE_8_0) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0) -__deprecated_msg("GTMURLBuilder is obsolete; update your app to use NSURLComponents queryItems property instead.") -#endif -@interface GTMURLBuilder : NSObject { - @private - NSMutableDictionary *params_; -} - -@property(nonatomic, readonly) NSString *baseURLString; - -// |URLString| is expected to be a valid URL with already escaped parameter -// values. -+ (GTMURLBuilder *)builderWithString:(NSString *)URLString; -+ (GTMURLBuilder *)builderWithURL:(NSURL *)URL; - -// |URLString| The base URL to which parameters will be appended. -// If the URL already contains parameters, they should already be encoded. -- (id)initWithString:(NSString *)URLString; -- (void)setValue:(NSString *)value forParameter:(NSString *)parameter; -- (void)setIntegerValue:(NSInteger)value forParameter:(NSString *)parameter; -- (NSString *)valueForParameter:(NSString *)parameter; -// Returns 0 if there is no value for |parameter| or if the value cannot -// be parsed into an NSInteger. Use valueForParameter if you want to make -// sure that the value is set before attempting the parsing. -- (NSInteger)integerValueForParameter:(NSString *)parameter; -- (void)removeParameter:(NSString *)parameter; -- (void)setParameters:(NSDictionary *)parameters; -- (NSDictionary *)parameters; -- (NSURL *)URL; -- (NSString *)URLString; - -// Case-sensitive comparison of the URL. Also protocol and host are compared -// as case-sensitive strings. The order of URL parameters is ignored. -- (BOOL)isEqual:(GTMURLBuilder *)URLBuilder; - -@end diff --git a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Modules/module.modulemap b/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Modules/module.modulemap deleted file mode 100644 index e8ef72b37..000000000 --- a/src/ios/Firebase/Performance/GoogleToolboxForMac.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module GoogleToolboxForMac { - umbrella header "GoogleToolboxForMac.h" - export * - module * { export *} - link "z" -} diff --git a/src/ios/Firebase/README.md b/src/ios/Firebase/README.md deleted file mode 100644 index 86b9403a8..000000000 --- a/src/ios/Firebase/README.md +++ /dev/null @@ -1,293 +0,0 @@ -# MODIFICATIONS - -This is a pruned copy of the 5.7.0 version of the Firebase SDK Frameworks. Any Frameworks that aren't currently used have been removed (along with duplicate Framework references) to reduce the size of the directory. - -# Firebase iOS SDKs - -This directory contains the full Firebase distribution, packaged as static -frameworks that can be integrated into your app. - -# Integration Instructions - -Each Firebase component requires several frameworks in order to function -properly. Each section below lists the frameworks you'll need to include -in your project in order to use that Firebase SDK in your application. - -To integrate a Firebase SDK with your app: - -1. Find the desired SDK in the list below. -2. Make sure you have an Xcode project open in Xcode. -3. In Xcode, hit `⌘-1` to open the Project Navigator pane. It will open on - left side of the Xcode window if it wasn't already open. -4. Drag each framework from the "Analytics" directory into the Project - Navigator pane. In the dialog box that appears, make sure the target you - want the framework to be added to has a checkmark next to it, and that - you've selected "Copy items if needed". If you already have Firebase - frameworks in your project, make sure that you replace them with the new - versions. -5. Drag each framework from the directory named after the SDK into the Project - Navigator pane. Note that there may be no additional frameworks, in which - case this directory will be empty. For instance, if you want the Database - SDK, look in the Database folder for the required frameworks. In the dialog - box that appears, make sure the target you want this framework to be added to - has a checkmark next to it, and that you've selected "Copy items if needed." - - *Do not add the Firebase frameworks to the "Embed Frameworks" Xcode build - phase. The Firebase frameworks are not embedded dynamic frameworks, but are - (static frameworks)[https://www.raywenderlich.com/65964/create-a-framework-for-ios] - which cannot be embedded into your application's bundle.* - -6. If the SDK has resources, go into the Resources folders, which will be in - the SDK folder. Drag all of those resources into the Project Navigator, just - like the frameworks, again making sure that the target you want to add these - resources to has a checkmark next to it, and that you've selected "Copy items - if needed". -7. Add the -ObjC flag to "Other Linker Settings": - a. In your project settings, open the Settings panel for your target - b. Go to the Build Settings tab and find the "Other Linker Flags" setting - in the Linking section. - c. Double-click the setting, click the '+' button, and add "-ObjC" (without - quotes) -8. Drag the `Firebase.h` header in this directory into your project. This will - allow you to `#import "Firebase.h"` and start using any Firebase SDK that you - have. -9. If you're using Swift, or you want to use modules, drag module.modulemap into - your project and update your User Header Search Paths to contain the - directory that contains your module map. -10. You're done! Compile your target and start using Firebase. - -If you want to add another SDK, repeat the steps above with the frameworks for -the new SDK. You only need to add each framework once, so if you've already -added a framework for one SDK, you don't need to add it again. Note that some -frameworks are required by multiple SDKs, and so appear in multiple folders. - -The Firebase frameworks list the system libraries and frameworks they depend on -in their modulemaps. If you have disabled the "Link Frameworks Automatically" -option in your Xcode project/workspace, you will need to add the system -frameworks and libraries listed in each Firebase framework's -.framework/Modules/module.modulemap file to your target's or targets' -"Link Binary With Libraries" build phase. - -"(~> X)" below means that the SDK requires all of the frameworks from X. You -should make sure to include all of the frameworks from X when including the SDK. - -NOTE: If you are upgrading FirebaseAnalytics from before Firebase 5.5.0, - `FirebaseNanoPB` has been renamed to `MeasurementNanoPB`. After you add - `MeasurementNanoPB` to your project, please remove `FirebaseNanoPB` as it - no longer provides any functionality. - -## Analytics - - FirebaseAnalytics.framework - - FirebaseCoreDiagnostics.framework - - FirebaseCore.framework - - FirebaseInstanceID.framework - - GoogleAppMeasurement.framework - - MeasurementNanoPB.framework - - GoogleUtilities.framework - - nanopb.framework -## ABTesting (~> Analytics) - - FirebaseABTesting.framework - - Protobuf.framework -## AdMob (~> Analytics) - - GoogleMobileAds.framework -## Auth (~> Analytics) - - FirebaseAuth.framework - - GTMSessionFetcher.framework -## Crash (~> Analytics) - - FirebaseCrash.framework - - GoogleToolboxForMac.framework - - Protobuf.framework -## Database (~> Analytics) - - FirebaseDatabase.framework - - leveldb-library.framework -## DynamicLinks (~> Analytics) - - FirebaseDynamicLinks.framework -## Firestore (~> Analytics) - - BoringSSL.framework - - FirebaseFirestore.framework - - Protobuf.framework - - gRPC.framework - - gRPC-Core.framework - - gRPC-ProtoRPC.framework - - gRPC-RxLibrary.framework - - leveldb-library.framework - - You'll also need to add the resources in the - Resources directory into your target's main - bundle. -## Functions (~> Analytics) - - FirebaseFunctions.framework - - GTMSessionFetcher.framework -## InAppMessagingDisplay (~> Analytics) - - FirebaseInAppMessaging.framework - - You'll also need to add the resources in the - Resources directory into your target's main - bundle. -## Invites (~> Analytics) - - FirebaseDynamicLinks.framework - - FirebaseInvites.framework - - GTMOAuth2.framework - - GTMSessionFetcher.framework - - GoogleAPIClientForREST.framework - - GoogleSignIn.framework - - GoogleToolboxForMac.framework - - Protobuf.framework - - You'll also need to add the resources in the - Resources directory into your target's main - bundle. -## Messaging (~> Analytics) - - FirebaseMessaging.framework - - Protobuf.framework -## MLModelInterpreter (~> Analytics) - - FirebaseMLCommon.framework - - FirebaseMLModelInterpreter.framework - - GTMSessionFetcher.framework - - tensorflow_lite.framework -## MLVision (~> Analytics) - - FirebaseMLCommon.framework - - FirebaseMLVision.framework - - GTMSessionFetcher.framework - - GoogleAPIClientForREST.framework - - BarcodeDetector.framework - - TextDetector.framework - - FaceDetector.framework - - LabelDetector.framework - - GoogleMobileVision.framework - - GoogleToolboxForMac.framework - - Protobuf.framework - - You'll also need to add the resources in the - Resources directory into your target's main - bundle. -## MLVisionBarcodeModel (~> Analytics) - - FirebaseMLVisionBarcodeModel.framework - - GTMSessionFetcher.framework - - BarcodeDetector.framework - - TextDetector.framework - - FaceDetector.framework - - LabelDetector.framework - - GoogleMobileVision.framework - - GoogleToolboxForMac.framework - - Protobuf.framework - - You'll also need to add the resources in the - Resources directory into your target's main - bundle. -## MLVisionFaceModel (~> Analytics) - - FirebaseMLVisionFaceModel.framework - - GTMSessionFetcher.framework - - BarcodeDetector.framework - - TextDetector.framework - - FaceDetector.framework - - LabelDetector.framework - - GoogleMobileVision.framework - - GoogleToolboxForMac.framework - - Protobuf.framework - - You'll also need to add the resources in the - Resources directory into your target's main - bundle. -## MLVisionLabelModel (~> Analytics) - - FirebaseMLVisionLabelModel.framework - - GTMSessionFetcher.framework - - BarcodeDetector.framework - - TextDetector.framework - - FaceDetector.framework - - LabelDetector.framework - - GoogleMobileVision.framework - - GoogleToolboxForMac.framework - - Protobuf.framework - - You'll also need to add the resources in the - Resources directory into your target's main - bundle. -## MLVisionTextModel (~> Analytics) - - FirebaseMLVisionTextModel.framework - - GTMSessionFetcher.framework - - BarcodeDetector.framework - - TextDetector.framework - - FaceDetector.framework - - LabelDetector.framework - - GoogleMobileVision.framework - - GoogleToolboxForMac.framework - - Protobuf.framework - - You'll also need to add the resources in the - Resources directory into your target's main - bundle. -## Performance (~> Analytics) - - FirebasePerformance.framework - - GTMSessionFetcher.framework - - GoogleToolboxForMac.framework - - Protobuf.framework -## RemoteConfig (~> Analytics) - - FirebaseABTesting.framework - - FirebaseRemoteConfig.framework - - Protobuf.framework -## Storage (~> Analytics) - - FirebaseStorage.framework - - GTMSessionFetcher.framework - -# Samples - -You can get samples for Firebase from https://github.com/firebase/quickstart-ios: - - git clone https://github.com/firebase/quickstart-ios - -Note that several of the samples depend on SDKs that are not included with -this archive; for example, FirebaseUI. For the samples that depend on SDKs not -included in this archive, you'll need to use CocoaPods. - -# Versions - -The frameworks in this directory map to these versions of the Firebase SDKs in -CocoaPods. - - CocoaPod | Version ------------------------------ | ------- -BoringSSL | 10.0.6 -Firebase | 5.7.0 -FirebaseABTesting | 2.0.0 -FirebaseAnalytics | 5.1.1 -FirebaseAuth | 5.0.3 -FirebaseAuthInterop | 1.0.0 -FirebaseCore | 5.1.2 -FirebaseCrash | 3.1.1 -FirebaseDatabase | 5.0.2 -FirebaseDynamicLinks | 3.0.2 -FirebaseFirestore | 0.13.2 -FirebaseFunctions | 2.1.0 -FirebaseInAppMessaging | 0.11.0 -FirebaseInstanceID | 3.2.1 -FirebaseInvites | 3.0.0 -FirebaseMLCommon | 0.11.0 -FirebaseMLModelInterpreter | 0.11.0 -FirebaseMLVision | 0.11.0 -FirebaseMLVisionBarcodeModel | 0.11.0 -FirebaseMLVisionFaceModel | 0.11.0 -FirebaseMLVisionLabelModel | 0.11.0 -FirebaseMLVisionTextModel | 0.11.0 -FirebaseMessaging | 3.1.1 -FirebasePerformance | 2.1.1 -FirebaseRemoteConfig | 3.0.1 -FirebaseStorage | 3.0.1 -GTMOAuth2 | 1.1.6 -GTMSessionFetcher | 1.2.0 -Google-Mobile-Ads-SDK | 7.32.0 -GoogleAPIClientForREST | 1.3.6 -GoogleAppMeasurement | 5.1.1 -GoogleMobileVision | 1.5.0 -GoogleSignIn | 4.2.0 -GoogleToolboxForMac | 2.1.4 -GoogleUtilities | 5.2.2 -Protobuf | 3.6.1 -TensorFlowLite | 0.1.7 -gRPC | 1.14.1 -gRPC-Core | 1.14.1 -gRPC-ProtoRPC | 1.14.1 -gRPC-RxLibrary | 1.14.1 -leveldb-library | 1.20 -nanopb | 0.3.8 - diff --git a/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/FirebaseABTesting b/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/FirebaseABTesting deleted file mode 100755 index abb4d3f1b..000000000 Binary files a/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/FirebaseABTesting and /dev/null differ diff --git a/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/Headers/FIRExperimentController.h b/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/Headers/FIRExperimentController.h deleted file mode 100755 index abd295996..000000000 --- a/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/Headers/FIRExperimentController.h +++ /dev/null @@ -1,48 +0,0 @@ -#import - -#import "developers/mobile/abt/proto/ExperimentPayload.pbobjc.h" - -NS_ASSUME_NONNULL_BEGIN - -@class FIRLifecycleEvents; - -/// The default experiment overflow policy, that is to discard the experiment with the oldest start -/// time when users start the experiment on the web console. -extern const ABTExperimentPayload_ExperimentOverflowPolicy FIRDefaultExperimentOverflowPolicy; - -/// This class is for Firebase services to handle experiments updates to Firebase Analytics. -/// Experiments can be set, cleared and updated through this controller. -@interface FIRExperimentController : NSObject - -/// Returns the FIRExperimentController singleton. -+ (FIRExperimentController *)sharedInstance; - -/// Updates the list of experiments. Experiments already existing in payloads are not affected, -/// whose state and payload is preserved. This method compares whether the experiments have changed -/// or not by their variant ID. This runs in a background queue. -/// @param origin The originating service affected by the experiment, it is defined at -/// Firebase Analytics FIREventOrigins.h. -/// @param events A list of event names to be used for logging experiment lifecycle events, -/// if they are not defined in the payload. -/// @param policy The policy to handle new experiments when slots are full. -/// @param lastStartTime The last known experiment start timestamp for this affected service. -/// (Timestamps are specified by the number of seconds from 00:00:00 UTC on 1 -/// January 1970.). -/// @param payloads List of experiment metadata. -- (void)updateExperimentsWithServiceOrigin:(NSString *)origin - events:(FIRLifecycleEvents *)events - policy:(ABTExperimentPayload_ExperimentOverflowPolicy)policy - lastStartTime:(NSTimeInterval)lastStartTime - payloads:(NSArray *)payloads; - -/// Returns the latest experiment start timestamp given a current latest timestamp and a list of -/// experiment payloads. Timestamps are specified by the number of seconds from 00:00:00 UTC on 1 -/// January 1970. -/// @param timestamp Current latest experiment start timestamp. If not known, affected service -/// should specify -1; -/// @param payloads List of experiment metadata. -- (NSTimeInterval)latestExperimentStartTimestampBetweenTimestamp:(NSTimeInterval)timestamp - andPayloads:(NSArray *)payloads; -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/Headers/FIRLifecycleEvents.h b/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/Headers/FIRLifecycleEvents.h deleted file mode 100755 index a245a81e4..000000000 --- a/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/Headers/FIRLifecycleEvents.h +++ /dev/null @@ -1,46 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -/// Default event name for when an experiment is set. -extern NSString *const FIRSetExperimentEventName; -/// Default event name for when an experiment is activated. -extern NSString *const FIRActivateExperimentEventName; -/// Default event name for when an experiment is cleared. -extern NSString *const FIRClearExperimentEventName; -/// Default event name for when an experiment times out for being activated. -extern NSString *const FIRTimeoutExperimentEventName; -/// Default event name for when an experiment is expired as it reaches the end of TTL. -extern NSString *const FIRExpireExperimentEventName; - -/// An Experiment Lifecycle Event Object that specifies the name of the experiment event to be -/// logged by Firebase Analytics. -@interface FIRLifecycleEvents : NSObject - -/// Event name for when an experiment is set. It is default to FIRSetExperimentEventName and can be -/// overriden. If experiment payload has a valid string of this field, always use experiment -/// payload. -@property(nonatomic, copy) NSString *setExperimentEventName; - -/// Event name for when an experiment is activated. It is default to FIRActivateExperimentEventName -/// and can be overriden. If experiment payload has a valid string of this field, always use -/// experiment payload. -@property(nonatomic, copy) NSString *activateExperimentEventName; - -/// Event name for when an experiment is clearred. It is default to FIRClearExperimentEventName and -/// can be overriden. If experiment payload has a valid string of this field, always use experiment -/// payload. -@property(nonatomic, copy) NSString *clearExperimentEventName; -/// Event name for when an experiment is timeout from being STANDBY. It is default to -/// FIRTimeoutExperimentEventName and can be overriden. If experiment payload has a valid string -/// of this field, always use experiment payload. -@property(nonatomic, copy) NSString *timeoutExperimentEventName; - -/// Event name when an experiment is expired when it reaches the end of its TTL. -/// It is default to FIRExpireExperimentEventName and can be overriden. If experiment payload has a -/// valid string of this field, always use experiment payload. -@property(nonatomic, copy) NSString *expireExperimentEventName; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/Headers/FirebaseABTesting.h b/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/Headers/FirebaseABTesting.h deleted file mode 100755 index 0aad4932b..000000000 --- a/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/Headers/FirebaseABTesting.h +++ /dev/null @@ -1,2 +0,0 @@ -#import "FIRExperimentController.h" -#import "FIRLifecycleEvents.h" diff --git a/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/Modules/module.modulemap b/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/Modules/module.modulemap deleted file mode 100755 index 603022fab..000000000 --- a/src/ios/Firebase/RemoteConfig/FirebaseABTesting.framework/Modules/module.modulemap +++ /dev/null @@ -1,7 +0,0 @@ -framework module FirebaseABTesting { - umbrella header "FirebaseABTesting.h" - export * - module * { export *} - link "z" - link framework "Security" - link framework "SystemConfiguration"} diff --git a/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/FirebaseRemoteConfig b/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/FirebaseRemoteConfig deleted file mode 100755 index 06e3d3dc3..000000000 Binary files a/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/FirebaseRemoteConfig and /dev/null differ diff --git a/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FIRRemoteConfig.h b/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FIRRemoteConfig.h deleted file mode 100755 index 098f3ced9..000000000 --- a/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FIRRemoteConfig.h +++ /dev/null @@ -1,246 +0,0 @@ -// -// FIRRemoteConfig.h -// Firebase Remote Config service SDK -// Copyright 2016 Google Inc. All rights reserved. -// -#import - -/// The Firebase Remote Config service default namespace, to be used if the API method does not -/// specify a different namespace. Use the default namespace if configuring from the Google Firebase -/// service. -extern NSString *const __nonnull FIRNamespaceGoogleMobilePlatform - NS_SWIFT_NAME(NamespaceGoogleMobilePlatform); - -/// Key used to manage throttling in NSError user info when the refreshing of Remote Config -/// parameter values (data) is throttled. The value of this key is the elapsed time since 1970, -/// measured in seconds. -extern NSString *const __nonnull FIRRemoteConfigThrottledEndTimeInSecondsKey - NS_SWIFT_NAME(RemoteConfigThrottledEndTimeInSecondsKey); - -/// Indicates whether updated data was successfully fetched. -typedef NS_ENUM(NSInteger, FIRRemoteConfigFetchStatus) { - /// Config has never been fetched. - FIRRemoteConfigFetchStatusNoFetchYet, - /// Config fetch succeeded. - FIRRemoteConfigFetchStatusSuccess, - /// Config fetch failed. - FIRRemoteConfigFetchStatusFailure, - /// Config fetch was throttled. - FIRRemoteConfigFetchStatusThrottled, -} NS_SWIFT_NAME(RemoteConfigFetchStatus); - -/// Remote Config error domain that handles errors when fetching data from the service. -extern NSString *const __nonnull FIRRemoteConfigErrorDomain NS_SWIFT_NAME(RemoteConfigErrorDomain); -/// Firebase Remote Config service fetch error. -typedef NS_ENUM(NSInteger, FIRRemoteConfigError) { - /// Unknown or no error. - FIRRemoteConfigErrorUnknown = 8001, - /// Frequency of fetch requests exceeds throttled limit. - FIRRemoteConfigErrorThrottled = 8002, - /// Internal error that covers all internal HTTP errors. - FIRRemoteConfigErrorInternalError = 8003, -} NS_SWIFT_NAME(RemoteConfigError); - -/// Enumerated value that indicates the source of Remote Config data. Data can come from -/// the Remote Config service, the DefaultConfig that is available when the app is first installed, -/// or a static initialized value if data is not available from the service or DefaultConfig. -typedef NS_ENUM(NSInteger, FIRRemoteConfigSource) { - FIRRemoteConfigSourceRemote, ///< The data source is the Remote Config service. - FIRRemoteConfigSourceDefault, ///< The data source is the DefaultConfig defined for this app. - FIRRemoteConfigSourceStatic, ///< The data doesn't exist, return a static initialized value. -} NS_SWIFT_NAME(RemoteConfigSource); - -/// Completion handler invoked by fetch methods when they get a response from the server. -/// -/// @param status Config fetching status. -/// @param error Error message on failure. -typedef void (^FIRRemoteConfigFetchCompletion)(FIRRemoteConfigFetchStatus status, - NSError *__nullable error) - NS_SWIFT_NAME(RemoteConfigFetchCompletion); - -#pragma mark - FIRRemoteConfigValue -/// This class provides a wrapper for Remote Config parameter values, with methods to get parameter -/// values as different data types. -NS_SWIFT_NAME(RemoteConfigValue) -@interface FIRRemoteConfigValue : NSObject -/// Gets the value as a string. -@property(nonatomic, readonly, nullable) NSString *stringValue; -/// Gets the value as a number value. -@property(nonatomic, readonly, nullable) NSNumber *numberValue; -/// Gets the value as a NSData object. -@property(nonatomic, readonly, nonnull) NSData *dataValue; -/// Gets the value as a boolean. -@property(nonatomic, readonly) BOOL boolValue; -/// Identifies the source of the fetched value. -@property(nonatomic, readonly) FIRRemoteConfigSource source; -@end - -#pragma mark - FIRRemoteConfigSettings -/// Firebase Remote Config settings. -NS_SWIFT_NAME(RemoteConfigSettings) -@interface FIRRemoteConfigSettings : NSObject -/// Indicates whether Developer Mode is enabled. -@property(nonatomic, readonly) BOOL isDeveloperModeEnabled; -/// Initializes FIRRemoteConfigSettings, which is used to set properties for custom settings. To -/// make custom settings take effect, pass the FIRRemoteConfigSettings instance to the -/// configSettings property of FIRRemoteConfig. -- (nonnull FIRRemoteConfigSettings *)initWithDeveloperModeEnabled:(BOOL)developerModeEnabled - NS_DESIGNATED_INITIALIZER; -@end - -#pragma mark - FIRRemoteConfig -/// Firebase Remote Config class. The shared instance method +remoteConfig can be created and used -/// to fetch, activate and read config results and set default config results. -NS_SWIFT_NAME(RemoteConfig) -@interface FIRRemoteConfig : NSObject -/// Last successful fetch completion time. -@property(nonatomic, readonly, strong, nullable) NSDate *lastFetchTime; -/// Last fetch status. The status can be any enumerated value from FIRRemoteConfigFetchStatus. -@property(nonatomic, readonly, assign) FIRRemoteConfigFetchStatus lastFetchStatus; -/// Config settings are custom settings. -@property(nonatomic, readwrite, strong, nonnull) FIRRemoteConfigSettings *configSettings; - -/// Returns the FIRRemoteConfig instance shared throughout your app. This singleton object contains -/// the complete set of Remote Config parameter values available to the app, including the Active -/// Config and Default Config. This object also caches values fetched from the Remote Config Server -/// until they are copied to the Active Config by calling activateFetched. -/// When you fetch values from the Remote Config Server using the default Firebase namespace -/// service, you should use this class method to create a shared instance of the FIRRemoteConfig -/// object to ensure that your app will function properly with the Remote Config Server and the -/// Firebase service. -+ (nonnull FIRRemoteConfig *)remoteConfig NS_SWIFT_NAME(remoteConfig()); - -/// Unavailable. Use +remoteConfig instead. -- (nonnull instancetype)init __attribute__((unavailable("Use +remoteConfig instead."))); - -#pragma mark - Fetch -/// Fetches Remote Config data with a callback. Call activateFetched to make fetched data available -/// to your app. -/// -/// Note: This method uses a Firebase Instance ID token to identify the app instance, and once it's -/// called, it periodically sends data to the Firebase backend. (see -/// `[FIRInstanceID getIDWithHandler:]`). -/// To stop the periodic sync, developers need to call `[FIRInstanceID deleteIDWithHandler:]` and -/// avoid calling this method again. -/// -/// @param completionHandler Fetch operation callback. -- (void)fetchWithCompletionHandler:(nullable FIRRemoteConfigFetchCompletion)completionHandler; - -/// Fetches Remote Config data and sets a duration that specifies how long config data lasts. -/// Call activateFetched to make fetched data available to your app. -/// -/// Note: This method uses a Firebase Instance ID token to identify the app instance, and once it's -/// called, it periodically sends data to the Firebase backend. (see -/// `[FIRInstanceID getIDWithHandler:]`). -/// To stop the periodic sync, developers need to call `[FIRInstanceID deleteIDWithHandler:]` and -/// avoid calling this method again. -/// -/// @param expirationDuration Duration that defines how long fetched config data is available, in -/// seconds. When the config data expires, a new fetch is required. -/// @param completionHandler Fetch operation callback. -- (void)fetchWithExpirationDuration:(NSTimeInterval)expirationDuration - completionHandler:(nullable FIRRemoteConfigFetchCompletion)completionHandler; - -#pragma mark - Apply -/// Applies Fetched Config data to the Active Config, causing updates to the behavior and appearance -/// of the app to take effect (depending on how config data is used in the app). -/// Returns true if there was a Fetched Config, and it was activated. -/// Returns false if no Fetched Config was found, or the Fetched Config was already activated. -- (BOOL)activateFetched; - -#pragma mark - Get Config -/// Enables access to configuration values by using object subscripting syntax. -/// This is used to get the config value of the default namespace. -///
-/// // Example:
-/// FIRRemoteConfig *config = [FIRRemoteConfig remoteConfig];
-/// FIRRemoteConfigValue *value = config[@"yourKey"];
-/// BOOL b = value.boolValue;
-/// NSNumber *number = config[@"yourKey"].numberValue;
-/// 
-- (nonnull FIRRemoteConfigValue *)objectForKeyedSubscript:(nonnull NSString *)key; - -/// Gets the config value of the default namespace. -/// @param key Config key. -- (nonnull FIRRemoteConfigValue *)configValueForKey:(nullable NSString *)key; - -/// Gets the config value of a given namespace. -/// @param key Config key. -/// @param aNamespace Config results under a given namespace. -- (nonnull FIRRemoteConfigValue *)configValueForKey:(nullable NSString *)key - namespace:(nullable NSString *)aNamespace; - -/// Gets the config value of a given namespace and a given source. -/// @param key Config key. -/// @param aNamespace Config results under a given namespace. -/// @param source Config value source. -- (nonnull FIRRemoteConfigValue *)configValueForKey:(nullable NSString *)key - namespace:(nullable NSString *)aNamespace - source:(FIRRemoteConfigSource)source; - -/// Gets all the parameter keys from a given source and a given namespace. -/// -/// @param source The config data source. -/// @param aNamespace The config data namespace. -/// @return An array of keys under the given source and namespace. -- (nonnull NSArray *)allKeysFromSource:(FIRRemoteConfigSource)source - namespace:(nullable NSString *)aNamespace; - -/// Returns the set of parameter keys that start with the given prefix, from the default namespace -/// in the active config. -/// -/// @param prefix The key prefix to look for. If prefix is nil or empty, returns all the -/// keys. -/// @return The set of parameter keys that start with the specified prefix. -- (nonnull NSSet *)keysWithPrefix:(nullable NSString *)prefix; - -/// Returns the set of parameter keys that start with the given prefix, from the given namespace in -/// the active config. -/// -/// @param prefix The key prefix to look for. If prefix is nil or empty, returns all the -/// keys in the given namespace. -/// @param aNamespace The namespace in which to look up the keys. If the namespace is invalid, -/// returns an empty set. -/// @return The set of parameter keys that start with the specified prefix. -- (nonnull NSSet *)keysWithPrefix:(nullable NSString *)prefix - namespace:(nullable NSString *)aNamespace; - -#pragma mark - Defaults -/// Sets config defaults for parameter keys and values in the default namespace config. -/// -/// @param defaults A dictionary mapping a NSString * key to a NSObject * value. -- (void)setDefaults:(nullable NSDictionary *)defaults; - -/// Sets config defaults for parameter keys and values in the default namespace config. -/// -/// @param defaults A dictionary mapping a NSString * key to a NSObject * value. -/// @param aNamespace Config under a given namespace. -- (void)setDefaults:(nullable NSDictionary *)defaults - namespace:(nullable NSString *)aNamespace; - -/// Sets default configs from plist for default namespace; -/// @param fileName The plist file name, with no file name extension. For example, if the plist file -/// is defaultSamples.plist, call: -/// [[FIRRemoteConfig remoteConfig] setDefaultsFromPlistFileName:@"defaultSamples"]; -- (void)setDefaultsFromPlistFileName:(nullable NSString *)fileName - NS_SWIFT_NAME(setDefaults(fromPlist:)); - -/// Sets default configs from plist for a given namespace; -/// @param fileName The plist file name, with no file name extension. For example, if the plist file -/// is defaultSamples.plist, call: -/// [[FIRRemoteConfig remoteConfig] setDefaultsFromPlistFileName:@"defaultSamples"]; -/// @param aNamespace The namespace where the default config is set. -- (void)setDefaultsFromPlistFileName:(nullable NSString *)fileName - namespace:(nullable NSString *)aNamespace - NS_SWIFT_NAME(setDefaults(fromPlist:namespace:)); - -/// Returns the default value of a given key and a given namespace from the default config. -/// -/// @param key The parameter key of default config. -/// @param aNamespace The namespace of default config. -/// @return Returns the default value of the specified key and namespace. Returns -/// nil if the key or namespace doesn't exist in the default config. -- (nullable FIRRemoteConfigValue *)defaultValueForKey:(nullable NSString *)key - namespace:(nullable NSString *)aNamespace; - -@end diff --git a/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FirebaseRemoteConfig.h b/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FirebaseRemoteConfig.h deleted file mode 100755 index eedc4fce0..000000000 --- a/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Headers/FirebaseRemoteConfig.h +++ /dev/null @@ -1 +0,0 @@ -#import "FIRRemoteConfig.h" diff --git a/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Modules/module.modulemap b/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Modules/module.modulemap deleted file mode 100755 index bfabd8554..000000000 --- a/src/ios/Firebase/RemoteConfig/FirebaseRemoteConfig.framework/Modules/module.modulemap +++ /dev/null @@ -1,10 +0,0 @@ -framework module FirebaseRemoteConfig { - umbrella header "FirebaseRemoteConfig.h" - export * - module * { export *} - link "sqlite3" - link "z" - link framework "Security" - link framework "StoreKit" - link framework "SystemConfiguration" - link framework "UIKit"} diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Any.pbobjc.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Any.pbobjc.h deleted file mode 100644 index ad261898e..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Any.pbobjc.h +++ /dev/null @@ -1,182 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/any.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "GPBDescriptor.h" - #import "GPBMessage.h" - #import "GPBRootObject.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBAnyRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBAnyRoot : GPBRootObject -@end - -#pragma mark - GPBAny - -typedef GPB_ENUM(GPBAny_FieldNumber) { - GPBAny_FieldNumber_TypeURL = 1, - GPBAny_FieldNumber_Value = 2, -}; - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * JSON - * ==== - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `\@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "\@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `\@type` - * field. Example (for message [google.protobuf.Duration][]): - * - * { - * "\@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - **/ -@interface GPBAny : GPBMessage - -/** - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a [google.protobuf.Type][] - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL; - -/** Must be a valid serialized protocol buffer of the above specified type. */ -@property(nonatomic, readwrite, copy, null_resettable) NSData *value; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Api.pbobjc.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Api.pbobjc.h deleted file mode 100644 index c93f3f15d..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Api.pbobjc.h +++ /dev/null @@ -1,311 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/api.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "GPBDescriptor.h" - #import "GPBMessage.h" - #import "GPBRootObject.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -@class GPBMethod; -@class GPBMixin; -@class GPBOption; -@class GPBSourceContext; -GPB_ENUM_FWD_DECLARE(GPBSyntax); - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBApiRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBApiRoot : GPBRootObject -@end - -#pragma mark - GPBApi - -typedef GPB_ENUM(GPBApi_FieldNumber) { - GPBApi_FieldNumber_Name = 1, - GPBApi_FieldNumber_MethodsArray = 2, - GPBApi_FieldNumber_OptionsArray = 3, - GPBApi_FieldNumber_Version = 4, - GPBApi_FieldNumber_SourceContext = 5, - GPBApi_FieldNumber_MixinsArray = 6, - GPBApi_FieldNumber_Syntax = 7, -}; - -/** - * Api is a light-weight descriptor for an API Interface. - * - * Interfaces are also described as "protocol buffer services" in some contexts, - * such as by the "service" keyword in a .proto file, but they are different - * from API Services, which represent a concrete implementation of an interface - * as opposed to simply a description of methods and bindings. They are also - * sometimes simply referred to as "APIs" in other contexts, such as the name of - * this message itself. See https://cloud.google.com/apis/design/glossary for - * detailed terminology. - **/ -@interface GPBApi : GPBMessage - -/** - * The fully qualified name of this interface, including package name - * followed by the interface's simple name. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** The methods of this interface, in unspecified order. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *methodsArray; -/** The number of items in @c methodsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger methodsArray_Count; - -/** Any metadata attached to the interface. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; -/** The number of items in @c optionsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger optionsArray_Count; - -/** - * A version string for this interface. If specified, must have the form - * `major-version.minor-version`, as in `1.10`. If the minor version is - * omitted, it defaults to zero. If the entire version field is empty, the - * major version is derived from the package name, as outlined below. If the - * field is not empty, the version in the package name will be verified to be - * consistent with what is provided here. - * - * The versioning schema uses [semantic - * versioning](http://semver.org) where the major version number - * indicates a breaking change and the minor version an additive, - * non-breaking change. Both version numbers are signals to users - * what to expect from different versions, and should be carefully - * chosen based on the product plan. - * - * The major version is also reflected in the package name of the - * interface, which must end in `v`, as in - * `google.feature.v1`. For major versions 0 and 1, the suffix can - * be omitted. Zero major versions must only be used for - * experimental, non-GA interfaces. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *version; - -/** - * Source context for the protocol buffer service represented by this - * message. - **/ -@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext; -/** Test to see if @c sourceContext has been set. */ -@property(nonatomic, readwrite) BOOL hasSourceContext; - -/** Included interfaces. See [Mixin][]. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *mixinsArray; -/** The number of items in @c mixinsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger mixinsArray_Count; - -/** The source syntax of the service. */ -@property(nonatomic, readwrite) enum GPBSyntax syntax; - -@end - -/** - * Fetches the raw value of a @c GPBApi's @c syntax property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBApi_Syntax_RawValue(GPBApi *message); -/** - * Sets the raw value of an @c GPBApi's @c syntax property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value); - -#pragma mark - GPBMethod - -typedef GPB_ENUM(GPBMethod_FieldNumber) { - GPBMethod_FieldNumber_Name = 1, - GPBMethod_FieldNumber_RequestTypeURL = 2, - GPBMethod_FieldNumber_RequestStreaming = 3, - GPBMethod_FieldNumber_ResponseTypeURL = 4, - GPBMethod_FieldNumber_ResponseStreaming = 5, - GPBMethod_FieldNumber_OptionsArray = 6, - GPBMethod_FieldNumber_Syntax = 7, -}; - -/** - * Method represents a method of an API interface. - **/ -@interface GPBMethod : GPBMessage - -/** The simple name of this method. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** A URL of the input message type. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *requestTypeURL; - -/** If true, the request is streamed. */ -@property(nonatomic, readwrite) BOOL requestStreaming; - -/** The URL of the output message type. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *responseTypeURL; - -/** If true, the response is streamed. */ -@property(nonatomic, readwrite) BOOL responseStreaming; - -/** Any metadata attached to the method. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; -/** The number of items in @c optionsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger optionsArray_Count; - -/** The source syntax of this method. */ -@property(nonatomic, readwrite) enum GPBSyntax syntax; - -@end - -/** - * Fetches the raw value of a @c GPBMethod's @c syntax property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBMethod_Syntax_RawValue(GPBMethod *message); -/** - * Sets the raw value of an @c GPBMethod's @c syntax property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value); - -#pragma mark - GPBMixin - -typedef GPB_ENUM(GPBMixin_FieldNumber) { - GPBMixin_FieldNumber_Name = 1, - GPBMixin_FieldNumber_Root = 2, -}; - -/** - * Declares an API Interface to be included in this interface. The including - * interface must redeclare all the methods from the included interface, but - * documentation and options are inherited as follows: - * - * - If after comment and whitespace stripping, the documentation - * string of the redeclared method is empty, it will be inherited - * from the original method. - * - * - Each annotation belonging to the service config (http, - * visibility) which is not set in the redeclared method will be - * inherited. - * - * - If an http annotation is inherited, the path pattern will be - * modified as follows. Any version prefix will be replaced by the - * version of the including interface plus the [root][] path if - * specified. - * - * Example of a simple mixin: - * - * package google.acl.v1; - * service AccessControl { - * // Get the underlying ACL object. - * rpc GetAcl(GetAclRequest) returns (Acl) { - * option (google.api.http).get = "/v1/{resource=**}:getAcl"; - * } - * } - * - * package google.storage.v2; - * service Storage { - * rpc GetAcl(GetAclRequest) returns (Acl); - * - * // Get a data record. - * rpc GetData(GetDataRequest) returns (Data) { - * option (google.api.http).get = "/v2/{resource=**}"; - * } - * } - * - * Example of a mixin configuration: - * - * apis: - * - name: google.storage.v2.Storage - * mixins: - * - name: google.acl.v1.AccessControl - * - * The mixin construct implies that all methods in `AccessControl` are - * also declared with same name and request/response types in - * `Storage`. A documentation generator or annotation processor will - * see the effective `Storage.GetAcl` method after inherting - * documentation and annotations as follows: - * - * service Storage { - * // Get the underlying ACL object. - * rpc GetAcl(GetAclRequest) returns (Acl) { - * option (google.api.http).get = "/v2/{resource=**}:getAcl"; - * } - * ... - * } - * - * Note how the version in the path pattern changed from `v1` to `v2`. - * - * If the `root` field in the mixin is specified, it should be a - * relative path under which inherited HTTP paths are placed. Example: - * - * apis: - * - name: google.storage.v2.Storage - * mixins: - * - name: google.acl.v1.AccessControl - * root: acls - * - * This implies the following inherited HTTP annotation: - * - * service Storage { - * // Get the underlying ACL object. - * rpc GetAcl(GetAclRequest) returns (Acl) { - * option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; - * } - * ... - * } - **/ -@interface GPBMixin : GPBMessage - -/** The fully qualified name of the interface which is included. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** - * If non-empty specifies a path under which inherited HTTP paths - * are rooted. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *root; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Duration.pbobjc.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Duration.pbobjc.h deleted file mode 100644 index 3e3675907..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Duration.pbobjc.h +++ /dev/null @@ -1,145 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/duration.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "GPBDescriptor.h" - #import "GPBMessage.h" - #import "GPBRootObject.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBDurationRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBDurationRoot : GPBRootObject -@end - -#pragma mark - GPBDuration - -typedef GPB_ENUM(GPBDuration_FieldNumber) { - GPBDuration_FieldNumber_Seconds = 1, - GPBDuration_FieldNumber_Nanos = 2, -}; - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - **/ -@interface GPBDuration : GPBMessage - -/** - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - **/ -@property(nonatomic, readwrite) int64_t seconds; - -/** - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - **/ -@property(nonatomic, readwrite) int32_t nanos; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Empty.pbobjc.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Empty.pbobjc.h deleted file mode 100644 index fdc247ae4..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Empty.pbobjc.h +++ /dev/null @@ -1,74 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/empty.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "GPBDescriptor.h" - #import "GPBMessage.h" - #import "GPBRootObject.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBEmptyRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBEmptyRoot : GPBRootObject -@end - -#pragma mark - GPBEmpty - -/** - * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - * - * The JSON representation for `Empty` is empty JSON object `{}`. - **/ -@interface GPBEmpty : GPBMessage - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/FieldMask.pbobjc.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/FieldMask.pbobjc.h deleted file mode 100644 index 73296d574..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/FieldMask.pbobjc.h +++ /dev/null @@ -1,281 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/field_mask.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "GPBDescriptor.h" - #import "GPBMessage.h" - #import "GPBRootObject.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBFieldMaskRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBFieldMaskRoot : GPBRootObject -@end - -#pragma mark - GPBFieldMask - -typedef GPB_ENUM(GPBFieldMask_FieldNumber) { - GPBFieldMask_FieldNumber_PathsArray = 1, -}; - -/** - * `FieldMask` represents a set of symbolic field paths, for example: - * - * paths: "f.a" - * paths: "f.b.d" - * - * Here `f` represents a field in some root message, `a` and `b` - * fields in the message found in `f`, and `d` a field found in the - * message in `f.b`. - * - * Field masks are used to specify a subset of fields that should be - * returned by a get operation or modified by an update operation. - * Field masks also have a custom JSON encoding (see below). - * - * # Field Masks in Projections - * - * When used in the context of a projection, a response message or - * sub-message is filtered by the API to only contain those fields as - * specified in the mask. For example, if the mask in the previous - * example is applied to a response message as follows: - * - * f { - * a : 22 - * b { - * d : 1 - * x : 2 - * } - * y : 13 - * } - * z: 8 - * - * The result will not contain specific values for fields x,y and z - * (their value will be set to the default, and omitted in proto text - * output): - * - * - * f { - * a : 22 - * b { - * d : 1 - * } - * } - * - * A repeated field is not allowed except at the last position of a - * paths string. - * - * If a FieldMask object is not present in a get operation, the - * operation applies to all fields (as if a FieldMask of all fields - * had been specified). - * - * Note that a field mask does not necessarily apply to the - * top-level response message. In case of a REST get operation, the - * field mask applies directly to the response, but in case of a REST - * list operation, the mask instead applies to each individual message - * in the returned resource list. In case of a REST custom method, - * other definitions may be used. Where the mask applies will be - * clearly documented together with its declaration in the API. In - * any case, the effect on the returned resource/resources is required - * behavior for APIs. - * - * # Field Masks in Update Operations - * - * A field mask in update operations specifies which fields of the - * targeted resource are going to be updated. The API is required - * to only change the values of the fields as specified in the mask - * and leave the others untouched. If a resource is passed in to - * describe the updated values, the API ignores the values of all - * fields not covered by the mask. - * - * If a repeated field is specified for an update operation, the existing - * repeated values in the target resource will be overwritten by the new values. - * Note that a repeated field is only allowed in the last position of a `paths` - * string. - * - * If a sub-message is specified in the last position of the field mask for an - * update operation, then the existing sub-message in the target resource is - * overwritten. Given the target message: - * - * f { - * b { - * d : 1 - * x : 2 - * } - * c : 1 - * } - * - * And an update message: - * - * f { - * b { - * d : 10 - * } - * } - * - * then if the field mask is: - * - * paths: "f.b" - * - * then the result will be: - * - * f { - * b { - * d : 10 - * } - * c : 1 - * } - * - * However, if the update mask was: - * - * paths: "f.b.d" - * - * then the result would be: - * - * f { - * b { - * d : 10 - * x : 2 - * } - * c : 1 - * } - * - * In order to reset a field's value to the default, the field must - * be in the mask and set to the default value in the provided resource. - * Hence, in order to reset all fields of a resource, provide a default - * instance of the resource and set all fields in the mask, or do - * not provide a mask as described below. - * - * If a field mask is not present on update, the operation applies to - * all fields (as if a field mask of all fields has been specified). - * Note that in the presence of schema evolution, this may mean that - * fields the client does not know and has therefore not filled into - * the request will be reset to their default. If this is unwanted - * behavior, a specific service may require a client to always specify - * a field mask, producing an error if not. - * - * As with get operations, the location of the resource which - * describes the updated values in the request message depends on the - * operation kind. In any case, the effect of the field mask is - * required to be honored by the API. - * - * ## Considerations for HTTP REST - * - * The HTTP kind of an update operation which uses a field mask must - * be set to PATCH instead of PUT in order to satisfy HTTP semantics - * (PUT must only be used for full updates). - * - * # JSON Encoding of Field Masks - * - * In JSON, a field mask is encoded as a single string where paths are - * separated by a comma. Fields name in each path are converted - * to/from lower-camel naming conventions. - * - * As an example, consider the following message declarations: - * - * message Profile { - * User user = 1; - * Photo photo = 2; - * } - * message User { - * string display_name = 1; - * string address = 2; - * } - * - * In proto a field mask for `Profile` may look as such: - * - * mask { - * paths: "user.display_name" - * paths: "photo" - * } - * - * In JSON, the same mask is represented as below: - * - * { - * mask: "user.displayName,photo" - * } - * - * # Field Masks and Oneof Fields - * - * Field masks treat fields in oneofs just as regular fields. Consider the - * following message: - * - * message SampleMessage { - * oneof test_oneof { - * string name = 4; - * SubMessage sub_message = 9; - * } - * } - * - * The field mask can be: - * - * mask { - * paths: "name" - * } - * - * Or: - * - * mask { - * paths: "sub_message" - * } - * - * Note that oneof type names ("test_oneof" in this case) cannot be used in - * paths. - * - * ## Field Mask Verification - * - * The implementation of any API method which has a FieldMask type field in the - * request should verify the included field paths, and return an - * `INVALID_ARGUMENT` error if any path is duplicated or unmappable. - **/ -@interface GPBFieldMask : GPBMessage - -/** The set of field mask paths. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *pathsArray; -/** The number of items in @c pathsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger pathsArray_Count; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBArray.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBArray.h deleted file mode 100644 index 638b2882d..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBArray.h +++ /dev/null @@ -1,1967 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2015 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBRuntimeTypes.h" - -NS_ASSUME_NONNULL_BEGIN - -//%PDDM-EXPAND DECLARE_ARRAYS() -// This block of code is generated, do not edit it directly. - -#pragma mark - Int32 - -/** - * Class used for repeated fields of int32_t values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32Array : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBInt32Array. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBInt32Array with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBInt32Array with value in it. - **/ -+ (instancetype)arrayWithValue:(int32_t)value; - -/** - * Creates and initializes a GPBInt32Array with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBInt32Array with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBInt32Array *)array; - -/** - * Creates and initializes a GPBInt32Array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBInt32Array with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBInt32Array. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBInt32Array with a copy of the values. - **/ -- (instancetype)initWithValues:(const int32_t [__nullable])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBInt32Array with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBInt32Array *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBInt32Array with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (int32_t)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(int32_t)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const int32_t [__nullable])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBInt32Array *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(int32_t)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int32_t)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - UInt32 - -/** - * Class used for repeated fields of uint32_t values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32Array : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBUInt32Array. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBUInt32Array with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBUInt32Array with value in it. - **/ -+ (instancetype)arrayWithValue:(uint32_t)value; - -/** - * Creates and initializes a GPBUInt32Array with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBUInt32Array with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBUInt32Array *)array; - -/** - * Creates and initializes a GPBUInt32Array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBUInt32Array with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBUInt32Array. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBUInt32Array with a copy of the values. - **/ -- (instancetype)initWithValues:(const uint32_t [__nullable])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBUInt32Array with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBUInt32Array *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBUInt32Array with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (uint32_t)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(uint32_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(uint32_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(uint32_t)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const uint32_t [__nullable])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBUInt32Array *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(uint32_t)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(uint32_t)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - Int64 - -/** - * Class used for repeated fields of int64_t values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64Array : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBInt64Array. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBInt64Array with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBInt64Array with value in it. - **/ -+ (instancetype)arrayWithValue:(int64_t)value; - -/** - * Creates and initializes a GPBInt64Array with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBInt64Array with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBInt64Array *)array; - -/** - * Creates and initializes a GPBInt64Array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBInt64Array with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBInt64Array. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBInt64Array with a copy of the values. - **/ -- (instancetype)initWithValues:(const int64_t [__nullable])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBInt64Array with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBInt64Array *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBInt64Array with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (int64_t)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(int64_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(int64_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(int64_t)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const int64_t [__nullable])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBInt64Array *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(int64_t)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int64_t)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - UInt64 - -/** - * Class used for repeated fields of uint64_t values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64Array : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBUInt64Array. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBUInt64Array with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBUInt64Array with value in it. - **/ -+ (instancetype)arrayWithValue:(uint64_t)value; - -/** - * Creates and initializes a GPBUInt64Array with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBUInt64Array with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBUInt64Array *)array; - -/** - * Creates and initializes a GPBUInt64Array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBUInt64Array with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBUInt64Array. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBUInt64Array with a copy of the values. - **/ -- (instancetype)initWithValues:(const uint64_t [__nullable])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBUInt64Array with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBUInt64Array *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBUInt64Array with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (uint64_t)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(uint64_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(uint64_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(uint64_t)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const uint64_t [__nullable])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBUInt64Array *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(uint64_t)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(uint64_t)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - Float - -/** - * Class used for repeated fields of float values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBFloatArray : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBFloatArray. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBFloatArray with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBFloatArray with value in it. - **/ -+ (instancetype)arrayWithValue:(float)value; - -/** - * Creates and initializes a GPBFloatArray with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBFloatArray with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBFloatArray *)array; - -/** - * Creates and initializes a GPBFloatArray with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBFloatArray with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBFloatArray. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBFloatArray with a copy of the values. - **/ -- (instancetype)initWithValues:(const float [__nullable])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBFloatArray with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBFloatArray *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBFloatArray with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (float)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(float value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(float value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(float)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const float [__nullable])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBFloatArray *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(float)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(float)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - Double - -/** - * Class used for repeated fields of double values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBDoubleArray : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBDoubleArray. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBDoubleArray with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBDoubleArray with value in it. - **/ -+ (instancetype)arrayWithValue:(double)value; - -/** - * Creates and initializes a GPBDoubleArray with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBDoubleArray with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBDoubleArray *)array; - -/** - * Creates and initializes a GPBDoubleArray with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBDoubleArray with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBDoubleArray. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBDoubleArray with a copy of the values. - **/ -- (instancetype)initWithValues:(const double [__nullable])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBDoubleArray with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBDoubleArray *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBDoubleArray with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (double)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(double value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(double value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(double)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const double [__nullable])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBDoubleArray *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(double)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(double)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - Bool - -/** - * Class used for repeated fields of BOOL values. This performs better than - * boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolArray : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * @return A newly instanced and empty GPBBoolArray. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBBoolArray with the single element given. - * - * @param value The value to be placed in the array. - * - * @return A newly instanced GPBBoolArray with value in it. - **/ -+ (instancetype)arrayWithValue:(BOOL)value; - -/** - * Creates and initializes a GPBBoolArray with the contents of the given - * array. - * - * @param array Array with the contents to be put into the new array. - * - * @return A newly instanced GPBBoolArray with the contents of array. - **/ -+ (instancetype)arrayWithValueArray:(GPBBoolArray *)array; - -/** - * Creates and initializes a GPBBoolArray with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBBoolArray with a capacity of count. - **/ -+ (instancetype)arrayWithCapacity:(NSUInteger)count; - -/** - * @return A newly initialized and empty GPBBoolArray. - **/ -- (instancetype)init NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBBoolArray with a copy of the values. - **/ -- (instancetype)initWithValues:(const BOOL [__nullable])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBBoolArray with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBBoolArray *)array; - -/** - * Initializes the array with the given capacity. - * - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBBoolArray with a capacity of count. - **/ -- (instancetype)initWithCapacity:(NSUInteger)count; - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (BOOL)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(BOOL value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(BOOL value, NSUInteger idx, BOOL *stop))block; - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(BOOL)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const BOOL [__nullable])values count:(NSUInteger)count; - -/** - * Adds the values from the given array to this array. - * - * @param array The array containing the elements to add to this array. - **/ -- (void)addValuesFromArray:(GPBBoolArray *)array; - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(BOOL)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(BOOL)value; - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -#pragma mark - Enum - -/** - * This class is used for repeated fields of int32_t values. This performs - * better than boxing into NSNumbers in NSArrays. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBEnumArray : NSObject - -/** The number of elements contained in the array. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * @return A newly instanced and empty GPBEnumArray. - **/ -+ (instancetype)array; - -/** - * Creates and initializes a GPBEnumArray with the enum validation function - * given. - * - * @param func The enum validation function for the array. - * - * @return A newly instanced GPBEnumArray. - **/ -+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Creates and initializes a GPBEnumArray with the enum validation function - * given and the single raw value given. - * - * @param func The enum validation function for the array. - * @param value The raw value to add to this array. - * - * @return A newly instanced GPBEnumArray. - **/ -+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValue:(int32_t)value; - -/** - * Creates and initializes a GPBEnumArray that adds the elements from the - * given array. - * - * @param array Array containing the values to add to the new array. - * - * @return A newly instanced GPBEnumArray. - **/ -+ (instancetype)arrayWithValueArray:(GPBEnumArray *)array; - -/** - * Creates and initializes a GPBEnumArray with the given enum validation - * function and with the givencapacity. - * - * @param func The enum validation function for the array. - * @param count The capacity needed for the array. - * - * @return A newly instanced GPBEnumArray with a capacity of count. - **/ -+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)count; - -/** - * Initializes the array with the given enum validation function. - * - * @param func The enum validation function for the array. - * - * @return A newly initialized GPBEnumArray with a copy of the values. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - NS_DESIGNATED_INITIALIZER; - -/** - * Initializes the array, copying the given values. - * - * @param func The enum validation function for the array. - * @param values An array with the values to put inside this array. - * @param count The number of elements to copy into the array. - * - * @return A newly initialized GPBEnumArray with a copy of the values. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [__nullable])values - count:(NSUInteger)count; - -/** - * Initializes the array, copying the given values. - * - * @param array An array with the values to put inside this array. - * - * @return A newly initialized GPBEnumArray with a copy of the values. - **/ -- (instancetype)initWithValueArray:(GPBEnumArray *)array; - -/** - * Initializes the array with the given capacity. - * - * @param func The enum validation function for the array. - * @param count The capacity needed for the array. - * - * @return A newly initialized GPBEnumArray with a capacity of count. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)count; - -// These will return kGPBUnrecognizedEnumeratorValue if the value at index is not a -// valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value at the given index. - * - * @param index The index of the value to get. - * - * @return The value at the given index. - **/ -- (int32_t)valueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; - -// These methods bypass the validationFunc to provide access to values that were not -// known at the time the binary was compiled. - -/** - * Gets the raw enum value at the given index. - * - * @param index The index of the raw enum value to get. - * - * @return The raw enum value at the given index. - **/ -- (int32_t)rawValueAtIndex:(NSUInteger)index; - -/** - * Enumerates the values on this array with the given block. - * - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateRawValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; - -/** - * Enumerates the values on this array with the given block. - * - * @param opts Options to control the enumeration. - * @param block The block to enumerate with. - * **value**: The current value being enumerated. - * **idx**: The index of the current value. - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateRawValuesWithOptions:(NSEnumerationOptions)opts - usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Adds a value to this array. - * - * @param value The value to add to this array. - **/ -- (void)addValue:(int32_t)value; - -/** - * Adds values to this array. - * - * @param values The values to add to this array. - * @param count The number of elements to add. - **/ -- (void)addValues:(const int32_t [__nullable])values count:(NSUInteger)count; - - -/** - * Inserts a value into the given position. - * - * @param value The value to add to this array. - * @param index The index into which to insert the value. - **/ -- (void)insertValue:(int32_t)value atIndex:(NSUInteger)index; - -/** - * Replaces the value at the given index with the given value. - * - * @param index The index for which to replace the value. - * @param value The value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int32_t)value; - -// These methods bypass the validationFunc to provide setting of values that were not -// known at the time the binary was compiled. - -/** - * Adds a raw enum value to this array. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param value The raw enum value to add to the array. - **/ -- (void)addRawValue:(int32_t)value; - -/** - * Adds raw enum values to this array. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param array Array containing the raw enum values to add to this array. - **/ -- (void)addRawValuesFromArray:(GPBEnumArray *)array; - -/** - * Adds raw enum values to this array. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param values Array containing the raw enum values to add to this array. - * @param count The number of raw values to add. - **/ -- (void)addRawValues:(const int32_t [__nullable])values count:(NSUInteger)count; - -/** - * Inserts a raw enum value at the given index. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param value Raw enum value to add. - * @param index The index into which to insert the value. - **/ -- (void)insertRawValue:(int32_t)value atIndex:(NSUInteger)index; - -/** - * Replaces the raw enum value at the given index with the given value. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param index The index for which to replace the value. - * @param value The raw enum value to replace with. - **/ -- (void)replaceValueAtIndex:(NSUInteger)index withRawValue:(int32_t)value; - -// No validation applies to these methods. - -/** - * Removes the value at the given index. - * - * @param index The index of the value to remove. - **/ -- (void)removeValueAtIndex:(NSUInteger)index; - -/** - * Removes all the values from this array. - **/ -- (void)removeAll; - -/** - * Exchanges the values between the given indexes. - * - * @param idx1 The index of the first element to exchange. - * @param idx2 The index of the second element to exchange. - **/ -- (void)exchangeValueAtIndex:(NSUInteger)idx1 - withValueAtIndex:(NSUInteger)idx2; - -@end - -//%PDDM-EXPAND-END DECLARE_ARRAYS() - -NS_ASSUME_NONNULL_END - -//%PDDM-DEFINE DECLARE_ARRAYS() -//%ARRAY_INTERFACE_SIMPLE(Int32, int32_t) -//%ARRAY_INTERFACE_SIMPLE(UInt32, uint32_t) -//%ARRAY_INTERFACE_SIMPLE(Int64, int64_t) -//%ARRAY_INTERFACE_SIMPLE(UInt64, uint64_t) -//%ARRAY_INTERFACE_SIMPLE(Float, float) -//%ARRAY_INTERFACE_SIMPLE(Double, double) -//%ARRAY_INTERFACE_SIMPLE(Bool, BOOL) -//%ARRAY_INTERFACE_ENUM(Enum, int32_t) - -// -// The common case (everything but Enum) -// - -//%PDDM-DEFINE ARRAY_INTERFACE_SIMPLE(NAME, TYPE) -//%#pragma mark - NAME -//% -//%/** -//% * Class used for repeated fields of ##TYPE## values. This performs better than -//% * boxing into NSNumbers in NSArrays. -//% * -//% * @note This class is not meant to be subclassed. -//% **/ -//%@interface GPB##NAME##Array : NSObject -//% -//%/** The number of elements contained in the array. */ -//%@property(nonatomic, readonly) NSUInteger count; -//% -//%/** -//% * @return A newly instanced and empty GPB##NAME##Array. -//% **/ -//%+ (instancetype)array; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array with the single element given. -//% * -//% * @param value The value to be placed in the array. -//% * -//% * @return A newly instanced GPB##NAME##Array with value in it. -//% **/ -//%+ (instancetype)arrayWithValue:(TYPE)value; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array with the contents of the given -//% * array. -//% * -//% * @param array Array with the contents to be put into the new array. -//% * -//% * @return A newly instanced GPB##NAME##Array with the contents of array. -//% **/ -//%+ (instancetype)arrayWithValueArray:(GPB##NAME##Array *)array; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array with the given capacity. -//% * -//% * @param count The capacity needed for the array. -//% * -//% * @return A newly instanced GPB##NAME##Array with a capacity of count. -//% **/ -//%+ (instancetype)arrayWithCapacity:(NSUInteger)count; -//% -//%/** -//% * @return A newly initialized and empty GPB##NAME##Array. -//% **/ -//%- (instancetype)init NS_DESIGNATED_INITIALIZER; -//% -//%/** -//% * Initializes the array, copying the given values. -//% * -//% * @param values An array with the values to put inside this array. -//% * @param count The number of elements to copy into the array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a copy of the values. -//% **/ -//%- (instancetype)initWithValues:(const TYPE [__nullable])values -//% count:(NSUInteger)count; -//% -//%/** -//% * Initializes the array, copying the given values. -//% * -//% * @param array An array with the values to put inside this array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a copy of the values. -//% **/ -//%- (instancetype)initWithValueArray:(GPB##NAME##Array *)array; -//% -//%/** -//% * Initializes the array with the given capacity. -//% * -//% * @param count The capacity needed for the array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a capacity of count. -//% **/ -//%- (instancetype)initWithCapacity:(NSUInteger)count; -//% -//%ARRAY_IMMUTABLE_INTERFACE(NAME, TYPE, Basic) -//% -//%ARRAY_MUTABLE_INTERFACE(NAME, TYPE, Basic) -//% -//%@end -//% - -// -// Macros specific to Enums (to tweak their interface). -// - -//%PDDM-DEFINE ARRAY_INTERFACE_ENUM(NAME, TYPE) -//%#pragma mark - NAME -//% -//%/** -//% * This class is used for repeated fields of ##TYPE## values. This performs -//% * better than boxing into NSNumbers in NSArrays. -//% * -//% * @note This class is not meant to be subclassed. -//% **/ -//%@interface GPB##NAME##Array : NSObject -//% -//%/** The number of elements contained in the array. */ -//%@property(nonatomic, readonly) NSUInteger count; -//%/** The validation function to check if the enums are valid. */ -//%@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; -//% -//%/** -//% * @return A newly instanced and empty GPB##NAME##Array. -//% **/ -//%+ (instancetype)array; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array with the enum validation function -//% * given. -//% * -//% * @param func The enum validation function for the array. -//% * -//% * @return A newly instanced GPB##NAME##Array. -//% **/ -//%+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array with the enum validation function -//% * given and the single raw value given. -//% * -//% * @param func The enum validation function for the array. -//% * @param value The raw value to add to this array. -//% * -//% * @return A newly instanced GPB##NAME##Array. -//% **/ -//%+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% rawValue:(TYPE)value; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array that adds the elements from the -//% * given array. -//% * -//% * @param array Array containing the values to add to the new array. -//% * -//% * @return A newly instanced GPB##NAME##Array. -//% **/ -//%+ (instancetype)arrayWithValueArray:(GPB##NAME##Array *)array; -//% -//%/** -//% * Creates and initializes a GPB##NAME##Array with the given enum validation -//% * function and with the givencapacity. -//% * -//% * @param func The enum validation function for the array. -//% * @param count The capacity needed for the array. -//% * -//% * @return A newly instanced GPB##NAME##Array with a capacity of count. -//% **/ -//%+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% capacity:(NSUInteger)count; -//% -//%/** -//% * Initializes the array with the given enum validation function. -//% * -//% * @param func The enum validation function for the array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a copy of the values. -//% **/ -//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% NS_DESIGNATED_INITIALIZER; -//% -//%/** -//% * Initializes the array, copying the given values. -//% * -//% * @param func The enum validation function for the array. -//% * @param values An array with the values to put inside this array. -//% * @param count The number of elements to copy into the array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a copy of the values. -//% **/ -//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% rawValues:(const TYPE [__nullable])values -//% count:(NSUInteger)count; -//% -//%/** -//% * Initializes the array, copying the given values. -//% * -//% * @param array An array with the values to put inside this array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a copy of the values. -//% **/ -//%- (instancetype)initWithValueArray:(GPB##NAME##Array *)array; -//% -//%/** -//% * Initializes the array with the given capacity. -//% * -//% * @param func The enum validation function for the array. -//% * @param count The capacity needed for the array. -//% * -//% * @return A newly initialized GPB##NAME##Array with a capacity of count. -//% **/ -//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% capacity:(NSUInteger)count; -//% -//%// These will return kGPBUnrecognizedEnumeratorValue if the value at index is not a -//%// valid enumerator as defined by validationFunc. If the actual value is -//%// desired, use "raw" version of the method. -//% -//%ARRAY_IMMUTABLE_INTERFACE(NAME, TYPE, NAME) -//% -//%// These methods bypass the validationFunc to provide access to values that were not -//%// known at the time the binary was compiled. -//% -//%/** -//% * Gets the raw enum value at the given index. -//% * -//% * @param index The index of the raw enum value to get. -//% * -//% * @return The raw enum value at the given index. -//% **/ -//%- (TYPE)rawValueAtIndex:(NSUInteger)index; -//% -//%/** -//% * Enumerates the values on this array with the given block. -//% * -//% * @param block The block to enumerate with. -//% * **value**: The current value being enumerated. -//% * **idx**: The index of the current value. -//% * **stop**: A pointer to a boolean that when set stops the enumeration. -//% **/ -//%- (void)enumerateRawValuesWithBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block; -//% -//%/** -//% * Enumerates the values on this array with the given block. -//% * -//% * @param opts Options to control the enumeration. -//% * @param block The block to enumerate with. -//% * **value**: The current value being enumerated. -//% * **idx**: The index of the current value. -//% * **stop**: A pointer to a boolean that when set stops the enumeration. -//% **/ -//%- (void)enumerateRawValuesWithOptions:(NSEnumerationOptions)opts -//% usingBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block; -//% -//%// If value is not a valid enumerator as defined by validationFunc, these -//%// methods will assert in debug, and will log in release and assign the value -//%// to the default value. Use the rawValue methods below to assign non enumerator -//%// values. -//% -//%ARRAY_MUTABLE_INTERFACE(NAME, TYPE, NAME) -//% -//%@end -//% - -//%PDDM-DEFINE ARRAY_IMMUTABLE_INTERFACE(NAME, TYPE, HELPER_NAME) -//%/** -//% * Gets the value at the given index. -//% * -//% * @param index The index of the value to get. -//% * -//% * @return The value at the given index. -//% **/ -//%- (TYPE)valueAtIndex:(NSUInteger)index; -//% -//%/** -//% * Enumerates the values on this array with the given block. -//% * -//% * @param block The block to enumerate with. -//% * **value**: The current value being enumerated. -//% * **idx**: The index of the current value. -//% * **stop**: A pointer to a boolean that when set stops the enumeration. -//% **/ -//%- (void)enumerateValuesWithBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block; -//% -//%/** -//% * Enumerates the values on this array with the given block. -//% * -//% * @param opts Options to control the enumeration. -//% * @param block The block to enumerate with. -//% * **value**: The current value being enumerated. -//% * **idx**: The index of the current value. -//% * **stop**: A pointer to a boolean that when set stops the enumeration. -//% **/ -//%- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts -//% usingBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block; - -//%PDDM-DEFINE ARRAY_MUTABLE_INTERFACE(NAME, TYPE, HELPER_NAME) -//%/** -//% * Adds a value to this array. -//% * -//% * @param value The value to add to this array. -//% **/ -//%- (void)addValue:(TYPE)value; -//% -//%/** -//% * Adds values to this array. -//% * -//% * @param values The values to add to this array. -//% * @param count The number of elements to add. -//% **/ -//%- (void)addValues:(const TYPE [__nullable])values count:(NSUInteger)count; -//% -//%ARRAY_EXTRA_MUTABLE_METHODS1_##HELPER_NAME(NAME, TYPE) -//%/** -//% * Inserts a value into the given position. -//% * -//% * @param value The value to add to this array. -//% * @param index The index into which to insert the value. -//% **/ -//%- (void)insertValue:(TYPE)value atIndex:(NSUInteger)index; -//% -//%/** -//% * Replaces the value at the given index with the given value. -//% * -//% * @param index The index for which to replace the value. -//% * @param value The value to replace with. -//% **/ -//%- (void)replaceValueAtIndex:(NSUInteger)index withValue:(TYPE)value; -//%ARRAY_EXTRA_MUTABLE_METHODS2_##HELPER_NAME(NAME, TYPE) -//%/** -//% * Removes the value at the given index. -//% * -//% * @param index The index of the value to remove. -//% **/ -//%- (void)removeValueAtIndex:(NSUInteger)index; -//% -//%/** -//% * Removes all the values from this array. -//% **/ -//%- (void)removeAll; -//% -//%/** -//% * Exchanges the values between the given indexes. -//% * -//% * @param idx1 The index of the first element to exchange. -//% * @param idx2 The index of the second element to exchange. -//% **/ -//%- (void)exchangeValueAtIndex:(NSUInteger)idx1 -//% withValueAtIndex:(NSUInteger)idx2; - -// -// These are hooks invoked by the above to do insert as needed. -// - -//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS1_Basic(NAME, TYPE) -//%/** -//% * Adds the values from the given array to this array. -//% * -//% * @param array The array containing the elements to add to this array. -//% **/ -//%- (void)addValuesFromArray:(GPB##NAME##Array *)array; -//% -//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS2_Basic(NAME, TYPE) -// Empty -//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS1_Enum(NAME, TYPE) -// Empty -//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS2_Enum(NAME, TYPE) -//% -//%// These methods bypass the validationFunc to provide setting of values that were not -//%// known at the time the binary was compiled. -//% -//%/** -//% * Adds a raw enum value to this array. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param value The raw enum value to add to the array. -//% **/ -//%- (void)addRawValue:(TYPE)value; -//% -//%/** -//% * Adds raw enum values to this array. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param array Array containing the raw enum values to add to this array. -//% **/ -//%- (void)addRawValuesFromArray:(GPB##NAME##Array *)array; -//% -//%/** -//% * Adds raw enum values to this array. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param values Array containing the raw enum values to add to this array. -//% * @param count The number of raw values to add. -//% **/ -//%- (void)addRawValues:(const TYPE [__nullable])values count:(NSUInteger)count; -//% -//%/** -//% * Inserts a raw enum value at the given index. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param value Raw enum value to add. -//% * @param index The index into which to insert the value. -//% **/ -//%- (void)insertRawValue:(TYPE)value atIndex:(NSUInteger)index; -//% -//%/** -//% * Replaces the raw enum value at the given index with the given value. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param index The index for which to replace the value. -//% * @param value The raw enum value to replace with. -//% **/ -//%- (void)replaceValueAtIndex:(NSUInteger)index withRawValue:(TYPE)value; -//% -//%// No validation applies to these methods. -//% diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBArray_PackagePrivate.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBArray_PackagePrivate.h deleted file mode 100644 index 35a453813..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBArray_PackagePrivate.h +++ /dev/null @@ -1,130 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2015 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBArray.h" - -@class GPBMessage; - -//%PDDM-DEFINE DECLARE_ARRAY_EXTRAS() -//%ARRAY_INTERFACE_EXTRAS(Int32, int32_t) -//%ARRAY_INTERFACE_EXTRAS(UInt32, uint32_t) -//%ARRAY_INTERFACE_EXTRAS(Int64, int64_t) -//%ARRAY_INTERFACE_EXTRAS(UInt64, uint64_t) -//%ARRAY_INTERFACE_EXTRAS(Float, float) -//%ARRAY_INTERFACE_EXTRAS(Double, double) -//%ARRAY_INTERFACE_EXTRAS(Bool, BOOL) -//%ARRAY_INTERFACE_EXTRAS(Enum, int32_t) - -//%PDDM-DEFINE ARRAY_INTERFACE_EXTRAS(NAME, TYPE) -//%#pragma mark - NAME -//% -//%@interface GPB##NAME##Array () { -//% @package -//% GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -//%} -//%@end -//% - -//%PDDM-EXPAND DECLARE_ARRAY_EXTRAS() -// This block of code is generated, do not edit it directly. - -#pragma mark - Int32 - -@interface GPBInt32Array () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - UInt32 - -@interface GPBUInt32Array () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - Int64 - -@interface GPBInt64Array () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - UInt64 - -@interface GPBUInt64Array () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - Float - -@interface GPBFloatArray () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - Double - -@interface GPBDoubleArray () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - Bool - -@interface GPBBoolArray () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - Enum - -@interface GPBEnumArray () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -//%PDDM-EXPAND-END DECLARE_ARRAY_EXTRAS() - -#pragma mark - NSArray Subclass - -@interface GPBAutocreatedArray : NSMutableArray { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBBootstrap.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBBootstrap.h deleted file mode 100644 index ed53ae7cb..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBBootstrap.h +++ /dev/null @@ -1,123 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/** - * The Objective C runtime has complete enough info that most protos don’t end - * up using this, so leaving it on is no cost or very little cost. If you - * happen to see it causing bloat, this is the way to disable it. If you do - * need to disable it, try only disabling it for Release builds as having - * full TextFormat can be useful for debugging. - **/ -#ifndef GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS -#define GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS 0 -#endif - -// Used in the generated code to give sizes to enums. int32_t was chosen based -// on the fact that Protocol Buffers enums are limited to this range. -#if !__has_feature(objc_fixed_enum) - #error All supported Xcode versions should support objc_fixed_enum. -#endif - -// If the headers are imported into Objective-C++, we can run into an issue -// where the defintion of NS_ENUM (really CF_ENUM) changes based on the C++ -// standard that is in effect. If it isn't C++11 or higher, the definition -// doesn't allow us to forward declare. We work around this one case by -// providing a local definition. The default case has to use NS_ENUM for the -// magic that is Swift bridging of enums. -#if (defined(__cplusplus) && __cplusplus && __cplusplus < 201103L) - #define GPB_ENUM(X) enum X : int32_t X; enum X : int32_t -#else - #define GPB_ENUM(X) NS_ENUM(int32_t, X) -#endif - -/** - * GPB_ENUM_FWD_DECLARE is used for forward declaring enums, for example: - * - * ``` - * GPB_ENUM_FWD_DECLARE(Foo_Enum) - * - * @interface BarClass : NSObject - * @property (nonatomic) enum Foo_Enum value; - * - (void)bazMethod:(enum Foo_Enum):value; - * @end - * ``` - **/ -#define GPB_ENUM_FWD_DECLARE(X) enum X : int32_t - -/** - * Based upon CF_INLINE. Forces inlining in non DEBUG builds. - **/ -#if !defined(DEBUG) -#define GPB_INLINE static __inline__ __attribute__((always_inline)) -#else -#define GPB_INLINE static __inline__ -#endif - -/** - * For use in public headers that might need to deal with ARC. - **/ -#ifndef GPB_UNSAFE_UNRETAINED -#if __has_feature(objc_arc) -#define GPB_UNSAFE_UNRETAINED __unsafe_unretained -#else -#define GPB_UNSAFE_UNRETAINED -#endif -#endif - -// If property name starts with init we need to annotate it to get past ARC. -// http://stackoverflow.com/questions/18723226/how-do-i-annotate-an-objective-c-property-with-an-objc-method-family/18723227#18723227 -// -// Meant to be used internally by generated code. -#define GPB_METHOD_FAMILY_NONE __attribute__((objc_method_family(none))) - -// ---------------------------------------------------------------------------- -// These version numbers are all internal to the ObjC Protobuf runtime; they -// are used to ensure compatibility between the generated sources and the -// headers being compiled against and/or the version of sources being run -// against. -// -// They are all #defines so the values are captured into every .o file they -// are used in and to allow comparisons in the preprocessor. - -// Current library runtime version. -// - Gets bumped when the runtime makes changes to the interfaces between the -// generated code and runtime (things added/removed, etc). -#define GOOGLE_PROTOBUF_OBJC_VERSION 30002 - -// Minimum runtime version supported for compiling/running against. -// - Gets changed when support for the older generated code is dropped. -#define GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION 30001 - - -// This is a legacy constant now frozen in time for old generated code. If -// GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION ever gets moved above 30001 then -// this should also change to break code compiled with an old runtime that -// can't be supported any more. -#define GOOGLE_PROTOBUF_OBJC_GEN_VERSION 30001 diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBCodedInputStream.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBCodedInputStream.h deleted file mode 100644 index fbe5009c9..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBCodedInputStream.h +++ /dev/null @@ -1,253 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -@class GPBMessage; -@class GPBExtensionRegistry; - -NS_ASSUME_NONNULL_BEGIN - -CF_EXTERN_C_BEGIN - -/** - * @c GPBCodedInputStream exception name. Exceptions raised from - * @c GPBCodedInputStream contain an underlying error in the userInfo dictionary - * under the GPBCodedInputStreamUnderlyingErrorKey key. - **/ -extern NSString *const GPBCodedInputStreamException; - -/** The key under which the underlying NSError from the exception is stored. */ -extern NSString *const GPBCodedInputStreamUnderlyingErrorKey; - -/** NSError domain used for @c GPBCodedInputStream errors. */ -extern NSString *const GPBCodedInputStreamErrorDomain; - -/** - * Error code for NSError with @c GPBCodedInputStreamErrorDomain. - **/ -typedef NS_ENUM(NSInteger, GPBCodedInputStreamErrorCode) { - /** The size does not fit in the remaining bytes to be read. */ - GPBCodedInputStreamErrorInvalidSize = -100, - /** Attempted to read beyond the subsection limit. */ - GPBCodedInputStreamErrorSubsectionLimitReached = -101, - /** The requested subsection limit is invalid. */ - GPBCodedInputStreamErrorInvalidSubsectionLimit = -102, - /** Invalid tag read. */ - GPBCodedInputStreamErrorInvalidTag = -103, - /** Invalid UTF-8 character in a string. */ - GPBCodedInputStreamErrorInvalidUTF8 = -104, - /** Invalid VarInt read. */ - GPBCodedInputStreamErrorInvalidVarInt = -105, - /** The maximum recursion depth of messages was exceeded. */ - GPBCodedInputStreamErrorRecursionDepthExceeded = -106, -}; - -CF_EXTERN_C_END - -/** - * Reads and decodes protocol message fields. - * - * The common uses of protocol buffers shouldn't need to use this class. - * @c GPBMessage's provide a @c +parseFromData:error: and - * @c +parseFromData:extensionRegistry:error: method that will decode a - * message for you. - * - * @note Subclassing of @c GPBCodedInputStream is NOT supported. - **/ -@interface GPBCodedInputStream : NSObject - -/** - * Creates a new stream wrapping some data. - * - * @param data The data to wrap inside the stream. - * - * @return A newly instanced GPBCodedInputStream. - **/ -+ (instancetype)streamWithData:(NSData *)data; - -/** - * Initializes a stream wrapping some data. - * - * @param data The data to wrap inside the stream. - * - * @return A newly initialized GPBCodedInputStream. - **/ -- (instancetype)initWithData:(NSData *)data; - -/** - * Attempts to read a field tag, returning zero if we have reached EOF. - * Protocol message parsers use this to read tags, since a protocol message - * may legally end wherever a tag occurs, and zero is not a valid tag number. - * - * @return The field tag, or zero if EOF was reached. - **/ -- (int32_t)readTag; - -/** - * @return A double read from the stream. - **/ -- (double)readDouble; -/** - * @return A float read from the stream. - **/ -- (float)readFloat; -/** - * @return A uint64 read from the stream. - **/ -- (uint64_t)readUInt64; -/** - * @return A uint32 read from the stream. - **/ -- (uint32_t)readUInt32; -/** - * @return An int64 read from the stream. - **/ -- (int64_t)readInt64; -/** - * @return An int32 read from the stream. - **/ -- (int32_t)readInt32; -/** - * @return A fixed64 read from the stream. - **/ -- (uint64_t)readFixed64; -/** - * @return A fixed32 read from the stream. - **/ -- (uint32_t)readFixed32; -/** - * @return An enum read from the stream. - **/ -- (int32_t)readEnum; -/** - * @return A sfixed32 read from the stream. - **/ -- (int32_t)readSFixed32; -/** - * @return A fixed64 read from the stream. - **/ -- (int64_t)readSFixed64; -/** - * @return A sint32 read from the stream. - **/ -- (int32_t)readSInt32; -/** - * @return A sint64 read from the stream. - **/ -- (int64_t)readSInt64; -/** - * @return A boolean read from the stream. - **/ -- (BOOL)readBool; -/** - * @return A string read from the stream. - **/ -- (NSString *)readString; -/** - * @return Data read from the stream. - **/ -- (NSData *)readBytes; - -/** - * Read an embedded message field value from the stream. - * - * @param message The message to set fields on as they are read. - * @param extensionRegistry An optional extension registry to use to lookup - * extensions for message. - **/ -- (void)readMessage:(GPBMessage *)message - extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry; - -/** - * Reads and discards a single field, given its tag value. - * - * @param tag The tag number of the field to skip. - * - * @return NO if the tag is an endgroup tag (in which case nothing is skipped), - * YES in all other cases. - **/ -- (BOOL)skipField:(int32_t)tag; - -/** - * Reads and discards an entire message. This will read either until EOF or - * until an endgroup tag, whichever comes first. - **/ -- (void)skipMessage; - -/** - * Check to see if the logical end of the stream has been reached. - * - * @note This can return NO when there is no more data, but the current parsing - * expected more data. - * - * @return YES if the logical end of the stream has been reached, NO otherwise. - **/ -- (BOOL)isAtEnd; - -/** - * @return The offset into the stream. - **/ -- (size_t)position; - -/** - * Moves the limit to the given byte offset starting at the current location. - * - * @exception GPBCodedInputStreamException If the requested bytes exceeed the - * current limit. - * - * @param byteLimit The number of bytes to move the limit, offset to the current - * location. - * - * @return The limit offset before moving the new limit. - */ -- (size_t)pushLimit:(size_t)byteLimit; - -/** - * Moves the limit back to the offset as it was before calling pushLimit:. - * - * @param oldLimit The number of bytes to move the current limit. Usually this - * is the value returned by the pushLimit: method. - */ -- (void)popLimit:(size_t)oldLimit; - -/** - * Verifies that the last call to -readTag returned the given tag value. This - * is used to verify that a nested group ended with the correct end tag. - * - * @exception NSParseErrorException If the value does not match the last tag. - * - * @param expected The tag that was expected. - **/ -- (void)checkLastTagWas:(int32_t)expected; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBCodedInputStream_PackagePrivate.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBCodedInputStream_PackagePrivate.h deleted file mode 100644 index 43ec6e79b..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBCodedInputStream_PackagePrivate.h +++ /dev/null @@ -1,112 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This header is private to the ProtobolBuffers library and must NOT be -// included by any sources outside this library. The contents of this file are -// subject to change at any time without notice. - -#import "GPBCodedInputStream.h" - -@class GPBUnknownFieldSet; -@class GPBFieldDescriptor; - -typedef struct GPBCodedInputStreamState { - const uint8_t *bytes; - size_t bufferSize; - size_t bufferPos; - - // For parsing subsections of an input stream you can put a hard limit on - // how much should be read. Normally the limit is the end of the stream, - // but you can adjust it to anywhere, and if you hit it you will be at the - // end of the stream, until you adjust the limit. - size_t currentLimit; - int32_t lastTag; - NSUInteger recursionDepth; -} GPBCodedInputStreamState; - -@interface GPBCodedInputStream () { - @package - struct GPBCodedInputStreamState state_; - NSData *buffer_; -} - -// Group support is deprecated, so we hide this interface from users, but -// support for older data. -- (void)readGroup:(int32_t)fieldNumber - message:(GPBMessage *)message - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry; - -// Reads a group field value from the stream and merges it into the given -// UnknownFieldSet. -- (void)readUnknownGroup:(int32_t)fieldNumber - message:(GPBUnknownFieldSet *)message; - -// Reads a map entry. -- (void)readMapEntry:(id)mapDictionary - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry - field:(GPBFieldDescriptor *)field - parentMessage:(GPBMessage *)parentMessage; -@end - -CF_EXTERN_C_BEGIN - -int32_t GPBCodedInputStreamReadTag(GPBCodedInputStreamState *state); - -double GPBCodedInputStreamReadDouble(GPBCodedInputStreamState *state); -float GPBCodedInputStreamReadFloat(GPBCodedInputStreamState *state); -uint64_t GPBCodedInputStreamReadUInt64(GPBCodedInputStreamState *state); -uint32_t GPBCodedInputStreamReadUInt32(GPBCodedInputStreamState *state); -int64_t GPBCodedInputStreamReadInt64(GPBCodedInputStreamState *state); -int32_t GPBCodedInputStreamReadInt32(GPBCodedInputStreamState *state); -uint64_t GPBCodedInputStreamReadFixed64(GPBCodedInputStreamState *state); -uint32_t GPBCodedInputStreamReadFixed32(GPBCodedInputStreamState *state); -int32_t GPBCodedInputStreamReadEnum(GPBCodedInputStreamState *state); -int32_t GPBCodedInputStreamReadSFixed32(GPBCodedInputStreamState *state); -int64_t GPBCodedInputStreamReadSFixed64(GPBCodedInputStreamState *state); -int32_t GPBCodedInputStreamReadSInt32(GPBCodedInputStreamState *state); -int64_t GPBCodedInputStreamReadSInt64(GPBCodedInputStreamState *state); -BOOL GPBCodedInputStreamReadBool(GPBCodedInputStreamState *state); -NSString *GPBCodedInputStreamReadRetainedString(GPBCodedInputStreamState *state) - __attribute((ns_returns_retained)); -NSData *GPBCodedInputStreamReadRetainedBytes(GPBCodedInputStreamState *state) - __attribute((ns_returns_retained)); -NSData *GPBCodedInputStreamReadRetainedBytesNoCopy( - GPBCodedInputStreamState *state) __attribute((ns_returns_retained)); - -size_t GPBCodedInputStreamPushLimit(GPBCodedInputStreamState *state, - size_t byteLimit); -void GPBCodedInputStreamPopLimit(GPBCodedInputStreamState *state, - size_t oldLimit); -size_t GPBCodedInputStreamBytesUntilLimit(GPBCodedInputStreamState *state); -BOOL GPBCodedInputStreamIsAtEnd(GPBCodedInputStreamState *state); -void GPBCodedInputStreamCheckLastTagWas(GPBCodedInputStreamState *state, - int32_t value); - -CF_EXTERN_C_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBCodedOutputStream.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBCodedOutputStream.h deleted file mode 100644 index 23c404b85..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBCodedOutputStream.h +++ /dev/null @@ -1,748 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBRuntimeTypes.h" -#import "GPBWireFormat.h" - -@class GPBBoolArray; -@class GPBDoubleArray; -@class GPBEnumArray; -@class GPBFloatArray; -@class GPBMessage; -@class GPBInt32Array; -@class GPBInt64Array; -@class GPBUInt32Array; -@class GPBUInt64Array; -@class GPBUnknownFieldSet; - -NS_ASSUME_NONNULL_BEGIN - -/** - * @c GPBCodedOutputStream exception names. - **/ -extern NSString *const GPBCodedOutputStreamException_OutOfSpace; -extern NSString *const GPBCodedOutputStreamException_WriteFailed; - -/** - * Writes out protocol message fields. - * - * The common uses of protocol buffers shouldn't need to use this class. - * GPBMessage's provide a -data method that will serialize the message for you. - * - * @note Any -write* api can raise the GPBCodedOutputStreamException_* - * exceptions. - * - * @note Subclassing of GPBCodedOutputStream is NOT supported. - **/ -@interface GPBCodedOutputStream : NSObject - -/** - * Creates a stream to fill in the given data. Data must be sized to fit or - * an error will be raised when out of space. - * - * @param data The data where the stream will be written to. - * - * @return A newly instanced GPBCodedOutputStream. - **/ -+ (instancetype)streamWithData:(NSMutableData *)data; - -/** - * Creates a stream to write into the given NSOutputStream. - * - * @param output The output stream where the stream will be written to. - * - * @return A newly instanced GPBCodedOutputStream. - **/ -+ (instancetype)streamWithOutputStream:(NSOutputStream *)output; - -/** - * Initializes a stream to fill in the given data. Data must be sized to fit - * or an error will be raised when out of space. - * - * @param data The data where the stream will be written to. - * - * @return A newly initialized GPBCodedOutputStream. - **/ -- (instancetype)initWithData:(NSMutableData *)data; - -/** - * Initializes a stream to write into the given @c NSOutputStream. - * - * @param output The output stream where the stream will be written to. - * - * @return A newly initialized GPBCodedOutputStream. - **/ -- (instancetype)initWithOutputStream:(NSOutputStream *)output; - -/** - * Flush any buffered data out. - **/ -- (void)flush; - -/** - * Write the raw byte out. - * - * @param value The value to write out. - **/ -- (void)writeRawByte:(uint8_t)value; - -/** - * Write the tag for the given field number and wire format. - * - * @param fieldNumber The field number. - * @param format The wire format the data for the field will be in. - **/ -- (void)writeTag:(uint32_t)fieldNumber format:(GPBWireFormat)format; - -/** - * Write a 32bit value out in little endian format. - * - * @param value The value to write out. - **/ -- (void)writeRawLittleEndian32:(int32_t)value; -/** - * Write a 64bit value out in little endian format. - * - * @param value The value to write out. - **/ -- (void)writeRawLittleEndian64:(int64_t)value; - -/** - * Write a 32bit value out in varint format. - * - * @param value The value to write out. - **/ -- (void)writeRawVarint32:(int32_t)value; -/** - * Write a 64bit value out in varint format. - * - * @param value The value to write out. - **/ -- (void)writeRawVarint64:(int64_t)value; - -/** - * Write a size_t out as a 32bit varint value. - * - * @note This will truncate 64 bit values to 32. - * - * @param value The value to write out. - **/ -- (void)writeRawVarintSizeTAs32:(size_t)value; - -/** - * Writes the contents of an NSData out. - * - * @param data The data to write out. - **/ -- (void)writeRawData:(NSData *)data; -/** - * Writes out the given data. - * - * @param data The data blob to write out. - * @param offset The offset into the blob to start writing out. - * @param length The number of bytes from the blob to write out. - **/ -- (void)writeRawPtr:(const void *)data - offset:(size_t)offset - length:(size_t)length; - -//%PDDM-EXPAND _WRITE_DECLS() -// This block of code is generated, do not edit it directly. - -/** - * Write a double for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeDouble:(int32_t)fieldNumber value:(double)value; -/** - * Write a packed array of double for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeDoubleArray:(int32_t)fieldNumber - values:(GPBDoubleArray *)values - tag:(uint32_t)tag; -/** - * Write a double without any tag. - * - * @param value The value to write out. - **/ -- (void)writeDoubleNoTag:(double)value; - -/** - * Write a float for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeFloat:(int32_t)fieldNumber value:(float)value; -/** - * Write a packed array of float for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeFloatArray:(int32_t)fieldNumber - values:(GPBFloatArray *)values - tag:(uint32_t)tag; -/** - * Write a float without any tag. - * - * @param value The value to write out. - **/ -- (void)writeFloatNoTag:(float)value; - -/** - * Write a uint64_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeUInt64:(int32_t)fieldNumber value:(uint64_t)value; -/** - * Write a packed array of uint64_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeUInt64Array:(int32_t)fieldNumber - values:(GPBUInt64Array *)values - tag:(uint32_t)tag; -/** - * Write a uint64_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeUInt64NoTag:(uint64_t)value; - -/** - * Write a int64_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeInt64:(int32_t)fieldNumber value:(int64_t)value; -/** - * Write a packed array of int64_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeInt64Array:(int32_t)fieldNumber - values:(GPBInt64Array *)values - tag:(uint32_t)tag; -/** - * Write a int64_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeInt64NoTag:(int64_t)value; - -/** - * Write a int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeInt32:(int32_t)fieldNumber value:(int32_t)value; -/** - * Write a packed array of int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeInt32Array:(int32_t)fieldNumber - values:(GPBInt32Array *)values - tag:(uint32_t)tag; -/** - * Write a int32_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeInt32NoTag:(int32_t)value; - -/** - * Write a uint32_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeUInt32:(int32_t)fieldNumber value:(uint32_t)value; -/** - * Write a packed array of uint32_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeUInt32Array:(int32_t)fieldNumber - values:(GPBUInt32Array *)values - tag:(uint32_t)tag; -/** - * Write a uint32_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeUInt32NoTag:(uint32_t)value; - -/** - * Write a uint64_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeFixed64:(int32_t)fieldNumber value:(uint64_t)value; -/** - * Write a packed array of uint64_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeFixed64Array:(int32_t)fieldNumber - values:(GPBUInt64Array *)values - tag:(uint32_t)tag; -/** - * Write a uint64_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeFixed64NoTag:(uint64_t)value; - -/** - * Write a uint32_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeFixed32:(int32_t)fieldNumber value:(uint32_t)value; -/** - * Write a packed array of uint32_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeFixed32Array:(int32_t)fieldNumber - values:(GPBUInt32Array *)values - tag:(uint32_t)tag; -/** - * Write a uint32_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeFixed32NoTag:(uint32_t)value; - -/** - * Write a int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeSInt32:(int32_t)fieldNumber value:(int32_t)value; -/** - * Write a packed array of int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeSInt32Array:(int32_t)fieldNumber - values:(GPBInt32Array *)values - tag:(uint32_t)tag; -/** - * Write a int32_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeSInt32NoTag:(int32_t)value; - -/** - * Write a int64_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeSInt64:(int32_t)fieldNumber value:(int64_t)value; -/** - * Write a packed array of int64_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeSInt64Array:(int32_t)fieldNumber - values:(GPBInt64Array *)values - tag:(uint32_t)tag; -/** - * Write a int64_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeSInt64NoTag:(int64_t)value; - -/** - * Write a int64_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeSFixed64:(int32_t)fieldNumber value:(int64_t)value; -/** - * Write a packed array of int64_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeSFixed64Array:(int32_t)fieldNumber - values:(GPBInt64Array *)values - tag:(uint32_t)tag; -/** - * Write a int64_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeSFixed64NoTag:(int64_t)value; - -/** - * Write a int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeSFixed32:(int32_t)fieldNumber value:(int32_t)value; -/** - * Write a packed array of int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeSFixed32Array:(int32_t)fieldNumber - values:(GPBInt32Array *)values - tag:(uint32_t)tag; -/** - * Write a int32_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeSFixed32NoTag:(int32_t)value; - -/** - * Write a BOOL for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeBool:(int32_t)fieldNumber value:(BOOL)value; -/** - * Write a packed array of BOOL for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeBoolArray:(int32_t)fieldNumber - values:(GPBBoolArray *)values - tag:(uint32_t)tag; -/** - * Write a BOOL without any tag. - * - * @param value The value to write out. - **/ -- (void)writeBoolNoTag:(BOOL)value; - -/** - * Write a int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeEnum:(int32_t)fieldNumber value:(int32_t)value; -/** - * Write a packed array of int32_t for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - * @param tag The tag assigned to the values. - **/ -- (void)writeEnumArray:(int32_t)fieldNumber - values:(GPBEnumArray *)values - tag:(uint32_t)tag; -/** - * Write a int32_t without any tag. - * - * @param value The value to write out. - **/ -- (void)writeEnumNoTag:(int32_t)value; - -/** - * Write a NSString for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeString:(int32_t)fieldNumber value:(NSString *)value; -/** - * Write an array of NSString for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - **/ -- (void)writeStringArray:(int32_t)fieldNumber values:(NSArray *)values; -/** - * Write a NSString without any tag. - * - * @param value The value to write out. - **/ -- (void)writeStringNoTag:(NSString *)value; - -/** - * Write a GPBMessage for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeMessage:(int32_t)fieldNumber value:(GPBMessage *)value; -/** - * Write an array of GPBMessage for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - **/ -- (void)writeMessageArray:(int32_t)fieldNumber values:(NSArray *)values; -/** - * Write a GPBMessage without any tag. - * - * @param value The value to write out. - **/ -- (void)writeMessageNoTag:(GPBMessage *)value; - -/** - * Write a NSData for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeBytes:(int32_t)fieldNumber value:(NSData *)value; -/** - * Write an array of NSData for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - **/ -- (void)writeBytesArray:(int32_t)fieldNumber values:(NSArray *)values; -/** - * Write a NSData without any tag. - * - * @param value The value to write out. - **/ -- (void)writeBytesNoTag:(NSData *)value; - -/** - * Write a GPBMessage for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeGroup:(int32_t)fieldNumber - value:(GPBMessage *)value; -/** - * Write an array of GPBMessage for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - **/ -- (void)writeGroupArray:(int32_t)fieldNumber values:(NSArray *)values; -/** - * Write a GPBMessage without any tag (but does write the endGroup tag). - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeGroupNoTag:(int32_t)fieldNumber - value:(GPBMessage *)value; - -/** - * Write a GPBUnknownFieldSet for the given field number. - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeUnknownGroup:(int32_t)fieldNumber - value:(GPBUnknownFieldSet *)value; -/** - * Write an array of GPBUnknownFieldSet for the given field number. - * - * @param fieldNumber The field number assigned to the values. - * @param values The values to write out. - **/ -- (void)writeUnknownGroupArray:(int32_t)fieldNumber values:(NSArray *)values; -/** - * Write a GPBUnknownFieldSet without any tag (but does write the endGroup tag). - * - * @param fieldNumber The field number assigned to the value. - * @param value The value to write out. - **/ -- (void)writeUnknownGroupNoTag:(int32_t)fieldNumber - value:(GPBUnknownFieldSet *)value; - -//%PDDM-EXPAND-END _WRITE_DECLS() - -/** -Write a MessageSet extension field to the stream. For historical reasons, -the wire format differs from normal fields. - -@param fieldNumber The extension field number to write out. -@param value The message from where to get the extension. -*/ -- (void)writeMessageSetExtension:(int32_t)fieldNumber value:(GPBMessage *)value; - -/** -Write an unparsed MessageSet extension field to the stream. For historical -reasons, the wire format differs from normal fields. - -@param fieldNumber The extension field number to write out. -@param value The raw message from where to get the extension. -*/ -- (void)writeRawMessageSetExtension:(int32_t)fieldNumber value:(NSData *)value; - -@end - -NS_ASSUME_NONNULL_END - -// Write methods for types that can be in packed arrays. -//%PDDM-DEFINE _WRITE_PACKABLE_DECLS(NAME, ARRAY_TYPE, TYPE) -//%/** -//% * Write a TYPE for the given field number. -//% * -//% * @param fieldNumber The field number assigned to the value. -//% * @param value The value to write out. -//% **/ -//%- (void)write##NAME:(int32_t)fieldNumber value:(TYPE)value; -//%/** -//% * Write a packed array of TYPE for the given field number. -//% * -//% * @param fieldNumber The field number assigned to the values. -//% * @param values The values to write out. -//% * @param tag The tag assigned to the values. -//% **/ -//%- (void)write##NAME##Array:(int32_t)fieldNumber -//% NAME$S values:(GPB##ARRAY_TYPE##Array *)values -//% NAME$S tag:(uint32_t)tag; -//%/** -//% * Write a TYPE without any tag. -//% * -//% * @param value The value to write out. -//% **/ -//%- (void)write##NAME##NoTag:(TYPE)value; -//% -// Write methods for types that aren't in packed arrays. -//%PDDM-DEFINE _WRITE_UNPACKABLE_DECLS(NAME, TYPE) -//%/** -//% * Write a TYPE for the given field number. -//% * -//% * @param fieldNumber The field number assigned to the value. -//% * @param value The value to write out. -//% **/ -//%- (void)write##NAME:(int32_t)fieldNumber value:(TYPE *)value; -//%/** -//% * Write an array of TYPE for the given field number. -//% * -//% * @param fieldNumber The field number assigned to the values. -//% * @param values The values to write out. -//% **/ -//%- (void)write##NAME##Array:(int32_t)fieldNumber values:(NSArray<##TYPE##*> *)values; -//%/** -//% * Write a TYPE without any tag. -//% * -//% * @param value The value to write out. -//% **/ -//%- (void)write##NAME##NoTag:(TYPE *)value; -//% -// Special write methods for Groups. -//%PDDM-DEFINE _WRITE_GROUP_DECLS(NAME, TYPE) -//%/** -//% * Write a TYPE for the given field number. -//% * -//% * @param fieldNumber The field number assigned to the value. -//% * @param value The value to write out. -//% **/ -//%- (void)write##NAME:(int32_t)fieldNumber -//% NAME$S value:(TYPE *)value; -//%/** -//% * Write an array of TYPE for the given field number. -//% * -//% * @param fieldNumber The field number assigned to the values. -//% * @param values The values to write out. -//% **/ -//%- (void)write##NAME##Array:(int32_t)fieldNumber values:(NSArray<##TYPE##*> *)values; -//%/** -//% * Write a TYPE without any tag (but does write the endGroup tag). -//% * -//% * @param fieldNumber The field number assigned to the value. -//% * @param value The value to write out. -//% **/ -//%- (void)write##NAME##NoTag:(int32_t)fieldNumber -//% NAME$S value:(TYPE *)value; -//% - -// One macro to hide it all up above. -//%PDDM-DEFINE _WRITE_DECLS() -//%_WRITE_PACKABLE_DECLS(Double, Double, double) -//%_WRITE_PACKABLE_DECLS(Float, Float, float) -//%_WRITE_PACKABLE_DECLS(UInt64, UInt64, uint64_t) -//%_WRITE_PACKABLE_DECLS(Int64, Int64, int64_t) -//%_WRITE_PACKABLE_DECLS(Int32, Int32, int32_t) -//%_WRITE_PACKABLE_DECLS(UInt32, UInt32, uint32_t) -//%_WRITE_PACKABLE_DECLS(Fixed64, UInt64, uint64_t) -//%_WRITE_PACKABLE_DECLS(Fixed32, UInt32, uint32_t) -//%_WRITE_PACKABLE_DECLS(SInt32, Int32, int32_t) -//%_WRITE_PACKABLE_DECLS(SInt64, Int64, int64_t) -//%_WRITE_PACKABLE_DECLS(SFixed64, Int64, int64_t) -//%_WRITE_PACKABLE_DECLS(SFixed32, Int32, int32_t) -//%_WRITE_PACKABLE_DECLS(Bool, Bool, BOOL) -//%_WRITE_PACKABLE_DECLS(Enum, Enum, int32_t) -//%_WRITE_UNPACKABLE_DECLS(String, NSString) -//%_WRITE_UNPACKABLE_DECLS(Message, GPBMessage) -//%_WRITE_UNPACKABLE_DECLS(Bytes, NSData) -//%_WRITE_GROUP_DECLS(Group, GPBMessage) -//%_WRITE_GROUP_DECLS(UnknownGroup, GPBUnknownFieldSet) diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBCodedOutputStream_PackagePrivate.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBCodedOutputStream_PackagePrivate.h deleted file mode 100644 index 2e7bb4c4a..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBCodedOutputStream_PackagePrivate.h +++ /dev/null @@ -1,126 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2016 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBCodedOutputStream.h" - -NS_ASSUME_NONNULL_BEGIN - -CF_EXTERN_C_BEGIN - -size_t GPBComputeDoubleSize(int32_t fieldNumber, double value) - __attribute__((const)); -size_t GPBComputeFloatSize(int32_t fieldNumber, float value) - __attribute__((const)); -size_t GPBComputeUInt64Size(int32_t fieldNumber, uint64_t value) - __attribute__((const)); -size_t GPBComputeInt64Size(int32_t fieldNumber, int64_t value) - __attribute__((const)); -size_t GPBComputeInt32Size(int32_t fieldNumber, int32_t value) - __attribute__((const)); -size_t GPBComputeFixed64Size(int32_t fieldNumber, uint64_t value) - __attribute__((const)); -size_t GPBComputeFixed32Size(int32_t fieldNumber, uint32_t value) - __attribute__((const)); -size_t GPBComputeBoolSize(int32_t fieldNumber, BOOL value) - __attribute__((const)); -size_t GPBComputeStringSize(int32_t fieldNumber, NSString *value) - __attribute__((const)); -size_t GPBComputeGroupSize(int32_t fieldNumber, GPBMessage *value) - __attribute__((const)); -size_t GPBComputeUnknownGroupSize(int32_t fieldNumber, - GPBUnknownFieldSet *value) - __attribute__((const)); -size_t GPBComputeMessageSize(int32_t fieldNumber, GPBMessage *value) - __attribute__((const)); -size_t GPBComputeBytesSize(int32_t fieldNumber, NSData *value) - __attribute__((const)); -size_t GPBComputeUInt32Size(int32_t fieldNumber, uint32_t value) - __attribute__((const)); -size_t GPBComputeSFixed32Size(int32_t fieldNumber, int32_t value) - __attribute__((const)); -size_t GPBComputeSFixed64Size(int32_t fieldNumber, int64_t value) - __attribute__((const)); -size_t GPBComputeSInt32Size(int32_t fieldNumber, int32_t value) - __attribute__((const)); -size_t GPBComputeSInt64Size(int32_t fieldNumber, int64_t value) - __attribute__((const)); -size_t GPBComputeTagSize(int32_t fieldNumber) __attribute__((const)); -size_t GPBComputeWireFormatTagSize(int field_number, GPBDataType dataType) - __attribute__((const)); - -size_t GPBComputeDoubleSizeNoTag(double value) __attribute__((const)); -size_t GPBComputeFloatSizeNoTag(float value) __attribute__((const)); -size_t GPBComputeUInt64SizeNoTag(uint64_t value) __attribute__((const)); -size_t GPBComputeInt64SizeNoTag(int64_t value) __attribute__((const)); -size_t GPBComputeInt32SizeNoTag(int32_t value) __attribute__((const)); -size_t GPBComputeFixed64SizeNoTag(uint64_t value) __attribute__((const)); -size_t GPBComputeFixed32SizeNoTag(uint32_t value) __attribute__((const)); -size_t GPBComputeBoolSizeNoTag(BOOL value) __attribute__((const)); -size_t GPBComputeStringSizeNoTag(NSString *value) __attribute__((const)); -size_t GPBComputeGroupSizeNoTag(GPBMessage *value) __attribute__((const)); -size_t GPBComputeUnknownGroupSizeNoTag(GPBUnknownFieldSet *value) - __attribute__((const)); -size_t GPBComputeMessageSizeNoTag(GPBMessage *value) __attribute__((const)); -size_t GPBComputeBytesSizeNoTag(NSData *value) __attribute__((const)); -size_t GPBComputeUInt32SizeNoTag(int32_t value) __attribute__((const)); -size_t GPBComputeEnumSizeNoTag(int32_t value) __attribute__((const)); -size_t GPBComputeSFixed32SizeNoTag(int32_t value) __attribute__((const)); -size_t GPBComputeSFixed64SizeNoTag(int64_t value) __attribute__((const)); -size_t GPBComputeSInt32SizeNoTag(int32_t value) __attribute__((const)); -size_t GPBComputeSInt64SizeNoTag(int64_t value) __attribute__((const)); - -// Note that this will calculate the size of 64 bit values truncated to 32. -size_t GPBComputeSizeTSizeAsInt32NoTag(size_t value) __attribute__((const)); - -size_t GPBComputeRawVarint32Size(int32_t value) __attribute__((const)); -size_t GPBComputeRawVarint64Size(int64_t value) __attribute__((const)); - -// Note that this will calculate the size of 64 bit values truncated to 32. -size_t GPBComputeRawVarint32SizeForInteger(NSInteger value) - __attribute__((const)); - -// Compute the number of bytes that would be needed to encode a -// MessageSet extension to the stream. For historical reasons, -// the wire format differs from normal fields. -size_t GPBComputeMessageSetExtensionSize(int32_t fieldNumber, GPBMessage *value) - __attribute__((const)); - -// Compute the number of bytes that would be needed to encode an -// unparsed MessageSet extension field to the stream. For -// historical reasons, the wire format differs from normal fields. -size_t GPBComputeRawMessageSetExtensionSize(int32_t fieldNumber, NSData *value) - __attribute__((const)); - -size_t GPBComputeEnumSize(int32_t fieldNumber, int32_t value) - __attribute__((const)); - -CF_EXTERN_C_END - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBDescriptor.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBDescriptor.h deleted file mode 100644 index 651f4de08..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBDescriptor.h +++ /dev/null @@ -1,288 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBRuntimeTypes.h" - -@class GPBEnumDescriptor; -@class GPBFieldDescriptor; -@class GPBFileDescriptor; -@class GPBOneofDescriptor; - -NS_ASSUME_NONNULL_BEGIN - -/** Syntax used in the proto file. */ -typedef NS_ENUM(uint8_t, GPBFileSyntax) { - /** Unknown syntax. */ - GPBFileSyntaxUnknown = 0, - /** Proto2 syntax. */ - GPBFileSyntaxProto2 = 2, - /** Proto3 syntax. */ - GPBFileSyntaxProto3 = 3, -}; - -/** Type of proto field. */ -typedef NS_ENUM(uint8_t, GPBFieldType) { - /** Optional/required field. Only valid for proto2 fields. */ - GPBFieldTypeSingle, - /** Repeated field. */ - GPBFieldTypeRepeated, - /** Map field. */ - GPBFieldTypeMap, -}; - -/** - * Describes a proto message. - **/ -@interface GPBDescriptor : NSObject - -/** Name of the message. */ -@property(nonatomic, readonly, copy) NSString *name; -/** Fields declared in the message. */ -@property(nonatomic, readonly, strong, nullable) NSArray *fields; -/** Oneofs declared in the message. */ -@property(nonatomic, readonly, strong, nullable) NSArray *oneofs; -/** Extension range declared for the message. */ -@property(nonatomic, readonly, nullable) const GPBExtensionRange *extensionRanges; -/** Number of extension ranges declared for the message. */ -@property(nonatomic, readonly) uint32_t extensionRangesCount; -/** Descriptor for the file where the message was defined. */ -@property(nonatomic, readonly, assign) GPBFileDescriptor *file; - -/** Whether the message is in wire format or not. */ -@property(nonatomic, readonly, getter=isWireFormat) BOOL wireFormat; -/** The class of this message. */ -@property(nonatomic, readonly) Class messageClass; -/** Containing message descriptor if this message is nested, or nil otherwise. */ -@property(readonly, nullable) GPBDescriptor *containingType; -/** - * Fully qualified name for this message (package.message). Can be nil if the - * value is unable to be computed. - */ -@property(readonly, nullable) NSString *fullName; - -/** - * Gets the field for the given number. - * - * @param fieldNumber The number for the field to get. - * - * @return The field descriptor for the given number, or nil if not found. - **/ -- (nullable GPBFieldDescriptor *)fieldWithNumber:(uint32_t)fieldNumber; - -/** - * Gets the field for the given name. - * - * @param name The name for the field to get. - * - * @return The field descriptor for the given name, or nil if not found. - **/ -- (nullable GPBFieldDescriptor *)fieldWithName:(NSString *)name; - -/** - * Gets the oneof for the given name. - * - * @param name The name for the oneof to get. - * - * @return The oneof descriptor for the given name, or nil if not found. - **/ -- (nullable GPBOneofDescriptor *)oneofWithName:(NSString *)name; - -@end - -/** - * Describes a proto file. - **/ -@interface GPBFileDescriptor : NSObject - -/** The package declared in the proto file. */ -@property(nonatomic, readonly, copy) NSString *package; -/** The objc prefix declared in the proto file. */ -@property(nonatomic, readonly, copy, nullable) NSString *objcPrefix; -/** The syntax of the proto file. */ -@property(nonatomic, readonly) GPBFileSyntax syntax; - -@end - -/** - * Describes a oneof field. - **/ -@interface GPBOneofDescriptor : NSObject -/** Name of the oneof field. */ -@property(nonatomic, readonly) NSString *name; -/** Fields declared in the oneof. */ -@property(nonatomic, readonly) NSArray *fields; - -/** - * Gets the field for the given number. - * - * @param fieldNumber The number for the field to get. - * - * @return The field descriptor for the given number, or nil if not found. - **/ -- (nullable GPBFieldDescriptor *)fieldWithNumber:(uint32_t)fieldNumber; - -/** - * Gets the field for the given name. - * - * @param name The name for the field to get. - * - * @return The field descriptor for the given name, or nil if not found. - **/ -- (nullable GPBFieldDescriptor *)fieldWithName:(NSString *)name; - -@end - -/** - * Describes a proto field. - **/ -@interface GPBFieldDescriptor : NSObject - -/** Name of the field. */ -@property(nonatomic, readonly, copy) NSString *name; -/** Number associated with the field. */ -@property(nonatomic, readonly) uint32_t number; -/** Data type contained in the field. */ -@property(nonatomic, readonly) GPBDataType dataType; -/** Whether it has a default value or not. */ -@property(nonatomic, readonly) BOOL hasDefaultValue; -/** Default value for the field. */ -@property(nonatomic, readonly) GPBGenericValue defaultValue; -/** Whether this field is required. Only valid for proto2 fields. */ -@property(nonatomic, readonly, getter=isRequired) BOOL required; -/** Whether this field is optional. */ -@property(nonatomic, readonly, getter=isOptional) BOOL optional; -/** Type of field (single, repeated, map). */ -@property(nonatomic, readonly) GPBFieldType fieldType; -/** Type of the key if the field is a map. The value's type is -fieldType. */ -@property(nonatomic, readonly) GPBDataType mapKeyDataType; -/** Whether the field is packable. */ -@property(nonatomic, readonly, getter=isPackable) BOOL packable; - -/** The containing oneof if this field is part of one, nil otherwise. */ -@property(nonatomic, readonly, assign, nullable) GPBOneofDescriptor *containingOneof; - -/** Class of the message if the field is of message type. */ -@property(nonatomic, readonly, assign, nullable) Class msgClass; - -/** Descriptor for the enum if this field is an enum. */ -@property(nonatomic, readonly, strong, nullable) GPBEnumDescriptor *enumDescriptor; - -/** - * Checks whether the given enum raw value is a valid enum value. - * - * @param value The raw enum value to check. - * - * @return YES if value is a valid enum raw value. - **/ -- (BOOL)isValidEnumValue:(int32_t)value; - -/** @return Name for the text format, or nil if not known. */ -- (nullable NSString *)textFormatName; - -@end - -/** - * Describes a proto enum. - **/ -@interface GPBEnumDescriptor : NSObject - -/** Name of the enum. */ -@property(nonatomic, readonly, copy) NSString *name; -/** Function that validates that raw values are valid enum values. */ -@property(nonatomic, readonly) GPBEnumValidationFunc enumVerifier; - -/** - * Returns the enum value name for the given raw enum. - * - * @param number The raw enum value. - * - * @return The name of the enum value passed, or nil if not valid. - **/ -- (nullable NSString *)enumNameForValue:(int32_t)number; - -/** - * Gets the enum raw value for the given enum name. - * - * @param outValue A pointer where the value will be set. - * @param name The enum name for which to get the raw value. - * - * @return YES if a value was copied into the pointer, NO otherwise. - **/ -- (BOOL)getValue:(nullable int32_t *)outValue forEnumName:(NSString *)name; - -/** - * Returns the text format for the given raw enum value. - * - * @param number The raw enum value. - * - * @return The text format name for the raw enum value, or nil if not valid. - **/ -- (nullable NSString *)textFormatNameForValue:(int32_t)number; - -/** - * Gets the enum raw value for the given text format name. - * - * @param outValue A pointer where the value will be set. - * @param textFormatName The text format name for which to get the raw value. - * - * @return YES if a value was copied into the pointer, NO otherwise. - **/ -- (BOOL)getValue:(nullable int32_t *)outValue forEnumTextFormatName:(NSString *)textFormatName; - -@end - -/** - * Describes a proto extension. - **/ -@interface GPBExtensionDescriptor : NSObject -/** Field number under which the extension is stored. */ -@property(nonatomic, readonly) uint32_t fieldNumber; -/** The containing message class, i.e. the class extended by this extension. */ -@property(nonatomic, readonly) Class containingMessageClass; -/** Data type contained in the extension. */ -@property(nonatomic, readonly) GPBDataType dataType; -/** Whether the extension is repeated. */ -@property(nonatomic, readonly, getter=isRepeated) BOOL repeated; -/** Whether the extension is packable. */ -@property(nonatomic, readonly, getter=isPackable) BOOL packable; -/** The class of the message if the extension is of message type. */ -@property(nonatomic, readonly, assign) Class msgClass; -/** The singleton name for the extension. */ -@property(nonatomic, readonly) NSString *singletonName; -/** The enum descriptor if the extension is of enum type. */ -@property(nonatomic, readonly, strong, nullable) GPBEnumDescriptor *enumDescriptor; -/** The default value for the extension. */ -@property(nonatomic, readonly, nullable) id defaultValue; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBDescriptor_PackagePrivate.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBDescriptor_PackagePrivate.h deleted file mode 100644 index 452b3f8e7..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBDescriptor_PackagePrivate.h +++ /dev/null @@ -1,325 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This header is private to the ProtobolBuffers library and must NOT be -// included by any sources outside this library. The contents of this file are -// subject to change at any time without notice. - -#import "GPBDescriptor.h" -#import "GPBWireFormat.h" - -// Describes attributes of the field. -typedef NS_OPTIONS(uint16_t, GPBFieldFlags) { - GPBFieldNone = 0, - // These map to standard protobuf concepts. - GPBFieldRequired = 1 << 0, - GPBFieldRepeated = 1 << 1, - GPBFieldPacked = 1 << 2, - GPBFieldOptional = 1 << 3, - GPBFieldHasDefaultValue = 1 << 4, - - // Indicates the field needs custom handling for the TextFormat name, if not - // set, the name can be derived from the ObjC name. - GPBFieldTextFormatNameCustom = 1 << 6, - // Indicates the field has an enum descriptor. - GPBFieldHasEnumDescriptor = 1 << 7, - - // These are not standard protobuf concepts, they are specific to the - // Objective C runtime. - - // These bits are used to mark the field as a map and what the key - // type is. - GPBFieldMapKeyMask = 0xF << 8, - GPBFieldMapKeyInt32 = 1 << 8, - GPBFieldMapKeyInt64 = 2 << 8, - GPBFieldMapKeyUInt32 = 3 << 8, - GPBFieldMapKeyUInt64 = 4 << 8, - GPBFieldMapKeySInt32 = 5 << 8, - GPBFieldMapKeySInt64 = 6 << 8, - GPBFieldMapKeyFixed32 = 7 << 8, - GPBFieldMapKeyFixed64 = 8 << 8, - GPBFieldMapKeySFixed32 = 9 << 8, - GPBFieldMapKeySFixed64 = 10 << 8, - GPBFieldMapKeyBool = 11 << 8, - GPBFieldMapKeyString = 12 << 8, -}; - -// NOTE: The structures defined here have their members ordered to minimize -// their size. This directly impacts the size of apps since these exist per -// field/extension. - -// Describes a single field in a protobuf as it is represented as an ivar. -typedef struct GPBMessageFieldDescription { - // Name of ivar. - const char *name; - union { - const char *className; // Name for message class. - // For enums only: If EnumDescriptors are compiled in, it will be that, - // otherwise it will be the verifier. - GPBEnumDescriptorFunc enumDescFunc; - GPBEnumValidationFunc enumVerifier; - } dataTypeSpecific; - // The field number for the ivar. - uint32_t number; - // The index (in bits) into _has_storage_. - // >= 0: the bit to use for a value being set. - // = GPBNoHasBit(INT32_MAX): no storage used. - // < 0: in a oneOf, use a full int32 to record the field active. - int32_t hasIndex; - // Offset of the variable into it's structure struct. - uint32_t offset; - // Field flags. Use accessor functions below. - GPBFieldFlags flags; - // Data type of the ivar. - GPBDataType dataType; -} GPBMessageFieldDescription; - -// Fields in messages defined in a 'proto2' syntax file can provide a default -// value. This struct provides the default along with the field info. -typedef struct GPBMessageFieldDescriptionWithDefault { - // Default value for the ivar. - GPBGenericValue defaultValue; - - GPBMessageFieldDescription core; -} GPBMessageFieldDescriptionWithDefault; - -// Describes attributes of the extension. -typedef NS_OPTIONS(uint8_t, GPBExtensionOptions) { - GPBExtensionNone = 0, - // These map to standard protobuf concepts. - GPBExtensionRepeated = 1 << 0, - GPBExtensionPacked = 1 << 1, - GPBExtensionSetWireFormat = 1 << 2, -}; - -// An extension -typedef struct GPBExtensionDescription { - GPBGenericValue defaultValue; - const char *singletonName; - const char *extendedClass; - const char *messageOrGroupClassName; - GPBEnumDescriptorFunc enumDescriptorFunc; - int32_t fieldNumber; - GPBDataType dataType; - GPBExtensionOptions options; -} GPBExtensionDescription; - -typedef NS_OPTIONS(uint32_t, GPBDescriptorInitializationFlags) { - GPBDescriptorInitializationFlag_None = 0, - GPBDescriptorInitializationFlag_FieldsWithDefault = 1 << 0, - GPBDescriptorInitializationFlag_WireFormat = 1 << 1, -}; - -@interface GPBDescriptor () { - @package - NSArray *fields_; - NSArray *oneofs_; - uint32_t storageSize_; -} - -// fieldDescriptions have to be long lived, they are held as raw pointers. -+ (instancetype) - allocDescriptorForClass:(Class)messageClass - rootClass:(Class)rootClass - file:(GPBFileDescriptor *)file - fields:(void *)fieldDescriptions - fieldCount:(uint32_t)fieldCount - storageSize:(uint32_t)storageSize - flags:(GPBDescriptorInitializationFlags)flags; - -- (instancetype)initWithClass:(Class)messageClass - file:(GPBFileDescriptor *)file - fields:(NSArray *)fields - storageSize:(uint32_t)storage - wireFormat:(BOOL)wireFormat; - -// Called right after init to provide extra information to avoid init having -// an explosion of args. These pointers are recorded, so they are expected -// to live for the lifetime of the app. -- (void)setupOneofs:(const char **)oneofNames - count:(uint32_t)count - firstHasIndex:(int32_t)firstHasIndex; -- (void)setupExtraTextInfo:(const char *)extraTextFormatInfo; -- (void)setupExtensionRanges:(const GPBExtensionRange *)ranges count:(int32_t)count; -- (void)setupContainingMessageClassName:(const char *)msgClassName; -- (void)setupMessageClassNameSuffix:(NSString *)suffix; - -@end - -@interface GPBFileDescriptor () -- (instancetype)initWithPackage:(NSString *)package - objcPrefix:(NSString *)objcPrefix - syntax:(GPBFileSyntax)syntax; -- (instancetype)initWithPackage:(NSString *)package - syntax:(GPBFileSyntax)syntax; -@end - -@interface GPBOneofDescriptor () { - @package - const char *name_; - NSArray *fields_; - SEL caseSel_; -} -// name must be long lived. -- (instancetype)initWithName:(const char *)name fields:(NSArray *)fields; -@end - -@interface GPBFieldDescriptor () { - @package - GPBMessageFieldDescription *description_; - GPB_UNSAFE_UNRETAINED GPBOneofDescriptor *containingOneof_; - - SEL getSel_; - SEL setSel_; - SEL hasOrCountSel_; // *Count for map<>/repeated fields, has* otherwise. - SEL setHasSel_; -} - -// Single initializer -// description has to be long lived, it is held as a raw pointer. -- (instancetype)initWithFieldDescription:(void *)description - includesDefault:(BOOL)includesDefault - syntax:(GPBFileSyntax)syntax; -@end - -@interface GPBEnumDescriptor () -// valueNames, values and extraTextFormatInfo have to be long lived, they are -// held as raw pointers. -+ (instancetype) - allocDescriptorForName:(NSString *)name - valueNames:(const char *)valueNames - values:(const int32_t *)values - count:(uint32_t)valueCount - enumVerifier:(GPBEnumValidationFunc)enumVerifier; -+ (instancetype) - allocDescriptorForName:(NSString *)name - valueNames:(const char *)valueNames - values:(const int32_t *)values - count:(uint32_t)valueCount - enumVerifier:(GPBEnumValidationFunc)enumVerifier - extraTextFormatInfo:(const char *)extraTextFormatInfo; - -- (instancetype)initWithName:(NSString *)name - valueNames:(const char *)valueNames - values:(const int32_t *)values - count:(uint32_t)valueCount - enumVerifier:(GPBEnumValidationFunc)enumVerifier; -@end - -@interface GPBExtensionDescriptor () { - @package - GPBExtensionDescription *description_; -} -@property(nonatomic, readonly) GPBWireFormat wireType; - -// For repeated extensions, alternateWireType is the wireType with the opposite -// value for the packable property. i.e. - if the extension was marked packed -// it would be the wire type for unpacked; if the extension was marked unpacked, -// it would be the wire type for packed. -@property(nonatomic, readonly) GPBWireFormat alternateWireType; - -// description has to be long lived, it is held as a raw pointer. -- (instancetype)initWithExtensionDescription: - (GPBExtensionDescription *)description; -- (NSComparisonResult)compareByFieldNumber:(GPBExtensionDescriptor *)other; -@end - -CF_EXTERN_C_BEGIN - -// Direct access is use for speed, to avoid even internally declaring things -// read/write, etc. The warning is enabled in the project to ensure code calling -// protos can turn on -Wdirect-ivar-access without issues. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -GPB_INLINE BOOL GPBFieldIsMapOrArray(GPBFieldDescriptor *field) { - return (field->description_->flags & - (GPBFieldRepeated | GPBFieldMapKeyMask)) != 0; -} - -GPB_INLINE GPBDataType GPBGetFieldDataType(GPBFieldDescriptor *field) { - return field->description_->dataType; -} - -GPB_INLINE int32_t GPBFieldHasIndex(GPBFieldDescriptor *field) { - return field->description_->hasIndex; -} - -GPB_INLINE uint32_t GPBFieldNumber(GPBFieldDescriptor *field) { - return field->description_->number; -} - -#pragma clang diagnostic pop - -uint32_t GPBFieldTag(GPBFieldDescriptor *self); - -// For repeated fields, alternateWireType is the wireType with the opposite -// value for the packable property. i.e. - if the field was marked packed it -// would be the wire type for unpacked; if the field was marked unpacked, it -// would be the wire type for packed. -uint32_t GPBFieldAlternateTag(GPBFieldDescriptor *self); - -GPB_INLINE BOOL GPBHasPreservingUnknownEnumSemantics(GPBFileSyntax syntax) { - return syntax == GPBFileSyntaxProto3; -} - -GPB_INLINE BOOL GPBExtensionIsRepeated(GPBExtensionDescription *description) { - return (description->options & GPBExtensionRepeated) != 0; -} - -GPB_INLINE BOOL GPBExtensionIsPacked(GPBExtensionDescription *description) { - return (description->options & GPBExtensionPacked) != 0; -} - -GPB_INLINE BOOL GPBExtensionIsWireFormat(GPBExtensionDescription *description) { - return (description->options & GPBExtensionSetWireFormat) != 0; -} - -// Helper for compile time assets. -#ifndef GPBInternalCompileAssert - #if __has_feature(c_static_assert) || __has_extension(c_static_assert) - #define GPBInternalCompileAssert(test, msg) _Static_assert((test), #msg) - #else - // Pre-Xcode 7 support. - #define GPBInternalCompileAssertSymbolInner(line, msg) GPBInternalCompileAssert ## line ## __ ## msg - #define GPBInternalCompileAssertSymbol(line, msg) GPBInternalCompileAssertSymbolInner(line, msg) - #define GPBInternalCompileAssert(test, msg) \ - typedef char GPBInternalCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ] - #endif // __has_feature(c_static_assert) || __has_extension(c_static_assert) -#endif // GPBInternalCompileAssert - -// Sanity check that there isn't padding between the field description -// structures with and without a default. -GPBInternalCompileAssert(sizeof(GPBMessageFieldDescriptionWithDefault) == - (sizeof(GPBGenericValue) + - sizeof(GPBMessageFieldDescription)), - DescriptionsWithDefault_different_size_than_expected); - -CF_EXTERN_C_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBDictionary.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBDictionary.h deleted file mode 100644 index a81165e81..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBDictionary.h +++ /dev/null @@ -1,5770 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBRuntimeTypes.h" - -// Note on naming: for the classes holding numeric values, a more natural -// naming of the method might be things like "-valueForKey:", -// "-setValue:forKey:"; etc. But those selectors are also defined by Key Value -// Coding (KVC) as categories on NSObject. So "overloading" the selectors with -// other meanings can cause warnings (based on compiler settings), but more -// importantly, some of those selector get called as KVC breaks up keypaths. -// So if those selectors are used, using KVC will compile cleanly, but could -// crash as it invokes those selectors with the wrong types of arguments. - -NS_ASSUME_NONNULL_BEGIN - -//%PDDM-EXPAND DECLARE_DICTIONARIES() -// This block of code is generated, do not edit it directly. - -#pragma mark - UInt32 -> UInt32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32UInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values - forKeys:(const uint32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32UInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(uint32_t key, uint32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32UInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt32:(uint32_t)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt32ForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Int32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32Int32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt32s:(const int32_t [__nullable])values - forKeys:(const uint32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32Int32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt32:(nullable int32_t *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(uint32_t key, int32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32Int32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt32:(int32_t)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt32ForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> UInt64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32UInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values - forKeys:(const uint32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32UInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(uint32_t key, uint64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32UInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt64:(uint64_t)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt64ForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Int64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32Int64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt64s:(const int64_t [__nullable])values - forKeys:(const uint32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32Int64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt64:(nullable int64_t *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(uint32_t key, int64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32Int64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt64:(int64_t)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt64ForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Bool - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32BoolDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithBools:(const BOOL [__nullable])values - forKeys:(const uint32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32BoolDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getBool:(nullable BOOL *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(uint32_t key, BOOL value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32BoolDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setBool:(BOOL)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeBoolForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Float - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32FloatDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithFloats:(const float [__nullable])values - forKeys:(const uint32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32FloatDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getFloat:(nullable float *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(uint32_t key, float value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32FloatDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setFloat:(float)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeFloatForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Double - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32DoubleDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithDoubles:(const double [__nullable])values - forKeys:(const uint32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32DoubleDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getDouble:(nullable double *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(uint32_t key, double value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32DoubleDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setDouble:(double)value forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeDoubleForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Enum - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32EnumDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * Initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly initialized dictionary. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly initialized dictionary with the keys and values in it. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [__nullable])values - forKeys:(const uint32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly initialized dictionary with the entries from the given - * dictionary in it. - **/ -- (instancetype)initWithDictionary:(GPBUInt32EnumDictionary *)dictionary; - -/** - * Initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly initialized dictionary with the given capacity. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -// is not a valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getEnum:(nullable int32_t *)value forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(uint32_t key, int32_t value, BOOL *stop))block; - -/** - * Gets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param rawValue Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **rawValue**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(uint32_t key, int32_t rawValue, BOOL *stop))block; - -/** - * Adds the keys and raw enum values from another dictionary. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addRawEntriesFromDictionary:(GPBUInt32EnumDictionary *)otherDictionary; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setEnum:(int32_t)value forKey:(uint32_t)key; - -/** - * Sets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param rawValue The raw enum value to set. - * @param key The key under which to store the raw enum value. - **/ -- (void)setRawValue:(int32_t)rawValue forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeEnumForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt32 -> Object - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt32ObjectDictionary<__covariant ObjectType> : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param objects The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects - forKeys:(const uint32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt32ObjectDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Fetches the object stored under the given key. - * - * @param key Key under which the value is stored, if present. - * - * @return The object if found, nil otherwise. - **/ -- (ObjectType)objectForKey:(uint32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **object**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(uint32_t key, ObjectType object, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt32ObjectDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param object The value to set. - * @param key The key under which to store the value. - **/ -- (void)setObject:(ObjectType)object forKey:(uint32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeObjectForKey:(uint32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> UInt32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32UInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values - forKeys:(const int32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32UInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(int32_t key, uint32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32UInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt32:(uint32_t)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt32ForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Int32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32Int32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt32s:(const int32_t [__nullable])values - forKeys:(const int32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32Int32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt32:(nullable int32_t *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(int32_t key, int32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32Int32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt32:(int32_t)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt32ForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> UInt64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32UInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values - forKeys:(const int32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32UInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(int32_t key, uint64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32UInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt64:(uint64_t)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt64ForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Int64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32Int64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt64s:(const int64_t [__nullable])values - forKeys:(const int32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32Int64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt64:(nullable int64_t *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(int32_t key, int64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32Int64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt64:(int64_t)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt64ForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Bool - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32BoolDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithBools:(const BOOL [__nullable])values - forKeys:(const int32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32BoolDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getBool:(nullable BOOL *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(int32_t key, BOOL value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32BoolDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setBool:(BOOL)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeBoolForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Float - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32FloatDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithFloats:(const float [__nullable])values - forKeys:(const int32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32FloatDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getFloat:(nullable float *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(int32_t key, float value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32FloatDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setFloat:(float)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeFloatForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Double - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32DoubleDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithDoubles:(const double [__nullable])values - forKeys:(const int32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32DoubleDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getDouble:(nullable double *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(int32_t key, double value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32DoubleDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setDouble:(double)value forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeDoubleForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Enum - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32EnumDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * Initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly initialized dictionary. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly initialized dictionary with the keys and values in it. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [__nullable])values - forKeys:(const int32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly initialized dictionary with the entries from the given - * dictionary in it. - **/ -- (instancetype)initWithDictionary:(GPBInt32EnumDictionary *)dictionary; - -/** - * Initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly initialized dictionary with the given capacity. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -// is not a valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getEnum:(nullable int32_t *)value forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(int32_t key, int32_t value, BOOL *stop))block; - -/** - * Gets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param rawValue Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **rawValue**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(int32_t key, int32_t rawValue, BOOL *stop))block; - -/** - * Adds the keys and raw enum values from another dictionary. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addRawEntriesFromDictionary:(GPBInt32EnumDictionary *)otherDictionary; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setEnum:(int32_t)value forKey:(int32_t)key; - -/** - * Sets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param rawValue The raw enum value to set. - * @param key The key under which to store the raw enum value. - **/ -- (void)setRawValue:(int32_t)rawValue forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeEnumForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int32 -> Object - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt32ObjectDictionary<__covariant ObjectType> : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param objects The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects - forKeys:(const int32_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt32ObjectDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Fetches the object stored under the given key. - * - * @param key Key under which the value is stored, if present. - * - * @return The object if found, nil otherwise. - **/ -- (ObjectType)objectForKey:(int32_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **object**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(int32_t key, ObjectType object, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt32ObjectDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param object The value to set. - * @param key The key under which to store the value. - **/ -- (void)setObject:(ObjectType)object forKey:(int32_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeObjectForKey:(int32_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> UInt32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64UInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values - forKeys:(const uint64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64UInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(uint64_t key, uint32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64UInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt32:(uint32_t)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt32ForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Int32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64Int32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt32s:(const int32_t [__nullable])values - forKeys:(const uint64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64Int32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt32:(nullable int32_t *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(uint64_t key, int32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64Int32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt32:(int32_t)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt32ForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> UInt64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64UInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values - forKeys:(const uint64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64UInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(uint64_t key, uint64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64UInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt64:(uint64_t)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt64ForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Int64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64Int64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt64s:(const int64_t [__nullable])values - forKeys:(const uint64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64Int64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt64:(nullable int64_t *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(uint64_t key, int64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64Int64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt64:(int64_t)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt64ForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Bool - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64BoolDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithBools:(const BOOL [__nullable])values - forKeys:(const uint64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64BoolDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getBool:(nullable BOOL *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(uint64_t key, BOOL value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64BoolDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setBool:(BOOL)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeBoolForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Float - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64FloatDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithFloats:(const float [__nullable])values - forKeys:(const uint64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64FloatDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getFloat:(nullable float *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(uint64_t key, float value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64FloatDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setFloat:(float)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeFloatForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Double - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64DoubleDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithDoubles:(const double [__nullable])values - forKeys:(const uint64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64DoubleDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getDouble:(nullable double *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(uint64_t key, double value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64DoubleDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setDouble:(double)value forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeDoubleForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Enum - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64EnumDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * Initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly initialized dictionary. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly initialized dictionary with the keys and values in it. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [__nullable])values - forKeys:(const uint64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly initialized dictionary with the entries from the given - * dictionary in it. - **/ -- (instancetype)initWithDictionary:(GPBUInt64EnumDictionary *)dictionary; - -/** - * Initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly initialized dictionary with the given capacity. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -// is not a valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getEnum:(nullable int32_t *)value forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(uint64_t key, int32_t value, BOOL *stop))block; - -/** - * Gets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param rawValue Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **rawValue**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(uint64_t key, int32_t rawValue, BOOL *stop))block; - -/** - * Adds the keys and raw enum values from another dictionary. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addRawEntriesFromDictionary:(GPBUInt64EnumDictionary *)otherDictionary; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setEnum:(int32_t)value forKey:(uint64_t)key; - -/** - * Sets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param rawValue The raw enum value to set. - * @param key The key under which to store the raw enum value. - **/ -- (void)setRawValue:(int32_t)rawValue forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeEnumForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - UInt64 -> Object - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBUInt64ObjectDictionary<__covariant ObjectType> : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param objects The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects - forKeys:(const uint64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBUInt64ObjectDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Fetches the object stored under the given key. - * - * @param key Key under which the value is stored, if present. - * - * @return The object if found, nil otherwise. - **/ -- (ObjectType)objectForKey:(uint64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **object**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(uint64_t key, ObjectType object, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBUInt64ObjectDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param object The value to set. - * @param key The key under which to store the value. - **/ -- (void)setObject:(ObjectType)object forKey:(uint64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeObjectForKey:(uint64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> UInt32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64UInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values - forKeys:(const int64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64UInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(int64_t key, uint32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64UInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt32:(uint32_t)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt32ForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Int32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64Int32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt32s:(const int32_t [__nullable])values - forKeys:(const int64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64Int32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt32:(nullable int32_t *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(int64_t key, int32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64Int32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt32:(int32_t)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt32ForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> UInt64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64UInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values - forKeys:(const int64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64UInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(int64_t key, uint64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64UInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt64:(uint64_t)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt64ForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Int64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64Int64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt64s:(const int64_t [__nullable])values - forKeys:(const int64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64Int64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt64:(nullable int64_t *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(int64_t key, int64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64Int64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt64:(int64_t)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt64ForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Bool - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64BoolDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithBools:(const BOOL [__nullable])values - forKeys:(const int64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64BoolDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getBool:(nullable BOOL *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(int64_t key, BOOL value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64BoolDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setBool:(BOOL)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeBoolForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Float - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64FloatDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithFloats:(const float [__nullable])values - forKeys:(const int64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64FloatDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getFloat:(nullable float *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(int64_t key, float value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64FloatDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setFloat:(float)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeFloatForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Double - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64DoubleDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithDoubles:(const double [__nullable])values - forKeys:(const int64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64DoubleDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getDouble:(nullable double *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(int64_t key, double value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64DoubleDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setDouble:(double)value forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeDoubleForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Enum - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64EnumDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * Initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly initialized dictionary. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly initialized dictionary with the keys and values in it. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [__nullable])values - forKeys:(const int64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly initialized dictionary with the entries from the given - * dictionary in it. - **/ -- (instancetype)initWithDictionary:(GPBInt64EnumDictionary *)dictionary; - -/** - * Initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly initialized dictionary with the given capacity. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -// is not a valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getEnum:(nullable int32_t *)value forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(int64_t key, int32_t value, BOOL *stop))block; - -/** - * Gets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param rawValue Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **rawValue**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(int64_t key, int32_t rawValue, BOOL *stop))block; - -/** - * Adds the keys and raw enum values from another dictionary. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addRawEntriesFromDictionary:(GPBInt64EnumDictionary *)otherDictionary; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setEnum:(int32_t)value forKey:(int64_t)key; - -/** - * Sets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param rawValue The raw enum value to set. - * @param key The key under which to store the raw enum value. - **/ -- (void)setRawValue:(int32_t)rawValue forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeEnumForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Int64 -> Object - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBInt64ObjectDictionary<__covariant ObjectType> : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param objects The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects - forKeys:(const int64_t [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBInt64ObjectDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Fetches the object stored under the given key. - * - * @param key Key under which the value is stored, if present. - * - * @return The object if found, nil otherwise. - **/ -- (ObjectType)objectForKey:(int64_t)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **object**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(int64_t key, ObjectType object, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBInt64ObjectDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param object The value to set. - * @param key The key under which to store the value. - **/ -- (void)setObject:(ObjectType)object forKey:(int64_t)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeObjectForKey:(int64_t)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> UInt32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolUInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values - forKeys:(const BOOL [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolUInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(BOOL key, uint32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolUInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt32:(uint32_t)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt32ForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Int32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt32s:(const int32_t [__nullable])values - forKeys:(const BOOL [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt32:(nullable int32_t *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(BOOL key, int32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt32:(int32_t)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt32ForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> UInt64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolUInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values - forKeys:(const BOOL [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolUInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(BOOL key, uint64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolUInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt64:(uint64_t)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt64ForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Int64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt64s:(const int64_t [__nullable])values - forKeys:(const BOOL [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt64:(nullable int64_t *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(BOOL key, int64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt64:(int64_t)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt64ForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Bool - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolBoolDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithBools:(const BOOL [__nullable])values - forKeys:(const BOOL [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolBoolDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getBool:(nullable BOOL *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(BOOL key, BOOL value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolBoolDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setBool:(BOOL)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeBoolForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Float - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolFloatDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithFloats:(const float [__nullable])values - forKeys:(const BOOL [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolFloatDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getFloat:(nullable float *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(BOOL key, float value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolFloatDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setFloat:(float)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeFloatForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Double - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolDoubleDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithDoubles:(const double [__nullable])values - forKeys:(const BOOL [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolDoubleDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getDouble:(nullable double *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(BOOL key, double value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolDoubleDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setDouble:(double)value forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeDoubleForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Enum - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolEnumDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * Initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly initialized dictionary. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly initialized dictionary with the keys and values in it. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [__nullable])values - forKeys:(const BOOL [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly initialized dictionary with the entries from the given - * dictionary in it. - **/ -- (instancetype)initWithDictionary:(GPBBoolEnumDictionary *)dictionary; - -/** - * Initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly initialized dictionary with the given capacity. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -// is not a valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getEnum:(nullable int32_t *)value forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(BOOL key, int32_t value, BOOL *stop))block; - -/** - * Gets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param rawValue Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **rawValue**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(BOOL key, int32_t rawValue, BOOL *stop))block; - -/** - * Adds the keys and raw enum values from another dictionary. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addRawEntriesFromDictionary:(GPBBoolEnumDictionary *)otherDictionary; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setEnum:(int32_t)value forKey:(BOOL)key; - -/** - * Sets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param rawValue The raw enum value to set. - * @param key The key under which to store the raw enum value. - **/ -- (void)setRawValue:(int32_t)rawValue forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeEnumForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - Bool -> Object - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBBoolObjectDictionary<__covariant ObjectType> : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param objects The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects - forKeys:(const BOOL [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBBoolObjectDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Fetches the object stored under the given key. - * - * @param key Key under which the value is stored, if present. - * - * @return The object if found, nil otherwise. - **/ -- (ObjectType)objectForKey:(BOOL)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **object**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndObjectsUsingBlock: - (void (^)(BOOL key, ObjectType object, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBBoolObjectDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param object The value to set. - * @param key The key under which to store the value. - **/ -- (void)setObject:(ObjectType)object forKey:(BOOL)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeObjectForKey:(BOOL)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> UInt32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringUInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values - forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringUInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt32sUsingBlock: - (void (^)(NSString *key, uint32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringUInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt32:(uint32_t)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt32ForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> Int32 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringInt32Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt32s:(const int32_t [__nullable])values - forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringInt32Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt32:(nullable int32_t *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt32sUsingBlock: - (void (^)(NSString *key, int32_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringInt32Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt32:(int32_t)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt32ForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> UInt64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringUInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values - forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringUInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndUInt64sUsingBlock: - (void (^)(NSString *key, uint64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringUInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setUInt64:(uint64_t)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeUInt64ForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> Int64 - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringInt64Dictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithInt64s:(const int64_t [__nullable])values - forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringInt64Dictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getInt64:(nullable int64_t *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndInt64sUsingBlock: - (void (^)(NSString *key, int64_t value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringInt64Dictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setInt64:(int64_t)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeInt64ForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> Bool - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringBoolDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithBools:(const BOOL [__nullable])values - forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringBoolDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getBool:(nullable BOOL *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndBoolsUsingBlock: - (void (^)(NSString *key, BOOL value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringBoolDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setBool:(BOOL)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeBoolForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> Float - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringFloatDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithFloats:(const float [__nullable])values - forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringFloatDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getFloat:(nullable float *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndFloatsUsingBlock: - (void (^)(NSString *key, float value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringFloatDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setFloat:(float)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeFloatForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> Double - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringDoubleDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; - -/** - * Initializes this dictionary, copying the given values and keys. - * - * @param values The values to be placed in this dictionary. - * @param keys The keys under which to store the values. - * @param count The number of elements to copy into the dictionary. - * - * @return A newly initialized dictionary with a copy of the values and keys. - **/ -- (instancetype)initWithDoubles:(const double [__nullable])values - forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes this dictionary, copying the entries from the given dictionary. - * - * @param dictionary Dictionary containing the entries to add to this dictionary. - * - * @return A newly initialized dictionary with the entries of the given dictionary. - **/ -- (instancetype)initWithDictionary:(GPBStringDoubleDictionary *)dictionary; - -/** - * Initializes this dictionary with the requested capacity. - * - * @param numItems Number of items needed for this dictionary. - * - * @return A newly initialized dictionary with the requested capacity. - **/ -- (instancetype)initWithCapacity:(NSUInteger)numItems; - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getDouble:(nullable double *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndDoublesUsingBlock: - (void (^)(NSString *key, double value, BOOL *stop))block; - -/** - * Adds the keys and values from another dictionary. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addEntriesFromDictionary:(GPBStringDoubleDictionary *)otherDictionary; - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setDouble:(double)value forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeDoubleForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -#pragma mark - String -> Enum - -/** - * Class used for map fields of - * values. This performs better than boxing into NSNumbers in NSDictionaries. - * - * @note This class is not meant to be subclassed. - **/ -@interface GPBStringEnumDictionary : NSObject - -/** Number of entries stored in this dictionary. */ -@property(nonatomic, readonly) NSUInteger count; -/** The validation function to check if the enums are valid. */ -@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; - -/** - * Initializes a dictionary with the given validation function. - * - * @param func The enum validation function for the dictionary. - * - * @return A newly initialized dictionary. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; - -/** - * Initializes a dictionary with the entries given. - * - * @param func The enum validation function for the dictionary. - * @param values The raw enum values values to be placed in the dictionary. - * @param keys The keys under which to store the values. - * @param count The number of entries to store in the dictionary. - * - * @return A newly initialized dictionary with the keys and values in it. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - rawValues:(const int32_t [__nullable])values - forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys - count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; - -/** - * Initializes a dictionary with the entries from the given. - * dictionary. - * - * @param dictionary Dictionary containing the entries to add to the dictionary. - * - * @return A newly initialized dictionary with the entries from the given - * dictionary in it. - **/ -- (instancetype)initWithDictionary:(GPBStringEnumDictionary *)dictionary; - -/** - * Initializes a dictionary with the given capacity. - * - * @param func The enum validation function for the dictionary. - * @param numItems Capacity needed for the dictionary. - * - * @return A newly initialized dictionary with the given capacity. - **/ -- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func - capacity:(NSUInteger)numItems; - -// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -// is not a valid enumerator as defined by validationFunc. If the actual value is -// desired, use "raw" version of the method. - -/** - * Gets the value for the given key. - * - * @param value Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getEnum:(nullable int32_t *)value forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **value**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndEnumsUsingBlock: - (void (^)(NSString *key, int32_t value, BOOL *stop))block; - -/** - * Gets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param rawValue Pointer into which the value will be set, if found. - * @param key Key under which the value is stored, if present. - * - * @return YES if the key was found and the value was copied, NO otherwise. - **/ -- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(NSString *)key; - -/** - * Enumerates the keys and values on this dictionary with the given block. - * - * @note This method bypass the validationFunc to enable the access of values that - * were not known at the time the binary was compiled. - * - * @param block The block to enumerate with. - * **key**: The key for the current entry. - * **rawValue**: The value for the current entry - * **stop**: A pointer to a boolean that when set stops the enumeration. - **/ -- (void)enumerateKeysAndRawValuesUsingBlock: - (void (^)(NSString *key, int32_t rawValue, BOOL *stop))block; - -/** - * Adds the keys and raw enum values from another dictionary. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param otherDictionary Dictionary containing entries to be added to this - * dictionary. - **/ -- (void)addRawEntriesFromDictionary:(GPBStringEnumDictionary *)otherDictionary; - -// If value is not a valid enumerator as defined by validationFunc, these -// methods will assert in debug, and will log in release and assign the value -// to the default value. Use the rawValue methods below to assign non enumerator -// values. - -/** - * Sets the value for the given key. - * - * @param value The value to set. - * @param key The key under which to store the value. - **/ -- (void)setEnum:(int32_t)value forKey:(NSString *)key; - -/** - * Sets the raw enum value for the given key. - * - * @note This method bypass the validationFunc to enable the setting of values that - * were not known at the time the binary was compiled. - * - * @param rawValue The raw enum value to set. - * @param key The key under which to store the raw enum value. - **/ -- (void)setRawValue:(int32_t)rawValue forKey:(NSString *)key; - -/** - * Removes the entry for the given key. - * - * @param aKey Key to be removed from this dictionary. - **/ -- (void)removeEnumForKey:(NSString *)aKey; - -/** - * Removes all entries in this dictionary. - **/ -- (void)removeAll; - -@end - -//%PDDM-EXPAND-END DECLARE_DICTIONARIES() - -NS_ASSUME_NONNULL_END - -//%PDDM-DEFINE DECLARE_DICTIONARIES() -//%DICTIONARY_INTERFACES_FOR_POD_KEY(UInt32, uint32_t) -//%DICTIONARY_INTERFACES_FOR_POD_KEY(Int32, int32_t) -//%DICTIONARY_INTERFACES_FOR_POD_KEY(UInt64, uint64_t) -//%DICTIONARY_INTERFACES_FOR_POD_KEY(Int64, int64_t) -//%DICTIONARY_INTERFACES_FOR_POD_KEY(Bool, BOOL) -//%DICTIONARY_POD_INTERFACES_FOR_KEY(String, NSString, *, OBJECT) -//%PDDM-DEFINE DICTIONARY_INTERFACES_FOR_POD_KEY(KEY_NAME, KEY_TYPE) -//%DICTIONARY_POD_INTERFACES_FOR_KEY(KEY_NAME, KEY_TYPE, , POD) -//%DICTIONARY_POD_KEY_TO_OBJECT_INTERFACE(KEY_NAME, KEY_TYPE, Object, ObjectType) -//%PDDM-DEFINE DICTIONARY_POD_INTERFACES_FOR_KEY(KEY_NAME, KEY_TYPE, KisP, KHELPER) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, UInt32, uint32_t) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Int32, int32_t) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, UInt64, uint64_t) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Int64, int64_t) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Bool, BOOL) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Float, float) -//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Double, double) -//%DICTIONARY_KEY_TO_ENUM_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Enum, int32_t) -//%PDDM-DEFINE DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE) -//%DICTIONARY_COMMON_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE, POD, VALUE_NAME, value) -//%PDDM-DEFINE DICTIONARY_POD_KEY_TO_OBJECT_INTERFACE(KEY_NAME, KEY_TYPE, VALUE_NAME, VALUE_TYPE) -//%DICTIONARY_COMMON_INTERFACE(KEY_NAME, KEY_TYPE, , POD, VALUE_NAME, VALUE_TYPE, OBJECT, Object, object) -//%PDDM-DEFINE VALUE_FOR_KEY_POD(KEY_TYPE, VALUE_TYPE, VNAME) -//%/** -//% * Gets the value for the given key. -//% * -//% * @param value Pointer into which the value will be set, if found. -//% * @param key Key under which the value is stored, if present. -//% * -//% * @return YES if the key was found and the value was copied, NO otherwise. -//% **/ -//%- (BOOL)get##VNAME##:(nullable VALUE_TYPE *)value forKey:(KEY_TYPE)key; -//%PDDM-DEFINE VALUE_FOR_KEY_OBJECT(KEY_TYPE, VALUE_TYPE, VNAME) -//%/** -//% * Fetches the object stored under the given key. -//% * -//% * @param key Key under which the value is stored, if present. -//% * -//% * @return The object if found, nil otherwise. -//% **/ -//%- (VALUE_TYPE)objectForKey:(KEY_TYPE)key; -//%PDDM-DEFINE VALUE_FOR_KEY_Enum(KEY_TYPE, VALUE_TYPE, VNAME) -//%VALUE_FOR_KEY_POD(KEY_TYPE, VALUE_TYPE, VNAME) -//%PDDM-DEFINE ARRAY_ARG_MODIFIERPOD() -// Nothing -//%PDDM-DEFINE ARRAY_ARG_MODIFIEREnum() -// Nothing -//%PDDM-DEFINE ARRAY_ARG_MODIFIEROBJECT() -//%__nonnull GPB_UNSAFE_UNRETAINED ## -//%PDDM-DEFINE DICTIONARY_CLASS_DECLPOD(KEY_NAME, VALUE_NAME, VALUE_TYPE) -//%GPB##KEY_NAME##VALUE_NAME##Dictionary -//%PDDM-DEFINE DICTIONARY_CLASS_DECLEnum(KEY_NAME, VALUE_NAME, VALUE_TYPE) -//%GPB##KEY_NAME##VALUE_NAME##Dictionary -//%PDDM-DEFINE DICTIONARY_CLASS_DECLOBJECT(KEY_NAME, VALUE_NAME, VALUE_TYPE) -//%GPB##KEY_NAME##VALUE_NAME##Dictionary<__covariant VALUE_TYPE> -//%PDDM-DEFINE DICTIONARY_COMMON_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR) -//%#pragma mark - KEY_NAME -> VALUE_NAME -//% -//%/** -//% * Class used for map fields of <##KEY_TYPE##, ##VALUE_TYPE##> -//% * values. This performs better than boxing into NSNumbers in NSDictionaries. -//% * -//% * @note This class is not meant to be subclassed. -//% **/ -//%@interface DICTIONARY_CLASS_DECL##VHELPER(KEY_NAME, VALUE_NAME, VALUE_TYPE) : NSObject -//% -//%/** Number of entries stored in this dictionary. */ -//%@property(nonatomic, readonly) NSUInteger count; -//% -//%/** -//% * Initializes this dictionary, copying the given values and keys. -//% * -//% * @param ##VNAME_VAR##s The values to be placed in this dictionary. -//% * @param keys ##VNAME_VAR$S## The keys under which to store the values. -//% * @param count ##VNAME_VAR$S## The number of elements to copy into the dictionary. -//% * -//% * @return A newly initialized dictionary with a copy of the values and keys. -//% **/ -//%- (instancetype)initWith##VNAME##s:(const VALUE_TYPE ARRAY_ARG_MODIFIER##VHELPER()[__nullable])##VNAME_VAR##s -//% ##VNAME$S## forKeys:(const KEY_TYPE##KisP$S##KisP ARRAY_ARG_MODIFIER##KHELPER()[__nullable])keys -//% ##VNAME$S## count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; -//% -//%/** -//% * Initializes this dictionary, copying the entries from the given dictionary. -//% * -//% * @param dictionary Dictionary containing the entries to add to this dictionary. -//% * -//% * @return A newly initialized dictionary with the entries of the given dictionary. -//% **/ -//%- (instancetype)initWithDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)dictionary; -//% -//%/** -//% * Initializes this dictionary with the requested capacity. -//% * -//% * @param numItems Number of items needed for this dictionary. -//% * -//% * @return A newly initialized dictionary with the requested capacity. -//% **/ -//%- (instancetype)initWithCapacity:(NSUInteger)numItems; -//% -//%DICTIONARY_IMMUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR) -//% -//%/** -//% * Adds the keys and values from another dictionary. -//% * -//% * @param otherDictionary Dictionary containing entries to be added to this -//% * dictionary. -//% **/ -//%- (void)addEntriesFromDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)otherDictionary; -//% -//%DICTIONARY_MUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR) -//% -//%@end -//% - -//%PDDM-DEFINE DICTIONARY_KEY_TO_ENUM_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE) -//%DICTIONARY_KEY_TO_ENUM_INTERFACE2(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE, Enum) -//%PDDM-DEFINE DICTIONARY_KEY_TO_ENUM_INTERFACE2(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE, VHELPER) -//%#pragma mark - KEY_NAME -> VALUE_NAME -//% -//%/** -//% * Class used for map fields of <##KEY_TYPE##, ##VALUE_TYPE##> -//% * values. This performs better than boxing into NSNumbers in NSDictionaries. -//% * -//% * @note This class is not meant to be subclassed. -//% **/ -//%@interface GPB##KEY_NAME##VALUE_NAME##Dictionary : NSObject -//% -//%/** Number of entries stored in this dictionary. */ -//%@property(nonatomic, readonly) NSUInteger count; -//%/** The validation function to check if the enums are valid. */ -//%@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc; -//% -//%/** -//% * Initializes a dictionary with the given validation function. -//% * -//% * @param func The enum validation function for the dictionary. -//% * -//% * @return A newly initialized dictionary. -//% **/ -//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func; -//% -//%/** -//% * Initializes a dictionary with the entries given. -//% * -//% * @param func The enum validation function for the dictionary. -//% * @param values The raw enum values values to be placed in the dictionary. -//% * @param keys The keys under which to store the values. -//% * @param count The number of entries to store in the dictionary. -//% * -//% * @return A newly initialized dictionary with the keys and values in it. -//% **/ -//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% rawValues:(const VALUE_TYPE ARRAY_ARG_MODIFIER##VHELPER()[__nullable])values -//% forKeys:(const KEY_TYPE##KisP$S##KisP ARRAY_ARG_MODIFIER##KHELPER()[__nullable])keys -//% count:(NSUInteger)count NS_DESIGNATED_INITIALIZER; -//% -//%/** -//% * Initializes a dictionary with the entries from the given. -//% * dictionary. -//% * -//% * @param dictionary Dictionary containing the entries to add to the dictionary. -//% * -//% * @return A newly initialized dictionary with the entries from the given -//% * dictionary in it. -//% **/ -//%- (instancetype)initWithDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)dictionary; -//% -//%/** -//% * Initializes a dictionary with the given capacity. -//% * -//% * @param func The enum validation function for the dictionary. -//% * @param numItems Capacity needed for the dictionary. -//% * -//% * @return A newly initialized dictionary with the given capacity. -//% **/ -//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func -//% capacity:(NSUInteger)numItems; -//% -//%// These will return kGPBUnrecognizedEnumeratorValue if the value for the key -//%// is not a valid enumerator as defined by validationFunc. If the actual value is -//%// desired, use "raw" version of the method. -//% -//%DICTIONARY_IMMUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, Enum, value) -//% -//%/** -//% * Gets the raw enum value for the given key. -//% * -//% * @note This method bypass the validationFunc to enable the access of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param rawValue Pointer into which the value will be set, if found. -//% * @param key Key under which the value is stored, if present. -//% * -//% * @return YES if the key was found and the value was copied, NO otherwise. -//% **/ -//%- (BOOL)getRawValue:(nullable VALUE_TYPE *)rawValue forKey:(KEY_TYPE##KisP$S##KisP)key; -//% -//%/** -//% * Enumerates the keys and values on this dictionary with the given block. -//% * -//% * @note This method bypass the validationFunc to enable the access of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param block The block to enumerate with. -//% * **key**: The key for the current entry. -//% * **rawValue**: The value for the current entry -//% * **stop**: A pointer to a boolean that when set stops the enumeration. -//% **/ -//%- (void)enumerateKeysAndRawValuesUsingBlock: -//% (void (^)(KEY_TYPE KisP##key, VALUE_TYPE rawValue, BOOL *stop))block; -//% -//%/** -//% * Adds the keys and raw enum values from another dictionary. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param otherDictionary Dictionary containing entries to be added to this -//% * dictionary. -//% **/ -//%- (void)addRawEntriesFromDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)otherDictionary; -//% -//%// If value is not a valid enumerator as defined by validationFunc, these -//%// methods will assert in debug, and will log in release and assign the value -//%// to the default value. Use the rawValue methods below to assign non enumerator -//%// values. -//% -//%DICTIONARY_MUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, Enum, value) -//% -//%@end -//% - -//%PDDM-DEFINE DICTIONARY_IMMUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR) -//%VALUE_FOR_KEY_##VHELPER(KEY_TYPE##KisP$S##KisP, VALUE_TYPE, VNAME) -//% -//%/** -//% * Enumerates the keys and values on this dictionary with the given block. -//% * -//% * @param block The block to enumerate with. -//% * **key**: ##VNAME_VAR$S## The key for the current entry. -//% * **VNAME_VAR**: The value for the current entry -//% * **stop**: ##VNAME_VAR$S## A pointer to a boolean that when set stops the enumeration. -//% **/ -//%- (void)enumerateKeysAnd##VNAME##sUsingBlock: -//% (void (^)(KEY_TYPE KisP##key, VALUE_TYPE VNAME_VAR, BOOL *stop))block; - -//%PDDM-DEFINE DICTIONARY_MUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR) -//%/** -//% * Sets the value for the given key. -//% * -//% * @param ##VNAME_VAR The value to set. -//% * @param key ##VNAME_VAR$S## The key under which to store the value. -//% **/ -//%- (void)set##VNAME##:(VALUE_TYPE)##VNAME_VAR forKey:(KEY_TYPE##KisP$S##KisP)key; -//%DICTIONARY_EXTRA_MUTABLE_METHODS_##VHELPER(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE) -//%/** -//% * Removes the entry for the given key. -//% * -//% * @param aKey Key to be removed from this dictionary. -//% **/ -//%- (void)remove##VNAME##ForKey:(KEY_TYPE##KisP$S##KisP)aKey; -//% -//%/** -//% * Removes all entries in this dictionary. -//% **/ -//%- (void)removeAll; - -//%PDDM-DEFINE DICTIONARY_EXTRA_MUTABLE_METHODS_POD(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE) -// Empty -//%PDDM-DEFINE DICTIONARY_EXTRA_MUTABLE_METHODS_OBJECT(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE) -// Empty -//%PDDM-DEFINE DICTIONARY_EXTRA_MUTABLE_METHODS_Enum(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE) -//% -//%/** -//% * Sets the raw enum value for the given key. -//% * -//% * @note This method bypass the validationFunc to enable the setting of values that -//% * were not known at the time the binary was compiled. -//% * -//% * @param rawValue The raw enum value to set. -//% * @param key The key under which to store the raw enum value. -//% **/ -//%- (void)setRawValue:(VALUE_TYPE)rawValue forKey:(KEY_TYPE##KisP$S##KisP)key; -//% diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBDictionary_PackagePrivate.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBDictionary_PackagePrivate.h deleted file mode 100644 index 7b921e8ec..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBDictionary_PackagePrivate.h +++ /dev/null @@ -1,488 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBDictionary.h" - -@class GPBCodedInputStream; -@class GPBCodedOutputStream; -@class GPBExtensionRegistry; -@class GPBFieldDescriptor; - -@protocol GPBDictionaryInternalsProtocol -- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field; -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream - asField:(GPBFieldDescriptor *)field; -- (void)setGPBGenericValue:(GPBGenericValue *)value - forGPBGenericValueKey:(GPBGenericValue *)key; -- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block; -@end - -//%PDDM-DEFINE DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(KEY_NAME) -//%DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(KEY_NAME) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Object, Object) -//%PDDM-DEFINE DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(KEY_NAME) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, UInt32, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Int32, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, UInt64, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Int64, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Bool, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Float, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Double, Basic) -//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Enum, Enum) - -//%PDDM-DEFINE DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, VALUE_NAME, HELPER) -//%@interface GPB##KEY_NAME##VALUE_NAME##Dictionary () { -//% @package -//% GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -//%} -//%EXTRA_DICTIONARY_PRIVATE_INTERFACES_##HELPER()@end -//% - -//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Basic() -// Empty -//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Object() -//%- (BOOL)isInitialized; -//%- (instancetype)deepCopyWithZone:(NSZone *)zone -//% __attribute__((ns_returns_retained)); -//% -//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Enum() -//%- (NSData *)serializedDataForUnknownValue:(int32_t)value -//% forKey:(GPBGenericValue *)key -//% keyDataType:(GPBDataType)keyDataType; -//% - -//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt32) -// This block of code is generated, do not edit it directly. - -@interface GPBUInt32UInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32Int32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32UInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32Int64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32BoolDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32FloatDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32DoubleDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt32EnumDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType; -@end - -@interface GPBUInt32ObjectDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (BOOL)isInitialized; -- (instancetype)deepCopyWithZone:(NSZone *)zone - __attribute__((ns_returns_retained)); -@end - -//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int32) -// This block of code is generated, do not edit it directly. - -@interface GPBInt32UInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32Int32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32UInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32Int64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32BoolDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32FloatDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32DoubleDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt32EnumDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType; -@end - -@interface GPBInt32ObjectDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (BOOL)isInitialized; -- (instancetype)deepCopyWithZone:(NSZone *)zone - __attribute__((ns_returns_retained)); -@end - -//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt64) -// This block of code is generated, do not edit it directly. - -@interface GPBUInt64UInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64Int32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64UInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64Int64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64BoolDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64FloatDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64DoubleDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBUInt64EnumDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType; -@end - -@interface GPBUInt64ObjectDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (BOOL)isInitialized; -- (instancetype)deepCopyWithZone:(NSZone *)zone - __attribute__((ns_returns_retained)); -@end - -//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int64) -// This block of code is generated, do not edit it directly. - -@interface GPBInt64UInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64Int32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64UInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64Int64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64BoolDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64FloatDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64DoubleDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBInt64EnumDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType; -@end - -@interface GPBInt64ObjectDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (BOOL)isInitialized; -- (instancetype)deepCopyWithZone:(NSZone *)zone - __attribute__((ns_returns_retained)); -@end - -//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Bool) -// This block of code is generated, do not edit it directly. - -@interface GPBBoolUInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolUInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolBoolDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolFloatDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolDoubleDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBBoolEnumDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType; -@end - -@interface GPBBoolObjectDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (BOOL)isInitialized; -- (instancetype)deepCopyWithZone:(NSZone *)zone - __attribute__((ns_returns_retained)); -@end - -//%PDDM-EXPAND DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(String) -// This block of code is generated, do not edit it directly. - -@interface GPBStringUInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringInt32Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringUInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringInt64Dictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringBoolDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringFloatDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringDoubleDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -@interface GPBStringEnumDictionary () { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -- (NSData *)serializedDataForUnknownValue:(int32_t)value - forKey:(GPBGenericValue *)key - keyDataType:(GPBDataType)keyDataType; -@end - -//%PDDM-EXPAND-END (6 expansions) - -#pragma mark - NSDictionary Subclass - -@interface GPBAutocreatedDictionary : NSMutableDictionary { - @package - GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator; -} -@end - -#pragma mark - Helpers - -CF_EXTERN_C_BEGIN - -// Helper to compute size when an NSDictionary is used for the map instead -// of a custom type. -size_t GPBDictionaryComputeSizeInternalHelper(NSDictionary *dict, - GPBFieldDescriptor *field); - -// Helper to write out when an NSDictionary is used for the map instead -// of a custom type. -void GPBDictionaryWriteToStreamInternalHelper( - GPBCodedOutputStream *outputStream, NSDictionary *dict, - GPBFieldDescriptor *field); - -// Helper to check message initialization when an NSDictionary is used for -// the map instead of a custom type. -BOOL GPBDictionaryIsInitializedInternalHelper(NSDictionary *dict, - GPBFieldDescriptor *field); - -// Helper to read a map instead. -void GPBDictionaryReadEntry(id mapDictionary, GPBCodedInputStream *stream, - GPBExtensionRegistry *registry, - GPBFieldDescriptor *field, - GPBMessage *parentMessage); - -CF_EXTERN_C_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBExtensionInternals.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBExtensionInternals.h deleted file mode 100644 index 2b980aefa..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBExtensionInternals.h +++ /dev/null @@ -1,50 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBDescriptor.h" - -@class GPBCodedInputStream; -@class GPBCodedOutputStream; -@class GPBExtensionRegistry; - -void GPBExtensionMergeFromInputStream(GPBExtensionDescriptor *extension, - BOOL isPackedOnStream, - GPBCodedInputStream *input, - GPBExtensionRegistry *extensionRegistry, - GPBMessage *message); - -size_t GPBComputeExtensionSerializedSizeIncludingTag( - GPBExtensionDescriptor *extension, id value); - -void GPBWriteExtensionValueToOutputStream(GPBExtensionDescriptor *extension, - id value, - GPBCodedOutputStream *output); diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBExtensionRegistry.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBExtensionRegistry.h deleted file mode 100644 index d79632d28..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBExtensionRegistry.h +++ /dev/null @@ -1,87 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -@class GPBDescriptor; -@class GPBExtensionDescriptor; - -NS_ASSUME_NONNULL_BEGIN - -/** - * A table of known extensions, searchable by name or field number. When - * parsing a protocol message that might have extensions, you must provide a - * GPBExtensionRegistry in which you have registered any extensions that you - * want to be able to parse. Otherwise, those extensions will just be treated - * like unknown fields. - * - * The *Root classes provide `+extensionRegistry` for the extensions defined - * in a given file *and* all files it imports. You can also create a - * GPBExtensionRegistry, and merge those registries to handle parsing - * extensions defined from non overlapping files. - * - * ``` - * GPBExtensionRegistry *registry = [[MyProtoFileRoot extensionRegistry] copy]; - * [registry addExtension:[OtherMessage neededExtension]]; // Not in MyProtoFile - * NSError *parseError; - * MyMessage *msg = [MyMessage parseData:data extensionRegistry:registry error:&parseError]; - * ``` - **/ -@interface GPBExtensionRegistry : NSObject - -/** - * Adds the given GPBExtensionDescriptor to this registry. - * - * @param extension The extension description to add. - **/ -- (void)addExtension:(GPBExtensionDescriptor *)extension; - -/** - * Adds all the extensions from another registry to this registry. - * - * @param registry The registry to merge into this registry. - **/ -- (void)addExtensions:(GPBExtensionRegistry *)registry; - -/** - * Looks for the extension registered for the given field number on a given - * GPBDescriptor. - * - * @param descriptor The descriptor to look for a registered extension on. - * @param fieldNumber The field number of the extension to look for. - * - * @return The registered GPBExtensionDescriptor or nil if none was found. - **/ -- (nullable GPBExtensionDescriptor *)extensionForDescriptor:(GPBDescriptor *)descriptor - fieldNumber:(NSInteger)fieldNumber; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBMessage.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBMessage.h deleted file mode 100644 index 276740d2f..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBMessage.h +++ /dev/null @@ -1,470 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBBootstrap.h" - -@class GPBDescriptor; -@class GPBCodedInputStream; -@class GPBCodedOutputStream; -@class GPBExtensionDescriptor; -@class GPBExtensionRegistry; -@class GPBFieldDescriptor; -@class GPBUnknownFieldSet; - -NS_ASSUME_NONNULL_BEGIN - -CF_EXTERN_C_BEGIN - -/** NSError domain used for errors. */ -extern NSString *const GPBMessageErrorDomain; - -/** Error codes for NSErrors originated in GPBMessage. */ -typedef NS_ENUM(NSInteger, GPBMessageErrorCode) { - /** Uncategorized error. */ - GPBMessageErrorCodeOther = -100, - /** Message couldn't be serialized because it is missing required fields. */ - GPBMessageErrorCodeMissingRequiredField = -101, -}; - -/** - * Key under which the GPBMessage error's reason is stored inside the userInfo - * dictionary. - **/ -extern NSString *const GPBErrorReasonKey; - -CF_EXTERN_C_END - -/** - * Base class that each generated message subclasses from. - * - * @note @c NSCopying support is a "deep copy", in that all sub objects are - * copied. Just like you wouldn't want a UIView/NSView trying to - * exist in two places, you don't want a sub message to be a property - * property of two other messages. - * - * @note While the class support NSSecureCoding, if the message has any - * extensions, they will end up reloaded in @c unknownFields as there is - * no way for the @c NSCoding plumbing to pass through a - * @c GPBExtensionRegistry. To support extensions, instead of passing the - * calls off to the Message, simple store the result of @c data, and then - * when loading, fetch the data and use - * @c +parseFromData:extensionRegistry:error: to provide an extension - * registry. - **/ -@interface GPBMessage : NSObject - -// If you add an instance method/property to this class that may conflict with -// fields declared in protos, you need to update objective_helpers.cc. The main -// cases are methods that take no arguments, or setFoo:/hasFoo: type methods. - -/** - * The set of unknown fields for this message. - * - * Only messages from proto files declared with "proto2" syntax support unknown - * fields. For "proto3" syntax, any unknown fields found while parsing are - * dropped. - **/ -@property(nonatomic, copy, nullable) GPBUnknownFieldSet *unknownFields; - -/** - * Whether the message, along with all submessages, have the required fields - * set. This is only applicable for files declared with "proto2" syntax, as - * there are no required fields for "proto3" syntax. - **/ -@property(nonatomic, readonly, getter=isInitialized) BOOL initialized; - -/** - * @return An autoreleased message with the default values set. - **/ -+ (instancetype)message; - -/** - * Creates a new instance by parsing the provided data. This method should be - * sent to the generated message class that the data should be interpreted as. - * If there is an error the method returns nil and the error is returned in - * errorPtr (when provided). - * - * @note In DEBUG builds, the parsed message is checked to be sure all required - * fields were provided, and the parse will fail if some are missing. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param data The data to parse. - * @param errorPtr An optional error pointer to fill in with a failure reason if - * the data can not be parsed. - * - * @return A new instance of the generated class. - **/ -+ (nullable instancetype)parseFromData:(NSData *)data error:(NSError **)errorPtr; - -/** - * Creates a new instance by parsing the data. This method should be sent to - * the generated message class that the data should be interpreted as. If - * there is an error the method returns nil and the error is returned in - * errorPtr (when provided). - * - * @note In DEBUG builds, the parsed message is checked to be sure all required - * fields were provided, and the parse will fail if some are missing. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param data The data to parse. - * @param extensionRegistry The extension registry to use to look up extensions. - * @param errorPtr An optional error pointer to fill in with a failure - * reason if the data can not be parsed. - * - * @return A new instance of the generated class. - **/ -+ (nullable instancetype)parseFromData:(NSData *)data - extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr; - -/** - * Creates a new instance by parsing the data from the given input stream. This - * method should be sent to the generated message class that the data should - * be interpreted as. If there is an error the method returns nil and the error - * is returned in errorPtr (when provided). - * - * @note In DEBUG builds, the parsed message is checked to be sure all required - * fields were provided, and the parse will fail if some are missing. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param input The stream to read data from. - * @param extensionRegistry The extension registry to use to look up extensions. - * @param errorPtr An optional error pointer to fill in with a failure - * reason if the data can not be parsed. - * - * @return A new instance of the generated class. - **/ -+ (nullable instancetype)parseFromCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry: - (nullable GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr; - -/** - * Creates a new instance by parsing the data from the given input stream. This - * method should be sent to the generated message class that the data should - * be interpreted as. If there is an error the method returns nil and the error - * is returned in errorPtr (when provided). - * - * @note Unlike the parseFrom... methods, this never checks to see if all of - * the required fields are set. So this method can be used to reload - * messages that may not be complete. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param input The stream to read data from. - * @param extensionRegistry The extension registry to use to look up extensions. - * @param errorPtr An optional error pointer to fill in with a failure - * reason if the data can not be parsed. - * - * @return A new instance of the generated class. - **/ -+ (nullable instancetype)parseDelimitedFromCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry: - (nullable GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr; - -/** - * Initializes an instance by parsing the data. This method should be sent to - * the generated message class that the data should be interpreted as. If - * there is an error the method returns nil and the error is returned in - * errorPtr (when provided). - * - * @note In DEBUG builds, the parsed message is checked to be sure all required - * fields were provided, and the parse will fail if some are missing. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param data The data to parse. - * @param errorPtr An optional error pointer to fill in with a failure reason if - * the data can not be parsed. - * - * @return An initialized instance of the generated class. - **/ -- (nullable instancetype)initWithData:(NSData *)data error:(NSError **)errorPtr; - -/** - * Initializes an instance by parsing the data. This method should be sent to - * the generated message class that the data should be interpreted as. If - * there is an error the method returns nil and the error is returned in - * errorPtr (when provided). - * - * @note In DEBUG builds, the parsed message is checked to be sure all required - * fields were provided, and the parse will fail if some are missing. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param data The data to parse. - * @param extensionRegistry The extension registry to use to look up extensions. - * @param errorPtr An optional error pointer to fill in with a failure - * reason if the data can not be parsed. - * - * @return An initialized instance of the generated class. - **/ -- (nullable instancetype)initWithData:(NSData *)data - extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr; - -/** - * Initializes an instance by parsing the data from the given input stream. This - * method should be sent to the generated message class that the data should - * be interpreted as. If there is an error the method returns nil and the error - * is returned in errorPtr (when provided). - * - * @note Unlike the parseFrom... methods, this never checks to see if all of - * the required fields are set. So this method can be used to reload - * messages that may not be complete. - * - * @note The errors returned are likely coming from the domain and codes listed - * at the top of this file and GPBCodedInputStream.h. - * - * @param input The stream to read data from. - * @param extensionRegistry The extension registry to use to look up extensions. - * @param errorPtr An optional error pointer to fill in with a failure - * reason if the data can not be parsed. - * - * @return An initialized instance of the generated class. - **/ -- (nullable instancetype)initWithCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry: - (nullable GPBExtensionRegistry *)extensionRegistry - error:(NSError **)errorPtr; - -/** - * Parses the given data as this message's class, and merges those values into - * this message. - * - * @param data The binary representation of the message to merge. - * @param extensionRegistry The extension registry to use to look up extensions. - * - * @exception GPBCodedInputStreamException Exception thrown when parsing was - * unsuccessful. - **/ -- (void)mergeFromData:(NSData *)data - extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry; - -/** - * Merges the fields from another message (of the same type) into this - * message. - * - * @param other Message to merge into this message. - **/ -- (void)mergeFrom:(GPBMessage *)other; - -/** - * Writes out the message to the given coded output stream. - * - * @param output The coded output stream into which to write the message. - * - * @note This can raise the GPBCodedOutputStreamException_* exceptions. - * - **/ -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)output; - -/** - * Writes out the message to the given output stream. - * - * @param output The output stream into which to write the message. - * - * @note This can raise the GPBCodedOutputStreamException_* exceptions. - **/ -- (void)writeToOutputStream:(NSOutputStream *)output; - -/** - * Writes out a varint for the message size followed by the the message to - * the given output stream. - * - * @param output The coded output stream into which to write the message. - * - * @note This can raise the GPBCodedOutputStreamException_* exceptions. - **/ -- (void)writeDelimitedToCodedOutputStream:(GPBCodedOutputStream *)output; - -/** - * Writes out a varint for the message size followed by the the message to - * the given output stream. - * - * @param output The output stream into which to write the message. - * - * @note This can raise the GPBCodedOutputStreamException_* exceptions. - **/ -- (void)writeDelimitedToOutputStream:(NSOutputStream *)output; - -/** - * Serializes the message to an NSData. - * - * If there is an error while generating the data, nil is returned. - * - * @note This value is not cached, so if you are using it repeatedly, cache - * it yourself. - * - * @note In DEBUG ONLY, the message is also checked for all required field, - * if one is missing, nil will be returned. - * - * @return The binary representation of the message. - **/ -- (nullable NSData *)data; - -/** - * Serializes a varint with the message size followed by the message data, - * returning that as an NSData. - * - * @note This value is not cached, so if you are using it repeatedly, it is - * recommended to keep a local copy. - * - * @return The binary representation of the size along with the message. - **/ -- (NSData *)delimitedData; - -/** - * Calculates the size of the object if it were serialized. - * - * This is not a cached value. If you are following a pattern like this: - * - * ``` - * size_t size = [aMsg serializedSize]; - * NSMutableData *foo = [NSMutableData dataWithCapacity:size + sizeof(size)]; - * [foo writeSize:size]; - * [foo appendData:[aMsg data]]; - * ``` - * - * you would be better doing: - * - * ``` - * NSData *data = [aMsg data]; - * NSUInteger size = [aMsg length]; - * NSMutableData *foo = [NSMutableData dataWithCapacity:size + sizeof(size)]; - * [foo writeSize:size]; - * [foo appendData:data]; - * ``` - * - * @return The size of the message in it's binary representation. - **/ -- (size_t)serializedSize; - -/** - * @return The descriptor for the message class. - **/ -+ (GPBDescriptor *)descriptor; - -/** - * Return the descriptor for the message. - **/ -- (GPBDescriptor *)descriptor; - -/** - * @return An array with the extension descriptors that are currently set on the - * message. - **/ -- (NSArray *)extensionsCurrentlySet; - -/** - * Checks whether there is an extension set on the message which matches the - * given extension descriptor. - * - * @param extension Extension descriptor to check if it's set on the message. - * - * @return Whether the extension is currently set on the message. - **/ -- (BOOL)hasExtension:(GPBExtensionDescriptor *)extension; - -/* - * Fetches the given extension's value for this message. - * - * Extensions use boxed values (NSNumbers) for PODs and NSMutableArrays for - * repeated fields. If the extension is a Message one will be auto created for - * you and returned similar to fields. - * - * @param extension The extension descriptor of the extension to fetch. - * - * @return The extension matching the given descriptor, or nil if none found. - **/ -- (nullable id)getExtension:(GPBExtensionDescriptor *)extension; - -/** - * Sets the given extension's value for this message. This only applies for - * single field extensions (i.e. - not repeated fields). - * - * Extensions use boxed values (NSNumbers). - * - * @param extension The extension descriptor under which to set the value. - * @param value The value to be set as the extension. - **/ -- (void)setExtension:(GPBExtensionDescriptor *)extension - value:(nullable id)value; - -/** - * Adds the given value to the extension for this message. This only applies - * to repeated field extensions. If the field is a repeated POD type, the value - * should be an NSNumber. - * - * @param extension The extension descriptor under which to add the value. - * @param value The value to be added to the repeated extension. - **/ -- (void)addExtension:(GPBExtensionDescriptor *)extension value:(id)value; - -/** - * Replaces the value at the given index with the given value for the extension - * on this message. This only applies to repeated field extensions. If the field - * is a repeated POD type, the value is should be an NSNumber. - * - * @param extension The extension descriptor under which to replace the value. - * @param index The index of the extension to be replaced. - * @param value The value to be replaced in the repeated extension. - **/ -- (void)setExtension:(GPBExtensionDescriptor *)extension - index:(NSUInteger)index - value:(id)value; - -/** - * Clears the given extension for this message. - * - * @param extension The extension descriptor to be cleared from this message. - **/ -- (void)clearExtension:(GPBExtensionDescriptor *)extension; - -/** - * Resets all of the fields of this message to their default values. - **/ -- (void)clear; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBMessage_PackagePrivate.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBMessage_PackagePrivate.h deleted file mode 100644 index ca10983b3..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBMessage_PackagePrivate.h +++ /dev/null @@ -1,124 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This header is private to the ProtobolBuffers library and must NOT be -// included by any sources outside this library. The contents of this file are -// subject to change at any time without notice. - -#import "GPBMessage.h" - -// TODO: Remove this import. Older generated code use the OSAtomic* apis, -// so anyone that hasn't regenerated says building by having this. After -// enough time has passed, this likely can be removed as folks should have -// regenerated. -#import - -#import "GPBBootstrap.h" - -typedef struct GPBMessage_Storage { - uint32_t _has_storage_[0]; -} GPBMessage_Storage; - -typedef struct GPBMessage_Storage *GPBMessage_StoragePtr; - -@interface GPBMessage () { - @package - // NOTE: Because of the +allocWithZone code using NSAllocateObject(), - // this structure should ideally always be kept pointer aligned where the - // real storage starts is also pointer aligned. The compiler/runtime already - // do this, but it may not be documented. - - // A pointer to the actual fields of the subclasses. The actual structure - // pointed to by this pointer will depend on the subclass. - // All of the actual structures will start the same as - // GPBMessage_Storage with _has_storage__ as the first field. - // Kept public because static functions need to access it. - GPBMessage_StoragePtr messageStorage_; -} - -// Gets an extension value without autocreating the result if not found. (i.e. -// returns nil if the extension is not set) -- (id)getExistingExtension:(GPBExtensionDescriptor *)extension; - -// Parses a message of this type from the input and merges it with this -// message. -// -// Warning: This does not verify that all required fields are present in -// the input message. -// Note: The caller should call -// -[CodedInputStream checkLastTagWas:] after calling this to -// verify that the last tag seen was the appropriate end-group tag, -// or zero for EOF. -// NOTE: This will throw if there is an error while parsing. -- (void)mergeFromCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry:(GPBExtensionRegistry *)extensionRegistry; - -// Parses the next delimited message of this type from the input and merges it -// with this message. -- (void)mergeDelimitedFromCodedInputStream:(GPBCodedInputStream *)input - extensionRegistry: - (GPBExtensionRegistry *)extensionRegistry; - -- (void)addUnknownMapEntry:(int32_t)fieldNum value:(NSData *)data; - -@end - -CF_EXTERN_C_BEGIN - - -// Call this before using the readOnlySemaphore_. This ensures it is created only once. -void GPBPrepareReadOnlySemaphore(GPBMessage *self); - -// Returns a new instance that was automatically created by |autocreator| for -// its field |field|. -GPBMessage *GPBCreateMessageWithAutocreator(Class msgClass, - GPBMessage *autocreator, - GPBFieldDescriptor *field) - __attribute__((ns_returns_retained)); - -// Returns whether |message| autocreated this message. This is NO if the message -// was not autocreated by |message| or if it has been mutated since -// autocreation. -BOOL GPBWasMessageAutocreatedBy(GPBMessage *message, GPBMessage *parent); - -// Call this when you mutate a message. It will cause the message to become -// visible to its autocreator. -void GPBBecomeVisibleToAutocreator(GPBMessage *self); - -// Call this when an array/dictionary is mutated so the parent message that -// autocreated it can react. -void GPBAutocreatedArrayModified(GPBMessage *self, id array); -void GPBAutocreatedDictionaryModified(GPBMessage *self, id dictionary); - -// Clear the autocreator, if any. Asserts if the autocreator still has an -// autocreated reference to this message. -void GPBClearMessageAutocreator(GPBMessage *self); - -CF_EXTERN_C_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBProtocolBuffers.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBProtocolBuffers.h deleted file mode 100644 index 68d8854eb..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBProtocolBuffers.h +++ /dev/null @@ -1,76 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBBootstrap.h" - -#import "GPBArray.h" -#import "GPBCodedInputStream.h" -#import "GPBCodedOutputStream.h" -#import "GPBDescriptor.h" -#import "GPBDictionary.h" -#import "GPBExtensionRegistry.h" -#import "GPBMessage.h" -#import "GPBRootObject.h" -#import "GPBUnknownField.h" -#import "GPBUnknownFieldSet.h" -#import "GPBUtilities.h" -#import "GPBWellKnownTypes.h" -#import "GPBWireFormat.h" - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -// Well-known proto types -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import - #import - #import - #import - #import - #import - #import - #import -#else - #import "google/protobuf/Any.pbobjc.h" - #import "google/protobuf/Api.pbobjc.h" - #import "google/protobuf/Duration.pbobjc.h" - #import "google/protobuf/Empty.pbobjc.h" - #import "google/protobuf/FieldMask.pbobjc.h" - #import "google/protobuf/SourceContext.pbobjc.h" - #import "google/protobuf/Struct.pbobjc.h" - #import "google/protobuf/Timestamp.pbobjc.h" - #import "google/protobuf/Type.pbobjc.h" - #import "google/protobuf/Wrappers.pbobjc.h" -#endif diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBProtocolBuffers_RuntimeSupport.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBProtocolBuffers_RuntimeSupport.h deleted file mode 100644 index 04dde620a..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBProtocolBuffers_RuntimeSupport.h +++ /dev/null @@ -1,40 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This header is meant to only be used by the generated source, it should not -// be included in code using protocol buffers. - -#import "GPBBootstrap.h" - -#import "GPBDescriptor_PackagePrivate.h" -#import "GPBExtensionInternals.h" -#import "GPBMessage_PackagePrivate.h" -#import "GPBRootObject_PackagePrivate.h" -#import "GPBUtilities_PackagePrivate.h" diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBRootObject.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBRootObject.h deleted file mode 100644 index d2e2aebfc..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBRootObject.h +++ /dev/null @@ -1,52 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -@class GPBExtensionRegistry; - -NS_ASSUME_NONNULL_BEGIN - -/** - * Every generated proto file defines a local "Root" class that exposes a - * GPBExtensionRegistry for all the extensions defined by that file and - * the files it depends on. - **/ -@interface GPBRootObject : NSObject - -/** - * @return An extension registry for the given file and all the files it depends - * on. - **/ -+ (GPBExtensionRegistry *)extensionRegistry; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBRootObject_PackagePrivate.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBRootObject_PackagePrivate.h deleted file mode 100644 index 3c8f09c89..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBRootObject_PackagePrivate.h +++ /dev/null @@ -1,46 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBRootObject.h" - -@class GPBExtensionDescriptor; - -@interface GPBRootObject () - -// Globally register. -+ (void)globallyRegisterExtension:(GPBExtensionDescriptor *)field; - -@end - -// Returns YES if the selector was resolved and added to the class, -// NO otherwise. -BOOL GPBResolveExtensionClassMethod(Class self, SEL sel); diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBRuntimeTypes.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBRuntimeTypes.h deleted file mode 100644 index 4d552060b..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBRuntimeTypes.h +++ /dev/null @@ -1,144 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBBootstrap.h" - -@class GPBEnumDescriptor; -@class GPBMessage; -@class GPBInt32Array; - -/** - * Verifies that a given value can be represented by an enum type. - * */ -typedef BOOL (*GPBEnumValidationFunc)(int32_t); - -/** - * Fetches an EnumDescriptor. - * */ -typedef GPBEnumDescriptor *(*GPBEnumDescriptorFunc)(void); - -/** - * Magic value used at runtime to indicate an enum value that wasn't know at - * compile time. - * */ -enum { - kGPBUnrecognizedEnumeratorValue = (int32_t)0xFBADBEEF, -}; - -/** - * A union for storing all possible Protobuf values. Note that owner is - * responsible for memory management of object types. - * */ -typedef union { - BOOL valueBool; - int32_t valueInt32; - int64_t valueInt64; - uint32_t valueUInt32; - uint64_t valueUInt64; - float valueFloat; - double valueDouble; - GPB_UNSAFE_UNRETAINED NSData *valueData; - GPB_UNSAFE_UNRETAINED NSString *valueString; - GPB_UNSAFE_UNRETAINED GPBMessage *valueMessage; - int32_t valueEnum; -} GPBGenericValue; - -/** - * Enum listing the possible data types that a field can contain. - * - * @note Do not change the order of this enum (or add things to it) without - * thinking about it very carefully. There are several things that depend - * on the order. - * */ -typedef NS_ENUM(uint8_t, GPBDataType) { - /** Field contains boolean value(s). */ - GPBDataTypeBool = 0, - /** Field contains unsigned 4 byte value(s). */ - GPBDataTypeFixed32, - /** Field contains signed 4 byte value(s). */ - GPBDataTypeSFixed32, - /** Field contains float value(s). */ - GPBDataTypeFloat, - /** Field contains unsigned 8 byte value(s). */ - GPBDataTypeFixed64, - /** Field contains signed 8 byte value(s). */ - GPBDataTypeSFixed64, - /** Field contains double value(s). */ - GPBDataTypeDouble, - /** - * Field contains variable length value(s). Inefficient for encoding negative - * numbers – if your field is likely to have negative values, use - * GPBDataTypeSInt32 instead. - **/ - GPBDataTypeInt32, - /** - * Field contains variable length value(s). Inefficient for encoding negative - * numbers – if your field is likely to have negative values, use - * GPBDataTypeSInt64 instead. - **/ - GPBDataTypeInt64, - /** Field contains signed variable length integer value(s). */ - GPBDataTypeSInt32, - /** Field contains signed variable length integer value(s). */ - GPBDataTypeSInt64, - /** Field contains unsigned variable length integer value(s). */ - GPBDataTypeUInt32, - /** Field contains unsigned variable length integer value(s). */ - GPBDataTypeUInt64, - /** Field contains an arbitrary sequence of bytes. */ - GPBDataTypeBytes, - /** Field contains UTF-8 encoded or 7-bit ASCII text. */ - GPBDataTypeString, - /** Field contains message type(s). */ - GPBDataTypeMessage, - /** Field contains message type(s). */ - GPBDataTypeGroup, - /** Field contains enum value(s). */ - GPBDataTypeEnum, -}; - -enum { - /** - * A count of the number of types in GPBDataType. Separated out from the - * GPBDataType enum to avoid warnings regarding not handling GPBDataType_Count - * in switch statements. - **/ - GPBDataType_Count = GPBDataTypeEnum + 1 -}; - -/** An extension range. */ -typedef struct GPBExtensionRange { - /** Inclusive. */ - uint32_t start; - /** Exclusive. */ - uint32_t end; -} GPBExtensionRange; diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUnknownField.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUnknownField.h deleted file mode 100644 index 5b96023b1..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUnknownField.h +++ /dev/null @@ -1,99 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -@class GPBCodedOutputStream; -@class GPBUInt32Array; -@class GPBUInt64Array; -@class GPBUnknownFieldSet; - -NS_ASSUME_NONNULL_BEGIN -/** - * Store an unknown field. These are used in conjunction with - * GPBUnknownFieldSet. - **/ -@interface GPBUnknownField : NSObject - -/** Initialize a field with the given number. */ -- (instancetype)initWithNumber:(int32_t)number; - -/** The field number the data is stored under. */ -@property(nonatomic, readonly, assign) int32_t number; - -/** An array of varint values for this field. */ -@property(nonatomic, readonly, strong) GPBUInt64Array *varintList; - -/** An array of fixed32 values for this field. */ -@property(nonatomic, readonly, strong) GPBUInt32Array *fixed32List; - -/** An array of fixed64 values for this field. */ -@property(nonatomic, readonly, strong) GPBUInt64Array *fixed64List; - -/** An array of data values for this field. */ -@property(nonatomic, readonly, strong) NSArray *lengthDelimitedList; - -/** An array of groups of values for this field. */ -@property(nonatomic, readonly, strong) NSArray *groupList; - -/** - * Add a value to the varintList. - * - * @param value The value to add. - **/ -- (void)addVarint:(uint64_t)value; -/** - * Add a value to the fixed32List. - * - * @param value The value to add. - **/ -- (void)addFixed32:(uint32_t)value; -/** - * Add a value to the fixed64List. - * - * @param value The value to add. - **/ -- (void)addFixed64:(uint64_t)value; -/** - * Add a value to the lengthDelimitedList. - * - * @param value The value to add. - **/ -- (void)addLengthDelimited:(NSData *)value; -/** - * Add a value to the groupList. - * - * @param value The value to add. - **/ -- (void)addGroup:(GPBUnknownFieldSet *)value; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUnknownFieldSet.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUnknownFieldSet.h deleted file mode 100644 index 1b5f24f39..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUnknownFieldSet.h +++ /dev/null @@ -1,82 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -@class GPBUnknownField; - -NS_ASSUME_NONNULL_BEGIN - -/** - * A collection of unknown fields. Fields parsed from the binary representation - * of a message that are unknown end up in an instance of this set. This only - * applies for files declared with the "proto2" syntax. Files declared with the - * "proto3" syntax discard the unknown values. - **/ -@interface GPBUnknownFieldSet : NSObject - -/** - * Tests to see if the given field number has a value. - * - * @param number The field number to check. - * - * @return YES if there is an unknown field for the given field number. - **/ -- (BOOL)hasField:(int32_t)number; - -/** - * Fetches the GPBUnknownField for the given field number. - * - * @param number The field number to look up. - * - * @return The GPBUnknownField or nil if none found. - **/ -- (nullable GPBUnknownField *)getField:(int32_t)number; - -/** - * @return The number of fields in this set. - **/ -- (NSUInteger)countOfFields; - -/** - * Adds the given field to the set. - * - * @param field The field to add to the set. - **/ -- (void)addField:(GPBUnknownField *)field; - -/** - * @return An array of the GPBUnknownFields sorted by the field numbers. - **/ -- (NSArray *)sortedFields; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUnknownFieldSet_PackagePrivate.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUnknownFieldSet_PackagePrivate.h deleted file mode 100644 index e27127ad1..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUnknownFieldSet_PackagePrivate.h +++ /dev/null @@ -1,61 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBUnknownFieldSet.h" - -@class GPBCodedOutputStream; -@class GPBCodedInputStream; - -@interface GPBUnknownFieldSet () - -+ (BOOL)isFieldTag:(int32_t)tag; - -- (NSData *)data; - -- (size_t)serializedSize; -- (size_t)serializedSizeAsMessageSet; - -- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)output; -- (void)writeAsMessageSetTo:(GPBCodedOutputStream *)output; - -- (void)mergeUnknownFields:(GPBUnknownFieldSet *)other; - -- (void)mergeFromCodedInputStream:(GPBCodedInputStream *)input; -- (void)mergeFromData:(NSData *)data; - -- (void)mergeVarintField:(int32_t)number value:(int32_t)value; -- (BOOL)mergeFieldFrom:(int32_t)tag input:(GPBCodedInputStream *)input; -- (void)mergeMessageSetMessage:(int32_t)number data:(NSData *)messageData; - -- (void)addUnknownMapEntry:(int32_t)fieldNum value:(NSData *)data; - -@end diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUnknownField_PackagePrivate.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUnknownField_PackagePrivate.h deleted file mode 100644 index 2b4c78951..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUnknownField_PackagePrivate.h +++ /dev/null @@ -1,47 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBUnknownField.h" - -@class GPBCodedOutputStream; - -@interface GPBUnknownField () - -- (void)writeToOutput:(GPBCodedOutputStream *)output; -- (size_t)serializedSize; - -- (void)writeAsMessageSetExtensionToOutput:(GPBCodedOutputStream *)output; -- (size_t)serializedSizeAsMessageSetExtension; - -- (void)mergeFromField:(GPBUnknownField *)other; - -@end diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUtilities.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUtilities.h deleted file mode 100644 index 5464dfb35..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUtilities.h +++ /dev/null @@ -1,539 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBArray.h" -#import "GPBMessage.h" -#import "GPBRuntimeTypes.h" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -/** - * Generates a string that should be a valid "TextFormat" for the C++ version - * of Protocol Buffers. - * - * @param message The message to generate from. - * @param lineIndent A string to use as the prefix for all lines generated. Can - * be nil if no extra indent is needed. - * - * @return An NSString with the TextFormat of the message. - **/ -NSString *GPBTextFormatForMessage(GPBMessage *message, - NSString * __nullable lineIndent); - -/** - * Generates a string that should be a valid "TextFormat" for the C++ version - * of Protocol Buffers. - * - * @param unknownSet The unknown field set to generate from. - * @param lineIndent A string to use as the prefix for all lines generated. Can - * be nil if no extra indent is needed. - * - * @return An NSString with the TextFormat of the unknown field set. - **/ -NSString *GPBTextFormatForUnknownFieldSet(GPBUnknownFieldSet * __nullable unknownSet, - NSString * __nullable lineIndent); - -/** - * Checks if the given field number is set on a message. - * - * @param self The message to check. - * @param fieldNumber The field number to check. - * - * @return YES if the field number is set on the given message. - **/ -BOOL GPBMessageHasFieldNumberSet(GPBMessage *self, uint32_t fieldNumber); - -/** - * Checks if the given field is set on a message. - * - * @param self The message to check. - * @param field The field to check. - * - * @return YES if the field is set on the given message. - **/ -BOOL GPBMessageHasFieldSet(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Clears the given field for the given message. - * - * @param self The message for which to clear the field. - * @param field The field to clear. - **/ -void GPBClearMessageField(GPBMessage *self, GPBFieldDescriptor *field); - -//%PDDM-EXPAND GPB_ACCESSORS() -// This block of code is generated, do not edit it directly. - - -// -// Get/Set a given field from/to a message. -// - -// Single Fields - -/** - * Gets the value of a bytes field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -NSData *GPBGetMessageBytesField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a bytes field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageBytesField(GPBMessage *self, GPBFieldDescriptor *field, NSData *value); - -/** - * Gets the value of a string field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -NSString *GPBGetMessageStringField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a string field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageStringField(GPBMessage *self, GPBFieldDescriptor *field, NSString *value); - -/** - * Gets the value of a message field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -GPBMessage *GPBGetMessageMessageField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a message field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageMessageField(GPBMessage *self, GPBFieldDescriptor *field, GPBMessage *value); - -/** - * Gets the value of a group field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -GPBMessage *GPBGetMessageGroupField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a group field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageGroupField(GPBMessage *self, GPBFieldDescriptor *field, GPBMessage *value); - -/** - * Gets the value of a bool field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -BOOL GPBGetMessageBoolField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a bool field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageBoolField(GPBMessage *self, GPBFieldDescriptor *field, BOOL value); - -/** - * Gets the value of an int32 field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -int32_t GPBGetMessageInt32Field(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of an int32 field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageInt32Field(GPBMessage *self, GPBFieldDescriptor *field, int32_t value); - -/** - * Gets the value of an uint32 field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -uint32_t GPBGetMessageUInt32Field(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of an uint32 field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageUInt32Field(GPBMessage *self, GPBFieldDescriptor *field, uint32_t value); - -/** - * Gets the value of an int64 field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -int64_t GPBGetMessageInt64Field(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of an int64 field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageInt64Field(GPBMessage *self, GPBFieldDescriptor *field, int64_t value); - -/** - * Gets the value of an uint64 field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -uint64_t GPBGetMessageUInt64Field(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of an uint64 field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageUInt64Field(GPBMessage *self, GPBFieldDescriptor *field, uint64_t value); - -/** - * Gets the value of a float field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -float GPBGetMessageFloatField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a float field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageFloatField(GPBMessage *self, GPBFieldDescriptor *field, float value); - -/** - * Gets the value of a double field. - * - * @param self The message from which to get the field. - * @param field The field to get. - **/ -double GPBGetMessageDoubleField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a double field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The to set in the field. - **/ -void GPBSetMessageDoubleField(GPBMessage *self, GPBFieldDescriptor *field, double value); - -/** - * Gets the given enum field of a message. For proto3, if the value isn't a - * member of the enum, @c kGPBUnrecognizedEnumeratorValue will be returned. - * GPBGetMessageRawEnumField will bypass the check and return whatever value - * was set. - * - * @param self The message from which to get the field. - * @param field The field to get. - * - * @return The enum value for the given field. - **/ -int32_t GPBGetMessageEnumField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Set the given enum field of a message. You can only set values that are - * members of the enum. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The enum value to set in the field. - **/ -void GPBSetMessageEnumField(GPBMessage *self, - GPBFieldDescriptor *field, - int32_t value); - -/** - * Get the given enum field of a message. No check is done to ensure the value - * was defined in the enum. - * - * @param self The message from which to get the field. - * @param field The field to get. - * - * @return The raw enum value for the given field. - **/ -int32_t GPBGetMessageRawEnumField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Set the given enum field of a message. You can set the value to anything, - * even a value that is not a member of the enum. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param value The raw enum value to set in the field. - **/ -void GPBSetMessageRawEnumField(GPBMessage *self, - GPBFieldDescriptor *field, - int32_t value); - -// Repeated Fields - -/** - * Gets the value of a repeated field. - * - * @param self The message from which to get the field. - * @param field The repeated field to get. - * - * @return A GPB*Array or an NSMutableArray based on the field's type. - **/ -id GPBGetMessageRepeatedField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a repeated field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param array A GPB*Array or NSMutableArray based on the field's type. - **/ -void GPBSetMessageRepeatedField(GPBMessage *self, - GPBFieldDescriptor *field, - id array); - -// Map Fields - -/** - * Gets the value of a map<> field. - * - * @param self The message from which to get the field. - * @param field The repeated field to get. - * - * @return A GPB*Dictionary or NSMutableDictionary based on the field's type. - **/ -id GPBGetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field); - -/** - * Sets the value of a map<> field. - * - * @param self The message into which to set the field. - * @param field The field to set. - * @param dictionary A GPB*Dictionary or NSMutableDictionary based on the - * field's type. - **/ -void GPBSetMessageMapField(GPBMessage *self, - GPBFieldDescriptor *field, - id dictionary); - -//%PDDM-EXPAND-END GPB_ACCESSORS() - -/** - * Returns an empty NSData to assign to byte fields when you wish to assign them - * to empty. Prevents allocating a lot of little [NSData data] objects. - **/ -NSData *GPBEmptyNSData(void) __attribute__((pure)); - -/** - * Drops the `unknownFields` from the given message and from all sub message. - **/ -void GPBMessageDropUnknownFieldsRecursively(GPBMessage *message); - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - - -//%PDDM-DEFINE GPB_ACCESSORS() -//% -//%// -//%// Get/Set a given field from/to a message. -//%// -//% -//%// Single Fields -//% -//%GPB_ACCESSOR_SINGLE_FULL(Bytes, NSData, , *) -//%GPB_ACCESSOR_SINGLE_FULL(String, NSString, , *) -//%GPB_ACCESSOR_SINGLE_FULL(Message, GPBMessage, , *) -//%GPB_ACCESSOR_SINGLE_FULL(Group, GPBMessage, , *) -//%GPB_ACCESSOR_SINGLE(Bool, BOOL, ) -//%GPB_ACCESSOR_SINGLE(Int32, int32_t, n) -//%GPB_ACCESSOR_SINGLE(UInt32, uint32_t, n) -//%GPB_ACCESSOR_SINGLE(Int64, int64_t, n) -//%GPB_ACCESSOR_SINGLE(UInt64, uint64_t, n) -//%GPB_ACCESSOR_SINGLE(Float, float, ) -//%GPB_ACCESSOR_SINGLE(Double, double, ) -//%/** -//% * Gets the given enum field of a message. For proto3, if the value isn't a -//% * member of the enum, @c kGPBUnrecognizedEnumeratorValue will be returned. -//% * GPBGetMessageRawEnumField will bypass the check and return whatever value -//% * was set. -//% * -//% * @param self The message from which to get the field. -//% * @param field The field to get. -//% * -//% * @return The enum value for the given field. -//% **/ -//%int32_t GPBGetMessageEnumField(GPBMessage *self, GPBFieldDescriptor *field); -//% -//%/** -//% * Set the given enum field of a message. You can only set values that are -//% * members of the enum. -//% * -//% * @param self The message into which to set the field. -//% * @param field The field to set. -//% * @param value The enum value to set in the field. -//% **/ -//%void GPBSetMessageEnumField(GPBMessage *self, -//% GPBFieldDescriptor *field, -//% int32_t value); -//% -//%/** -//% * Get the given enum field of a message. No check is done to ensure the value -//% * was defined in the enum. -//% * -//% * @param self The message from which to get the field. -//% * @param field The field to get. -//% * -//% * @return The raw enum value for the given field. -//% **/ -//%int32_t GPBGetMessageRawEnumField(GPBMessage *self, GPBFieldDescriptor *field); -//% -//%/** -//% * Set the given enum field of a message. You can set the value to anything, -//% * even a value that is not a member of the enum. -//% * -//% * @param self The message into which to set the field. -//% * @param field The field to set. -//% * @param value The raw enum value to set in the field. -//% **/ -//%void GPBSetMessageRawEnumField(GPBMessage *self, -//% GPBFieldDescriptor *field, -//% int32_t value); -//% -//%// Repeated Fields -//% -//%/** -//% * Gets the value of a repeated field. -//% * -//% * @param self The message from which to get the field. -//% * @param field The repeated field to get. -//% * -//% * @return A GPB*Array or an NSMutableArray based on the field's type. -//% **/ -//%id GPBGetMessageRepeatedField(GPBMessage *self, GPBFieldDescriptor *field); -//% -//%/** -//% * Sets the value of a repeated field. -//% * -//% * @param self The message into which to set the field. -//% * @param field The field to set. -//% * @param array A GPB*Array or NSMutableArray based on the field's type. -//% **/ -//%void GPBSetMessageRepeatedField(GPBMessage *self, -//% GPBFieldDescriptor *field, -//% id array); -//% -//%// Map Fields -//% -//%/** -//% * Gets the value of a map<> field. -//% * -//% * @param self The message from which to get the field. -//% * @param field The repeated field to get. -//% * -//% * @return A GPB*Dictionary or NSMutableDictionary based on the field's type. -//% **/ -//%id GPBGetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field); -//% -//%/** -//% * Sets the value of a map<> field. -//% * -//% * @param self The message into which to set the field. -//% * @param field The field to set. -//% * @param dictionary A GPB*Dictionary or NSMutableDictionary based on the -//% * field's type. -//% **/ -//%void GPBSetMessageMapField(GPBMessage *self, -//% GPBFieldDescriptor *field, -//% id dictionary); -//% - -//%PDDM-DEFINE GPB_ACCESSOR_SINGLE(NAME, TYPE, AN) -//%GPB_ACCESSOR_SINGLE_FULL(NAME, TYPE, AN, ) -//%PDDM-DEFINE GPB_ACCESSOR_SINGLE_FULL(NAME, TYPE, AN, TisP) -//%/** -//% * Gets the value of a##AN NAME$L field. -//% * -//% * @param self The message from which to get the field. -//% * @param field The field to get. -//% **/ -//%TYPE TisP##GPBGetMessage##NAME##Field(GPBMessage *self, GPBFieldDescriptor *field); -//% -//%/** -//% * Sets the value of a##AN NAME$L field. -//% * -//% * @param self The message into which to set the field. -//% * @param field The field to set. -//% * @param value The to set in the field. -//% **/ -//%void GPBSetMessage##NAME##Field(GPBMessage *self, GPBFieldDescriptor *field, TYPE TisP##value); -//% diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUtilities_PackagePrivate.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUtilities_PackagePrivate.h deleted file mode 100644 index ed424ce39..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBUtilities_PackagePrivate.h +++ /dev/null @@ -1,351 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -#import "GPBUtilities.h" - -#import "GPBDescriptor_PackagePrivate.h" - -// Macros for stringifying library symbols. These are used in the generated -// PB descriptor classes wherever a library symbol name is represented as a -// string. See README.google for more information. -#define GPBStringify(S) #S -#define GPBStringifySymbol(S) GPBStringify(S) - -#define GPBNSStringify(S) @#S -#define GPBNSStringifySymbol(S) GPBNSStringify(S) - -// Constant to internally mark when there is no has bit. -#define GPBNoHasBit INT32_MAX - -CF_EXTERN_C_BEGIN - -// These two are used to inject a runtime check for version mismatch into the -// generated sources to make sure they are linked with a supporting runtime. -void GPBCheckRuntimeVersionSupport(int32_t objcRuntimeVersion); -GPB_INLINE void GPB_DEBUG_CHECK_RUNTIME_VERSIONS() { - // NOTE: By being inline here, this captures the value from the library's - // headers at the time the generated code was compiled. -#if defined(DEBUG) && DEBUG - GPBCheckRuntimeVersionSupport(GOOGLE_PROTOBUF_OBJC_VERSION); -#endif -} - -// Legacy version of the checks, remove when GOOGLE_PROTOBUF_OBJC_GEN_VERSION -// goes away (see more info in GPBBootstrap.h). -void GPBCheckRuntimeVersionInternal(int32_t version); -GPB_INLINE void GPBDebugCheckRuntimeVersion() { -#if defined(DEBUG) && DEBUG - GPBCheckRuntimeVersionInternal(GOOGLE_PROTOBUF_OBJC_GEN_VERSION); -#endif -} - -// Conversion functions for de/serializing floating point types. - -GPB_INLINE int64_t GPBConvertDoubleToInt64(double v) { - union { double f; int64_t i; } u; - u.f = v; - return u.i; -} - -GPB_INLINE int32_t GPBConvertFloatToInt32(float v) { - union { float f; int32_t i; } u; - u.f = v; - return u.i; -} - -GPB_INLINE double GPBConvertInt64ToDouble(int64_t v) { - union { double f; int64_t i; } u; - u.i = v; - return u.f; -} - -GPB_INLINE float GPBConvertInt32ToFloat(int32_t v) { - union { float f; int32_t i; } u; - u.i = v; - return u.f; -} - -GPB_INLINE int32_t GPBLogicalRightShift32(int32_t value, int32_t spaces) { - return (int32_t)((uint32_t)(value) >> spaces); -} - -GPB_INLINE int64_t GPBLogicalRightShift64(int64_t value, int32_t spaces) { - return (int64_t)((uint64_t)(value) >> spaces); -} - -// Decode a ZigZag-encoded 32-bit value. ZigZag encodes signed integers -// into values that can be efficiently encoded with varint. (Otherwise, -// negative values must be sign-extended to 64 bits to be varint encoded, -// thus always taking 10 bytes on the wire.) -GPB_INLINE int32_t GPBDecodeZigZag32(uint32_t n) { - return (int32_t)(GPBLogicalRightShift32((int32_t)n, 1) ^ -((int32_t)(n) & 1)); -} - -// Decode a ZigZag-encoded 64-bit value. ZigZag encodes signed integers -// into values that can be efficiently encoded with varint. (Otherwise, -// negative values must be sign-extended to 64 bits to be varint encoded, -// thus always taking 10 bytes on the wire.) -GPB_INLINE int64_t GPBDecodeZigZag64(uint64_t n) { - return (int64_t)(GPBLogicalRightShift64((int64_t)n, 1) ^ -((int64_t)(n) & 1)); -} - -// Encode a ZigZag-encoded 32-bit value. ZigZag encodes signed integers -// into values that can be efficiently encoded with varint. (Otherwise, -// negative values must be sign-extended to 64 bits to be varint encoded, -// thus always taking 10 bytes on the wire.) -GPB_INLINE uint32_t GPBEncodeZigZag32(int32_t n) { - // Note: the right-shift must be arithmetic - return ((uint32_t)n << 1) ^ (uint32_t)(n >> 31); -} - -// Encode a ZigZag-encoded 64-bit value. ZigZag encodes signed integers -// into values that can be efficiently encoded with varint. (Otherwise, -// negative values must be sign-extended to 64 bits to be varint encoded, -// thus always taking 10 bytes on the wire.) -GPB_INLINE uint64_t GPBEncodeZigZag64(int64_t n) { - // Note: the right-shift must be arithmetic - return ((uint64_t)n << 1) ^ (uint64_t)(n >> 63); -} - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wswitch-enum" -#pragma clang diagnostic ignored "-Wdirect-ivar-access" - -GPB_INLINE BOOL GPBDataTypeIsObject(GPBDataType type) { - switch (type) { - case GPBDataTypeBytes: - case GPBDataTypeString: - case GPBDataTypeMessage: - case GPBDataTypeGroup: - return YES; - default: - return NO; - } -} - -GPB_INLINE BOOL GPBDataTypeIsMessage(GPBDataType type) { - switch (type) { - case GPBDataTypeMessage: - case GPBDataTypeGroup: - return YES; - default: - return NO; - } -} - -GPB_INLINE BOOL GPBFieldDataTypeIsMessage(GPBFieldDescriptor *field) { - return GPBDataTypeIsMessage(field->description_->dataType); -} - -GPB_INLINE BOOL GPBFieldDataTypeIsObject(GPBFieldDescriptor *field) { - return GPBDataTypeIsObject(field->description_->dataType); -} - -GPB_INLINE BOOL GPBExtensionIsMessage(GPBExtensionDescriptor *ext) { - return GPBDataTypeIsMessage(ext->description_->dataType); -} - -// The field is an array/map or it has an object value. -GPB_INLINE BOOL GPBFieldStoresObject(GPBFieldDescriptor *field) { - GPBMessageFieldDescription *desc = field->description_; - if ((desc->flags & (GPBFieldRepeated | GPBFieldMapKeyMask)) != 0) { - return YES; - } - return GPBDataTypeIsObject(desc->dataType); -} - -BOOL GPBGetHasIvar(GPBMessage *self, int32_t index, uint32_t fieldNumber); -void GPBSetHasIvar(GPBMessage *self, int32_t idx, uint32_t fieldNumber, - BOOL value); -uint32_t GPBGetHasOneof(GPBMessage *self, int32_t index); - -GPB_INLINE BOOL -GPBGetHasIvarField(GPBMessage *self, GPBFieldDescriptor *field) { - GPBMessageFieldDescription *fieldDesc = field->description_; - return GPBGetHasIvar(self, fieldDesc->hasIndex, fieldDesc->number); -} -GPB_INLINE void GPBSetHasIvarField(GPBMessage *self, GPBFieldDescriptor *field, - BOOL value) { - GPBMessageFieldDescription *fieldDesc = field->description_; - GPBSetHasIvar(self, fieldDesc->hasIndex, fieldDesc->number, value); -} - -void GPBMaybeClearOneof(GPBMessage *self, GPBOneofDescriptor *oneof, - int32_t oneofHasIndex, uint32_t fieldNumberNotToClear); - -#pragma clang diagnostic pop - -//%PDDM-DEFINE GPB_IVAR_SET_DECL(NAME, TYPE) -//%void GPBSet##NAME##IvarWithFieldInternal(GPBMessage *self, -//% NAME$S GPBFieldDescriptor *field, -//% NAME$S TYPE value, -//% NAME$S GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(Bool, BOOL) -// This block of code is generated, do not edit it directly. - -void GPBSetBoolIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - BOOL value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(Int32, int32_t) -// This block of code is generated, do not edit it directly. - -void GPBSetInt32IvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - int32_t value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(UInt32, uint32_t) -// This block of code is generated, do not edit it directly. - -void GPBSetUInt32IvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - uint32_t value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(Int64, int64_t) -// This block of code is generated, do not edit it directly. - -void GPBSetInt64IvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - int64_t value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(UInt64, uint64_t) -// This block of code is generated, do not edit it directly. - -void GPBSetUInt64IvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - uint64_t value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(Float, float) -// This block of code is generated, do not edit it directly. - -void GPBSetFloatIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - float value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(Double, double) -// This block of code is generated, do not edit it directly. - -void GPBSetDoubleIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - double value, - GPBFileSyntax syntax); -//%PDDM-EXPAND GPB_IVAR_SET_DECL(Enum, int32_t) -// This block of code is generated, do not edit it directly. - -void GPBSetEnumIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - int32_t value, - GPBFileSyntax syntax); -//%PDDM-EXPAND-END (8 expansions) - -int32_t GPBGetEnumIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - GPBFileSyntax syntax); - -id GPBGetObjectIvarWithField(GPBMessage *self, GPBFieldDescriptor *field); - -void GPBSetObjectIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, id value, - GPBFileSyntax syntax); -void GPBSetRetainedObjectIvarWithFieldInternal(GPBMessage *self, - GPBFieldDescriptor *field, - id __attribute__((ns_consumed)) - value, - GPBFileSyntax syntax); - -// GPBGetObjectIvarWithField will automatically create the field (message) if -// it doesn't exist. GPBGetObjectIvarWithFieldNoAutocreate will return nil. -id GPBGetObjectIvarWithFieldNoAutocreate(GPBMessage *self, - GPBFieldDescriptor *field); - -void GPBSetAutocreatedRetainedObjectIvarWithField( - GPBMessage *self, GPBFieldDescriptor *field, - id __attribute__((ns_consumed)) value); - -// Clears and releases the autocreated message ivar, if it's autocreated. If -// it's not set as autocreated, this method does nothing. -void GPBClearAutocreatedMessageIvarWithField(GPBMessage *self, - GPBFieldDescriptor *field); - -// Returns an Objective C encoding for |selector|. |instanceSel| should be -// YES if it's an instance selector (as opposed to a class selector). -// |selector| must be a selector from MessageSignatureProtocol. -const char *GPBMessageEncodingForSelector(SEL selector, BOOL instanceSel); - -// Helper for text format name encoding. -// decodeData is the data describing the sepecial decodes. -// key and inputString are the input that needs decoding. -NSString *GPBDecodeTextFormatName(const uint8_t *decodeData, int32_t key, - NSString *inputString); - -// A series of selectors that are used solely to get @encoding values -// for them by the dynamic protobuf runtime code. See -// GPBMessageEncodingForSelector for details. GPBRootObject conforms to -// the protocol so that it is encoded in the Objective C runtime. -@protocol GPBMessageSignatureProtocol -@optional - -#define GPB_MESSAGE_SIGNATURE_ENTRY(TYPE, NAME) \ - -(TYPE)get##NAME; \ - -(void)set##NAME : (TYPE)value; \ - -(TYPE)get##NAME##AtIndex : (NSUInteger)index; - -GPB_MESSAGE_SIGNATURE_ENTRY(BOOL, Bool) -GPB_MESSAGE_SIGNATURE_ENTRY(uint32_t, Fixed32) -GPB_MESSAGE_SIGNATURE_ENTRY(int32_t, SFixed32) -GPB_MESSAGE_SIGNATURE_ENTRY(float, Float) -GPB_MESSAGE_SIGNATURE_ENTRY(uint64_t, Fixed64) -GPB_MESSAGE_SIGNATURE_ENTRY(int64_t, SFixed64) -GPB_MESSAGE_SIGNATURE_ENTRY(double, Double) -GPB_MESSAGE_SIGNATURE_ENTRY(int32_t, Int32) -GPB_MESSAGE_SIGNATURE_ENTRY(int64_t, Int64) -GPB_MESSAGE_SIGNATURE_ENTRY(int32_t, SInt32) -GPB_MESSAGE_SIGNATURE_ENTRY(int64_t, SInt64) -GPB_MESSAGE_SIGNATURE_ENTRY(uint32_t, UInt32) -GPB_MESSAGE_SIGNATURE_ENTRY(uint64_t, UInt64) -GPB_MESSAGE_SIGNATURE_ENTRY(NSData *, Bytes) -GPB_MESSAGE_SIGNATURE_ENTRY(NSString *, String) -GPB_MESSAGE_SIGNATURE_ENTRY(GPBMessage *, Message) -GPB_MESSAGE_SIGNATURE_ENTRY(GPBMessage *, Group) -GPB_MESSAGE_SIGNATURE_ENTRY(int32_t, Enum) - -#undef GPB_MESSAGE_SIGNATURE_ENTRY - -- (id)getArray; -- (NSUInteger)getArrayCount; -- (void)setArray:(NSArray *)array; -+ (id)getClassValue; -@end - -BOOL GPBClassHasSel(Class aClass, SEL sel); - -CF_EXTERN_C_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBWellKnownTypes.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBWellKnownTypes.h deleted file mode 100644 index 04df41788..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBWellKnownTypes.h +++ /dev/null @@ -1,245 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2015 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "google/protobuf/Any.pbobjc.h" - #import "google/protobuf/Duration.pbobjc.h" - #import "google/protobuf/Timestamp.pbobjc.h" -#endif - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - Errors - -/** NSError domain used for errors. */ -extern NSString *const GPBWellKnownTypesErrorDomain; - -/** Error code for NSError with GPBWellKnownTypesErrorDomain. */ -typedef NS_ENUM(NSInteger, GPBWellKnownTypesErrorCode) { - /** The type_url could not be computed for the requested GPBMessage class. */ - GPBWellKnownTypesErrorCodeFailedToComputeTypeURL = -100, - /** type_url in a Any doesn’t match that of the requested GPBMessage class. */ - GPBWellKnownTypesErrorCodeTypeURLMismatch = -101, -}; - -#pragma mark - GPBTimestamp - -/** - * Category for GPBTimestamp to work with standard Foundation time/date types. - **/ -@interface GPBTimestamp (GBPWellKnownTypes) - -/** The NSDate representation of this GPBTimestamp. */ -@property(nonatomic, readwrite, strong) NSDate *date; - -/** - * The NSTimeInterval representation of this GPBTimestamp. - * - * @note: Not all second/nanos combinations can be represented in a - * NSTimeInterval, so getting this could be a lossy transform. - **/ -@property(nonatomic, readwrite) NSTimeInterval timeIntervalSince1970; - -/** - * Initializes a GPBTimestamp with the given NSDate. - * - * @param date The date to configure the GPBTimestamp with. - * - * @return A newly initialized GPBTimestamp. - **/ -- (instancetype)initWithDate:(NSDate *)date; - -/** - * Initializes a GPBTimestamp with the given NSTimeInterval. - * - * @param timeIntervalSince1970 Time interval to configure the GPBTimestamp with. - * - * @return A newly initialized GPBTimestamp. - **/ -- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970; - -@end - -#pragma mark - GPBDuration - -/** - * Category for GPBDuration to work with standard Foundation time type. - **/ -@interface GPBDuration (GBPWellKnownTypes) - -/** - * The NSTimeInterval representation of this GPBDuration. - * - * @note: Not all second/nanos combinations can be represented in a - * NSTimeInterval, so getting this could be a lossy transform. - **/ -@property(nonatomic, readwrite) NSTimeInterval timeInterval; - -/** - * Initializes a GPBDuration with the given NSTimeInterval. - * - * @param timeInterval Time interval to configure the GPBDuration with. - * - * @return A newly initialized GPBDuration. - **/ -- (instancetype)initWithTimeInterval:(NSTimeInterval)timeInterval; - -// These next two methods are deprecated because GBPDuration has no need of a -// "base" time. The older methods were about symmetry with GBPTimestamp, but -// the unix epoch usage is too confusing. - -/** Deprecated, use timeInterval instead. */ -@property(nonatomic, readwrite) NSTimeInterval timeIntervalSince1970 - __attribute__((deprecated("Use timeInterval"))); -/** Deprecated, use initWithTimeInterval: instead. */ -- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970 - __attribute__((deprecated("Use initWithTimeInterval:"))); - -@end - -#pragma mark - GPBAny - -/** - * Category for GPBAny to help work with the message within the object. - **/ -@interface GPBAny (GBPWellKnownTypes) - -/** - * Convenience method to create a GPBAny containing the serialized message. - * This uses type.googleapis.com/ as the type_url's prefix. - * - * @param message The message to be packed into the GPBAny. - * @param errorPtr Pointer to an error that will be populated if something goes - * wrong. - * - * @return A newly configured GPBAny with the given message, or nil on failure. - */ -+ (nullable instancetype)anyWithMessage:(nonnull GPBMessage *)message - error:(NSError **)errorPtr; - -/** - * Convenience method to create a GPBAny containing the serialized message. - * - * @param message The message to be packed into the GPBAny. - * @param typeURLPrefix The URL prefix to apply for type_url. - * @param errorPtr Pointer to an error that will be populated if something - * goes wrong. - * - * @return A newly configured GPBAny with the given message, or nil on failure. - */ -+ (nullable instancetype)anyWithMessage:(nonnull GPBMessage *)message - typeURLPrefix:(nonnull NSString *)typeURLPrefix - error:(NSError **)errorPtr; - -/** - * Initializes a GPBAny to contain the serialized message. This uses - * type.googleapis.com/ as the type_url's prefix. - * - * @param message The message to be packed into the GPBAny. - * @param errorPtr Pointer to an error that will be populated if something goes - * wrong. - * - * @return A newly configured GPBAny with the given message, or nil on failure. - */ -- (nullable instancetype)initWithMessage:(nonnull GPBMessage *)message - error:(NSError **)errorPtr; - -/** - * Initializes a GPBAny to contain the serialized message. - * - * @param message The message to be packed into the GPBAny. - * @param typeURLPrefix The URL prefix to apply for type_url. - * @param errorPtr Pointer to an error that will be populated if something - * goes wrong. - * - * @return A newly configured GPBAny with the given message, or nil on failure. - */ -- (nullable instancetype)initWithMessage:(nonnull GPBMessage *)message - typeURLPrefix:(nonnull NSString *)typeURLPrefix - error:(NSError **)errorPtr; - -/** - * Packs the serialized message into this GPBAny. This uses - * type.googleapis.com/ as the type_url's prefix. - * - * @param message The message to be packed into the GPBAny. - * @param errorPtr Pointer to an error that will be populated if something goes - * wrong. - * - * @return Whether the packing was successful or not. - */ -- (BOOL)packWithMessage:(nonnull GPBMessage *)message - error:(NSError **)errorPtr; - -/** - * Packs the serialized message into this GPBAny. - * - * @param message The message to be packed into the GPBAny. - * @param typeURLPrefix The URL prefix to apply for type_url. - * @param errorPtr Pointer to an error that will be populated if something - * goes wrong. - * - * @return Whether the packing was successful or not. - */ -- (BOOL)packWithMessage:(nonnull GPBMessage *)message - typeURLPrefix:(nonnull NSString *)typeURLPrefix - error:(NSError **)errorPtr; - -/** - * Unpacks the serialized message as if it was an instance of the given class. - * - * @note When checking type_url, the base URL is not checked, only the fully - * qualified name. - * - * @param messageClass The class to use to deserialize the contained message. - * @param errorPtr Pointer to an error that will be populated if something - * goes wrong. - * - * @return An instance of the given class populated with the contained data, or - * nil on failure. - */ -- (nullable GPBMessage *)unpackMessageClass:(Class)messageClass - error:(NSError **)errorPtr; - -@end - -NS_ASSUME_NONNULL_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBWireFormat.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBWireFormat.h deleted file mode 100644 index c5941a382..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/GPBWireFormat.h +++ /dev/null @@ -1,73 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#import "GPBRuntimeTypes.h" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -typedef enum { - GPBWireFormatVarint = 0, - GPBWireFormatFixed64 = 1, - GPBWireFormatLengthDelimited = 2, - GPBWireFormatStartGroup = 3, - GPBWireFormatEndGroup = 4, - GPBWireFormatFixed32 = 5, -} GPBWireFormat; - -enum { - GPBWireFormatMessageSetItem = 1, - GPBWireFormatMessageSetTypeId = 2, - GPBWireFormatMessageSetMessage = 3 -}; - -uint32_t GPBWireFormatMakeTag(uint32_t fieldNumber, GPBWireFormat wireType) - __attribute__((const)); -GPBWireFormat GPBWireFormatGetTagWireType(uint32_t tag) __attribute__((const)); -uint32_t GPBWireFormatGetTagFieldNumber(uint32_t tag) __attribute__((const)); -BOOL GPBWireFormatIsValidTag(uint32_t tag) __attribute__((const)); - -GPBWireFormat GPBWireFormatForType(GPBDataType dataType, BOOL isPacked) - __attribute__((const)); - -#define GPBWireFormatMessageSetItemTag \ - (GPBWireFormatMakeTag(GPBWireFormatMessageSetItem, GPBWireFormatStartGroup)) -#define GPBWireFormatMessageSetItemEndTag \ - (GPBWireFormatMakeTag(GPBWireFormatMessageSetItem, GPBWireFormatEndGroup)) -#define GPBWireFormatMessageSetTypeIdTag \ - (GPBWireFormatMakeTag(GPBWireFormatMessageSetTypeId, GPBWireFormatVarint)) -#define GPBWireFormatMessageSetMessageTag \ - (GPBWireFormatMakeTag(GPBWireFormatMessageSetMessage, \ - GPBWireFormatLengthDelimited)) - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/SourceContext.pbobjc.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/SourceContext.pbobjc.h deleted file mode 100644 index e4923959e..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/SourceContext.pbobjc.h +++ /dev/null @@ -1,77 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/source_context.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "GPBDescriptor.h" - #import "GPBMessage.h" - #import "GPBRootObject.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBSourceContextRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBSourceContextRoot : GPBRootObject -@end - -#pragma mark - GPBSourceContext - -typedef GPB_ENUM(GPBSourceContext_FieldNumber) { - GPBSourceContext_FieldNumber_FileName = 1, -}; - -/** - * `SourceContext` represents information about the source of a - * protobuf element, like the file in which it is defined. - **/ -@interface GPBSourceContext : GPBMessage - -/** - * The path-qualified name of the .proto file that contained the associated - * protobuf element. For example: `"google/protobuf/source_context.proto"`. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *fileName; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Struct.pbobjc.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Struct.pbobjc.h deleted file mode 100644 index fb2042519..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Struct.pbobjc.h +++ /dev/null @@ -1,204 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/struct.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "GPBDescriptor.h" - #import "GPBMessage.h" - #import "GPBRootObject.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -@class GPBListValue; -@class GPBStruct; -@class GPBValue; - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - Enum GPBNullValue - -/** - * `NullValue` is a singleton enumeration to represent the null value for the - * `Value` type union. - * - * The JSON representation for `NullValue` is JSON `null`. - **/ -typedef GPB_ENUM(GPBNullValue) { - /** - * Value used if any message's field encounters a value that is not defined - * by this enum. The message will also have C functions to get/set the rawValue - * of the field. - **/ - GPBNullValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, - /** Null value. */ - GPBNullValue_NullValue = 0, -}; - -GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void); - -/** - * Checks to see if the given value is defined by the enum or was not known at - * the time this source was generated. - **/ -BOOL GPBNullValue_IsValidValue(int32_t value); - -#pragma mark - GPBStructRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBStructRoot : GPBRootObject -@end - -#pragma mark - GPBStruct - -typedef GPB_ENUM(GPBStruct_FieldNumber) { - GPBStruct_FieldNumber_Fields = 1, -}; - -/** - * `Struct` represents a structured data value, consisting of fields - * which map to dynamically typed values. In some languages, `Struct` - * might be supported by a native representation. For example, in - * scripting languages like JS a struct is represented as an - * object. The details of that representation are described together - * with the proto support for the language. - * - * The JSON representation for `Struct` is JSON object. - **/ -@interface GPBStruct : GPBMessage - -/** Unordered map of dynamically typed values. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary *fields; -/** The number of items in @c fields without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger fields_Count; - -@end - -#pragma mark - GPBValue - -typedef GPB_ENUM(GPBValue_FieldNumber) { - GPBValue_FieldNumber_NullValue = 1, - GPBValue_FieldNumber_NumberValue = 2, - GPBValue_FieldNumber_StringValue = 3, - GPBValue_FieldNumber_BoolValue = 4, - GPBValue_FieldNumber_StructValue = 5, - GPBValue_FieldNumber_ListValue = 6, -}; - -typedef GPB_ENUM(GPBValue_Kind_OneOfCase) { - GPBValue_Kind_OneOfCase_GPBUnsetOneOfCase = 0, - GPBValue_Kind_OneOfCase_NullValue = 1, - GPBValue_Kind_OneOfCase_NumberValue = 2, - GPBValue_Kind_OneOfCase_StringValue = 3, - GPBValue_Kind_OneOfCase_BoolValue = 4, - GPBValue_Kind_OneOfCase_StructValue = 5, - GPBValue_Kind_OneOfCase_ListValue = 6, -}; - -/** - * `Value` represents a dynamically typed value which can be either - * null, a number, a string, a boolean, a recursive struct value, or a - * list of values. A producer of value is expected to set one of that - * variants, absence of any variant indicates an error. - * - * The JSON representation for `Value` is JSON value. - **/ -@interface GPBValue : GPBMessage - -/** The kind of value. */ -@property(nonatomic, readonly) GPBValue_Kind_OneOfCase kindOneOfCase; - -/** Represents a null value. */ -@property(nonatomic, readwrite) GPBNullValue nullValue; - -/** Represents a double value. */ -@property(nonatomic, readwrite) double numberValue; - -/** Represents a string value. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *stringValue; - -/** Represents a boolean value. */ -@property(nonatomic, readwrite) BOOL boolValue; - -/** Represents a structured value. */ -@property(nonatomic, readwrite, strong, null_resettable) GPBStruct *structValue; - -/** Represents a repeated `Value`. */ -@property(nonatomic, readwrite, strong, null_resettable) GPBListValue *listValue; - -@end - -/** - * Fetches the raw value of a @c GPBValue's @c nullValue property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBValue_NullValue_RawValue(GPBValue *message); -/** - * Sets the raw value of an @c GPBValue's @c nullValue property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value); - -/** - * Clears whatever value was set for the oneof 'kind'. - **/ -void GPBValue_ClearKindOneOfCase(GPBValue *message); - -#pragma mark - GPBListValue - -typedef GPB_ENUM(GPBListValue_FieldNumber) { - GPBListValue_FieldNumber_ValuesArray = 1, -}; - -/** - * `ListValue` is a wrapper around a repeated field of values. - * - * The JSON representation for `ListValue` is JSON array. - **/ -@interface GPBListValue : GPBMessage - -/** Repeated field of dynamically typed values. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *valuesArray; -/** The number of items in @c valuesArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger valuesArray_Count; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Timestamp.pbobjc.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Timestamp.pbobjc.h deleted file mode 100644 index 2c4b8b205..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Timestamp.pbobjc.h +++ /dev/null @@ -1,163 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/timestamp.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "GPBDescriptor.h" - #import "GPBMessage.h" - #import "GPBRootObject.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBTimestampRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBTimestampRoot : GPBRootObject -@end - -#pragma mark - GPBTimestamp - -typedef GPB_ENUM(GPBTimestamp_FieldNumber) { - GPBTimestamp_FieldNumber_Seconds = 1, - GPBTimestamp_FieldNumber_Nanos = 2, -}; - -/** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) - * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one - * can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- - * ) to obtain a formatter capable of generating timestamps in this format. - **/ -@interface GPBTimestamp : GPBMessage - -/** - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - **/ -@property(nonatomic, readwrite) int64_t seconds; - -/** - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - **/ -@property(nonatomic, readwrite) int32_t nanos; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Type.pbobjc.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Type.pbobjc.h deleted file mode 100644 index e14d15df6..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Type.pbobjc.h +++ /dev/null @@ -1,444 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/type.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "GPBDescriptor.h" - #import "GPBMessage.h" - #import "GPBRootObject.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -@class GPBAny; -@class GPBEnumValue; -@class GPBField; -@class GPBOption; -@class GPBSourceContext; - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - Enum GPBSyntax - -/** The syntax in which a protocol buffer element is defined. */ -typedef GPB_ENUM(GPBSyntax) { - /** - * Value used if any message's field encounters a value that is not defined - * by this enum. The message will also have C functions to get/set the rawValue - * of the field. - **/ - GPBSyntax_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, - /** Syntax `proto2`. */ - GPBSyntax_SyntaxProto2 = 0, - - /** Syntax `proto3`. */ - GPBSyntax_SyntaxProto3 = 1, -}; - -GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void); - -/** - * Checks to see if the given value is defined by the enum or was not known at - * the time this source was generated. - **/ -BOOL GPBSyntax_IsValidValue(int32_t value); - -#pragma mark - Enum GPBField_Kind - -/** Basic field types. */ -typedef GPB_ENUM(GPBField_Kind) { - /** - * Value used if any message's field encounters a value that is not defined - * by this enum. The message will also have C functions to get/set the rawValue - * of the field. - **/ - GPBField_Kind_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, - /** Field type unknown. */ - GPBField_Kind_TypeUnknown = 0, - - /** Field type double. */ - GPBField_Kind_TypeDouble = 1, - - /** Field type float. */ - GPBField_Kind_TypeFloat = 2, - - /** Field type int64. */ - GPBField_Kind_TypeInt64 = 3, - - /** Field type uint64. */ - GPBField_Kind_TypeUint64 = 4, - - /** Field type int32. */ - GPBField_Kind_TypeInt32 = 5, - - /** Field type fixed64. */ - GPBField_Kind_TypeFixed64 = 6, - - /** Field type fixed32. */ - GPBField_Kind_TypeFixed32 = 7, - - /** Field type bool. */ - GPBField_Kind_TypeBool = 8, - - /** Field type string. */ - GPBField_Kind_TypeString = 9, - - /** Field type group. Proto2 syntax only, and deprecated. */ - GPBField_Kind_TypeGroup = 10, - - /** Field type message. */ - GPBField_Kind_TypeMessage = 11, - - /** Field type bytes. */ - GPBField_Kind_TypeBytes = 12, - - /** Field type uint32. */ - GPBField_Kind_TypeUint32 = 13, - - /** Field type enum. */ - GPBField_Kind_TypeEnum = 14, - - /** Field type sfixed32. */ - GPBField_Kind_TypeSfixed32 = 15, - - /** Field type sfixed64. */ - GPBField_Kind_TypeSfixed64 = 16, - - /** Field type sint32. */ - GPBField_Kind_TypeSint32 = 17, - - /** Field type sint64. */ - GPBField_Kind_TypeSint64 = 18, -}; - -GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void); - -/** - * Checks to see if the given value is defined by the enum or was not known at - * the time this source was generated. - **/ -BOOL GPBField_Kind_IsValidValue(int32_t value); - -#pragma mark - Enum GPBField_Cardinality - -/** Whether a field is optional, required, or repeated. */ -typedef GPB_ENUM(GPBField_Cardinality) { - /** - * Value used if any message's field encounters a value that is not defined - * by this enum. The message will also have C functions to get/set the rawValue - * of the field. - **/ - GPBField_Cardinality_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, - /** For fields with unknown cardinality. */ - GPBField_Cardinality_CardinalityUnknown = 0, - - /** For optional fields. */ - GPBField_Cardinality_CardinalityOptional = 1, - - /** For required fields. Proto2 syntax only. */ - GPBField_Cardinality_CardinalityRequired = 2, - - /** For repeated fields. */ - GPBField_Cardinality_CardinalityRepeated = 3, -}; - -GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void); - -/** - * Checks to see if the given value is defined by the enum or was not known at - * the time this source was generated. - **/ -BOOL GPBField_Cardinality_IsValidValue(int32_t value); - -#pragma mark - GPBTypeRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBTypeRoot : GPBRootObject -@end - -#pragma mark - GPBType - -typedef GPB_ENUM(GPBType_FieldNumber) { - GPBType_FieldNumber_Name = 1, - GPBType_FieldNumber_FieldsArray = 2, - GPBType_FieldNumber_OneofsArray = 3, - GPBType_FieldNumber_OptionsArray = 4, - GPBType_FieldNumber_SourceContext = 5, - GPBType_FieldNumber_Syntax = 6, -}; - -/** - * A protocol buffer message type. - **/ -@interface GPBType : GPBMessage - -/** The fully qualified message name. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** The list of fields. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *fieldsArray; -/** The number of items in @c fieldsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger fieldsArray_Count; - -/** The list of types appearing in `oneof` definitions in this type. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *oneofsArray; -/** The number of items in @c oneofsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger oneofsArray_Count; - -/** The protocol buffer options. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; -/** The number of items in @c optionsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger optionsArray_Count; - -/** The source context. */ -@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext; -/** Test to see if @c sourceContext has been set. */ -@property(nonatomic, readwrite) BOOL hasSourceContext; - -/** The source syntax. */ -@property(nonatomic, readwrite) GPBSyntax syntax; - -@end - -/** - * Fetches the raw value of a @c GPBType's @c syntax property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBType_Syntax_RawValue(GPBType *message); -/** - * Sets the raw value of an @c GPBType's @c syntax property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBType_Syntax_RawValue(GPBType *message, int32_t value); - -#pragma mark - GPBField - -typedef GPB_ENUM(GPBField_FieldNumber) { - GPBField_FieldNumber_Kind = 1, - GPBField_FieldNumber_Cardinality = 2, - GPBField_FieldNumber_Number = 3, - GPBField_FieldNumber_Name = 4, - GPBField_FieldNumber_TypeURL = 6, - GPBField_FieldNumber_OneofIndex = 7, - GPBField_FieldNumber_Packed = 8, - GPBField_FieldNumber_OptionsArray = 9, - GPBField_FieldNumber_JsonName = 10, - GPBField_FieldNumber_DefaultValue = 11, -}; - -/** - * A single field of a message type. - **/ -@interface GPBField : GPBMessage - -/** The field type. */ -@property(nonatomic, readwrite) GPBField_Kind kind; - -/** The field cardinality. */ -@property(nonatomic, readwrite) GPBField_Cardinality cardinality; - -/** The field number. */ -@property(nonatomic, readwrite) int32_t number; - -/** The field name. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** - * The field type URL, without the scheme, for message or enumeration - * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL; - -/** - * The index of the field type in `Type.oneofs`, for message or enumeration - * types. The first type has index 1; zero means the type is not in the list. - **/ -@property(nonatomic, readwrite) int32_t oneofIndex; - -/** Whether to use alternative packed wire representation. */ -@property(nonatomic, readwrite) BOOL packed; - -/** The protocol buffer options. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; -/** The number of items in @c optionsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger optionsArray_Count; - -/** The field JSON name. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName; - -/** The string value of the default value of this field. Proto2 syntax only. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue; - -@end - -/** - * Fetches the raw value of a @c GPBField's @c kind property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBField_Kind_RawValue(GPBField *message); -/** - * Sets the raw value of an @c GPBField's @c kind property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBField_Kind_RawValue(GPBField *message, int32_t value); - -/** - * Fetches the raw value of a @c GPBField's @c cardinality property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBField_Cardinality_RawValue(GPBField *message); -/** - * Sets the raw value of an @c GPBField's @c cardinality property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value); - -#pragma mark - GPBEnum - -typedef GPB_ENUM(GPBEnum_FieldNumber) { - GPBEnum_FieldNumber_Name = 1, - GPBEnum_FieldNumber_EnumvalueArray = 2, - GPBEnum_FieldNumber_OptionsArray = 3, - GPBEnum_FieldNumber_SourceContext = 4, - GPBEnum_FieldNumber_Syntax = 5, -}; - -/** - * Enum type definition. - **/ -@interface GPBEnum : GPBMessage - -/** Enum type name. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** Enum value definitions. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *enumvalueArray; -/** The number of items in @c enumvalueArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger enumvalueArray_Count; - -/** Protocol buffer options. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; -/** The number of items in @c optionsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger optionsArray_Count; - -/** The source context. */ -@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext; -/** Test to see if @c sourceContext has been set. */ -@property(nonatomic, readwrite) BOOL hasSourceContext; - -/** The source syntax. */ -@property(nonatomic, readwrite) GPBSyntax syntax; - -@end - -/** - * Fetches the raw value of a @c GPBEnum's @c syntax property, even - * if the value was not defined by the enum at the time the code was generated. - **/ -int32_t GPBEnum_Syntax_RawValue(GPBEnum *message); -/** - * Sets the raw value of an @c GPBEnum's @c syntax property, allowing - * it to be set to a value that was not defined by the enum at the time the code - * was generated. - **/ -void SetGPBEnum_Syntax_RawValue(GPBEnum *message, int32_t value); - -#pragma mark - GPBEnumValue - -typedef GPB_ENUM(GPBEnumValue_FieldNumber) { - GPBEnumValue_FieldNumber_Name = 1, - GPBEnumValue_FieldNumber_Number = 2, - GPBEnumValue_FieldNumber_OptionsArray = 3, -}; - -/** - * Enum value definition. - **/ -@interface GPBEnumValue : GPBMessage - -/** Enum value name. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** Enum value number. */ -@property(nonatomic, readwrite) int32_t number; - -/** Protocol buffer options. */ -@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *optionsArray; -/** The number of items in @c optionsArray without causing the array to be created. */ -@property(nonatomic, readonly) NSUInteger optionsArray_Count; - -@end - -#pragma mark - GPBOption - -typedef GPB_ENUM(GPBOption_FieldNumber) { - GPBOption_FieldNumber_Name = 1, - GPBOption_FieldNumber_Value = 2, -}; - -/** - * A protocol buffer option, which can be attached to a message, field, - * enumeration, etc. - **/ -@interface GPBOption : GPBMessage - -/** - * The option's name. For protobuf built-in options (options defined in - * descriptor.proto), this is the short name. For example, `"map_entry"`. - * For custom options, it should be the fully-qualified name. For example, - * `"google.api.http"`. - **/ -@property(nonatomic, readwrite, copy, null_resettable) NSString *name; - -/** - * The option's value packed in an Any message. If the value is a primitive, - * the corresponding wrapper type defined in google/protobuf/wrappers.proto - * should be used. If the value is an enum, it should be stored as an int32 - * value using the google.protobuf.Int32Value type. - **/ -@property(nonatomic, readwrite, strong, null_resettable) GPBAny *value; -/** Test to see if @c value has been set. */ -@property(nonatomic, readwrite) BOOL hasValue; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Wrappers.pbobjc.h b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Wrappers.pbobjc.h deleted file mode 100644 index 0411e1ec0..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Headers/Wrappers.pbobjc.h +++ /dev/null @@ -1,219 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto - -// This CPP symbol can be defined to use imports that match up to the framework -// imports needed when using CocoaPods. -#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) - #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 -#endif - -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import - #import - #import -#else - #import "GPBDescriptor.h" - #import "GPBMessage.h" - #import "GPBRootObject.h" -#endif - -#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002 -#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. -#endif -#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION -#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. -#endif - -// @@protoc_insertion_point(imports) - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - -CF_EXTERN_C_BEGIN - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - GPBWrappersRoot - -/** - * Exposes the extension registry for this file. - * - * The base class provides: - * @code - * + (GPBExtensionRegistry *)extensionRegistry; - * @endcode - * which is a @c GPBExtensionRegistry that includes all the extensions defined by - * this file and all files that it depends on. - **/ -@interface GPBWrappersRoot : GPBRootObject -@end - -#pragma mark - GPBDoubleValue - -typedef GPB_ENUM(GPBDoubleValue_FieldNumber) { - GPBDoubleValue_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `double`. - * - * The JSON representation for `DoubleValue` is JSON number. - **/ -@interface GPBDoubleValue : GPBMessage - -/** The double value. */ -@property(nonatomic, readwrite) double value; - -@end - -#pragma mark - GPBFloatValue - -typedef GPB_ENUM(GPBFloatValue_FieldNumber) { - GPBFloatValue_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `float`. - * - * The JSON representation for `FloatValue` is JSON number. - **/ -@interface GPBFloatValue : GPBMessage - -/** The float value. */ -@property(nonatomic, readwrite) float value; - -@end - -#pragma mark - GPBInt64Value - -typedef GPB_ENUM(GPBInt64Value_FieldNumber) { - GPBInt64Value_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `int64`. - * - * The JSON representation for `Int64Value` is JSON string. - **/ -@interface GPBInt64Value : GPBMessage - -/** The int64 value. */ -@property(nonatomic, readwrite) int64_t value; - -@end - -#pragma mark - GPBUInt64Value - -typedef GPB_ENUM(GPBUInt64Value_FieldNumber) { - GPBUInt64Value_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `uint64`. - * - * The JSON representation for `UInt64Value` is JSON string. - **/ -@interface GPBUInt64Value : GPBMessage - -/** The uint64 value. */ -@property(nonatomic, readwrite) uint64_t value; - -@end - -#pragma mark - GPBInt32Value - -typedef GPB_ENUM(GPBInt32Value_FieldNumber) { - GPBInt32Value_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `int32`. - * - * The JSON representation for `Int32Value` is JSON number. - **/ -@interface GPBInt32Value : GPBMessage - -/** The int32 value. */ -@property(nonatomic, readwrite) int32_t value; - -@end - -#pragma mark - GPBUInt32Value - -typedef GPB_ENUM(GPBUInt32Value_FieldNumber) { - GPBUInt32Value_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `uint32`. - * - * The JSON representation for `UInt32Value` is JSON number. - **/ -@interface GPBUInt32Value : GPBMessage - -/** The uint32 value. */ -@property(nonatomic, readwrite) uint32_t value; - -@end - -#pragma mark - GPBBoolValue - -typedef GPB_ENUM(GPBBoolValue_FieldNumber) { - GPBBoolValue_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `bool`. - * - * The JSON representation for `BoolValue` is JSON `true` and `false`. - **/ -@interface GPBBoolValue : GPBMessage - -/** The bool value. */ -@property(nonatomic, readwrite) BOOL value; - -@end - -#pragma mark - GPBStringValue - -typedef GPB_ENUM(GPBStringValue_FieldNumber) { - GPBStringValue_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `string`. - * - * The JSON representation for `StringValue` is JSON string. - **/ -@interface GPBStringValue : GPBMessage - -/** The string value. */ -@property(nonatomic, readwrite, copy, null_resettable) NSString *value; - -@end - -#pragma mark - GPBBytesValue - -typedef GPB_ENUM(GPBBytesValue_FieldNumber) { - GPBBytesValue_FieldNumber_Value = 1, -}; - -/** - * Wrapper message for `bytes`. - * - * The JSON representation for `BytesValue` is JSON string. - **/ -@interface GPBBytesValue : GPBMessage - -/** The bytes value. */ -@property(nonatomic, readwrite, copy, null_resettable) NSData *value; - -@end - -NS_ASSUME_NONNULL_END - -CF_EXTERN_C_END - -#pragma clang diagnostic pop - -// @@protoc_insertion_point(global_scope) diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Modules/module.modulemap b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Modules/module.modulemap deleted file mode 100644 index 8b1cb3fb4..000000000 --- a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Modules/module.modulemap +++ /dev/null @@ -1,5 +0,0 @@ -framework module Protobuf { - umbrella header "Protobuf.h" - export * - module * { export *} -} diff --git a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Protobuf b/src/ios/Firebase/RemoteConfig/Protobuf.framework/Protobuf deleted file mode 100644 index 3950f91d8..000000000 Binary files a/src/ios/Firebase/RemoteConfig/Protobuf.framework/Protobuf and /dev/null differ diff --git a/src/ios/Firebase/module.modulemap b/src/ios/Firebase/module.modulemap deleted file mode 100644 index 0a48bcbb4..000000000 --- a/src/ios/Firebase/module.modulemap +++ /dev/null @@ -1,4 +0,0 @@ -module Firebase { - header "Firebase.h" - export * -} diff --git a/src/ios/FirebasePlugin.h b/src/ios/FirebasePlugin.h index f7d081016..8719d0ec7 100755 --- a/src/ios/FirebasePlugin.h +++ b/src/ios/FirebasePlugin.h @@ -1,42 +1,41 @@ -#import -#import "AppDelegate.h" - -@interface FirebasePlugin : CDVPlugin -+ (FirebasePlugin *) firebasePlugin; -- (void)getVerificationID:(CDVInvokedUrlCommand*)command; -- (void)verifyPhoneNumber:(CDVInvokedUrlCommand*)command; -- (void)getInstanceId:(CDVInvokedUrlCommand*)command; -- (void)getId:(CDVInvokedUrlCommand*)command; -- (void)getToken:(CDVInvokedUrlCommand*)command; -- (void)grantPermission:(CDVInvokedUrlCommand*)command; -- (void)hasPermission:(CDVInvokedUrlCommand*)command; -- (void)setBadgeNumber:(CDVInvokedUrlCommand*)command; -- (void)getBadgeNumber:(CDVInvokedUrlCommand*)command; -- (void)subscribe:(CDVInvokedUrlCommand*)command; -- (void)unsubscribe:(CDVInvokedUrlCommand*)command; -- (void)unregister:(CDVInvokedUrlCommand*)command; -- (void)onNotificationOpen:(CDVInvokedUrlCommand*)command; -- (void)onTokenRefresh:(CDVInvokedUrlCommand*)command; -- (void)sendNotification:(NSDictionary*)userInfo; -- (void)sendToken:(NSString*)token; -- (void)logEvent:(CDVInvokedUrlCommand*)command; -- (void)logError:(CDVInvokedUrlCommand*)command; -- (void)setCrashlyticsUserId:(CDVInvokedUrlCommand*)command; -- (void)setScreenName:(CDVInvokedUrlCommand*)command; -- (void)setUserId:(CDVInvokedUrlCommand*)command; -- (void)setUserProperty:(CDVInvokedUrlCommand*)command; -- (void)fetch:(CDVInvokedUrlCommand*)command; -- (void)activateFetched:(CDVInvokedUrlCommand*)command; -- (void)getValue:(CDVInvokedUrlCommand*)command; -- (void)startTrace:(CDVInvokedUrlCommand*)command; -- (void)incrementCounter:(CDVInvokedUrlCommand*)command; -- (void)stopTrace:(CDVInvokedUrlCommand*)command; -- (void)setAnalyticsCollectionEnabled:(CDVInvokedUrlCommand*)command; -- (void)setPerformanceCollectionEnabled:(CDVInvokedUrlCommand*)command; -- (void)clearAllNotifications:(CDVInvokedUrlCommand *)command; -@property (nonatomic, copy) NSString *notificationCallbackId; -@property (nonatomic, copy) NSString *tokenRefreshCallbackId; -@property (nonatomic, retain) NSMutableArray *notificationStack; -@property (nonatomic, readwrite) NSMutableDictionary* traces; - -@end +#import +#import "AppDelegate.h" + +@interface FirebasePlugin : CDVPlugin ++ (FirebasePlugin *) firebasePlugin; +- (void)getVerificationID:(CDVInvokedUrlCommand*)command; +- (void)verifyPhoneNumber:(CDVInvokedUrlCommand*)command; +- (void)getId:(CDVInvokedUrlCommand*)command; +- (void)getToken:(CDVInvokedUrlCommand*)command; +- (void)grantPermission:(CDVInvokedUrlCommand*)command; +- (void)hasPermission:(CDVInvokedUrlCommand*)command; +- (void)setBadgeNumber:(CDVInvokedUrlCommand*)command; +- (void)getBadgeNumber:(CDVInvokedUrlCommand*)command; +- (void)subscribe:(CDVInvokedUrlCommand*)command; +- (void)unsubscribe:(CDVInvokedUrlCommand*)command; +- (void)unregister:(CDVInvokedUrlCommand*)command; +- (void)onNotificationOpen:(CDVInvokedUrlCommand*)command; +- (void)onTokenRefresh:(CDVInvokedUrlCommand*)command; +- (void)sendNotification:(NSDictionary*)userInfo; +- (void)sendToken:(NSString*)token; +- (void)logEvent:(CDVInvokedUrlCommand*)command; +- (void)logError:(CDVInvokedUrlCommand*)command; +- (void)setCrashlyticsUserId:(CDVInvokedUrlCommand*)command; +- (void)setScreenName:(CDVInvokedUrlCommand*)command; +- (void)setUserId:(CDVInvokedUrlCommand*)command; +- (void)setUserProperty:(CDVInvokedUrlCommand*)command; +- (void)fetch:(CDVInvokedUrlCommand*)command; +- (void)activateFetched:(CDVInvokedUrlCommand*)command; +- (void)getValue:(CDVInvokedUrlCommand*)command; +- (void)startTrace:(CDVInvokedUrlCommand*)command; +- (void)incrementCounter:(CDVInvokedUrlCommand*)command; +- (void)stopTrace:(CDVInvokedUrlCommand*)command; +- (void)setAnalyticsCollectionEnabled:(CDVInvokedUrlCommand*)command; +- (void)setPerformanceCollectionEnabled:(CDVInvokedUrlCommand*)command; +- (void)clearAllNotifications:(CDVInvokedUrlCommand *)command; +@property (nonatomic, copy) NSString *notificationCallbackId; +@property (nonatomic, copy) NSString *tokenRefreshCallbackId; +@property (nonatomic, retain) NSMutableArray *notificationStack; +@property (nonatomic, readwrite) NSMutableDictionary* traces; + +@end diff --git a/src/ios/FirebasePlugin.m b/src/ios/FirebasePlugin.m index df0c79167..00aa6e5ab 100644 --- a/src/ios/FirebasePlugin.m +++ b/src/ios/FirebasePlugin.m @@ -54,12 +54,6 @@ - (void)getId:(CDVInvokedUrlCommand *)command { [[FIRInstanceID instanceID] getIDWithHandler:handler]; } -// DEPRECATED - alias of getToken -- (void)getInstanceId:(CDVInvokedUrlCommand *)command { - CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:[[FIRInstanceID instanceID] token]]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; -} - - (void)getToken:(CDVInvokedUrlCommand *)command { CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:[[FIRInstanceID instanceID] token]]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; @@ -287,8 +281,27 @@ - (void)logEvent:(CDVInvokedUrlCommand *)command { - (void)logError:(CDVInvokedUrlCommand *)command { [self.commandDelegate runInBackground:^{ NSString* errorMessage = [command.arguments objectAtIndex:0]; - CLSNSLog(@"%@", errorMessage); - CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + NSMutableDictionary* userInfo = [[NSMutableDictionary alloc] init]; + CDVCommandStatus status = CDVCommandStatus_OK; + + @try { + // We can optionally be passed a stack trace from stackTrace.js which we'll put in userInfo. + if ([command.arguments count] > 1) { + NSArray *stack = [command.arguments objectAtIndex:1]; + int lineNum = 1; + for (NSDictionary *entry in stack) { + NSString *key = [NSString stringWithFormat:@"Stack_line_%02d", lineNum++]; + userInfo[key] = entry[@"source"]; + } + } + } @catch (NSException *exception) { + CLSNSLog(@"Exception in logError: %@, original error: %@", exception.description, errorMessage); + status = CDVCommandStatus_ERROR; + } + + NSError *error = [NSError errorWithDomain:errorMessage code:0 userInfo:userInfo]; + [CrashlyticsKit recordError:error]; + CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:status]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; }]; } diff --git a/test/platform-add.sh b/test/platform-add.sh index 1eadf054b..d6376c4eb 100644 --- a/test/platform-add.sh +++ b/test/platform-add.sh @@ -9,6 +9,10 @@ PLATFORM_VERSION=$3 FOLDER=".build-$PLATFORM" rm -rf $FOLDER +if [[ "$PLATFORM" == "ios" ]]; then + npm install xcode --no-save +fi + npm install "cordova@$CORDOVA_VERSION" --no-save ./node_modules/.bin/cordova create $FOLDER com.github.cordova_plugin_firebase HelloWorld diff --git a/test/test-with-3-plugins.sh b/test/test-with-3-plugins.sh index 7de0b6a57..64f435bd0 100644 --- a/test/test-with-3-plugins.sh +++ b/test/test-with-3-plugins.sh @@ -9,7 +9,8 @@ ADDITIONAL_PLUGIN_1=$4 ADDITIONAL_PLUGIN_2=$5 ADDITIONAL_PLUGIN_3=$6 -bash ./test/platform-add.sh $CORDOVA_VERSION $PLATFORM $PLATFORM_VERSION +# Do not reinstall the platforms +#bash ./test/platform-add.sh $CORDOVA_VERSION $PLATFORM $PLATFORM_VERSION bash ./test/plugin-add.sh $CORDOVA_VERSION $PLATFORM $PLATFORM_VERSION .. bash ./test/plugin-add.sh $CORDOVA_VERSION $PLATFORM $PLATFORM_VERSION $ADDITIONAL_PLUGIN_1 bash ./test/plugin-add.sh $CORDOVA_VERSION $PLATFORM $PLATFORM_VERSION $ADDITIONAL_PLUGIN_2 diff --git a/www/firebase-browser.js b/www/firebase-browser.js index 10426bb49..9a89298f4 100755 --- a/www/firebase-browser.js +++ b/www/firebase-browser.js @@ -1,159 +1,158 @@ -exports.getVerificationID = function (number, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.getInstanceId = function (success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.getToken = function (success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.getId = function (success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.onNotificationOpen = function (success, error) {}; - -exports.onTokenRefresh = function (success, error) {}; - -exports.grantPermission = function (success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.setBadgeNumber = function (number, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.getBadgeNumber = function (success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.subscribe = function (topic, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.unsubscribe = function (topic, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.logEvent = function (name, params, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.logError = function (message, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.setCrashlyticsUserId = function (userId, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.setScreenName = function (name, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.setUserId = function (id, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.setUserProperty = function (name, value, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.activateFetched = function (success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.fetch = function (cacheExpirationSeconds, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.getByteArray = function (key, namespace, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.getValue = function (key, namespace, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.getInfo = function (success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.setConfigSettings = function (settings, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.setDefaults = function (defaults, namespace, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.verifyPhoneNumber = function (number, timeOutDuration, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.setAnalyticsCollectionEnabled = function (enabled, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.setPerformanceCollectionEnabled = function (enabled, success, error) { - if (typeof success === 'function') { - success(); - } -}; - -exports.clearAllNotifications = function (success, error) { - if (typeof success === 'function') { - success(); - } -}; \ No newline at end of file +exports.getVerificationID = function (number, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.getToken = function (success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.getId = function (success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.onNotificationOpen = function (success, error) { +}; + +exports.onTokenRefresh = function (success, error) { +}; + +exports.grantPermission = function (success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.setBadgeNumber = function (number, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.getBadgeNumber = function (success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.subscribe = function (topic, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.unsubscribe = function (topic, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.logEvent = function (name, params, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.logError = function (message, stackTrace, success, error) { + // "stackTrace" is an optional arg and is an array of objects. + if (typeof stackTrace === 'function') { + stackTrace(); + } else if (typeof success === 'function') { + success(); + } +}; + +exports.setCrashlyticsUserId = function (userId, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.setScreenName = function (name, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.setUserId = function (id, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.setUserProperty = function (name, value, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.activateFetched = function (success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.fetch = function (cacheExpirationSeconds, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.getByteArray = function (key, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.getValue = function (key, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.getInfo = function (success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.setConfigSettings = function (settings, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.setDefaults = function (defaults, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.verifyPhoneNumber = function (number, timeOutDuration, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.setAnalyticsCollectionEnabled = function (enabled, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.setPerformanceCollectionEnabled = function (enabled, success, error) { + if (typeof success === 'function') { + success(); + } +}; + +exports.clearAllNotifications = function (success, error) { + if (typeof success === 'function') { + success(); + } +}; diff --git a/www/firebase.js b/www/firebase.js index 0e4330a69..25b0ff3c7 100644 --- a/www/firebase.js +++ b/www/firebase.js @@ -1,63 +1,69 @@ var exec = require('cordova/exec'); exports.getVerificationID = function (number, success, error) { - exec(success, error, "FirebasePlugin", "getVerificationID", [number]); -}; - -exports.getInstanceId = function (success, error) { - exec(success, error, "FirebasePlugin", "getInstanceId", []); + exec(success, error, "FirebasePlugin", "getVerificationID", [number]); }; exports.getId = function (success, error) { - exec(success, error, "FirebasePlugin", "getId", []); + exec(success, error, "FirebasePlugin", "getId", []); }; exports.getToken = function (success, error) { - exec(success, error, "FirebasePlugin", "getToken", []); + exec(success, error, "FirebasePlugin", "getToken", []); }; exports.onNotificationOpen = function (success, error) { - exec(success, error, "FirebasePlugin", "onNotificationOpen", []); + exec(success, error, "FirebasePlugin", "onNotificationOpen", []); }; exports.onTokenRefresh = function (success, error) { - exec(success, error, "FirebasePlugin", "onTokenRefresh", []); + exec(success, error, "FirebasePlugin", "onTokenRefresh", []); }; exports.grantPermission = function (success, error) { - exec(success, error, "FirebasePlugin", "grantPermission", []); + exec(success, error, "FirebasePlugin", "grantPermission", []); }; exports.hasPermission = function (success, error) { - exec(success, error, "FirebasePlugin", "hasPermission", []); + exec(success, error, "FirebasePlugin", "hasPermission", []); }; exports.setBadgeNumber = function (number, success, error) { - exec(success, error, "FirebasePlugin", "setBadgeNumber", [number]); + exec(success, error, "FirebasePlugin", "setBadgeNumber", [number]); }; exports.getBadgeNumber = function (success, error) { - exec(success, error, "FirebasePlugin", "getBadgeNumber", []); + exec(success, error, "FirebasePlugin", "getBadgeNumber", []); }; exports.subscribe = function (topic, success, error) { - exec(success, error, "FirebasePlugin", "subscribe", [topic]); + exec(success, error, "FirebasePlugin", "subscribe", [topic]); }; exports.unsubscribe = function (topic, success, error) { - exec(success, error, "FirebasePlugin", "unsubscribe", [topic]); + exec(success, error, "FirebasePlugin", "unsubscribe", [topic]); }; exports.unregister = function (success, error) { - exec(success, error, "FirebasePlugin", "unregister", []); + exec(success, error, "FirebasePlugin", "unregister", []); }; exports.logEvent = function (name, params, success, error) { - exec(success, error, "FirebasePlugin", "logEvent", [name, params]); + exec(success, error, "FirebasePlugin", "logEvent", [name, params]); }; -exports.logError = function (message, success, error) { - exec(success, error, "FirebasePlugin", "logError", [message]); +exports.logError = function (message, stackTrace, success, error) { + var args = [message]; + // "stackTrace" is an optional arg that's an array of objects. + if (stackTrace) { + if (typeof stackTrace === 'function') { + error = success; + success = stackTrace; + } else { + args.push(stackTrace); + } + } + exec(success, error, "FirebasePlugin", "logError", args); }; exports.setCrashlyticsUserId = function (userId, success, error) { @@ -65,105 +71,89 @@ exports.setCrashlyticsUserId = function (userId, success, error) { }; exports.setScreenName = function (name, success, error) { - exec(success, error, "FirebasePlugin", "setScreenName", [name]); + exec(success, error, "FirebasePlugin", "setScreenName", [name]); }; exports.setUserId = function (id, success, error) { - exec(success, error, "FirebasePlugin", "setUserId", [id]); + exec(success, error, "FirebasePlugin", "setUserId", [id]); }; exports.setUserProperty = function (name, value, success, error) { - exec(success, error, "FirebasePlugin", "setUserProperty", [name, value]); + exec(success, error, "FirebasePlugin", "setUserProperty", [name, value]); }; exports.activateFetched = function (success, error) { - exec(success, error, "FirebasePlugin", "activateFetched", []); + exec(success, error, "FirebasePlugin", "activateFetched", []); }; exports.fetch = function (cacheExpirationSeconds, success, error) { - var args = []; - if (typeof cacheExpirationSeconds === 'number') { - args.push(cacheExpirationSeconds); - } else { - error = success; - success = cacheExpirationSeconds; - } - exec(success, error, "FirebasePlugin", "fetch", args); -}; - -exports.getByteArray = function (key, namespace, success, error) { - var args = [key]; - if (typeof namespace === 'string') { - args.push(namespace); - } else { - error = success; - success = namespace; - } - exec(success, error, "FirebasePlugin", "getByteArray", args); -}; - -exports.getValue = function (key, namespace, success, error) { - var args = [key]; - if (typeof namespace === 'string') { - args.push(namespace); - } else { - error = success; - success = namespace; - } - exec(success, error, "FirebasePlugin", "getValue", args); + var args = []; + if (typeof cacheExpirationSeconds === 'number') { + args.push(cacheExpirationSeconds); + } else { + error = success; + success = cacheExpirationSeconds; + } + exec(success, error, "FirebasePlugin", "fetch", args); +}; + +exports.getByteArray = function (key, success, error) { + exec(success, error, "FirebasePlugin", "getByteArray", [key]); +}; + +exports.getValue = function (key, success, error) { + exec(success, error, "FirebasePlugin", "getValue", [key]); }; exports.getInfo = function (success, error) { - exec(success, error, "FirebasePlugin", "getInfo", []); + exec(success, error, "FirebasePlugin", "getInfo", []); }; exports.setConfigSettings = function (settings, success, error) { - exec(success, error, "FirebasePlugin", "setConfigSettings", [settings]); + exec(success, error, "FirebasePlugin", "setConfigSettings", [settings]); }; -exports.setDefaults = function (defaults, namespace, success, error) { - var args = [defaults]; - if (typeof namespace === 'string') { - args.push(namespace); - } else { - error = success; - success = namespace; - } - exec(success, error, "FirebasePlugin", "setDefaults", args); +exports.setDefaults = function (defaults, success, error) { + exec(success, error, "FirebasePlugin", "setDefaults", [defaults]); }; exports.startTrace = function (name, success, error) { - exec(success, error, "FirebasePlugin", "startTrace", [name]); + exec(success, error, "FirebasePlugin", "startTrace", [name]); }; exports.incrementCounter = function (name, counterNamed, success, error) { - exec(success, error, "FirebasePlugin", "incrementCounter", [name, counterNamed]); + exec(success, error, "FirebasePlugin", "incrementCounter", [name, counterNamed]); }; exports.stopTrace = function (name, success, error) { - exec(success, error, "FirebasePlugin", "stopTrace", [name]); + exec(success, error, "FirebasePlugin", "stopTrace", [name]); }; exports.setAnalyticsCollectionEnabled = function (enabled, success, error) { - exec(success, error, "FirebasePlugin", "setAnalyticsCollectionEnabled", [enabled]); + exec(success, error, "FirebasePlugin", "setAnalyticsCollectionEnabled", [enabled]); }; exports.setPerformanceCollectionEnabled = function (enabled, success, error) { - exec(success, error, "FirebasePlugin", "setPerformanceCollectionEnabled", [enabled]); + exec(success, error, "FirebasePlugin", "setPerformanceCollectionEnabled", [enabled]); }; exports.verifyPhoneNumber = function (number, timeOutDuration, success, error) { - if (typeof timeOutDuration === 'function') { - // method being called with old signature: function(number, success, error) - // timeOutDuration is the success callback, success is the error callback - exec(timeOutDuration, success, "FirebasePlugin", "verifyPhoneNumber", [number]); - } else { - // method being called with new signature: function(number, timeOutDuration, success, error) - // callbacks are correctly named - exec(success, error, "FirebasePlugin", "verifyPhoneNumber", [number, timeOutDuration]); - } + if (typeof timeOutDuration === 'function') { + // method being called with old signature: function(number, success, error) + // timeOutDuration is the success callback, success is the error callback + exec(timeOutDuration, success, "FirebasePlugin", "verifyPhoneNumber", [number]); + } else { + // method being called with new signature: function(number, timeOutDuration, success, error) + // callbacks are correctly named + exec(success, error, "FirebasePlugin", "verifyPhoneNumber", [number, timeOutDuration]); + } }; exports.clearAllNotifications = function (success, error) { - exec(success, error, "FirebasePlugin", "clearAllNotifications", []); -}; \ No newline at end of file + exec(success, error, "FirebasePlugin", "clearAllNotifications", []); +}; + +// For Android O only +exports.createChannel = function (success, error, channel) { + exec(success, error, 'FirebasePlugin', 'createChannel', [channel]); +};