React 19 and The New Architecture support.#373
Conversation
| ReactNativeSdk_targetSdkVersion=34 | ||
| ReactNativeSdk_compileSdkVersion=35 | ||
| ReactNativeSdk_ndkVersion=27.1.12297006 | ||
| # newArchEnabled=true No newline at end of file |
There was a problem hiding this comment.
Should we leave this here?
| import com.facebook.react.module.model.ReactModuleInfoProvider | ||
| import com.reactlibrary.QonversionModule | ||
|
|
||
| class ReactNativeSdkPackage : BaseReactPackage() { |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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> | |||
| BuildableName = "exampleTests.xctest" | ||
| BlueprintName = "exampleTests" | ||
| ReferencedContainer = "container:example.xcodeproj"> | ||
| BuildableName = "ReactNativeExampleTests.xctest" |
There was a problem hiding this comment.
Let's remove test target
| "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 ..", |
There was a problem hiding this comment.
RCT_NEW_ARCH_ENABLED=1 is not required because it's already set in the podfile. But we can leave this here anyway.
|
|
||
| #pragma mark - Private | ||
|
|
||
| NSDictionary *convertPromoOfferDetailsToDictionary(JS::NativeQonversionModule::QPromoOfferDetails &promoOffer) { |
There was a problem hiding this comment.
I think will be better to move this logic to the swift class
| class QonversionEventHandler: QonversionEventListener { | ||
| weak var delegate: QonversionEventDelegate? | ||
|
|
||
| init(delegate: QonversionEventDelegate?) { |
There was a problem hiding this comment.
Looks like we don't need delegate here
| } | ||
|
|
||
| private func handleResult(result: [String: Any]?, error: SandwichError?, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) { | ||
| if let error = error { |
There was a problem hiding this comment.
| if let error = error { | |
| if let error { |
| reject(error.code, error.details, nil) | ||
| return | ||
| } | ||
| if let result = result { |
There was a problem hiding this comment.
| if let result = result { | |
| if let result { |
No description provided.