Apple wallet card

Hi there, I'm using php to create a qr code card for your apple wallet. Hereby I'm using this package: https://github.com/chiiya/laravel-passes Currently I got this far, that it creates a temporary directory filled with the needed files, including: icon.png, logo.png, manifest.json, pass.json and a signature file. After that temp directory gets created it creates a .pkpass file. Which will be downloaded to your system using an anchor tag button with controller method behind. For some reason on my iPhone I can only download it as file (the .pkpass file) and not as an actual wallet card. Any idea what is going wrong?

`public function createApplePass(Request $request) { // phpinfo(); $uniqueId = uniqid();

    $pass = new GenericPass([
        'serialNumber' => $uniqueId,
        'description' => 'Card',
        'organizationName' => '****',
        'passTypeIdentifier' => '****',
        'teamIdentifier' => '****',
    ]);

    $barcode = new Barcode([
        'format' => 'PKBarcodeFormatQR',
        'message' => 'https://my-app.app/sample-url',
        'messageEncoding' => 'iso-8859-1',
    ]);

    $pass->barcodes = [$barcode];
    $pass->backgroundColor = 'rgb(0, 100, 255)';
    $pass->labelColor = 'rgb(255, 255, 255)';

    $logoPath = storage_path('app/public/img/layout/logo.png');

    if (file_exists($logoPath) && mime_content_type($logoPath) === 'image/png') {
        $pass->addImage(new Image($logoPath, ImageType::ICON, 1));
        $pass->addImage(new Image($logoPath, ImageType::LOGO, 1));
    } else {
        throw new \Exception('Icon and logo images must exist at ' . $logoPath . ' and be valid PNG files.');
    }
    // $this->builder->apple()->create($pass);
    // $signedPass = $this->builder->apple()->create($pass);

    $factory = new PassFactory();

    $factory->setCertificate(config('passes.apple.certificate'));
    $factory->setPassword(config('passes.apple.password'));
    $factory->setWwdr(config('passes.apple.wwdr'));
    $factory->setOutput(config('passes.apple.disk'));
    // dd(config('passes.apple.disk'));
    $factory->create($pass, $uniqueId);
    // dd($factory);
    // return redirect()->back();
    return response()->make($pass, 200, [
        'Content-Type' => 'application/vnd.apple.pkpass',
        'Content-Disposition' => 'attachment; filename="'.$uniqueId.'.pkpass"',
    ]);
}
Apple wallet card
 
 
Q