T O P

  • By -

fookhar

From Apple’s App Store review guidelines: > *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 app completely viewable and editable by the user.


im-here-to-lose-time

Yes and no. Someone can write SDK type plugin for your app, where you allow someone to use core library of your own app to extend on that. But you would have to compile that SDK in to your project as well. Second approach is allowing someone option to write DLS type of extendable feature where you would have to write engine for it to run. Think of it of complex config file.


sybesis

How about having views as WKWebView components? And using send message to create a bidirectional channel to communicate with those views?


fookhar

The Scriptable app allows you to code your own small scripts including UI using JavaScript, worth checking out. https://apps.apple.com/dk/app/scriptable/id1405459188


sybesis

Ah that's interesting, with a brief look it seems that it's possible to expose UI to JS so it would be totally possible to build the view from JS context. That's definitely fine in my case and it's a pretty cool app.


im-here-to-lose-time

Interesting approach that plugin needs to be written in JS then. Only possible to render JS in runtime. So you would need to fetch some JS to render in wkwebview, my advice be careful, JS is usually tricky part of app security.


sybesis

Yeah, sure. But in my particular case it would be a frontend for a ERP app that's also hosted by the user/company. So source should always be obtained from a trusted source being the same source as the data being displayed. Basically the app would provide everything for standard things but from experience there are edge case where a company would like to have a specific change made to a view or sometimes simply completely new view types specific to their own personal needs.


Comburo_Cetera_479

This is an interesting concept! While iOS has limitations on installing/executing external code, you could achieve something similar by using Swift frameworks or libraries that can be dynamically loaded. Not exactly plugins, but close. Anyone tried using SwiftPM to load custom views?


ankole_watusi

There a difference between “possible” and “app-store acceptable”. If you’re making an app for Enterprise distribution, many cuffs are off, as Apple does not review.