Report
Plugin Version
6.17.5
On what Platform are you having the issue?
Android
What did you do?
The ConversionData type in index.d.ts declares is_first_launch as a string literal union:
// index.d.ts
export type ConversionData = {
...
data: {
is_first_launch: "true" | "false";
...
};
};
Following the type, our onInstallConversionData handler compared it as a string:
if (res.data.is_first_launch !== 'true') return
What did you expect to happen?
res.data.is_first_launch to be the string "true" on Android, as declared by the type (and as stated in the docs).
What happened instead?
On a physical Android device (Samsung Galaxy S21, SM-G991N), res.data.is_first_launch came back as a boolean true, not the string "true". So res.data.is_first_launch !== 'true' was always true and the first-launch branch never ran. We had to widen the check:
if (res.data.is_first_launch !== 'true' && (res.data.is_first_launch as any) !== true) return
Please provide any other relevant information.
This is doubly surprising because the docs (Docs/RN_API.md) state the opposite of what we observed:
Note: is_first_launch will be "true" (string) on Android and true (boolean) on iOS.
But we observed a boolean on Android. So in practice the value can be either a boolean or a string regardless of platform, and the TypeScript type "true" | "false" is incorrect — it should at least include the boolean form:
is_first_launch: boolean | "true" | "false";
Related prior reports: #257 (closed as "won't fix"), #122. The type is still "true" | "false" in 6.17.5, so re-filing against the current version.
Report
Plugin Version
6.17.5
On what Platform are you having the issue?
Android
What did you do?
The
ConversionDatatype inindex.d.tsdeclaresis_first_launchas a string literal union:Following the type, our
onInstallConversionDatahandler compared it as a string:What did you expect to happen?
res.data.is_first_launchto be the string"true"on Android, as declared by the type (and as stated in the docs).What happened instead?
On a physical Android device (Samsung Galaxy S21, SM-G991N),
res.data.is_first_launchcame back as a booleantrue, not the string"true". Sores.data.is_first_launch !== 'true'was alwaystrueand the first-launch branch never ran. We had to widen the check:Please provide any other relevant information.
This is doubly surprising because the docs (
Docs/RN_API.md) state the opposite of what we observed:But we observed a boolean on Android. So in practice the value can be either a boolean or a string regardless of platform, and the TypeScript type
"true" | "false"is incorrect — it should at least include the boolean form:Related prior reports: #257 (closed as "won't fix"), #122. The type is still
"true" | "false"in 6.17.5, so re-filing against the current version.