-
Notifications
You must be signed in to change notification settings - Fork 32
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
add addRadarSDKVerify option #367
base: master
Are you sure you want to change the base?
Conversation
@@ -59,6 +59,7 @@ export const withRadarAndroid = ( | |||
<!-- for React Native --> | |||
<domain-config cleartextTrafficPermitted="true"> | |||
<domain includeSubdomains="true">localhost</domain> | |||
<domain includeSubdomains="true">10.0.2.2</domain> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localhost
on Android emulator
|
||
// Insert the pod declaration within the target block | ||
const targetBlock = contents.substring(targetStartIndex, targetEndIndex); | ||
const updatedTargetBlock = targetBlock.replace(/(target '(\w+)' do)/, `$1\n pod 'RadarSDK/Verify', '3.19.2-beta.9'\n pod 'CocoaAsyncSocket', :modular_headers => true\n pod 'HTTPParserC', :modular_headers => true`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Telegraph sub-dependencies need modular_headers => true
const contents = await fs.readFile(filePath, 'utf-8'); | ||
|
||
// Check if the pod declaration already exists | ||
if (contents.indexOf("pod 'RadarSDK/Verify', '3.19.2-beta.9'") === -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lmeier @KennyHuRadar Similar to addRadarSDKMotion
option. Will we need to update the version by hand in both places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably extract this to a constant in the future. Since we release all the sdks with matching versions (I think, since RadarSDKMotion releases a 3.19 together with a 3.19 main SDK even if there is no change). We can probably just update the version string in the podspec file, and we can read the version from there and use it across the plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea that's exactly correct — easiest to maintain the same version across the the main module and all submodules.
I noticed that you bumped the RN version, however, there are a few more spots where we need to bump the beta version and the native versions as well. It's documented here
|
startVerifyServer()
andstopVerifyServer()
, allowing customers to turn their Android app into a "companion app" (https://radar.com/documentation/fraud#web-and-desktop) fortrackVerified()
andstartTrackingVerified()
on mobileaddRadarSDKVerify
plugin option to addNanoHTTPD
dependency andTelegraph
sub-dependencies (CocoaAsyncSocket
andHTTPParserC
with:modular_headers => true
)