Description of the Problem:
When running pod install –no-repo-update in my React Native project, I observed that certain existing dependencies were removed during the process.
- Downloading dependencies
- Installing AppAuth 1.6.2 (was 1.4.0)/n
- Installing Firebase 6.34.0
- Installing GTMAppAuth 1.3.1 (was 1.2.2)
- Installing GTMSessionFetcher 1.7.2 (was 1.7.0)
- Installing GoogleUtilities 6.7.2
- Installing Protobuf 3.25.2 (was 3.19.4)
- Installing RNSVG 12.5.1 (was 12.3.0)
- Installing lottie-ios (3.1.9)
- Installing lottie-react-native (3.5.0)
- Installing react-native-camera 3.44.3
- Removing BVLinearGradient
- Removing FirebaseAnalytics
- Removing FirebaseAuth
- Removing FirebaseDynamicLinks
- Removing FirebaseInstanceID
- Removing FirebaseMessaging
- Removing FirebaseStorage
- Removing GoogleAppMeasurement
- Removing RNAppleAuthentication
- Removing RNCAsyncStorage
- Removing RNCMaskedView
- Removing RNCPicker
- Removing RNDateTimePicker
- Removing RNDeviceInfo
- Removing RNFBAnalytics
- Removing RNFBAuth
- Removing RNFBDynamicLinks
- Removing RNFBMessaging
- Removing RNFBStorage
- Removing RNFastImage
- Removing RNReactNativeHapticFeedback
- Removing RNScreens
- Removing SDWebImage
- Removing SDWebImageWebPCoder
- Removing Toast
- Removing libwebp
- Removing react-native-apple-authentication
- Removing react-native-blur
- Removing react-native-geolocation
- Removing react-native-image-picker
- Removing react-native-maps
- Removing react-native-safe-area-context
- Removing react-native-simple-toast
- Removing react-native-slider
- Removing react-native-version-check
- Removing react-native-webview
Generating Pods project
Why are existing dependencies being removed during the ‘pod install’ process?, Is there a way to prevent the removal of specific dependencies?
2
Answers
Yes, you have to define the exact dependency version.
e.g.
means install the Alamofire having version 5.0 or later. So every time you run pod install it will try to install the latest compatible version.
This means install the exactly the 5.0 version even if new version is available. It will not change the lib version.
This means install the latest version compatible to your pod version.
So basically you have to remove ~> sign before the library version number.