Is it possible for a macOS app to download and run a swiftUI view file?

My app will have a concept of "packs" and the lessons inside the packs are interactive music learning experiences interacting with midi instruments (not always, only if the user has one, otherwise they can click around the virtual instrument on the UI).

I want to build it in a way that users download each one as if it was a Swift Playgrounds book. This would allow for a leaner app and not having a huge binary.

Constraints:
  • App will be served on the app store

Related:
  • I think I could achieve this using json config and having already views in the app that read the config and render the correct UI flow

  • I also saw this gist that runs from the cli and got intriguided

Is this possible and allowed for apps in the App Store?

Cheers for any replies.
Answered by OOPer in 664590022

Constraints:

  • App will be served on the app store

You may need to re-check the App Review Guidelines, especially this part:

2.5 Software Requirements

2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code which introduces or changes features or functionality of the app, including other apps. Educational apps designed to teach, develop, or allow students to test executable code may, in limited circumstances, download code provided that such code is not used for other purposes. Such apps must make the source code provided by the Application completely viewable and editable by the user.

Your app would be considered to be an educational app, but not designed to teach, develop, or allow students to test executable code.

So, download and run a swiftUI view file would never be approved whether it is in a source file or some sort of compiled binary.

If you can represent your packs in other format (for example, HTML & JavaScript), your app can be considered to be sort of packs player, and may have some chance to be approved. Sorry, just my opinion.
Accepted Answer

Constraints:

  • App will be served on the app store

You may need to re-check the App Review Guidelines, especially this part:

2.5 Software Requirements

2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code which introduces or changes features or functionality of the app, including other apps. Educational apps designed to teach, develop, or allow students to test executable code may, in limited circumstances, download code provided that such code is not used for other purposes. Such apps must make the source code provided by the Application completely viewable and editable by the user.

Your app would be considered to be an educational app, but not designed to teach, develop, or allow students to test executable code.

So, download and run a swiftUI view file would never be approved whether it is in a source file or some sort of compiled binary.

If you can represent your packs in other format (for example, HTML & JavaScript), your app can be considered to be sort of packs player, and may have some chance to be approved. Sorry, just my opinion.
I agree with that and was aware. Hence why I came to ask this question and see if there is any Apple framework I am not aware of, or an approach that fits.

My first approach was indeed to use html & javascript but I am tending towards native to keep the experience the same across the app and because I won't have to "interop" between the JS world and native world for audio and midi calls.

Thanks for confirming some assumptions though.
Is it possible for a macOS app to download and run a swiftUI view file?
 
 
Q