Skip to content

Update platform support for iOS and Android - #2860

Open
xymus wants to merge 7 commits into
nitlang:masterfrom
xymus:update-platforms
Open

Update platform support for iOS and Android#2860
xymus wants to merge 7 commits into
nitlang:masterfrom
xymus:update-platforms

Conversation

@xymus

@xymus xymus commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Update Android support for a more recent Android SDK and NDK along with the newer gradle wrapper and plugin. These align with the updated versions in the recent docker changes from #2857.

Update iOS deployment target to the minimum accepted by the App Store and fix a warning on mismatching bundle identifiers.

For bdwgc support, update both platforms to use the atomics built in the C compilers, use the new library name, and fix an issue with the iOS shared cache triggering registering too many roots.

xymus added 3 commits August 10, 2026 15:33
Bump the Android Gradle plugin from 3.0.0 to 7.4.2 for compatibility
with the docker that now has Java 17 and the Gradle wrapper 7.6.4. Replace the
defunct jcenter repository with mavenCentral. Pin ndkVersion so builds use the
NDK installed by the docker image instead of downloading the plugin's
default NDK. Finally, drop the gcc toolchain argument as GCC was removed from
the NDK in r18.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Use the number of minutes since epoch as the version code. This is
usually the 3rd element of the app version tuple.

This format fits in the 32 bit integer expected by the Android toolchain.

We need to be careful for already published apps as newly generated
version code will be lower than previous ones. Bumping the minor
version should avoid this problem.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Build with -DGC_BUILTIN_ATOMIC so bdwgc uses C11 atomics instead of the
no-longer-fetched libatomic_ops headers, and drop the libatomic_ops
include path on iOS. The CMake library target was renamed from 'gc-lib'
to 'gc' in bdwgc 8.x.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

Test Results

    67 files     337 suites   16m 31s ⏱️
14 236 tests 13 689 ✅ 547 💤 0 ❌
14 627 runs  14 063 ✅ 564 💤 0 ❌

Results for commit 39b9aba.

♻️ This comment has been updated with latest results.

xymus added 4 commits August 11, 2026 14:45
Declare android_api_min 23 in the platform module so all Android apps
inherit the requirement, and use the same value as the toolchain
default when no annotation is present. The NDK r25 compiles for
at least API 19, and bdwgc has known issues with thread management
before API 23.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Xcodes 26 require a deployment target of 12.0, and the App Store
already requires 13.0. Bump it widely to 13.0 to cover both.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
On iOS, bdwgc registers the writable data segment of every loaded dyld
image as a GC root. The iOS shared cache holds too many such
ranges for MAX_ROOT_SETS, so registration overflows and the app aborts
at startup with 'Too many root sets'.

Only images from the app bundle hold Nit objects, so install a
GC_register_has_static_roots_callback that keeps only images whose path
contains '.app/'. This is scoped to Apple mobile devices only.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Xcode warns when the CFBundleIdentifier of the Info.plist differs from
the build setting, which was left empty. Both now come from the same
`app_project.namespace`.

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
@xymus
xymus force-pushed the update-platforms branch from ffa0935 to 39b9aba Compare August 11, 2026 18:48
@xymus
xymus requested a review from privat August 17, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant