AL+

Language: RO (română) EN (English)

Email us: paul@alplustech.com

Swift on Android starts with a library boundary

The official Swift Android SDK supports a reuse decision. Define the domain library, JNI boundary and platform owners before estimating a whole app port.

Citiți articolul în română

The useful first question about Swift on Android is which behavior deserves one implementation. A shared language can make reuse credible, but it does not assign responsibility for screens, lifecycle or platform services. Technical leaders should evaluate a bounded domain library before turning an SDK announcement into an estimate for an entire application. The unit of evaluation should have an explicit interface and an owner on each side.

Swift 6.3, released on 24 March 2026, introduced an official Swift SDK for Android. That matters as a release milestone. It is different from the 18 December 2025 exploration, which discussed nightly previews. The earlier article explains native compilation, a bundled Swift runtime and Java interoperability through JNI. It also identifies shared business logic as a prominent use case and says the workgroup is not providing a single GUI solution.

Those facts support investigating library reuse. They do not establish that an existing iPhone application can move unchanged to Android, or that a particular library already works there. The project still needs evidence about its own dependencies and platform behavior. Official availability changes the tooling question; it leaves the product boundary to the team responsible for delivery.

Choose behavior before a percentage

Start by describing the behavior that should remain identical across platforms. Domain calculations, validation rules and data transformations are possible candidates, provided their dependencies can support the target environment. A useful candidate has inputs and outputs that can be explained without a screen or operating-system callback. This is a selection criterion, not a claim that every calculation in an existing app is already isolated.

Avoid starting with a target percentage of shared code. A large shared module can carry platform assumptions that make each change expensive. A small module can still matter if it contains rules whose divergence would change a customer's result. Evaluate the responsibility being shared and the changes it will absorb. Line counts cannot tell you whether a boundary will remain understandable after both applications evolve.

Write down what stays outside the library. Android navigation, permissions and lifecycle behavior need deliberate ownership. So do the equivalent responsibilities in the iPhone application. A library can return a domain result while each platform decides how to present it and how to recover from interruption. That separation should be a product decision, rather than an accidental consequence of whichever code was easiest to move first.

Treat JNI as an interface to maintain

The December explanation places JNI between Swift and the Java/Kotlin world used by Android APIs. For a proposed library, describe what crosses that boundary and how the receiving side interprets it. Ownership includes error handling, data conversion and the lifetime of values. Automated bindings can help create an interface, but a generated surface still needs a contract that both sides can understand.

Prefer an interface organized around complete domain operations when that matches the product. Exposing every internal object can tie the Android application to implementation details that were never meant to be public. An interface that is too coarse can create different problems by hiding necessary control. The right boundary depends on the operation, its failure modes and which side must decide what happens next.

Ask who will maintain that agreement when requirements change. A Swift change can be correct within the library and still require a change in its Android consumer. Review responsibilities should therefore cover both sides of a contract change. This is a planning recommendation; it does not imply that a build, interoperability test or performance measurement has been performed for your application.

UI sharing is a separate decision

The strongest counterargument is that separate interfaces can duplicate real work. If a shared UI framework provides the behavior a product needs, using it can reduce duplication beyond the domain layer. That is a legitimate option. Rejecting UI sharing in advance would turn a sensible boundary review into a preference for a particular implementation style.

Evaluate that option against required platform behavior. Consider accessibility, navigation expectations and integration with operating-system services. The question is whether the framework fits the product's needs and maintenance model. The existence of a Swift SDK does not decide that question, and the December workgroup article explicitly avoids validating individual community GUI projects. Claims about a selected framework require separate evidence.

A whole-app approach may be reasonable where these conditions fit. A library-first evaluation remains useful because it makes the reusable responsibility explicit before a broader commitment. It also gives the team a way to reject reuse if maintaining the boundary would cost more than keeping the behavior separate. There is no obligation to maximize sharing merely because the language can target both platforms.

Make the estimate conditional

A credible proposal should identify one candidate library, its dependency questions and the people responsible for the platform integration. State what would count as acceptable behavior and which unresolved conditions could change the estimate. Keep toolchain availability separate from application compatibility. Neither a release announcement nor a preview demonstration can settle the latter for a different codebase.

AL+ offers custom software development for businesses defining those responsibilities. A useful starting brief describes the behavior that must match across platforms and the platform features that must remain distinct. Choose the shared boundary on that evidence. An SDK can make an implementation possible; a maintained agreement between the applications is what makes reuse a decision a team can own.