dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.28k stars 1.76k forks source link

Spect API For IOS Wallet and Android Wallet Maui Essentials #1890

Closed davidbuckleyni closed 3 months ago

davidbuckleyni commented 3 years ago

Summary

Please provide an api to manage adding in facility to add to ios wallet and andriod wallet in an easier manor.

API Changes

AddToWalletAsync(string JSONPayLoad) UpdateWallAsync(string JsonPayLoad)

Their should be some Kind of Initial Config

Maui.IOS.CardServices.Wallet.Init(); Maui.Andriod.CardServices.Wallet.Init();

Ios should use the Underlaying PassKit

e.g.

When the developer wishes to add a item to the wallet it should be able to send the paylod the json file should have something like the following or model

ThumbNail Description BarCode Image JsonUrl

For Example

The object would be like

     public WalletService()
     {
       PassGenerator passGenerator;
        passGenerator = new PassGenerator();
      }

      public PassGeneratorRequest GetPassRequest(SomeViewModel viewModel) 
     {

        PassGeneratorRequest request = new PassGeneratorRequest();
        request.PassTypeIdentifier = "pass.covidCerti.db";
        request.TeamIdentifier = "RW121242";
        request.SerialNumber = "121212";
        request.Description = "My first pass";
        request.OrganizationName = "Tomas McGuinness";
        request.LogoText = "My Pass";
        request.BackgroundColor = "#FFFFFF";
        request.LabelColor = "#000000";
        request.ForegroundColor = "#000000";
        request.BackgroundColor = "rgb(255,255,255)";
        request.LabelColor = "rgb(0,0,0)";
        request.ForegroundColor = "rgb(0,0,0)";
        request.AddBarcode(BarcodeType.PKBarcodeFormatPDF417, "01927847623423234234", "ISO-8859-1", "01927847623423234234")
 return request;
  }

 public void GereneratePassFile(Passgenerator gen)
 {
  /// do some code make it compatible with ios or android
  }

We would have a function for example that would

        byte[] generatedPass = passGenerator.Generate(request);

Gerenrate a pass based on ios / andriod watch os and prsent the wallet to the user their would be a push element.

 NaivationItem Current = await passGenerator.PushWallet(); // again this would push to google play wallet or apple wallet depending on the use case.

Intended Use Case

This is to allow the wave of coivd passport applications and various apps to install and maintain wallets very easy their should also be a way of forcing the expiry of the pass every 30 days until the person re signs into the given app.

ghost commented 2 years ago

We've moved this issue to the Future milestone. This means that it is not going to be worked on for the coming release. We will reassess the issue following the current release and consider this item at that time.

jfversluis commented 3 months ago

This has seen no traction for years so I don't think this will happen anytime soon. Probably good for a third-party library if anyone is willing and able!