Skip to content

Commit e333327

Browse files
committed
adds asset link
1 parent 70aef99 commit e333327

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
use Illuminate\Http\Request;
6+
7+
class ApplinksController extends Controller
8+
{
9+
public function assetLinks()
10+
{
11+
$array = [
12+
[
13+
'relation' => [
14+
'delegate_permission/common.handle_all_urls',
15+
],
16+
'target' => [
17+
'namespace' => 'android_app',
18+
'package_name' => config('nativephp.app_id'),
19+
'sha256_cert_fingerprints' => [
20+
config('services.certFingerprint'),
21+
],
22+
],
23+
],
24+
];
25+
26+
return response()->json('[
27+
{
28+
"relation": [
29+
"delegate_permission/common.handle_all_urls"
30+
],
31+
"target": {
32+
"namespace": "android_app",
33+
"package_name": "com.nativephp.kitchensinkapp",
34+
"sha256_cert_fingerprints": [
35+
"D3:C4:F7:5E:B2:3C:95:90:89:BE:CB:47:0B:B2:9F:40:A5:22:6B:03:A3:C9:1D:B2:8B:B6:1F:06:87:C8:86:AA"
36+
]
37+
}
38+
}
39+
]', headers: ['Content-Type' => 'application/json']);
40+
}
41+
42+
public function appSiteAssociation()
43+
{
44+
return response()->json([
45+
'applinks' => [
46+
'details' => [
47+
[
48+
'appIDs' => [config('services.apple.app_id')],
49+
'paths' => ['*'],
50+
],
51+
],
52+
],
53+
'webcredentials' => [
54+
'apps' => [config('services.apple.webcredentials')],
55+
],
56+
]);
57+
}
58+
}
File renamed without changes.

routes/web.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
use App\Features\ShowAuthButtons;
4+
use App\Http\Controllers\ApplinksController;
45
use App\Http\Controllers\Auth\CustomerAuthController;
56
use App\Http\Controllers\CustomerLicenseController;
67
use App\Http\Controllers\CustomerSubLicenseController;
@@ -139,3 +140,6 @@
139140
Route::patch('licenses/{licenseKey}/sub-licenses/{subLicense}/suspend', [CustomerSubLicenseController::class, 'suspend'])->name('licenses.sub-licenses.suspend');
140141
Route::post('licenses/{licenseKey}/sub-licenses/{subLicense}/send-email', [CustomerSubLicenseController::class, 'sendEmail'])->name('licenses.sub-licenses.send-email');
141142
});
143+
144+
145+
Route::get('.well-known/assetlinks.json', [ApplinksController::class, 'assetLinks']);

0 commit comments

Comments
 (0)