Plugin Architecture Implementation for Mobile App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Plugin Architecture Implementation for Mobile App
Complex
from 2 weeks to 3 months
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Plugin Architecture Implementation for Mobile Apps

Plugin architecture—step beyond modularity. Modular apps have all modules known at compile time, assembled into single binary. Plugin architecture allows app parts to be added, replaced, or updated independently from the main app—sometimes at runtime.

Not always needed. Specific scenarios: platform app with partner extensions, super app where mini-programs are plugins, corporate MDM system where client-company adds modules.

How It Works on Android

Android enables dynamic code loading via DexClassLoader. Plugin is APK or DEX file loaded at runtime:

val pluginApkPath = File(context.filesDir, "plugin-v2.apk").absolutePath
val classLoader = DexClassLoader(
    pluginApkPath,
    context.codeCacheDir.absolutePath,
    null,
    context.classLoader
)
val pluginClass = classLoader.loadClass("com.plugin.FeatureImpl")
val plugin = pluginClass.getDeclaredConstructor().newInstance() as PluginContract
plugin.initialize(pluginContext)

PluginContract interface implemented by plugin. Main app knows only the interface, not implementation. Plugin downloaded from server, verified by digital signature (JarVerifier or custom via SHA-256), placed in filesDir, loaded.

Google Play Integrity API verifies downloaded plugin wasn't replaced. IntegrityManager.requestIntegrityToken() before plugin load confirms request integrity.

Limitation. App Store (iOS) forbids dynamic executable code loading—guideline 2.5.2. On iOS, plugin architecture means either compile-time plugins (all known at build, connected via protocols) or interpreted content (JavaScript via JavaScriptCore, Lua, WebAssembly)—not native code, doesn't violate guidelines.

iOS: Plugins via Protocols and JavaScriptCore

iOS dynamic plugin code loading impossible without jailbreak. But plugin architecture implementable via:

1. Protocol-based compile-time plugins. Each plugin is Swift Package implementing PluginProtocol. App compiles with all plugins, activates needed ones via config. Plugins isolated through modules, host API access only through protocol.

2. JavaScriptCore as runtime. Plugin is JavaScript file downloaded from server, executed via JSContext. Host registers native functions as JS objects: context["nativeAPI"] = nativeAPI as AnyObject. Execution speed acceptable for business logic, unacceptable for rendering. This is how WeChat mini-programs and some super apps work.

3. WebAssembly. iOS 14+ WKWebView runs WASM via JavaScript engine. Plugin compiles to WASM (from C++, Rust, AssemblyScript), runs in isolated environment. Native code interaction via WASM imports/exports.

Plugin Versioning and Compatibility

Hardest plugin architecture part—not code loading, but compatibility management. App v2.5 must run plugin written for v2.0 API, not crash on v2.6 plugin expecting non-existent API.

Solution—explicit contract versioning. PluginContract has minHostVersion and targetHostVersion. On plugin load, host checks compatibility before initialize(). Obsolete API versions marked @Deprecated, supported for two major versions.

Case study. Corporate retail super app: main app—authorization, navigation, common UI. Plugins: StockPlugin (inventory), CRMPlugin (customer management), AnalyticsPlugin (dashboards). Each developed by separate team, loaded via MDM on employee first launch. Android: DexClassLoader with signature verification. iOS: compile-time plugins via local SPM packages, activation via feature flags. Plugin update—without main app update in Google Play (via custom distribution server for corporate devices).

Timeline

System Type Estimated Timeline
Compile-time plugin system (iOS + Android) 8–14 weeks
Runtime plugin system (Android) + JS plugins (iOS) 4–7 months
Full platform with plugin marketplace 8–14 months

Pricing determined individually. Plugin architecture solves complex platforms; for standard products it's excessive and complicates development without benefit.