0

I must be going insane, but in 2022, I still can't figure out how to allow my iOS app to let other apps share X, Y or Z types of files to it (in particular STL/OBJ model files).

In other words, I go into Files app, find a .stl file, tap Share then my app shows up as a destination. Either it's simply not possible or Apple's documentation around it is extremely hard to find.

Can anyone point me in the right direction or crush my hopes and dreams?

I know of another app that can accept STL/OBJ 3D models but I have no idea how they managed to get their app to show up in the standard Share sheet.

Nick Bedford
  • 4,365
  • 30
  • 36
  • https://developer.apple.com/documentation/uniformtypeidentifiers/defining_file_and_data_types_for_your_app – Paulw11 Jun 10 '22 at 01:15

1 Answers1

0

As is usual with my on Stack Overflow, I solve my problem half an hour later after posting...

The solution is the Document Types in Info using the public.3d-content type to denote files including STL and OBJ format. This opened the app up to the Share Sheet from other apps sharing those formats.

Then I implement the func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool method on AppDelegate.

Nick Bedford
  • 4,365
  • 30
  • 36