Skip to content

React 19 and The New Architecture support.#373

Merged
SpertsyanKM merged 9 commits into
major10from
tech/sc-40200/react19
Aug 29, 2025
Merged

React 19 and The New Architecture support.#373
SpertsyanKM merged 9 commits into
major10from
tech/sc-40200/react19

Conversation

@SpertsyanKM
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread android/gradle.properties Outdated
ReactNativeSdk_targetSdkVersion=34
ReactNativeSdk_compileSdkVersion=35
ReactNativeSdk_ndkVersion=27.1.12297006
# newArchEnabled=true No newline at end of file
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.

Should we leave this here?

import com.facebook.react.module.model.ReactModuleInfoProvider
import com.reactlibrary.QonversionModule

class ReactNativeSdkPackage : BaseReactPackage() {
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.

I think will be better to rename this file and associate it with Qonversion

* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "ReactNativeSdkExample"
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.

And I prefer to rename here as well and associate it with Q

@@ -1,3 +1,3 @@
<resources>
<string name="app_name">RN Qonversion</string>
<string name="app_name">ReactNativeSdkExample</string>
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.

And here

BuildableName = "exampleTests.xctest"
BlueprintName = "exampleTests"
ReferencedContainer = "container:example.xcodeproj">
BuildableName = "ReactNativeExampleTests.xctest"
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.

Let's remove test target

Comment thread example/package.json Outdated
"android": "react-native run-android",
"reIos": "yarn cleanIos && yarn ios",
"ios": "react-native run-ios",
"pods": "cd ios && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install && cd ..",
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.

RCT_NEW_ARCH_ENABLED=1 is not required because it's already set in the podfile. But we can leave this here anyway.

Comment thread ios/RNQonversion.mm

#pragma mark - Private

NSDictionary *convertPromoOfferDetailsToDictionary(JS::NativeQonversionModule::QPromoOfferDetails &promoOffer) {
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.

I think will be better to move this logic to the swift class

Comment thread ios/RNQonversionImpl.swift Outdated
class QonversionEventHandler: QonversionEventListener {
weak var delegate: QonversionEventDelegate?

init(delegate: QonversionEventDelegate?) {
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.

Looks like we don't need delegate here

Comment thread ios/RNQonversionImpl.swift Outdated
}

private func handleResult(result: [String: Any]?, error: SandwichError?, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) {
if let error = error {
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.

Suggested change
if let error = error {
if let error {

Comment thread ios/RNQonversionImpl.swift Outdated
reject(error.code, error.details, nil)
return
}
if let result = result {
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.

Suggested change
if let result = result {
if let result {

@SpertsyanKM SpertsyanKM merged commit 552221d into major10 Aug 29, 2025
1 check passed
@SpertsyanKM SpertsyanKM deleted the tech/sc-40200/react19 branch August 29, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants