Skip to content
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

Privacy manifest file collides with local project privacy manifest file #264

Open
jesse-one-app opened this issue May 1, 2024 · 5 comments

Comments

@jesse-one-app
Copy link

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

@denissb
Copy link

denissb commented May 2, 2024

Facing the same issue on LD SDK 8.2.0

It was fixed in the following commit on the originating ios-client-sdk: launchdarkly/ios-client-sdk@971a4c4

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)

@louis-launchdarkly
Copy link
Contributor

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.

@cbaucom
Copy link

cbaucom commented May 9, 2024

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

@hmcpheewes
Copy link

hmcpheewes commented May 28, 2024

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

@denissb
Copy link

denissb commented May 28, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants