-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
PrivacyInfo.xcprivacy build issue with Expo 51 #111
Comments
To use # Add temporary IQKeyboardManagerSwift fork to solve problems with PrivacyInfo.xcprivacy
pod 'IQKeyboardManagerSwift', :git => 'https://github.com/douglasjunior/IQKeyboardManager.git', :branch => 'react-native-keyboard-manager' If you still in |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Have you tried building it using Expo? Maybe I missed something. All I can do is to downgrade to a lower version without the privacy manifest. |
Anyway, to use this library with expo you need to run the prebuild to get access to the native files. https://docs.expo.dev/workflow/prebuild/ So just add this line o # Add temporary IQKeyboardManagerSwift fork to solve problems with PrivacyInfo.xcprivacy
pod 'IQKeyboardManagerSwift', :git => 'https://github.com/douglasjunior/IQKeyboardManager.git', :branch => 'react-native-keyboard-manager' |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
The version 6 was outdated by So the only option was to fork the
Of course, it would be better to work without needing of a fork to be added to Podfile, that's obvious, and it's been like that for the last 7 years. Unfortunately, this is how the open source world sometimes works, we need to play with the tools that we have in our hands. |
I got it to work on Expo with the latest version with a plugin. Here's how:
const { withDangerousMod, withPlugins } = require('@expo/config-plugins');
const fs = require('fs');
const path = require('path');
async function readFile(path) {
return fs.promises.readFile(path, 'utf8');
}
async function saveFile(path, content) {
return fs.promises.writeFile(path, content, 'utf8');
}
module.exports = (config) =>
withPlugins(config, [
(config) => {
return withDangerousMod(config, [
'iOS',
async (config) => {
const file = path.join(config.modRequest.platformProjectRoot, 'Podfile');
/*
* You need to remove the line before adding it.
* If you don't do this and you run `expo prebuild` in a dirt project
* your file will have the same line added twice
*/
const contents = (await readFile(file)).replace(
/pod 'IQKeyboardManagerSwift', :git => 'https:\/\/github.com\/douglasjunior\/IQKeyboardManager.git', :branch => 'react-native-keyboard-manager'\n\n/g,
'',
);
/*
* Now re-adds the content
*/
await saveFile(
file,
`pod 'IQKeyboardManagerSwift', :git => 'https://github.com/douglasjunior/IQKeyboardManager.git', :branch => 'react-native-keyboard-manager'\n\n${contents}`,
);
return config;
},
]);
},
]);
{
"expo": {
"name": "bidaction",
...
"plugins": [
...
"./plugins/withPodfile"
],
...
}
}
|
Nice @samuelbeaulieu, I'm going to link your comment on README. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Thanks so much for writing this plugin, however, I found it is only working after I updating the "iOS" to "ios", according to the latest of Expo doc (https://docs.expo.dev/config-plugins/plugins-and-mods/#experimental-functionality) so this line: return withDangerousMod(config, [
'iOS', has to be return withDangerousMod(config, [
'ios', |
Version
6.5.16-0
breaks IOS build due to invalidPrivacyInfo.xcprivacy
with Expo 51.I think we can safely ignore this since it will be up for the user to add the privacy file in their project. Expo does it via the
app.json
config.Reverting to
6.5.11-2
works just fine.The text was updated successfully, but these errors were encountered: