iosswiftios-universal-links

How to download a 3D model from a web site and load content into iOS app using Swift


Can someone explain the process involved to allows users of my app to visit a web site using Safari to download 3D models and subsequently launch the app for the users to view the models. I am currently working with Scenekit to visualise 3D models that have been pre-loaded at build time, however I would like users to be able to access 3D files dynamically after they have uploaded them to my website. After some initial research, I believe Universal links may direct me in the right direction, however I cannot find a suitable source that supports downloading files using these links. An example of the desired functionality is below (screenshot taken from another app).

  1. The user visits the website and downloads the 3D model.

    enter image description here

  2. After pressing the download button, an alert pops up and allows the user to launch the app. In doing so, the 3D model is downloaded into the app.

    enter image description here


Solution

  • You can use for it Universal Links, or Deeplink. iOS will detect this action and offer to you open in app. But remember, app MUST be installed on your device, otherwise it goes to AppStore to find your app.

    So u can put into download URL your 3D model and send it by Universal Link.

    Here is documentation from Apple how to use it.

    https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content