-
Notifications
You must be signed in to change notification settings - Fork 2
[MOO-2265] - Update deprecated apis #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
YogendraShelke
wants to merge
15
commits into
main
Choose a base branch
from
moo/MOO-2265-update-deprecated-apis
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2de9294
refactor: replace RedBoxHelper with RCTExceptionsManager for error ha…
YogendraShelke 5be47a7
refactor: implement typed constants spec
YogendraShelke a8e2c86
refactor: update deprecated ReactNativeHost usage to ReactHost across…
YogendraShelke c6e2530
refactor: enhance NativeDownloadModule to support download progress e…
YogendraShelke 54358b3
chore: update MendixNative version to 0.5.1 in Podfile.lock
YogendraShelke 6123968
refactor: update getConstants and getTypedExportedConstants to use nu…
YogendraShelke 908ddc6
refactor: fix tests
YogendraShelke 72bcf30
refactor: increase Node.js memory limit for E2E tests
YogendraShelke bdfe6e0
refactor: remove deprecated APIs
YogendraShelke d42f795
refactor: add loop protection for OTA redeployment and update error h…
YogendraShelke d76066a
refactor: update onKeyUp method to require non-null KeyEvent parameter
YogendraShelke edf5990
refactor: remove deprecated APIs and improve serialization handling
YogendraShelke 860d7f0
refactor: simplify splash screen handling by removing compatibility c…
YogendraShelke 5e77cf4
refactor: remove deprecated APIs and clean up unused code
YogendraShelke 2898f17
refactor: improve React Native developer support setup and host resol…
YogendraShelke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
android/src/main/java/com/facebook/react/devsupport/MendixShakeDetector.kt
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,6 @@ package com.mendix.mendixnative | |
|
|
||
| import android.app.Application | ||
| import com.facebook.react.ReactHost | ||
| import com.facebook.react.ReactNativeHost | ||
| import com.facebook.react.ReactPackage | ||
| import com.facebook.react.bridge.JSBundleLoader | ||
| import com.facebook.react.bridge.JSBundleLoaderDelegate | ||
|
|
@@ -28,8 +27,6 @@ import com.mendixnative.MendixNativePackage | |
| import java.util.* | ||
| import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load | ||
|
|
||
| import com.facebook.react.defaults.DefaultReactNativeHost | ||
|
|
||
| abstract class MendixReactApplication : Application(), MendixApplication, ErrorHandlerFactory { | ||
| private val appSessionId = "" + Math.random() * 1000 + Date().time | ||
| override fun getAppSessionId(): String = appSessionId | ||
|
|
@@ -44,33 +41,11 @@ abstract class MendixReactApplication : Application(), MendixApplication, ErrorH | |
|
|
||
| private var jsBundleFileProvider: JSBundleFileProvider? = jsBundleProvider | ||
|
|
||
| override var reactNativeHost: ReactNativeHost = object : DefaultReactNativeHost(this) { | ||
| override fun getUseDeveloperSupport(): Boolean = [email protected] | ||
|
|
||
| override fun getPackages(): List<ReactPackage> { | ||
| val pkgs: MutableList<ReactPackage> = ArrayList() | ||
| // Use the packages provided by the concrete Application subclass. | ||
| pkgs.addAll([email protected]) | ||
| // Inject splashScreenPresenter into any MendixNativePackage instances without creating duplicates. | ||
| applyInternalPackageAugmentations(pkgs) | ||
| return pkgs | ||
| } | ||
|
|
||
| override fun getJSBundleFile(): String? = [email protected] | ||
| override fun getJSMainModuleName(): String = "index" | ||
| override fun getBundleAssetName(): String? = super.getBundleAssetName() | ||
| override fun getRedBoxHandler(): RedBoxHandler? = null | ||
|
|
||
| // Hermes & New Arch flags; Hermes executor will be picked automatically when isHermesEnabled is true. | ||
| override val isNewArchEnabled: Boolean = true | ||
| override val isHermesEnabled: Boolean = true | ||
| } | ||
|
|
||
| /** | ||
| * Build the [ReactHost] ourselves instead of using [DefaultReactHost.getDefaultReactHost], | ||
| * because that factory evaluates [ReactNativeHost.getJSBundleFile] once at creation time and | ||
| * bakes the result into a fixed [JSBundleLoader]. After an OTA update deploys a new bundle, | ||
| * a subsequent [ReactHost.reload] would still load the stale bundle. | ||
| * Build the [ReactHost] with a custom [JSBundleLoader] instead of using a static bundle path. | ||
| * The default approach evaluates the bundle file path once at creation time and bakes it into | ||
| * a fixed [JSBundleLoader]. After an OTA update deploys a new bundle, a subsequent | ||
| * [ReactHost.reload] would still load the stale bundle. | ||
| * | ||
| * By providing a **dynamic** [JSBundleLoader] whose [JSBundleLoader.loadScript] calls | ||
| * [getJSBundleFile] on every invocation, each reload picks up the latest bundle path — | ||
|
|
@@ -133,10 +108,7 @@ abstract class MendixReactApplication : Application(), MendixApplication, ErrorH | |
| override fun onCreate() { | ||
| super.onCreate() | ||
| SoLoader.init(this, OpenSourceMergedSoMapping) | ||
| // Only load the New Architecture entry point when enabled (always true here, but guarded for safety). | ||
| if (reactNativeHost is DefaultReactNativeHost) { | ||
| load() | ||
| } | ||
| load() | ||
| } | ||
|
|
||
| override fun getJSBundleFile(): String? { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.