Hi!
We are facing an issue that is preventing us from adding Skottie to our project.
Steps to reproduce from scratch
- Create React Native project
- Install react-native-skottie:
yarn add react-native-skottie
- Install react-native-skia:
yarn add @shopify/react-native-skia
- Run
(cd ios && bundle exec pod install)
- Install the same project on another machine or at another location
- Run
(cd ios && bundle exec pod install)
Expectation: No change in Podfile.lock
Actual behaviour: checksum for pod react-native-skia-skottie has changes in Podfile.lock
This is a problem for us for 2 reasons:
- Every time a developer runs
bundle exec pod install they have a file change in git
- On our CI we check that there is no git change after installing pods, which fails because of this
Reproduce the issue quickly with this repo
Investigation
I believe the checksum from cocoapods is generated from the output of pod ipc spec ../node_modules/react-native-skottie/react-native-skia-skottie.podspec - you can run it from the SkottiePodsIssue as yarn podipc and it will write the output to a pod.json file at the root.
When running the command, I see that it includes the absolute path where the project is located on the machine (/Users/me/SkottiePodsIssue in the exemple below): https://github.com/louiszawadzki/SkottiePodsIssue/blob/main/pod.json
This is because we use the absolute path to react-native-skia in the podspec: https://github.com/margelo/react-native-skottie/blob/main/package/react-native-skia-skottie.podspec#L7
Proposed solution
I would suggest to use the ${PROJECT_DIR} env variable that is available during the iOS build phase as suggested here https://stackoverflow.com/a/33359337. However I'm not sure this would work with prepare_command.
If you want to I can create a PR with this change :)
Hi!
We are facing an issue that is preventing us from adding Skottie to our project.
Steps to reproduce from scratch
yarn add react-native-skottieyarn add @shopify/react-native-skia(cd ios && bundle exec pod install)(cd ios && bundle exec pod install)Expectation: No change in Podfile.lock
Actual behaviour: checksum for pod
react-native-skia-skottiehas changes in Podfile.lockThis is a problem for us for 2 reasons:
bundle exec pod installthey have a file change in gitReproduce the issue quickly with this repo
yarnandbundle install(cd ios && bundle exec pod install)Investigation
I believe the checksum from cocoapods is generated from the output of
pod ipc spec ../node_modules/react-native-skottie/react-native-skia-skottie.podspec- you can run it from the SkottiePodsIssue asyarn podipcand it will write the output to apod.jsonfile at the root.When running the command, I see that it includes the absolute path where the project is located on the machine (
/Users/me/SkottiePodsIssuein the exemple below): https://github.com/louiszawadzki/SkottiePodsIssue/blob/main/pod.jsonThis is because we use the absolute path to react-native-skia in the podspec: https://github.com/margelo/react-native-skottie/blob/main/package/react-native-skia-skottie.podspec#L7
Proposed solution
I would suggest to use the
${PROJECT_DIR}env variable that is available during the iOS build phase as suggested here https://stackoverflow.com/a/33359337. However I'm not sure this would work withprepare_command.If you want to I can create a PR with this change :)