Closed tomrom-pomelo closed 4 months ago
Hey @tomrom-pomelo
Thanks for reaching out.
This issue looks very similar to another GitHub issue here on a monorepo project. Would you confirm if your project is a monorepo?
Yes we are using a monorepo
I had to manually patch this line to get it to install https://github.com/customerio/customerio-expo-plugin/blob/309e3614eccbed0b66388c158206ae4b2bf6f791/src/helpers/utils/injectCIOPodfileCode.ts#L22-L24 . Would love if this plugin supported monorepos so we could remove the patch in the future
@tomrom-pomelo
Our plugin does support monorepo. It automatically finds the relative path to the react native package and uses it in the podfile
.
Is the patch you made fetches different path than what our plugin gets?
Unfortunately that code to find the relative path does not work in our monorepo (note that we don’t have an issue with any other package). This is the patch we apply:
diff --git a/lib/module/helpers/utils/injectCIOPodfileCode.js b/lib/module/helpers/utils/injectCIOPodfileCode.js
index 71567ea16e0162db29d30f37f334bc192751c376..5199e8613df8d852b93d5a99a0e701ea3c3a3ad4 100644
--- a/lib/module/helpers/utils/injectCIOPodfileCode.js
+++ b/lib/module/helpers/utils/injectCIOPodfileCode.js
@@ -1,4 +1,3 @@
-import { getRelativePathToRNSDK } from '../constants/ios';
import { injectCodeByRegex } from './codeInjection';
import { FileManagement } from './fileManagement';
export async function injectCIOPodfileCode(iosPath) {
@@ -14,7 +13,7 @@ export async function injectCIOPodfileCode(iosPath) {
const lineInPodfileToInjectSnippetBefore = /post_install do \|installer\|/;
const snippetToInjectInPodfile = `
${blockStart}
- pod 'customerio-reactnative/apn', :path => '${getRelativePathToRNSDK(filename)}'
+ pod 'customerio-reactnative/apn', :path => '../node_modules/customerio-reactnative'
${blockEnd}
`.trim();
FileManagement.write(filename, injectCodeByRegex(podfile, lineInPodfileToInjectSnippetBefore, snippetToInjectInPodfile).join('\n'));
Thanks for sharing the patch fix @tomrom-pomelo but we are unable to reproduce this issue on our end. If you'd like us to investigate further then I would request you to share the project structure that we could use to reproduce on our end. You could also either share a GitHub link with us if you'd like, on win@customer.io
and mention this issue.
Closing issue due to inactivity.
Feel free to add new comments or re-open. We would be happy to help.
SDK version: customerio-reactnative 3.7.2 customerio-expo-plugin 1.0.0-beta.15 react-native 0.74.2 expo 51.0.14
Environment: Development
Are logs available? No, fail during build
Describe the bug When running pod install, I see the error
I am running this with Expo's
eas
build on Expo 51To Reproduce eas build --platform ios
Expected behavior
Screenshots
Additional context