Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions components.cake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Artifact FIREBASE_INSTALLATIONS_ARTIFACT = new Artifact ("Firebase.Ins
Artifact FIREBASE_PERFORMANCE_MONITORING_ARTIFACT = new Artifact ("Firebase.PerformanceMonitoring", "12.6.0", "15.0", ComponentGroup.Firebase, csprojName: "PerformanceMonitoring");
Artifact FIREBASE_REMOTE_CONFIG_ARTIFACT = new Artifact ("Firebase.RemoteConfig", "12.6.0", "15.0", ComponentGroup.Firebase, csprojName: "RemoteConfig");
Artifact FIREBASE_STORAGE_ARTIFACT = new Artifact ("Firebase.Storage", "12.6.0", "15.0", ComponentGroup.Firebase, csprojName: "Storage");
//Artifact FIREBASE_APP_DISTRIBUTION_ARTIFACT = new Artifact ("Firebase.AppDistribution", "8.10.0.1", "15.0", ComponentGroup.Firebase, csprojName: "AppDistribution");
Artifact FIREBASE_APP_DISTRIBUTION_ARTIFACT = new Artifact ("Firebase.AppDistribution", "12.6.0", "15.0", ComponentGroup.Firebase, csprojName: "AppDistribution");
Artifact FIREBASE_APP_CHECK_ARTIFACT = new Artifact ("Firebase.AppCheck", "12.6.0", "15.0", ComponentGroup.Firebase, csprojName: "AppCheck");

// Google artifacts available to be built. These artifacts generate NuGets.
Expand Down Expand Up @@ -64,7 +64,7 @@ var ARTIFACTS = new Dictionary<string, Artifact> {
{ "Firebase.PerformanceMonitoring", FIREBASE_PERFORMANCE_MONITORING_ARTIFACT },
{ "Firebase.RemoteConfig", FIREBASE_REMOTE_CONFIG_ARTIFACT },
{ "Firebase.Storage", FIREBASE_STORAGE_ARTIFACT },
// { "Firebase.AppDistribution", FIREBASE_APP_DISTRIBUTION_ARTIFACT },
{ "Firebase.AppDistribution", FIREBASE_APP_DISTRIBUTION_ARTIFACT },
{ "Firebase.AppCheck", FIREBASE_APP_CHECK_ARTIFACT },

{ "Google.GoogleAppMeasurement", GOOGLE_GOOGLE_APP_MEASUREMENT_ARTIFACT },
Expand Down Expand Up @@ -114,7 +114,7 @@ void SetArtifactsDependencies ()
FIREBASE_PERFORMANCE_MONITORING_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_INSTALLATIONS_ARTIFACT, FIREBASE_AB_TESTING_ARTIFACT, FIREBASE_REMOTE_CONFIG_ARTIFACT };
FIREBASE_REMOTE_CONFIG_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_INSTALLATIONS_ARTIFACT, FIREBASE_AB_TESTING_ARTIFACT };
FIREBASE_STORAGE_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_DATABASE_ARTIFACT, GOOGLE_GTM_SESSION_FETCHER_ARTIFACT /* Needed for sample FIREBASE_AUTH_ARTIFACT */ };
// FIREBASE_APP_DISTRIBUTION_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_INSTALLATIONS_ARTIFACT };
FIREBASE_APP_DISTRIBUTION_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_INSTALLATIONS_ARTIFACT };
FIREBASE_APP_CHECK_ARTIFACT.Dependencies = new [] { FIREBASE_CORE_ARTIFACT, FIREBASE_INSTALLATIONS_ARTIFACT, GOOGLE_APP_CHECK_CORE_ARTIFACT };

GOOGLE_ANALYTICS_ARTIFACT.Dependencies = null;
Expand Down Expand Up @@ -208,9 +208,9 @@ void SetArtifactsPodSpecs ()
FIREBASE_STORAGE_ARTIFACT.PodSpecs = new [] {
PodSpec.Create ("FirebaseStorage", "12.6.0", frameworkSource: FrameworkSource.Pods)
};
// FIREBASE_APP_DISTRIBUTION_ARTIFACT.PodSpecs = new [] {
// PodSpec.Create ("Firebase", "8.10.0", frameworkSource: FrameworkSource.Pods, frameworkName: "FirebaseAppDistribution", targetName: "FirebaseAppDistribution", subSpecs: new [] { "AppDistribution" })
// };
FIREBASE_APP_DISTRIBUTION_ARTIFACT.PodSpecs = new [] {
PodSpec.Create ("Firebase", "12.6.0", frameworkSource: FrameworkSource.Pods, frameworkName: "FirebaseAppDistribution", targetName: "FirebaseAppDistribution", subSpecs: new [] { "AppDistribution" })
};
FIREBASE_APP_CHECK_ARTIFACT.PodSpecs = new [] {
PodSpec.Create ("FirebaseAppCheck", "12.6.0", frameworkSource: FrameworkSource.Pods)
};
Expand Down Expand Up @@ -376,7 +376,7 @@ void SetArtifactsExtraPodfileLines ()
GOOGLE_NANOPB_ARTIFACT.ExtraPodfileLines = extraPodfileLines.ToArray ();
GOOGLE_GOOGLE_UTILITIES_ARTIFACT.ExtraPodfileLines = extraPodfileLines.ToArray ();
GOOGLE_GOOGLE_DATA_TRANSPORT_ARTIFACT.ExtraPodfileLines = extraPodfileLines.ToArray ();
// FIREBASE_APP_DISTRIBUTION_ARTIFACT.ExtraPodfileLines = dynamicFrameworkLines;
FIREBASE_APP_DISTRIBUTION_ARTIFACT.ExtraPodfileLines = extraPodfileLines.ToArray ();
// FIREBASE_APP_CHECK_ARTIFACT.ExtraPodfileLines = dynamicFrameworkLines;

var inAppMessagingWorkaround = new [] {
Expand Down Expand Up @@ -424,7 +424,7 @@ void SetArtifactsSamples ()
FIREBASE_PERFORMANCE_MONITORING_ARTIFACT.Samples = new [] { "PerformanceMonitoringSample" };
FIREBASE_REMOTE_CONFIG_ARTIFACT.Samples = new [] { "RemoteConfigSample" };
FIREBASE_STORAGE_ARTIFACT.Samples = new [] { "StorageSample" };
//FIREBASE_APP_DISTRIBUTION_ARTIFACT.Samples = new [] { "AppDistributionSample" };
FIREBASE_APP_DISTRIBUTION_ARTIFACT.Samples = null;
FIREBASE_APP_CHECK_ARTIFACT.Samples = new [] { "AppCheckSample" };

// Google components
Expand Down
10 changes: 4 additions & 6 deletions docs/Firebase/NuGet/AppDistribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ When multi-targeting, condition the package reference so it only restores for Ap

```xml
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' Or $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
<PackageReference Include="AdamE.Firebase.iOS.AppDistribution" Version="8.10.0" />
<PackageReference Include="AdamE.Firebase.iOS.AppDistribution" Version="12.6.0" />
</ItemGroup>
```

Expand All @@ -60,8 +60,6 @@ dotnet add package AdamE.Firebase.iOS.AppDistribution

This package does not itself perform Firebase app initialization; call `Firebase.Core.App.Configure()` from the app before using Firebase feature APIs.

The current binding exposes `signInTesterWithCompletion:` as `SigInTester(...)` and declares a second `SigInTester(...)` overload for the native update-check selector.

```csharp
using System;
using Firebase.Core;
Expand All @@ -72,7 +70,7 @@ var appDistribution = Firebase.AppDistribution.AppDistribution.SharedInstance;

if (!appDistribution.IsTesterSignedIn)
{
appDistribution.SigInTester(error =>
appDistribution.SignInTester(error =>
{
if (error is not null)
{
Expand All @@ -90,7 +88,7 @@ if (!appDistribution.IsTesterSignedIn)
- `AdamE.Firebase.iOS.Core` - Firebase app initialization.
- `AdamE.Firebase.iOS.Installations` - package metadata references Firebase Installations for underlying Firebase identity support.

This package currently uses the `8.10` package line in this repository. Verify compatibility carefully before combining it with Firebase packages from a different MAJOR.MINOR package line.
This package is part of the Firebase `12.6.0` package line. Firebase's `12.6.0` aggregate CocoaPods spec exposes App Distribution through `Firebase/AppDistribution`, which resolves the native `FirebaseAppDistribution` pod at `12.6.0-beta`.

## Firebase app configuration

Expand Down Expand Up @@ -127,7 +125,7 @@ Google and Firebase Apple SDKs share native dependencies. Avoid mixing multiple

## API surface notes

The public namespace is `Firebase.AppDistribution`. API names closely mirror the native Firebase App Distribution SDK surface, with the binding-specific `SigInTester(...)` overload naming noted above.
The public namespace is `Firebase.AppDistribution`. API names closely mirror the native Firebase App Distribution SDK surface.

## Repository / support

Expand Down
Binary file added icons/firebaseiosappdistribution_128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 18 additions & 14 deletions source/Firebase/AppDistribution/ApiDefinition.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
using System;
using System.Collections.Generic;

using Foundation;
using ObjCRuntime;
using UIKit;

namespace Firebase.AppDistribution
{
// (void (^)(NSError *_Nullable error))completion
delegate void ErrorHandler ([NullAllowed] NSError error);

// (void (^)(FIRAppDistributionRelease *_Nullable release, NSError *_Nullable error))completion
// (void (^)(FIRAppDistributionRelease *_Nullable_result release, NSError *_Nullable error))completion
delegate void AppDistributionReleaseHandler ([NullAllowed] AppDistributionRelease release, [NullAllowed] NSError error);

// @interface FIRAppDistribution : NSObject
Expand All @@ -25,32 +24,36 @@ interface AppDistribution
[Field ("FIRAppDistributionErrorDetailsKey", "__Internal")]
NSString ErrorDetailsKey { get; }

// + (instancetype)appDistribution
// + (instancetype)appDistribution NS_SWIFT_NAME(appDistribution());
[Static]
[Export("appDistribution")]
[Export ("appDistribution")]
AppDistribution SharedInstance { get; }

// @property(nonatomic, readonly) BOOL isTesterSignedIn;
[Export ("isTesterSignedIn")]
bool IsTesterSignedIn { get; }

// - (void)signInTesterWithCompletion: (void (^)(NSError *_Nullable error))completion
// - (void)signInTesterWithCompletion:(void (^)(NSError *_Nullable error))completion NS_SWIFT_NAME(signInTester(completion:));
[Export ("signInTesterWithCompletion:")]
void SigInTester (ErrorHandler completion);
void SignInTester (ErrorHandler completion);

// - (void)checkForUpdateWithCompletion: (void (^)(FIRAppDistributionRelease *_Nullable release, NSError *_Nullable error))completion;
// - (void)checkForUpdateWithCompletion:(void (^)(FIRAppDistributionRelease *_Nullable_result release, NSError *_Nullable error))completion NS_SWIFT_NAME(checkForUpdate(completion:));
[Export ("checkForUpdateWithCompletion:")]
void SigInTester (AppDistributionReleaseHandler completion);
void CheckForUpdate (AppDistributionReleaseHandler completion);

// - (void)signOutTester;
[Export ("signOutTester:")]
[Export ("signOutTester")]
void SignOutTester ();

// - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<NSString *, id> *)options;
[Export ("application:openURL:options:")]
bool OpenUrl (UIApplication application, NSUrl url, NSDictionary<NSString, NSObject> options);
}

// @interface FIRAppDistributionRelease : NSObject
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "FIRAppDistributionRelease")]
interface Release
interface AppDistributionRelease
{
// @property(nonatomic, copy, readonly) NSString *displayVersion;
[Export ("displayVersion")]
Expand All @@ -60,13 +63,14 @@ interface Release
[Export ("buildVersion")]
string BuildVersion { get; }

// @property(nonatomic, copy, readonly) NSString *releaseNotes;
// @property(nonatomic, nullable, copy, readonly) NSString *releaseNotes;
[NullAllowed]
[Export ("releaseNotes")]
string ReleaseNotes { get; }

// @property(nonatomic, strong, readonly) NSURL *downloadURL;
[Export ("displayVersion")]
NSURL DownloadUrl { get; }
[Export ("downloadURL")]
NSUrl DownloadUrl { get; }

// @property(nonatomic, readonly) BOOL isExpired;
[Export ("isExpired")]
Expand Down
18 changes: 8 additions & 10 deletions source/Firebase/AppDistribution/AppDistribution.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Xamarin.Legacy.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>xamarin.ios10;net6.0-ios</TargetFrameworks>
<NoNFloatUsing Condition="'$(TargetFramework)' == 'xamarin.ios10'">true</NoNFloatUsing>
<TargetFrameworks>net9.0-ios;net10.0-ios;net9.0-maccatalyst;net10.0-maccatalyst</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>true</ImplicitUsings>
<IsBindingProject>true</IsBindingProject>
<NoBindingEmbedding>true</NoBindingEmbedding>
<SupportedOSPlatformVersion>11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion>15.0</SupportedOSPlatformVersion>
<RootNamespace>Firebase.AppDistribution</RootNamespace>
<AssemblyName>Firebase.AppDistribution</AssemblyName>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>8.10.0</FileVersion>
<AssemblyVersion>12.6.0</AssemblyVersion>
<FileVersion>12.6.0</FileVersion>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CompressBindingResourcePackage>true</CompressBindingResourcePackage>
</PropertyGroup>
<PropertyGroup>
<PackageId>AdamE.Firebase.iOS.AppDistribution</PackageId>
Expand All @@ -27,7 +27,7 @@
<PackageLicenseFile>License.md</PackageLicenseFile>
<PackageReadmeFile>NUGET_README.md</PackageReadmeFile>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageVersion>8.10.0</PackageVersion>
<PackageVersion>12.6.0</PackageVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\AssemblyInfo.cs" />
Expand All @@ -43,6 +43,7 @@
<ItemGroup>
<NativeReference Include="..\..\..\externals\FirebaseAppDistribution.xcframework">
<Kind>Framework</Kind>
<Frameworks>UIKit</Frameworks>
<SmartLink>True</SmartLink>
<ForceLoad>True</ForceLoad>
<LinkerFlags>-ObjC</LinkerFlags>
Expand All @@ -54,9 +55,6 @@
<ItemGroup>
<ObjcBindingApiDefinition Include="ApiDefinition.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Build.Download" Version="0.11.0" PrivateAssets="None" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\Core.csproj" PrivateAssets="None" />
<ProjectReference Include="..\Installations\Installations.csproj" PrivateAssets="None" />
Expand Down
5 changes: 3 additions & 2 deletions source/Firebase/AppDistribution/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
namespace Firebase.AppDistribution
{
[Native]
public enum Error : uint {
public enum Error : long
{
Unknown = 0,
AuthenticationFailure = 1,
AuthenticationCancelled = 2,
NetworkFailure = 3,
}
}
}
Loading