Skip to content

Commit

Permalink
tvOS Reference Doc Changes (#583)
Browse files Browse the repository at this point in the history
Update the reference docs to refer to tvOS when discussing particular methods and classes.
  • Loading branch information
DellaBitta authored Jan 25, 2023
1 parent ffc921e commit c361b8c
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 41 deletions.
2 changes: 1 addition & 1 deletion app/src/AppOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void Dispose() { }
/// file or PROJECT_ID in the GoogleService-Info.plist.
public string ProjectId { get; set; }

/// Gets or sets the Android or iOS client project name.
/// Gets or sets the Android, iOS or tvOS client project name.
///
/// This is the project_name in the Android google-services.json config
/// file or BUNDLE_ID in the GoogleService-Info.plist.
Expand Down
11 changes: 6 additions & 5 deletions app/src/ErrorMessages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ internal class ErrorMessages {
"* Rebuild your APK and deploy.\n";

private static string DEPENDENCY_NOT_FOUND_ERROR_IOS =
"On iOS+ Firebase requires native (C/C++) and Cocoapod components\n" +
"that are distributed with the Firebase SDK and via Cocoapods.\n" +
"On iOS and tvOS Firebase requires native (C/C++) and Cocoapod\n" +
"components that are distributed with the Firebase SDK and via\n" +
"Cocoapods.\n" +
"\n" +
"It's likely that you did not include the require Cocoapod\n" +
"dependencies for Firebase in your Unity project.\n" +
Expand All @@ -56,8 +57,8 @@ internal class ErrorMessages {
" iOS Resolver -> Settings'\n" +
"* In the iOS Resolver settings check 'Podfile Generation' and\n" +
" 'Add Cocoapods to Generated Xcode Project'.\n" +
"* Build your iOS project and check the Unity console for any\n" +
" errors associated with Cocoapod tool execution.\n" +
"* Build your iOS or tvOS project and check the Unity console for\n" +
" any errors associated with Cocoapod tool execution.\n" +
" You will need to correctly install Cocoapods tools to generate\n" +
" a working build.\n";

Expand All @@ -84,7 +85,7 @@ internal class ErrorMessages {

private static string DLL_NOT_FOUND_ERROR_IOS =
"A Firebase static library (e.g libApp.a) was not linked with your\n" +
"iOS application.\n";
"iOS or tvOS application.\n";

private static string DLL_NOT_FOUND_ERROR_GENERIC =
"A Firebase shared library (.dll / .so) could not be loaded.\n";
Expand Down
2 changes: 1 addition & 1 deletion app/src/swig/app.i
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ static firebase::AppOptions* AppOptionsLoadFromJsonConfig(const char* config) {
/// @endcode
/// @endif
///
/// or on iOS to your Info.plist:
/// or on iOS or tvOS to your Info.plist:
///
/// @if NOT_DOXYGEN
/// <key>FirebaseDataCollectionDefaultEnabled</key>
Expand Down
2 changes: 1 addition & 1 deletion app/src/swig/future.i
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ namespace firebase {
%define %SWIG_FUTURE_FOOTER(CSNAME, CSTYPE, CTYPE)
public delegate void Action();

// On iOS, in order to marshal a delegate from C#, it needs both a
// On iOS and tvOS, in order to marshal a delegate from C#, it needs both a
// MonoPInvokeCallback attribute, and be static.
// Because of this need to be static, the instanced callbacks need to be
// saved in a way that can be obtained later, hence the use of a static
Expand Down
2 changes: 2 additions & 0 deletions auth/src/PhoneAuthProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ namespace Firebase.Auth {
/// Allows developers to use the phone number and SMS verification codes
/// to authenticate a user.
///
/// This class is not supported on tvOS and Desktop platforms.
///
/// The verification flow results in a Credential that can be used to,
/// * Sign in to an existing phone number account/sign up with a new
/// phone number
Expand Down
18 changes: 9 additions & 9 deletions auth/src/swig/auth.i
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,9 @@ static CppInstanceManager<Auth> g_auth_instances;

/// Sign-in a user authenticated via a federated auth provider.
///
/// @note: This operation is supported only on iOS and Android platforms. On
/// non-mobile platforms this method will return a Future with a preset error
/// code: kAuthErrorUnimplemented.
/// @note: This operation is supported only on iOS, tvOS and Android
/// platforms. On other platforms this method will return a Future with a
/// preset error code: kAuthErrorUnimplemented.
public System.Threading.Tasks.Task<SignInResult> SignInWithProviderAsync(
FederatedAuthProvider provider) {
ThrowIfNull();
Expand Down Expand Up @@ -1087,9 +1087,9 @@ static CppInstanceManager<Auth> g_auth_instances;

/// Reauthenticate a user via a federated auth provider.
///
/// @note: This operation is supported only on iOS and Android platforms. On
/// non-mobile platforms this method will return a Future with a preset error
/// code: kAuthErrorUnimplemented.
/// @note: This operation is supported only on iOS, tvOS and Android
/// platforms. On other platforms this method will return a Future with a
/// preset error code: kAuthErrorUnimplemented.
public System.Threading.Tasks.Task<SignInResult>
ReauthenticateWithProviderAsync(FederatedAuthProvider provider) {
ThrowIfNull();
Expand All @@ -1110,9 +1110,9 @@ static CppInstanceManager<Auth> g_auth_instances;

/// Link a user via a federated auth provider.
///
/// @note: This operation is supported only on iOS and Android platforms. On
/// non-mobile platforms this method will return a Future with a preset error
/// code: kAuthErrorUnimplemented.
/// @note: This operation is supported only on iOS, tvOS and Android
/// platforms. On other platforms this method will return a Future with a
/// preset error code: kAuthErrorUnimplemented.
public System.Threading.Tasks.Task<SignInResult> LinkWithProviderAsync(
FederatedAuthProvider provider) {
ThrowIfNull();
Expand Down
2 changes: 1 addition & 1 deletion crashlytics/src/IOSImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal struct Frame
}


// Stub implementation that is not used on iOS.
// Stub implementation that is not used on iOS or tvOS.
internal class AndroidImpl : Impl {}

//TODO(b/112043008): These extern symbols aren't available for Android builds.
Expand Down
2 changes: 1 addition & 1 deletion crashlytics/src/Metadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Firebase.Crashlytics {
/// Represents the Unity-specific metadata object that is transformed into JSON.
///
/// Metadata keys are acronyms to save space as there are limits to the maximum size of Keys in
/// the Android and iOS SDK.
/// the Android, iOS and tvOS SDKs.
/// </summary>
internal class Metadata {
// unityVersion: Version of Unity Engine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ void InitializeFirebase() {
// End our session when the program exits.
void OnDestroy() { }

// Causes an error that will crash the app at the platform level (Android or iOS)
// Causes an error that will crash the app at the platform level (Android,
// iOS or tvOS)
public void ThrowUncaughtException() {
DebugLog("Causing a platform crash.");
throw new InvalidOperationException("Uncaught exception created from UI.");
Expand Down
6 changes: 3 additions & 3 deletions database/src/Query.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public Query EqualTo(bool value) {
/// Create a query constrained to only return the child node with the given key and value.
/// Note that there is at most one such child as names are unique. <br />
/// <br />
/// <b>Known issue</b> This currently does not work properly on iOS. Please use
/// <b>Known issue</b> This currently does not work properly on iOS and tvOS. Please use
/// EqualTo(string value) instead.
/// </remarks>
/// <param name="value">The value to query for</param>
Expand All @@ -368,7 +368,7 @@ public Query EqualTo(string value, string key) {
/// Create a query constrained to only return the child node with the given key and value.
/// Note that there is at most one such child as keys are unique. <br />
/// <br />
/// <b>Known issue</b> This currently does not work properly on iOS. Please use
/// <b>Known issue</b> This currently does not work properly on iOS and tvOS. Please use
/// EqualTo(double value) instead.
/// </remarks>
/// <param name="value">The value to query for</param>
Expand All @@ -385,7 +385,7 @@ public Query EqualTo(double value, string key) {
/// Create a query constrained to only return the child node with the given key and value.
/// Note that there is at most one such child as keys are unique. <br />
/// <br />
/// <b>Known issue</b> This currently does not work properly on iOS. Please use
/// <b>Known issue</b> This currently does not work properly on iOS and tvOS. Please use
/// EqualTo(bool value) instead.
/// </remarks>
/// <param name="value">The value to query for</param>
Expand Down
9 changes: 7 additions & 2 deletions docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ Firebase Unity SDK
==================

The Firebase Unity SDK provides Unity packages for the following Firebase
features on *iOS* and *Android*:
features on *iOS*, *tvOS* and *Android*.

Note: Firebase Dynamic Links is not supported on tvOS.

| Feature | Unity Package |
|:----------------------------------:|:---------------------------------:|
Expand Down Expand Up @@ -67,8 +69,11 @@ Support

Release Notes
-------------
### Upcoming Release
### 10.4.0
- Changes
- Firebase introduces Unity SDK support for tvOS, for Analytics,
Authentication, Crashlytics, Database, Firestore, Cloud Functions,
Installations, Messaging, Remote Config and Storage.
- Analytics: Added `SetConsent()` and `GetSessionIdAsync()` APIs.
- Crashlytics: Added `ReportUncaughtExceptionsAsFatal` property and `LogExceptionAsFatal` API.

Expand Down
4 changes: 2 additions & 2 deletions firestore/src/swig/firestore.i
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ static void SWIG_CSharpSetPendingExceptionFirestore(const char* msg) {
// Important: `invalid_argument` is a subclass of `logic_error` -- make sure
// they are checked in order from most to least derived.
//
// The catch-all clause is to work around iOS issues where some exception types
// aren't getting caught correctly.
// The catch-all clause is to work around iOS and tvOS issues where some
// exception types aren't getting caught correctly.
%exception {
try {
$action
Expand Down
2 changes: 1 addition & 1 deletion installations/src/swig/installations.i
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static CppInstanceManager<Installations> g_installations_instances;
/// `Installations` if required.
///
/// @param[in] app The `App` to create an `Installations` object from. On
/// **iOS** this must be the default Firebase `App`.
/// **iOS and tvOS** this must be the default Firebase `App`.
///
/// @returns Installations object if successful, null otherwise.
public static FirebaseInstallations GetInstance(FirebaseApp app) {
Expand Down
26 changes: 13 additions & 13 deletions messaging/src/swig/messaging.i
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ void* NotificationCopyAndroidNotificationParams(void* notification) {
/// If this setting is enabled, it triggers the token registration refresh
/// immediately. This setting is persisted across app restarts and overrides
/// the setting "firebase_messaging_auto_init_enabled" specified in your
/// Android manifest (on Android) or Info.plist (on iOS).
/// Android manifest (on Android) or Info.plist (on iOS and tvOS).
///
/// <p>By default, token registration during initialization is enabled.
///
Expand All @@ -431,7 +431,7 @@ void* NotificationCopyAndroidNotificationParams(void* notification) {
/// @endcode
/// @endif
///
/// or on iOS to your Info.plist:
/// or on iOS or tvOS to your Info.plist:
///
/// @if NOT_DOXYGEN
/// <key>FirebaseMessagingAutoInitEnabled</key>
Expand Down Expand Up @@ -847,8 +847,8 @@ void* NotificationCopyAndroidNotificationParams(void* notification) {
// The following docs are all here instead of the header due to b/35780150.

%csmethodmodifiers firebase::messaging::Notification::title "
/// Indicates notification title. This field is not visible on iOS phones
/// and tablets.
/// Indicates notification title. This field is not visible on tvOS, iOS
/// phones and tablets.
public"

%csmethodmodifiers firebase::messaging::Notification::body "
Expand All @@ -865,13 +865,13 @@ void* NotificationCopyAndroidNotificationParams(void* notification) {
/// Supports default, or the filename of a sound resource bundled in the
/// app.
///
/// Android sound files must reside in /res/raw/, while iOS sound files
/// can be in the main bundle of the client app or in the Library/Sounds
/// folder of the app’s data container.
/// Android sound files must reside in /res/raw/, while tvOS and iOS sound
/// files can be in the main bundle of the client app or in the
/// Library/Sounds folder of the app’s data container.
public"

%csmethodmodifiers firebase::messaging::Notification::badge "
/// Indicates the badge on the client app home icon. iOS only.
/// Indicates the badge on the client app home icon. iOS and tvOS only.
public"

%csmethodmodifiers firebase::messaging::Notification::tag "
Expand All @@ -892,13 +892,13 @@ void* NotificationCopyAndroidNotificationParams(void* notification) {
/// On Android, if this is set, an activity with a matching intent filter is
/// launched when user clicks the notification.
///
/// If set on iOS, corresponds to category in APNS payload.
/// If set on iOS or tvOS, corresponds to category in APNS payload.
public"

%csmethodmodifiers firebase::messaging::Notification::body_loc_key "
/// Indicates the key to the body string for localization.
///
/// On iOS, this corresponds to \"loc-key\" in APNS payload.
/// On iOS and tvOS, this corresponds to \"loc-key\" in APNS payload.
///
/// On Android, use the key in the app's string resources when populating this
/// value.
Expand All @@ -908,7 +908,7 @@ void* NotificationCopyAndroidNotificationParams(void* notification) {
/// Indicates the string value to replace format specifiers in body string
/// for localization.
///
/// On iOS, this corresponds to \"loc-args\" in APNS payload.
/// On iOS and tvOS, this corresponds to \"loc-args\" in APNS payload.
///
/// On Android, these are the format arguments for the string resource. For
/// more information, see [Formatting strings][1].
Expand All @@ -920,7 +920,7 @@ void* NotificationCopyAndroidNotificationParams(void* notification) {
%csmethodmodifiers firebase::messaging::Notification::title_loc_key "
/// Indicates the key to the title string for localization.
///
/// On iOS, this corresponds to \"title-loc-key\" in APNS payload.
/// On iOS and tvOS, this corresponds to \"title-loc-key\" in APNS payload.
///
/// On Android, use the key in the app's string resources when populating this
/// value.
Expand All @@ -930,7 +930,7 @@ void* NotificationCopyAndroidNotificationParams(void* notification) {
/// Indicates the string value to replace format specifiers in title string
/// for localization.
///
/// On iOS, this corresponds to \"title-loc-args\" in APNS payload.
/// On iOS and tvOS, this corresponds to \"title-loc-args\" in APNS payload.
///
/// On Android, these are the format arguments for the string resource. For
/// more information, see [Formatting strings][1].
Expand Down

0 comments on commit c361b8c

Please sign in to comment.