Running Cocoapods "pod install" Causes Libraries to Disappear - ios

We are having a problem with an existing project. Running pod install causes our existing Pods to break.
Our existing project looks like this:
After I run pod install, several of the libraries that appear in the Products directory and under the Targets are gone, and the app won't compile:
Here is the output from pod install --verbose
myapp-Macbook-Air:myapp username$ pod install --verbose
Preparing
Updating local specs repositories
Updating spec repo `master`
$ /usr/bin/git pull --ff-only
Already up-to-date.
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods`:
(`$(ARCHS_STANDARD)`)
Finding Podfile changes
- Dropbox-iOS-SDK
- FiksuSDK
- GoogleAnalytics
- Localytics
- MobileAppTracker
- SDWebImage
Resolving dependencies of `Podfile`
Comparing resolved specification to the sandbox manifest
- Dropbox-iOS-SDK
- FiksuSDK
- GoogleAnalytics
- Localytics
- MobileAppTracker
- SDWebImage
Downloading dependencies
-> Using Dropbox-iOS-SDK (1.3.13)
-> Using FiksuSDK (4.4.1)
-> Using GoogleAnalytics (3.13.0)
-> Using Localytics (3.5.0)
-> Using MobileAppTracker (3.7)
-> Using SDWebImage (3.7.2)
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding libraries to Pods project
- Adding resources to Pods project
- Linking headers
- Installing targets
- Installing target `SDWebImage` iOS 7.0
- Installing target `Pods` iOS 7.0
- Running post install hooks
- Writing Xcode project file to `Pods/Pods.xcodeproj`
- Generating deterministic UUIDs
- Writing Lockfile in `Podfile.lock`
- Writing Manifest in `Pods/Manifest.lock`
Integrating client project
Integrating target `Pods` (`myapp.xcodeproj` project)
Adding Build Phase 'Embed Pods Frameworks' to project.
- Running post install hooks
- cocoapods-stats from
`/usr/local/lib/ruby/gems/2.1.0/gems/cocoapods-stats-0.6.2/lib/cocoapods_plugin.rb`
Sending stats
- Dropbox-iOS-SDK, 1.3.13
- FiksuSDK, 4.4.1
- GoogleAnalytics, 3.13.0
- Localytics, 3.5.0
- MobileAppTracker, 3.7
- SDWebImage, 3.7.2
Pod installation complete! There are 6 dependencies from the Podfile and 6
total pods installed.
[!] The `myapp [Debug]` target overrides the `GCC_PREPROCESSOR_DEFINITIONS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
(We've always had that GCC_PREPROCESSOR warning)
Any ideas about what be happening here, would be appreciated.
Some other notes: We are having this problem on Xcode 6 and Xcode 7, but both machines are running OS X 10.11, which might be the problem. Cocoapods v0.39.0. Also tried downgrading to Cocoapods v0.25.0 but the same problem occurs.

Related

flutter_native_image not found in xcode build, but pod install log shows otherwise

I have made an app which uses flutter_native_image, image_picker and image_cropper to take pictures and resize them at will. On Android build it works flawless.
While running XCode build to make this work on iOS, the build fails because packages cannot be found, although I followed (to my newbee knowledge) all necessary steps
Steps I did to create a clean build on iOS:
flutter clean
flutter pub get
pod deintegrate; pod install
In the log of the pod install, I can see that the necessary packages are being installed. See log below
#LMAC-C02F5662MD6R ~/work/git/boekelaar/bierpot/frontend/ios> pod deintegrate; pod install
Deintegrating `Runner.xcodeproj`
Deleted 1 'Check Pods Manifest.lock' build phases.
Deleted 1 'Embed Pods Frameworks' build phases.
- Pods_Runner.framework
Deleting Pod file references from project
- Pods-Runner.debug.xcconfig
- Pods-Runner.release.xcconfig
- Pods-Runner.profile.xcconfig
Deleted 1 empty `Frameworks` groups from project.
Removing `Pods` directory.
Project has been deintegrated. No traces of CocoaPods left in project.
Note: The workspace referencing the Pods project still remains.
Analyzing dependencies
Downloading dependencies
Installing Flutter (1.0.0)
Installing TOCropViewController (2.6.1)
Installing flutter_native_image (0.0.1)
Installing image_cropper (0.0.4)
Installing image_picker_ios (0.0.1)
Installing path_provider_ios (0.0.1)
Installing shared_preferences_ios (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 6 dependencies from the Podfile and 7 total pods installed.
After this install, I tried to build this on a physical device (iPhone X with iOS 15) and my XCode build failed here:
Screenshot of XCode build failure
Does anyone have any clue or ideas?

Consistency issue: build setting `IPHONEOS_DEPLOYMENT_TARGET` has multiple values

I generated new flutter module project for my existing app which has set iOS target to 15.0
I was following https://docs.flutter.dev/development/add-to-app/ios/project-setup this guide with option A but I'm getting this after pod install:
Analyzing dependencies
Downloading dependencies
Installing Flutter (1.0.0)
Installing FlutterPluginRegistrant (0.0.1)
Generating Pods project
[!] An error occurred while processing the post-install hook of the Podfile.
[Xcodeproj] Consistency issue: build setting `IPHONEOS_DEPLOYMENT_TARGET` has multiple values: `{"Release"=>"13.0", "Debug"=>"13.0", "Production"=>"15.0", "Store"=>"15.0"}`
I tried changing the iOS version in pod file by setting target to 15.0 but its not working.
Changing anything in flutter .iOS dir is also not working

Working process of pod install command in iOS

I have one doubt about cocoapod. Nowadays we are using dependency manager cocoapod for adding libraries to our project.
For example I added pod 'Alamofire' command in podfile and i run pod install command in my terminal.Then automatically added Alamofire library to our xcode project.This is working fine.
But my doubt is we are mentioned only pod 'Alamofire' in podfile, then how to download this exact library from this single line command? What is the process done in background when i run pod install command?
When you mention just the name of the repository in podfile. It automatically checks the latest version of the library present on GitHub and downloads it.
Here is the detailed log of what happens when you install a pod.
Analyzing dependencies
Updating spec repositories
Updating spec repo `master`
$ /usr/bin/git pull
Already up-to-date.
Finding Podfile changes
- AFNetworking
- HockeySDK
Resolving dependencies of `Podfile`
Resolving dependencies for target `Pods' (iOS 6.0)
- AFNetworking (= 1.2.1)
- SDWebImage (= 3.2)
- SDWebImage/Core
Comparing resolved specification to the sandbox manifest
- AFNetworking
- HockeySDK
Downloading dependencies
-> Using AFNetworking (1.2.1)
-> Using HockeySDK (3.0.0)
- Running pre install hooks
- HockeySDK
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding libraries to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-AFNetworking` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-AFNetworking.xcconfig`
- Generating private xcconfig file at `Pods/Pods-AFNetworking-Private.xcconfig`
- Generating prefix header at `Pods/Pods-AFNetworking-prefix.pch`
- Generating dummy source file at `Pods/Pods-AFNetworking-dummy.m`
- Installing target `Pods-HockeySDK` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-HockeySDK.xcconfig`
- Generating private xcconfig file at `Pods/Pods-HockeySDK-Private.xcconfig`
- Generating prefix header at `Pods/Pods-HockeySDK-prefix.pch`
- Generating dummy source file at `Pods/Pods-HockeySDK-dummy.m`
- Installing target `Pods` iOS 6.0
- Generating xcconfig file at `Pods/Pods.xcconfig`
- Generating target environment header at `Pods/Pods-environment.h`
- Generating copy resources script at `Pods/Pods-resources.sh`
- Generating acknowledgements at `Pods/Pods-acknowledgements.plist`
- Generating acknowledgements at `Pods/Pods-acknowledgements.markdown`
- Generating dummy source file at `Pods/Pods-dummy.m`
- Running post install hooks
- Writing Xcode project file to `Pods/Pods.xcodeproj`
- Writing Lockfile in `Podfile.lock`
- Writing Manifest in `Pods/Manifest.lock`
Integrating client project
Please refer to this Link for a detailed version of how CocoaPods work.

iOS, install library via pod install, still get "No such module"

Pardon me for beginner's question,
I tried to install a library named NetworkKit, and follow their instruction by doing
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'NetworkKit'
and then
pod install
but still in the swift file, I got the error "No such module" at the line import NetworkKit.
Any idea how to fix this? Thanks
Update: This is the output of pod install --verbose
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target
`Pods-networkingexamle`: (``)
Using `ARCHS` setting to build architectures of target
`Pods-networkingexamleTests`: (``)
Using `ARCHS` setting to build architectures of target
`Pods-networkingexamleUITests`: (``)
Finding Podfile changes
- NetworkKit
Resolving dependencies of `Podfile`
Comparing resolved specification to the sandbox manifest
- NetworkKit
Downloading dependencies
-> Using NetworkKit (1.3.2)
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding libraries to Pods project
- Adding resources to Pods project
- Linking headers
- Installing targets
- Installing target `NetworkKit` iOS 8.0
- Generating Info.plist file at `Pods/Target Support
Files/NetworkKit/Info.plist`
- Generating module map file at `Pods/Target Support
Files/NetworkKit/NetworkKit.modulemap`
- Generating umbrella header at `Pods/Target Support
Files/NetworkKit/NetworkKit-umbrella.h`
- Installing target `Pods-networkingexamle` iOS 8.0
- Generating Info.plist file at `Pods/Target Support
Files/Pods-networkingexamle/Info.plist`
- Generating module map file at `Pods/Target Support
Files/Pods-networkingexamle/Pods-networkingexamle.modulemap`
- Generating umbrella header at `Pods/Target Support
Files/Pods-networkingexamle/Pods-networkingexamle-umbrella.h`
- Installing target `Pods-networkingexamleTests` iOS 8.0
- Generating Info.plist file at `Pods/Target Support
Files/Pods-networkingexamleTests/Info.plist`
- Generating module map file at `Pods/Target Support
Files/Pods-networkingexamleTests/Pods-networkingexamleTests.modulemap`
- Generating umbrella header at `Pods/Target Support
Files/Pods-networkingexamleTests/Pods-networkingexamleTests-umbrella.h`
- Installing target `Pods-networkingexamleUITests` iOS 8.0
- Generating Info.plist file at `Pods/Target Support
Files/Pods-networkingexamleUITests/Info.plist`
- Generating module map file at `Pods/Target Support
Files/Pods-networkingexamleUITests/Pods-networkingexamleUITests.modulemap`
- Generating umbrella header at `Pods/Target Support
Files/Pods-networkingexamleUITests/Pods-networkingexamleUITests-umbrella.h`
- Running post install hooks
- Writing Xcode project file to `Pods/Pods.xcodeproj`
- Generating deterministic UUIDs
- Writing Lockfile in `Podfile.lock`
- Writing Manifest in `Pods/Manifest.lock`
Integrating client project
Integrating target `Pods-networkingexamle` (`networkingexamle.xcodeproj` project)
Integrating target `Pods-networkingexamleTests` (`networkingexamle.xcodeproj` project)
Integrating target `Pods-networkingexamleUITests` (`networkingexamle.xcodeproj` project)
- Running post install hooks
- cocoapods-stats from
`/Library/Ruby/Gems/2.0.0/gems/cocoapods-stats-1.0.0/lib/cocoapods_plugin.rb`
Sending stats
- NetworkKit, 1.3.2
Pod installation complete! There is 1 dependency from the Podfile and 1 total
pod installed.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
Update 2:
The answer is in Thanh Pham's and Shayan Jali's comment: I have to open xcworkspace after install the pod, instead of the xcproject
Let me put the answer here for future readers:
The output of pod install --verbose indicates that the pod has been installed successfully. However, you have to open the .xcworkspace file generated by CocoaPods instead of the .xcproject file.
It is also worth mentioned that the pod can be compiled on Xcode 7 but not Xcode 8 since it has not been updated to Swift 2.3 nor 3.0 at the time of this post.
“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
The NetworkKit isn't configured with the latest swift syntax. So, use this link Xcode 8 Beta 3 Use Legacy Swift issue to resolve it.
It is import NewsstandKit, the import NewtworkKit is not working.

GoogleMaps SDK 1.10.21020.0 Update iOS

Just trying to update my GoogleMaps SDK version for an iOS application. I'm running Xcode 7.1 and following the directions at https://developers.google.com/maps/documentation/ios-sdk/start. Unfortunately I cannot seem to run the following:
pod install
in the terminal. I have tried to add the '$(inherited)' flag into my project, deleting and recreating my Podfile, updating pod, etc. but nothing seems to let me update the SDK. Below is the code the terminal spits out after I run the pod install command:
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Using GoogleMaps (1.10.1)
Generating Pods project
Integrating client project
Sending stats
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total
pod installed.
[!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`
[!] The `projectName [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `projectName [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
You have not updated the gems. Try sudo gem install cocoapods
then clean the project cmd + shift + k. Then in your Framework Search Path (in build settings) use $inherited. then install a podfile and mention all the dependencies you need. This procedure might help you

Resources