react-native-unity icon indicating copy to clipboard operation
react-native-unity copied to clipboard

UnityFramework in node_modules folder for iOS is not cleaned between pod refreshes

Open anothercog opened this issue 9 months ago • 0 comments

After running the line: rm -rf ios/Pods && rm -f ios/Podfile.lock && npx pod-install from the project root folder the UnityFramework.framework from the unity/build/ios folder is copied to the ios directory of the react-native-unity root folder in node_modules. This is fine. However on subsequent runs, if files in the UnityFramework.framework have changed, the new files are added to this folder, causing the build to grow over time. In the react-native-unity.podspec, adding a line that removes the ios directory just before a clean fixes this problem, and I have added it locally. If this could be added to the main package that would be great!

For reference, the exact line is: rm -rf ios/UnityFramework.framework right before the line cp -R ../../../unity/builds/ios/ ios/

Thanks!

anothercog avatar Mar 06 '25 21:03 anothercog