Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #157 from membraneframework/MV-377-deeplink-static…
Browse files Browse the repository at this point in the history
…-files

[MV-377] Static files for deeplinks on mobile
  • Loading branch information
bblaszkow06 authored Mar 17, 2023
2 parents 4883f3d + bfa4212 commit 8a7ec72
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .formatter.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
".formatter.exs",
"*.exs"
],
import_deps: [:membrane_core, :ecto, :ecto_sql]
import_deps: [:membrane_core, :ecto, :ecto_sql, :phoenix]
]
20 changes: 9 additions & 11 deletions lib/videoroom_web/endpoint.ex
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
defmodule VideoRoomWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :membrane_videoroom_demo

socket("/socket", VideoRoomWeb.UserSocket,
socket "/socket", VideoRoomWeb.UserSocket,
websocket: true,
longpoll: false
)

plug(Plug.Static,
plug Plug.Static,
at: "/",
from: :membrane_videoroom_demo,
brotli: true,
gzip: true,
only: ~w(assets images html svg robots.txt favicon.ico)
)
content_types: %{"apple-app-site-association" => "application/json"},
only: ~w(.well-known assets images html svg robots.txt favicon.ico)

if code_reloading? do
socket("/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket)
plug(Phoenix.LiveReloader)
plug(Phoenix.CodeReloader)
socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
plug Phoenix.LiveReloader
plug Phoenix.CodeReloader
end

plug(Plug.Parsers,
plug Plug.Parsers,
parsers: [
:urlencoded,
:multipart,
Expand All @@ -29,7 +28,6 @@ defmodule VideoRoomWeb.Endpoint do
],
pass: ["*/*"],
json_decoder: Phoenix.json_library()
)

plug(VideoRoomWeb.Router)
plug VideoRoomWeb.Router
end
13 changes: 13 additions & 0 deletions priv/static/.well-known/apple-app-site-association
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"applinks": {
"apps": [],
"details": [
{
"appID": "J5FM626PE2.com.membrane.reactnativemembrane",
"paths": [
"*"
]
}
]
}
}
12 changes: 12 additions & 0 deletions priv/static/.well-known/assetlinks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.membrane.reactnativemembrane",
"sha256_cert_fingerprints": [
"75:28:D4:3A:DE:86:B8:AA:B5:72:1A:0B:6E:9D:37:CF:A9:F5:C0:D1:AE:C5:8A:D1:A7:D8:73:91:4B:20:5A:E4"
]
}
}
]

0 comments on commit 8a7ec72

Please sign in to comment.