Cocoapods "Framework not found Pods_<my_project_name>" - ios

I am trying to set up Cocoapods with my project for the first time, to use one framework that only comes as a pod. I already have an xcworkspace file, so I specified that in the Podfile. When I run pod install, it adds a reference to a framework Pods_<my_project_name>, but Xcode can't find that framework at build time. I can't find it on disk either. I see the framework for my one included pod framework in the Pods directory, but no Pods_<my_project>.framework.
If I delete the reference to the errant framework I can build, but it comes back if I run pod install again.
My issue is very similar to this reported issue, but I am definitely opening and building via my xcworkspace file.
When I first ran pod install it warned about some things, like including a reference to their xcconfig file in mine and setting $(inherited) in some settings I had values for - I fixed all those, and pod install no longer produces any warnings.
What is this framework supposed to be / do? Where is it supposed to live?
EDIT: Here's the Podfile:
platform :ios, '12.0'
workspace 'iOS'
target "MyProject" do
use_frameworks!
pod 'AdaptiveCards', '1.2.7'
end

Related

ld: framework not found IDZSwiftCommonCrypto

I have installed the pod libcommoncrypto, the path is
<project>/Pods/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/*.swift files
I fail to understand why Xcode is not able to find a framework installed by the pod.
Edit (Podfile)
source 'https://github.com/CocoaPods/Specs.git'
project 'myproject.xcodeproj'
target 'myproject' do
use_frameworks!
pod 'Toaster'
pod 'libCommonCrypto'
end
Edit : CommonCrypto not found
You apparently have IDZCSwiftCommonCrypto and Toaster as explicit entries in your "Linked Frameworks and Libraries", not as part of you cocoapods. Remove those two and try again, these should be added to your app only via Pods_SwiftCommons.framework that cocoapods creates for you.
Also: pod 'libCommonCrypto' does not create any files named IDZSwiftCommonCrypto at all, instead I find Pods/libCommonCrypto/CommonCrypto.{h,swift}, as I would expect. IDZSwiftCommonCrypto is another pod, unrelated to libCommonCrypto, if you still have those files I'd recommend cleaning your your Pods directory and running pod update again.

Pod update has fatally altered app

My perfectly working app used to have an Xcode Project Navigator as shown below.
iOS 10 requirements meant I had to upgrade Xcode to 8.1, which meant upgrading the entire Mac OS to Sierra and also translating the whole app to Swift 2.3.
Needless to say, this caused errors, one of which was an issue with PubNub. However, apart from this new build error the app structure was the same and everything seemed ok after dealing with all the layout issues.
I was requested to run the following steps to try to solve the PubNub pod error despite me warning that previous attempts to deal with the pod file caused fatal errors that were ultimately unrecoverable.
Install all iOS simulators after Xcode update
Open Xcode preferences (Cmd+,) and navigate to ”Locations” tab where will be shown path to ”DerivedData” folder
Click on small circle with arrow on the right side of shown ”DerivedData” path to open it in Finder
Quit Xcode
Remove ”DerivedData” folder
Clean up CocoaPods (if integrated with it) caches by entering this in Terminal:
rm -rf ~/Library/Caches/CocoaPods
From project root (where Podfile is located) run this in Terminal:
pod deintegrate MyApp.xcodeproj
Remove from project root (where Podfile is located) Podfile.lock file
From project root (where Podfile is located) run this in Terminal: pod update
Launch Xcode (hit Shift + Cmd + K just in case)
Try build project
After doing all this my Project Navigator now looks like this.
As you can see, I've lost a load of stuff including the pod file etc. As suspected, my app is now fatally wounded.
My bridging header is red, Restkit.h is red and all pod references gone.
My project root in Finder has the Pods folder and pod file etc, however if I try to drag folders into the project from Finder they do not show as they used to - e.g., folders are blue color not yellow.
I'm on Xcode 8.1 and Cocoapods 1.1.1.
How can I recover my app?
EDIT: If it helps, here is the link to my unsolved question in January which was the last time I dared touch the pod file at all until now. The consequences of this situation are the same as before - the difference is that in January I was ditching 2 weeks work, now I'm looking at ditching 10 months' work.
RestKit.h never found in Xcode project
Podfile:
pod 'RestKit', '~> 0.24.0'
pod 'SimpleKeychain'
pod 'AWSS3'
pod 'VideoCore'
pod 'SDWebImage', '~>3.7'
pod 'SVPullToRefresh'
pod 'PubNub', '~> 3.7.11'
pod 'MZFormSheetController'
Result of pod update in Terminal:
Update all pods
Updating local specs repositories
Performing a deep fetch of the master specs repo to improve future performance
warning: inexact rename detection was skipped due to too many files.
CocoaPods 1.2.0.beta.1 is available.
To update use: sudo gem install cocoapods --pre
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1
Analyzing dependencies
[!] The dependency RestKit (~> 0.24.0) is not used in any concrete target.
The dependency SimpleKeychain is not used in any concrete target.
The dependency AWSS3 is not used in any concrete target.
The dependency VideoCore is not used in any concrete target.
The dependency SDWebImage (~> 3.7) is not used in any concrete target.
The dependency SVPullToRefresh is not used in any concrete target.
The dependency PubNub (~> 3.7.11) is not used in any concrete target.
The dependency MZFormSheetController is not used in any concrete target.
From the pod update logs seems like CocoaPods can't find any target where the libraries have to be applied.
Can you try something like this in your Podfile?
target 'YOUR_TARGET_NAME' do
pod 'RestKit', '~> 0.24.0'
pod 'SimpleKeychain'
pod 'AWSS3'
pod 'VideoCore'
pod 'SDWebImage', '~>3.7'
pod 'SVPullToRefresh'
pod 'PubNub', '~> 3.7.11'
pod 'MZFormSheetController'
end
Not sure if it will fix the error you have.

IOS Run custom shell script 'embed pods framework' file not found error

I am getting an error when building my app after i removed reference to a framework i added incorrectly. i am new to ios and cocoapods
/Users/MyMac/Library/Developer/Xcode/DerivedData/MyApp-ewxrexwuczochyctnqvlyusrtvvy/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Script-5874133373474758EEC76CFD.sh: line 2: /Users/MyMac/Documents/MyApp/Pods/Target Support Files/Pods-MyApp/Pods-MyApp-frameworks.sh: No such file or directory
I am aware that the file and directory don't exist and that is the way it should be but where is it finding the reference to this file so i can remove it and be rid of the error.
I have checked the following:
Linked Frameworks andLibraries under the general tab of my project
The frameworks group in the project
framework search paths under build settings tab
i have also run pod update after removing it from the pod file
How can i fix this?
Edit
back story
I was trying to add the framework https://github.com/Alliants/ALAccordion . in the instruction it said to use
# Podfile
target 'My Target' do
use_frameworks!
pod "ALAccordion"
end
so i added MyApp where my Target is and it created a framework named Pods-MyApp which i cant remove completely.
hope this helps
Cocoapods wrote a tool to completely deintegrate all of this stuff from your project so it goes back to running standalone. It sounds like you had an issue adding the correct target, so use this:
https://github.com/CocoaPods/cocoapods-deintegrate
Then try again so you can at least start from good ground. Hope this helps!
It happened with a prerelease version of Cocoapods 1.2.0.beta.1, by reverting to stable version and running pod install, then clean build, it worked.
why
use_frameworks!
after
target ... do
here is example
platform :ios, '8.0'
use_frameworks!
inhibit_all_warnings!
target 'XXX' do
pod 'RealmSwift'
end
target 'XXXTests' do
pod 'RealmSwift'
end

'No such module' when I use CocoaPods

So here's my procedure. I create a new Podfile in the project directory, then I added the following
platform :ios, '9.0'
use_frameworks!
target 'CPod' do
pod 'AFNetworking', '~> 2.5'
pod 'ORStackView', '~> 2.0'
pod 'SwiftyJSON', '~> 2.1'
end
I fire off pod install, and everything goes well, open up the xcworkspace. I then go over to ViewController.swift and if I try to import a pod I get No such module 'SwiftyJSON', if I were to do import SwiftyJSON. Any ideas?
EDIT: SwiftyJSON is a Swift based module, not Obj-C
Try adding the Pods framework to your build scheme and building the framework. After you've built it, build/run your project.
Steps:
Scheme menu > Manage Schemes > check Pods > Close
Select Pods from the scheme menu.
Build Pods.
Select your project from the same menu, then build/run it.
You must reopen project .xcworkspace file(not .xcodeproj) after install your podfile.
Clone the repo with CocoaPods
Open YourWorkspace/YourApplication.xcworkspace
Select the app u want to run Add SwiftyJSON.framework in embedded
binaries for that project Hit Run
Happy Coding :)
You may also try re-installing pods using:
pod deintegrate
and then
pod install
This fixed this issue for me
Press Command+Option+Shift+K and then Run your app, you will see a magic.
Or from the menu -> Product, press Option on your keyboard and you'll see Clean Build Folder.
It's looking funny that how could Xcode do those things with us but same thing happened to me when I used a Swift library using Pod and after too much struggle I ended up with Clean Build Folder.
Not sure if this would still be helpful for others. But, in my case, it ended up being a silly mistake of not referencing dependencies from the .podspec file.
We have an application with multiple internal libraries, and those libraries also have dependencies on each other - which we accounted for the in the Podfiles... but NOT in the podspecs.
So, even though our Podfiles had:
Application / Podfile
# Development Pods
pod 'ConsumingLibrary ', :path => '../ios-consuming-lib'
pod 'DependentLibrary1', :path => '../ios-library-one'
pod 'CommonCoreLibrary', :path => '../ios-common-core-lib'
ConsumingLibrary / Podfile
# Development Pods
pod 'DependentLibrary1', :path => '../ios-library-one'
pod 'CommonCoreLibrary', :path => '../ios-common-core-lib'
Needed to also call it out in the .podspec's:
ConsumingLibrary / ConsumingLibrary.podspec
# TODO
# Add here any resources to be exported.
s.dependency 'DependentLibrary1', '~> 0.1.0-RC'
DependentLibrary1 / DependentLibrary1.podspec
# TODO
# Add here any resources to be exported.
s.dependency 'CommonCoreLibrary', '~> 0.1.0-RC'
I think I wasted about 2 hours trying to figure out why I could build ConsumingLibrary & run tests, but as soon as I built the app, that consumed all three libraries - I kept getting:
No such module 'DependentLibrary1'
In my case it was because I opened xcodeproj instead of the correct xcworkspace.
Had this issue, too. I noticed the folder in Pods/broken_framework_name for framework which produced an error was empty even after pod install or pod update. So, for me those steps helped:
close XCode completely
remove DerivedData
remove Podfile.lock. Before doing it, make sure your pods are set to specific versions and it will not cause unwanted code updates
run pod deintegrate
remove .xcworkspace file
probably optional step: I had general line use_frameworks! written before all targets, but included it also in target in which I had an error
run pod install
After all steps I noticed missing framework files finally appeared back and build was working again.
Try using pod update after pod install command which will solve problem of No such module.
I just tried and it working fine.
Thanks,
Ratneshwar
Those who working with multiple targets , please don't forget to add this line in pods
def shared_pods
pod 'SSKeychain', '~> 0.1.4'
pod 'INAppStoreWindow', :head
pod 'AFNetworking', '1.1.0'
pod 'Reachability', '~> 3.1.0'
pod 'KSADNTwitterFormatter', '~> 0.1.0'
pod 'MASShortcut', '~> 1.1'
pod 'MagicalRecord', '2.1'
pod 'MASPreferences', '~> 1.0'
end
target 'Target_Name' do
shared_pods
end
target 'Target_Name_Two' do
shared_pods
end
Sometimes happens when you have an obj-c pod within a swift project (even when you use the use_frameworks! in the .podfile).
If you're sure the pod is installed and you are still getting No such module, try this:
Go to Pods project in Xcode
Pods
Right click on the affected pod
Show in finder
There should be a package file with .framework suffix. Create a folder Modules in it. In this folder create a file called module.modulemap with code:
framework module MODULE_NAME_HERE {
umbrella header "MODULE_NAME_HERE.h"
export *
module * { export * }
link framework LINKED_FRAMEWORKS_AND_LIBRARIES_THE_POD_NEEDS_HERE
link framework "AdSupport"
link "c++"
link "z"
}
Rebuild and you should be ok.
As #jakub-truhlář wrote, the root issue is the missing module.modulemap file due to some concurrency issue mixing Swift and Objective-C libraries, but instead of creating those files manually, would be better to try multiple times cleaning the Derived Data and build your project. When the project is successfully built then commit module.modulemap files to your repository to avoid to lose those files for example changing the current branch.
I faced the same problem in a swift framework I developed. The framework had a dependency of git project and the framework itself added as a pod to my main project. So, ideally the dependency has been specified in podspec file and Podfile as well.
I didn't faced the problem when accessing through the my main project but when I open the framework standalone it was throwing "No such module" error.
The root cause is, the base configurations is set with the path which points towards my main project instead of the framework itself because I ran podinstall first in my main project and then in the framework project.
Eg: in the project file it was like
0091AB0C861D71C94ADD7240 /* Pods-myframework.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-myframework.release.xcconfig"; path = "../../Apps/MyMainProject/Pods/Target Support Files/Pods-myframework/Pods-myframework.release.xcconfig"; sourceTree = ""; };
After doing the below mentioned fix,
4444F5B1B35F066E57F96782 /* Pods-myframework.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-myframework.release.xcconfig"; path = "Pods/Target Support Files/Pods-myframework/Pods-myframework.release.xcconfig"; sourceTree = ""; };
To fix the error,
Project file -> Configurations -> Set all the configurations set to
none.
Remove Pods folder and Podfile.lock.
Run 'pod install' first in the framework project direcory and then do pod install in main project directory.
I get some warning when pod install: '... target overrides the FRAMEWORK_SEARCH_PATHS build setting defined in ...'.
Fix it and enjoy.
Reference: target overrides the FRAMEWORK_SEARCH_PATHS build settings.
Another way this issue can manifest: if you have multiple targets with different platforms (e.g. iOS and watchOS) you need to make sure your podfile specifies the correct platform for each target. Otherwise Cocoapods might be building the right pod but for wrong platform, leading to the "no such module" error.
You can fix it just by specifying the correct platforms e.g.
# global platform
platform :ios, '11.0'
target 'My Framework' do
use_frameworks!
pod 'RxSwift', '~> 5.1'
end
target 'My Framework (watchOS)' do
# override global platform for this target
platform :watchos, '4.0'
use_frameworks!
pod 'RxSwift', '~> 5.1'
end
i fixed it by check "Find Implicit Dependencies" to true.
Go to Edit Scheme -> Build Tab -> set Find Implicit Dependencies = true.
and rebuild.
Adding link "c++" in the framework module.modulemap file worked for me
I had this problem when I opened XCode and then selected the workspace of my project via file->open recent.
I found that I had two .xcworkspace files on my filesystem for the same workspace/project.
Opening XCode by double clicking on the correct .xcworkspace file did the trick.
The correct one is the one that works.
I later deleted the wrong one.
I just updated particular dependencies in terminal
Go to project folder then run below command
pod update your pod name
For me I need to do
pod update ReachabilitySwift
Had this issue while adding CocoaPods into an old project, which already had manually included libs from before. It happened because Xcode was not resolving to the Framework Search Path generated by CocoaPods because of values previously set in target's settings.
Solution that helped me:
copy the old path
hit delete to completely clear the Framework Search Path settings in the target's column - the path, generated by CocoaPods would appear there
add the old search path back under the generated one (only needed if you still have some manually added frameworks to work with)
Clean project, wipe Derived Data, build.
The result would look like this (1st line added by Xcode, 2nd added by CocoaPods, and 3rd is manual):
In case of multiple targets.
For eg. Target1, Target2
use_frameworks!
target 'Target1' do
pod 'Fabric'
pod 'Crashlytics'
target 'Target2' do
end
end
Then run pod install.
I tried all of these suggestions but nothing worked for me. Instead what'd worked for me was deintegrating pods. Afterwards deleting the pods folder from xcode hierarchy and doing pod install. Suddenly it worked. Don't ask me why because anyways most of these suggestions are hit or miss anyways but I'll be happy if it works for someone else too :)
Make sure to import correct framework name that is defined in .podspec of the pod.
I usually remove Pods folder and .xcworkspace file, then I run pod installagain and it helps in almost 100% cases.
My setup
macOS 10.14 Mojave
Xcode 10.3
cocoapods 1.7.5
None of the answers work for me, although some gave partial clues. In my case, the root cause was that I customized my build product paths after running pod install.
If you run cocoapods right after creating an Xcode project, then it usually works if you open the generated Xcode .xcworkspace instead of the .xcodeproj.
Funny things happen if you start tweaking your build product paths after generating the workspace. Because the generated Pods project and its target all refer to your old Xcode project settings.
In my case, my trouble came from:
I prefer all my build products sitting under the project folder $(SRCROOT)/build/$(CONFIGURATION)/$(EFFECTIVE_PLATORM_NAME). So I went ahead and changed my Pre-configuration Build Products Path to it .... AFTER doing pod install.
Now, the generated Pods project, including all its Framework target, still points to the old location, so both the header import and linking of your own project will fail (you'd see Command PhaseScriptExecution failed with a nonzero exit code when No such module is fixed).
The fix:
Delete all Pods stuff including the workspace.
Regenerate Pods project and workspace with pod install. However, cocoapods hardcodes the build product path to ${SRCROOT}/../build and Pre-configuration Build Products to $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) in my case, which usually points to a temporary ~/Library/Developer subfolder . Still not quite right. Then ....
Make sure the Framework Search Path and Header Search Path of my own project cover the above paths.
Tweak Pods project setting and all dependency Framework's Pre-configuration Build Products Path to use my preferred paths.
The moral lesson: Always regenerate Pods and verify the key result paths whenever you touch paths in Xcode project settings.
UPDATE
With Xcode 11, Apple finally removed the confusing "Pre-configuration Build Products Path". To customize the build product paths, use Locations in Xcode preferences with global relative paths pre-baked.
If you see this warning:
[!] The `Joint [Debug]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-Joint/Pods-Joint.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Joint [Release]` target overrides the `FRAMEWORK_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-Joint/Pods-Joint.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
follow the instructions to avoid Module not found issue.
For me, removing the following from my podFile fixed it:
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
clean project
close xcode
open xcode
enjoy
For using Swift in Objective-C, you should import a header file that Xcode generates automatically in compile time (NameOfModule+Swift.h). In this case, you should try import SwifityJSON in you header file like this:
#import "SwiftyJSON-Swift.h"

Cocoapods Warning - CocoaPods did not set the base configuration of your project because because your project already has a custom config set

After I execute a pod install at the base of my project, I get the following error:
CocoaPods did not set the base configuration of your project because because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target BluePlaquesLondonFramework to Pods/Target Support Files/Pods/Pods.debug.xcconfig or include the Pods/Target Support Files/Pods/Pods.debug.xcconfig in your build configuration.
This probably sounds like a silly question, but how do I set the base configuration for a target?
https://github.com/seanoshea/BluePlaquesLondon/blob/ios8/Podfile is the Podfile which is causing this issue.
http://github.com/seanoshea/BluePlaquesLondon on the iOS 8 branch is the Podfile in question if you're curious to see what the project looks like.
I had the same problem, but in Xcode 6.1.1 - what fixed it for me was to change the configuration file setting to None for the two Pods-related targets, then run pod install again.
The configuration file setting is found by selecting the project (not the target) and then the Info tab.
Don't tinker, Reset.
Step-by-step
Show Project Navigator
Select Project
Select Info
In Configurations, select each one, one at a time (Debug, ApplicationUnitTest, Release, etc.), and for each target within said configuration, set configuration to None.
Make certain that Based on Configuration File reads 0 Configurations Set or No Configurations Set for each configuration. That is the crux.
Quit Xcode
rm -rf Pods/ Podfile.lock ; pod install
Once you have allowed pod install in step 7 to do its magic, you may be able to use a custom config and change your configurations.
Go into XCode and open your project settings and under the Info tab, you will see "Configurations" where you can set a configuration file for both Debug and Release. You apparently have already set these to some custom config and CocoaPods wants/needs you to use the Pods config.
Ran into the same problem. It would build on the simulator but not on my device. None of the answers solved this for me. Here's what I did piecing some answers together:
Changed my pods file to use a specific target:
target :MyProject do
pod 'AWSCognitoSync'
pod 'Facebook-iOS-SDK'
end
Ran pod install
That gives an error:
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `MyProject` to `Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig` or include the `Pods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig` in your build configuration.
Go Project settings and click on Info tab. There will be an error where it cannot find the Configuration file. Set it to "None" for Debug and Release.
Run pod install yet again
Clean and build. This works.
I fixed my issue after a careful reading of the error message:
[!] CocoaPods did not set the base configuration of your project
because your project already has a custom config set. In order for
CocoaPods integration to work at all, please either set the base
configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig in your build
configuration (Flutter/Release.xcconfig).
Solution
Open Xcode and change the Runner Info Base Configurations to the
related Pods-Runner.profile.xconfig.
Quit Xcode
Terminal: From the ios project folder run pod deintegrate
Verify pods are removed
Project has been deintegrated. No traces of CocoaPods left in project.
Note: The workspace referencing the Pods project still remains.
Terminal: From the ios project folder run pod install
(from this original - BAD)
(to this GOOD settings)
Notes
I have not been able to resolve the issue using the second
suggestion of including the xconfig file inside of the
Flutter/Release.xcconfig configuration file as mentioned in the
error message.
You should also make sure that you have no pods in the root of Podfile, you should define all the pods that are used in many targets like that:
def shared_pods
pod 'ReactiveCocoa', '~> 2.5'
end
target 'app' do
shared_pods
pod 'RestKit'
end
target 'tests' do
shared_pods
pod 'OCMock'
end
You also might need to delete libPods.a and libPods-app.a from the target dependencies, perform a clean and then run pod install again.
For those coming from the Flutter world, this is a misleading error message suggesting an unnecessary action, and the correct course is to ignore the error and use the flutter cli (not pod), as discussed in https://github.com/flutter/flutter/issues/73845:
gatzsche says a better message would be:
In Flutter pod install should not called manually. To run pod install
execute the following commands flutter clean, flutter pub get and
flutter build ios.
jmagman notes:
As you point out, the error message is suggesting an action that isn't necessary. The flutter command suppresses that message from pod. You ran pod directly, which isn't a recommended workflow. We don't have any control of error messages coming from CocoaPods, and the flutter command line tool already suppresses the confusing message.
I just ran into this issue after adding some custom build configurations. I could see under:
Pods (target) > Target Support Files > Pods
that it had actually created the new xcconfig files that matched the new build configurations but for some reason I could not select these in the project target of my app.
What fixed it for me was to install and use cocoapods-deintegrate:
gem install cocoapods-deintegrate
and then run:
pod deintegrate
followed by:
pod install
In case you are using custom config you can follow the suggestion in the warning and include the Pod config in your config file
#include "Pods/Target Support Files/Pods-YYY/Pods-YYYY.develop-archive.xcconfig"
This will NOT stop the warnings but will allow you to use your private config (there is an open bug on the warning with CocoaPods project)
https://github.com/CocoaPods/CocoaPods/issues/2633
If you added a custom build configuration to your existing project, Cocoapods will complain about it.
Cocoapods will automatically create xcconfig files under the directory Pods/Target Support Files/<build_target> following the naming pattern Pods-<build_target>.<build_config>.xcconfig.
Just make sure to manually add those files to your project in Xcode (under the Pods directory, but not inside the Pods project!). Once those files are included select your project in Xcode, go to the "Info" tab, and expand your custom configuration. Select the appropriate xcconfig file for each target under your custom configuration.
The line in the podfile that is generating a problem is : link_with ['BluePlaquesLondon', 'BluePlaquesLondonFramework'].
Just make this : link_with ['BluePlaquesLondon'] or this (worked in my case, hope it will in yours :-)) :
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
xcodeproj 'BluePlaquesLondon.xcodeproj'
inhibit_all_warnings!
link_with ['BluePlaquesLondon']
def import_pods
pod 'TTTAttributedLabel', '~> 1.10.1'
pod 'GoogleAnalytics-iOS-SDK', '~> 3.0.9'
pod 'Google-Maps-iOS-SDK'
pod 'IntentKit'
pod 'HCViews'
pod 'SVProgressHUD', :head
pod 'iRate'
pod 'iOS-KML-Framework', :git => 'https://github.com/FLCLjp/iOS-KML-Framework.git'
end
import_pods
target "BluePlaquesLondonFramework" do
import_pods
pod 'Kiwi'
end
I had the same error while pod install. I tried everything (reinstall pod, update all gems, etc.) and I found solution worked in my case. There was problem because of changing target's name. In this case solution is simple:
Click Product -> Scheme -> Manage Schemes...
Click on your target on the list and delete it with "-" sign on bottom of window.
Click "+" to add target back to list. Choose correct target and name.
After all everything should works.
I moved pods in Podfile outside from the target. File changes from this:
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'MyProject' do
pod 'Firebase', '>= 2.5.0'
pod 'Onboard'
pod 'GoogleMaps'
pod 'IQDropDownTextField'
end
To this:
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
pod 'Firebase', '>= 2.5.0'
pod 'Onboard'
pod 'GoogleMaps'
pod 'IQDropDownTextField'
target 'MyProject' do
end
Add the relevent xcconfig files to your project. Cocoapods will have created them but you can't set them in Xcode until they are in the project.
You probably want to add them to the Pods group where the other pods xcconfig files are. Right click and add files.
Search for xcconfig files in your project folder or look in Pods/Target Support Files/[TARGET_NAME]/ (I have different cocoapods configured for each target (extension and main project this may be slightly different in your case)
Go to project configurations in the Info of your main project
For each target and configuration set the appropriate pods configuration.
pod install again and you should see no errors.
So for me, the problem was due to the aforementioned xcconfig files names being changed before the Swift 3 update took place.
Something was out of sync, so Cocoapods created a 'Recovered References' folder section with the old named files, and linked to them.
To fix this, I:
Removed the 'Recovered References' folder and the containing old
.xcconfig files from Xcode and file system
Quit Xcode
Run pod install
Everything was handled for me after then, and the warnings were gone.
I was able to build the project touched by this issue on XCode 6 by:
selecting Project from the Project Navigator
choosing Project instead of Target
going to Info tab
choosing Pods.(debug/release) Configuration Files from the combobox for the respective Configurations.
Hope this will help someone.
This happened to me because I already had a Pod configuration. I'm new on iOS development, was searching instructions to install Alamofire + SwiftyJSON and ended up installing the libraries more than once, inadvertently. To me, what worked was: on the folder "Target Support Files" in "Pods" project, I selected the two correct .xcconfig files and dragged them to the "Pods" folder of my app project. This enabled the selection of the correct config files on the base configuration.
But then, if I run "pod install" again, the warning will change to the previous .xcconfig file. I try to delete the files and the old framework from the main project but when i ran the previous command once more, gave me the same warning, and created the file "Pods.framework" under the "Pods" folder of my app project. I ignored it, and it seems to be running ok, despite the two frameworks. I don't know if it's right, and a solution, if exists, it would be welcomed.
I had error:
diff: /../Podfile.lock: No such file or directory diff: /Manifest.lock: No such file or directory error: The sandbox is not in sync with the Podfile.lock.
I just checked the path where I was installing the pod and corrected it and installed again,It just worked.
Make sure give the path just before where .xcodeproj or .xcworkspace (if it is already there) exists.
Sorry my previous answer was unclear. This was just one of many errors i've got while trying to set up Cloud Firestore, so this answer is specific for that situation. In order to solve this error and make firebase work, eventually, you have to follow all of the steps from this page: https://firebase.flutter.dev/docs/firestore/overview/ . If you are having problems with generating the 'firebase_options.dart' file, then you need to follow the steps on this page: https://firebase.google.com/docs/cli#mac-linux-auto-script . The last step is optional, but it reduces build time, and I really don't know how or why, but it made some of other errors also disappear... Step 4. Improve iOS & macOS build times, from this page https://firebase.flutter.dev/docs/firestore/overview/. And off course, don't forget to add dependencies in pubspec.yaml: https://pub.dev/packages/firebase_core/install . There is also a great comment here about using Firebase.initializeApp() : https://stackoverflow.com/a/63492262/17626190
Seems a good ole system restart and probably more importantly it seems I had to reinstall cocoa pods even though the CLI seemed to be in perfectly working condition and had been working for many days before today.
Reinstalled CocoaPods 🤷
sudo gem install cocoapods
It doesn't seem this was the fix for anyone else, but I figured I should post it since this was driving me nuts, and hopefully it helps at least one other person.
This is the messages I got after running pod install or pod update:
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.debug-staging.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.debug-staging.xcconfig` in your build configuration (`Flutter/Debug.xcconfig`).
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.release-staging.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.release-staging.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile-staging.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile-staging.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).
This is what I did to solve the issue:
Add Schemes to Podfile under project 'Runner'
project 'Runner', {
'Debug' => :debug,
'Debug-staging' => :debug,
'Profile' => :release,
'Profile-staging' => :release,
'Release' => :release,
'Release-staging' => :release,
}
Go to ios/Flutter/Debug.xcconfig and include
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-staging.xcconfig"
Go to ios/Flutter/Release.xcconfig and include
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-staging.xcconfig"
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile-staging.xcconfig"
flutter clean
Delete podfile.lock
Pub get
pod install
Just follow the Android Studio instructions.
This is the error output:
"[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`)."
In android studio IDE go to IOS folder/Flutter and open the file Release.xconfig
Then just past this line:
Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig
Delete podfile.lock and try to rebuild in Xcode. Worked for me.
The simplest solution for this (after having this issue multiple times):
Delete Podfile & Podfile.lock from your project library (save Podfile somewhere so you could easily paste to new Podfile)
run 'pod init'
Edit the 'Podfile' to your will (add pods you are using)
run 'pod install'
This would recreate everything and works always in minutes (not spending time to reverse engineer the "bug").

Resources