Skip to content

tweak: RN-1770: target Android API Level 35 (Android 15)#6555

Closed
jaskfla wants to merge 4 commits intodevfrom
rn-1770-android-api-35
Closed

tweak: RN-1770: target Android API Level 35 (Android 15)#6555
jaskfla wants to merge 4 commits intodevfrom
rn-1770-android-api-35

Conversation

@jaskfla
Copy link
Copy Markdown
Contributor

@jaskfla jaskfla commented Nov 20, 2025

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @jaskfla, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the application's target Android API level to 35. This change is crucial for maintaining compatibility with the latest Android operating system (Android 15), ensuring the application can utilize new platform features, and adhering to the most recent security and privacy standards mandated by Google Play.

Highlights

  • Android API Level Update: The target Android API level for the application has been updated from 34 to 35, aligning with Android 15.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to update the Android target API level to 35 (Android 15). While updating targetSdkVersion is a good step, the compileSdkVersion has not been updated in tandem. It's crucial to align compileSdkVersion with targetSdkVersion to ensure the app is built and tested against the new platform's APIs and behavioral changes. I've added a comment to address this oversight.

minSdkVersion = 21
compileSdkVersion = 34
targetSdkVersion = 34
targetSdkVersion = 35
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While updating targetSdkVersion to 35 is correct, the compileSdkVersion on line 7 should also be updated to 35. It is a best practice to keep compileSdkVersion and targetSdkVersion at the same value. This ensures your application is compiled against the APIs of the version it targets, allowing you to handle new platform behaviors and requirements correctly. Without this change, you might encounter unexpected runtime issues on Android 15 devices.

Comment thread packages/meditrak-app/android/build.gradle
@jaskfla jaskfla force-pushed the rn-1770-android-api-35 branch from 61dc322 to 39bf35c Compare December 1, 2025 23:55
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "MediTrak"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Android component name doesn't match JavaScript registration

getMainComponentName() returns "MediTrak" but the JavaScript code in main.jsx registers the app component as 'TupaiaMediTrak'. iOS (AppDelegate.swift) correctly uses "TupaiaMediTrak". This mismatch will cause the Android app to crash on startup because React Native won't find a component with the name "MediTrak".

Fix in Cursor Fix in Web

<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
<string>armv64</string>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Invalid iOS device capability architecture value typo

The UIRequiredDeviceCapabilities key specifies armv64 which is not a valid iOS device capability. The correct value is arm64. This typo could cause App Store submission rejection or unexpected device compatibility issues.

Fix in Cursor Fix in Web

Applied all Android-related changes and some iOS-related changes
@jaskfla jaskfla force-pushed the rn-1770-android-api-35 branch from dc483fd to 3287a26 Compare February 24, 2026 02:38
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ATS keys misplaced inside NSExceptionDomains dictionary

Medium Severity

NSAllowsArbitraryLoads and NSAllowsLocalNetworking are placed inside the NSExceptionDomains dictionary, but Apple's documentation requires these keys to be direct children of the NSAppTransportSecurity dictionary. Nested inside NSExceptionDomains, they will be ignored by the system, so the intended NSAllowsLocalNetworking exception for debug builds won't take effect.

Fix in Cursor Fix in Web

// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing Bugsnag initialization in Android MainApplication

High Severity

The Java-to-Kotlin conversion of MainApplication dropped the Bugsnag.start(this) call that was in the old MainApplication.java's onCreate(). The Android manifest still declares the Bugsnag API key, but without the explicit start() call, crash reporting will be silently disabled on Android.

Fix in Cursor Fix in Web

@@ -0,0 +1,44 @@
package com.tupaia.meditrak
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kotlin package name mismatches Android namespace causing crash

High Severity

Both new Kotlin files declare package com.tupaia.meditrak, but the build.gradle namespace is "com.tupaiameditrak". The AndroidManifest uses shorthand .MainApplication and .MainActivity, which Android resolves relative to the namespace — so it will look for com.tupaiameditrak.MainApplication, but the actual class is com.tupaia.meditrak.MainApplication. This causes a ClassNotFoundException at app startup. The old Java files correctly used package com.tupaiameditrak.

Additional Locations (1)

Fix in Cursor Fix in Web

self.initialProps = [:]

return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing Bugsnag and AppCenter initialization on iOS

High Severity

The Objective-C to Swift conversion of AppDelegate dropped the [Bugsnag start], [AppCenterReactNative register], and [AppCenterReactNativeAnalytics registerWithInitiallyEnabled:true] calls that existed in the old AppDelegate.mm. Crash reporting and analytics will be silently disabled on iOS.

Fix in Cursor Fix in Web

jaskfla added 2 commits March 30, 2026 13:17
# Conflicts:
#	packages/meditrak-app/metro.config.js
#	yarn.lock
@jaskfla jaskfla closed this Mar 30, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

There are 6 total unresolved issues (including 4 from previous reviews).

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "MediTrak"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android component name doesn't match JS registration

High Severity

getMainComponentName() returns "MediTrak", but the JavaScript side registers the component as "TupaiaMediTrak" via AppRegistry.registerComponent('TupaiaMediTrak', () => App) in main.jsx. The iOS AppDelegate.swift correctly uses "TupaiaMediTrak". This mismatch will cause the Android app to fail to find and render the root React component.

Fix in Cursor Fix in Web

<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
<string>armv64</string>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid device capability armv64 instead of arm64

High Severity

UIRequiredDeviceCapabilities specifies armv64, which is not a valid value. Apple's documentation lists the valid architecture capabilities as armv6, armv7, arm64, and arm64e. This typo could prevent the app from being installed on devices or cause App Store rejection.

Fix in Cursor Fix in Web

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