react-native-client-sdk icon indicating copy to clipboard operation
react-native-client-sdk copied to clipboard

Privacy manifest file collides with local project privacy manifest file

Open jesse-one-app opened this issue 1 year ago • 3 comments

Describe the bug The privacy manifest file exported by Launch darkly conflicts with a projects local privacy file causing a build failure

To reproduce Include the latest Launch darkly sdk into a project with an existing privacy manifest file

Expected behavior Build should pass

SDK version 9.2.0

OS/platform iOS

Additional context It appears the issue has been resolved in the launch darkly ios-client-sdk v9.6.1, the react native package needs to adopt that newer version of the companion sdk

jesse-one-app avatar May 01 '24 21:05 jesse-one-app

Facing the same issue on LD SDK 8.2.0

It was fixed in the following commit on the originating ios-client-sdk: https://github.com/launchdarkly/ios-client-sdk/commit/971a4c4abb6144c80af5af3b71f4336dde917f20

I think both versions 9.2.0 and 8.2.0 need to be patched (as 9.2.0 is not recommended for apps using RN <=0.73 and old arch)

denissb avatar May 02 '24 13:05 denissb

Hello, @jesse-one-app and @denissb, thank you for reporting this, we have filed this internally as 242758 and will work on a fix for this.

louis-launchdarkly avatar May 02 '24 16:05 louis-launchdarkly

Hi @louis-launchdarkly, is there a way to track the status of 242758? I'm curious when we might see a patch for SDK 8.2.0. Thank you

cbaucom avatar May 09 '24 13:05 cbaucom

If it helps, after updating to react native 0.74.1, we downgraded the library to 8.0.2 to temporarily get around the issue

hmcpheewes avatar May 28 '24 00:05 hmcpheewes

If you are on version 8.20 and don't want to downgrade as a workaround you can try to use the following script to patch the SDK in a postinstall step or use patch-package to overwrite "LaunchDarkly", "9.5.1" with "LaunchDarkly", "9.6.2"

import fs from 'fs/promises';
import path from 'path';

const __dirname = path.dirname(new URL(import.meta.url).pathname);

const replaceInFile = async (filePath, searchValue, replaceValue) => {
	const data = await fs.readFile(filePath, 'utf8');
	const result = data.replace(searchValue, replaceValue);

	await fs.writeFile(filePath, result, { encoding: 'utf8' });
	console.log(`Replaced Pod resource bundles in ${filePath}`);
};

const buildPluginFile = path.join(
	__dirname,
	'./node_modules/launchdarkly-react-native-client-sdk/launchdarkly-react-native-client-sdk.podspec',
);

(async () => {
	await replaceInFile(
		buildPluginFile,
		's.dependency "LaunchDarkly", "9.5.1"',
		's.dependency "LaunchDarkly", "9.6.2"',
	);
})();

It worked fine for me without any issues.

denissb avatar May 28 '24 06:05 denissb

Hello everyone. We have released version 9.3.0 of the react-native-client-sdk that bumps the internal ios-client-sdk to incorporate this fix.

tanderson-ld avatar Jun 11 '24 19:06 tanderson-ld