Skip to content

Commit

Permalink
Add apple domain association
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Dec 24, 2023
1 parent 93a3e8d commit 3e864c7
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 13 deletions.
27 changes: 17 additions & 10 deletions ProjectTemplates/ShinyAspNet/.template.config/ide.host.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,65 +28,72 @@
{
"id": "push",
"name": {
"text": "Push Notification Management (Shiny.Extensions.Push)"
"text": "Add Push Notification Management (Shiny.Extensions.Push)"
},
"isVisible": true
},
{
"id": "email",
"name": {
"text": "Email Templating (Shiny.Extensions.Email)"
"text": "Add Email Templating (Shiny.Extensions.Email)"
},
"isVisible": true
},
{
"id": "signalr",
"name": {
"text": "SignalR"
"text": "Add SignalR"
},
"isVisible": true
},
{
"id": "google",
"name": {
"text": "Google Authentication"
"text": "Add Google Authentication"
},
"isVisible": true
},
{
"id": "facebook",
"name": {
"text": "Facebook Authentication"
"text": "Add Facebook Authentication"
},
"isVisible": true
},
{
"id": "apple",
"name": {
"text": "Apple Authentication"
"text": "Add Apple Authentication"
},
"isVisible": true
},
{
"id": "mobileauth",
"name": {
"text": "Mobile Authentication Endpoints"
"text": "Add Mobile Authentication Endpoints"
},
"isVisible": true
},
{
"id": "orleans",
"name": {
"text": "Microsoft Orleans"
"text": "Add Microsoft Orleans"
},
"isVisible": true
},
{
"id": "swagger",
"name": {
"text": "Swagger"
"text": "Add Swagger"
},
"isVisible": true
}
},
{
"id": "appledomain",
"name": {
"text": "Include Apple Domain Association Fil"
},
"isVisible": true
}
]
}
15 changes: 13 additions & 2 deletions ProjectTemplates/ShinyAspNet/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"datatype": "bool",
"defaultValue": "true",
"description": "Microsoft Orleans",
"displayName": "Microsoft Orleans"
"displayName": "Microsoft Orleans"
},
"swagger": {
"type": "parameter",
Expand All @@ -125,6 +125,13 @@
"description": "Swagger",
"displayName": "Swagger"
},
"appledomain": {
"type": "parameter",
"datatype": "bool",
"defaultValue": "true",
"description": "Include Apple Domain Association File",
"displayName": "Include Apple Domain Association File"
},
"efsql":{
"type": "computed",
"datatype": "bool",
Expand All @@ -151,7 +158,11 @@
{
"condition": "(orleans == false)",
"exclude": "Grains/**"
},
},
{
"condition": "(appledomain == false)",
"exclude": "wwwroot/**"
},
{
"condition": "(signalr == false)",
"exclude": "Hubs/**"
Expand Down
14 changes: 13 additions & 1 deletion ProjectTemplates/ShinyAspNet/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
{
ep.PostProcessors(Order.After, new EmptyResponseGlobalPostProcessor());
});
app.UseExceptionHandler();
// app.UseExceptionHandler();

//#if (signalr)
app.MapHub<BizHub>("/biz");
Expand All @@ -174,6 +174,7 @@
.AllowAnyHeader()
.AllowAnyMethod()
.AllowAnyOrigin()
// .WithOrigins("https://localhost:1234")
//.AllowCredentials()
);
#endif
Expand Down Expand Up @@ -201,5 +202,16 @@
});
#endif
}
#if (appledomain)
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(
Path.Combine(Directory.GetCurrentDirectory(), "wwwroot/.well-known")
),
RequestPath = "/.well-known",
ServeUnknownFileTypes = true,
DefaultContentType = "text/plain"
});
#endif

app.Run();
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"applinks": {
"details": [{
"appIDs": [ "ABCDE12345.com.example.app", "ABCDE12345.com.example.app2" ],
"components": [{
"#": "no_universal_links",
"exclude": true,
"comment": "Matches any URL with a fragment that equals no_universal_links and instructs the system not to open it as a universal link."
},{
"/": "/buy/*",
"comment": "Matches any URL with a path that starts with /buy/."
},{
"/": "/help/website/*",
"exclude": true,
"comment": "Matches any URL with a path that starts with /help/website/ and instructs the system not to open it as a universal link."
},{
"/": "/help/*",
"?": { "articleNumber": "????" },
"comment": "Matches any URL with a path that starts with /help/ and that has a query item with name 'articleNumber' and a value of exactly four characters."
}]
}]
},
"webcredentials": {
"apps": [ "ABCDE12345.com.example.app" ]
},
"appclips": {
"apps": ["ABCED12345.com.example.MyApp.Clip"]
}
}

0 comments on commit 3e864c7

Please sign in to comment.