Pods not found after creating new schemes? - ios

I've just decided to create a couple of different schemes with different configurations. However it get "No such module 'podname'", when I try to build it.
I've followed this guide, and tried to build just before the steps where you add configuration files. Any ideas why my pods doesn't get recognised? The new schemes I've created is name "development", "test" and "production".
This is how my podfile looks like:
When I run Pod install, I get the following messages:
[!] Automatically assigning platform `ios` with version `10.0` on target `NoteIt` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
[!] 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 `NoteIt` to `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (development).xcconfig` or include the `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (development).xcconfig` in your build configuration (`NoteIt/Development.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 `NoteIt` to `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (test).xcconfig` or include the `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (test).xcconfig` in your build configuration (`NoteIt/Test.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 `NoteIt` to `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (production).xcconfig` or include the `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (production).xcconfig` in your build configuration (`NoteIt/Production.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 `NoteIt` to `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(development).xcconfig` or include the `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(development).xcconfig` in your build configuration (`NoteIt/Development.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 `NoteIt` to `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(test).xcconfig` or include the `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(test).xcconfig` in your build configuration (`NoteIt/Test.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 `NoteIt` to `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(production).xcconfig` or include the `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(production).xcconfig` in your build configuration (`NoteIt/Production.xcconfig`).
[!] The `NoteIt [Debug (Development)]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (development).xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `NoteIt [Debug (Test)]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (test).xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `NoteIt [Debug (Production)]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (production).xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `NoteIt [Release(Development)]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(development).xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `NoteIt [Release(Test)]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(test).xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `NoteIt [Release(Production)]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release(production).xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
And I get the following error when I build after a clean:
My configurations settings looks like this:

Delete the .xcworkspace, Podfile.lockand Pods/ directory. Once Done do
pod install
Now, open the newly generated .xcworkspace file and add the .xcconfig path for Cocoapods in your own .xcconfig file.
For more details regarding solving this issue, you can refer to link.
This would solve the problem.
Happy Coding :)

I replicated your issue and got the same error "sandbox not in sync with Podfile.lock"
Even after the .xcworkspace, Pod folders and Pod related phases got the same error, so taking a closer look on the error, I found out that it wasn't finding the Pods .xcconfig files. However, looking at the Pods folder, at the path Pods/Target Support Files/Pods-NoteIt, I saw that these files where indeed there:
> Pods-NoteIt.debug (beta) Pods-NoteIt.debug (development).xcconfig
> Pods-NoteIt.debug (production) Pods-NoteIt.debug (qa)
> Pods-NoteIt.debug (uat) Pods-NoteIt.debug
>
> Pods-NoteIt.release (beta) Pods-NoteIt.release (development)
> Pods-NoteIt.release (production) Pods-NoteIt.release (qa)
> Pods-NoteIt.release (uat) Pods-NoteIt.release
>
> Pods-NoteIt.debug (beta).xcconfig Pods-NoteIt.debug
> (development).xcconfig Pods-NoteIt.debug (production).xcconfig
> Pods-NoteIt.debug (qa).xcconfig Pods-NoteIt.debug (uat).xcconfig
> Pods-NoteIt.debug.xcconfig
>
> Pods-NoteIt.release (beta).xcconfig Pods-NoteIt.release
> (development).xcconfig Pods-NoteIt.release (production).xcconfig
> Pods-NoteIt.release (qa).xcconfig Pods-NoteIt.release (uat).xcconfig
> Pods-NoteIt.release.xcconfig
What I did was to include the required files on each .xcconfig what I created manually. So for example, on the Development.xcconfig I added the following:
#include "Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.debug (uat).xcconfig"
#include "Pods/Target Support Files/Pods-NoteIt/Pods-NoteIt.release (uat).xcconfig"
So your file would look liket this, if you added some other variables like the one in the tutorial:
After repeating this for each .xcconfig (Development, Production, QA, Beta, UAT) I was able to build and run the project succesfully.

From another post, of syncing podfile.lock, the solution was:
pod deintegrate --verbose
pod install --verbose
if that doesn't work, simply follow the error code and reinstall coca-pods
link to the question The sandbox is not in sync with the Podfile.lock-ios

I had this same issue. I resolved it by deleting all pod files and the derived data folder from my project. Uninstalled all pods from my machine. Then I reinstalled them.
sudo gem uninstall cocoapods
sudo gem install cocoapods
pod init
pod install

in pod file, add target for each schema
Try something like this:
def shared_pods
pod 'SideMenuSwift'
pod 'Alamofire'
pod 'ObjectMapper'
pod 'SwiftDate'
pod 'NVActivityIndicatorView'
pod 'SwiftyUserDefaults'
end
target 'Target1' do
shared_pods
end
target 'Target2' do
shared_pods
end

Related

Cocoapods files are missing in flutter

I'm not an ios developer and am trying to add Firebase to my Flutter project. I followed the firebase guideline of adding an ios project. I first moved the GoogleService-Info.plist into Runner/Runner in Xcode. Thereafter I executed $pod init and added pod 'Firebase Core' into the Podfile. As described in the setup guide I executed pod install thereafter. This command already shows the following error messages:
[!] Automatically assigning platform ios with version 8.0 on target Runner because no platform was specified. Please specify a
platform for this target in your Podfile. See
https://guides.cocoapods.org/syntax/podfile.html#platform.
[!] 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 Pods/Target Support
Files/Pods-Runner/Pods-Runner.debug.xcconfig or include the
Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.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 Pods/Target Support
Files/Pods-Runner/Pods-Runner.release.xcconfig or include the
Pods/Target Support Files/Pods-Runner/Pods-Runner.release.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 Pods/Target Support
Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the
Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig
in your build configuration (Flutter/Release.xcconfig).
When I now try to run my app the debug concol outputs these errors:
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
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. Run 'pod install' or update your CocoaPods installation.
It seems as if some files are missing even though they are inside the ios project folder.
After some research, I found out that it's not necessary to run these pod comments. It's only required to move the google-services file into the iOS project.
follow the three simple step.
flutter terminal,
1. cd ios
2. pod init
3. pod install
after than, flutter run.

Warning at pod update due to difference in bit code settings in project and pods

I am trying to do a Pod update and recently started getting this error, request you to kindly help me what should I do.
I have tried the solution given for $inherited addition but no success yet.
[!] The `MYAPP_DEV [Debug]` target overrides the `ENABLE_BITCODE` 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 `MYAPP_DEV [Release]` target overrides the `ENABLE_BITCODE` build setting defined in
`Pods/Target Support Files/Pods/Pods.release.xcconfig'.
This can lead to problems with the CocoaPods installation
Try adding the $(inherited) like this in the Build Settings of your target:
(you have to select Other in the down menu to see the text box)

Warning when running pod update on CocoaPods 0.39.0

I get the following warning when I run pod update command. I checked that "$(inherited)" is already added in the build settings.
I tried settiong "EMBEDDED_CONTENT_CONTAINS_SWIFT" to both yes and no and I get this warning in either case.
The `Project Name[Debug]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` 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.
I think that the parameter EMBEDDED_CONTENT_CONTAINS_SWIFT under Building Settings in Xcode is not equal to that in file Pods/Target Support Files/Pods/Pods.debug.xcconfig.
You could try to make it same on these two points.

Problems with Cocoa Pods

I am having very bad problems with CocoaPod. I had to update Cocoa pods for Yosemite. I then ran pod update and got the following warning message:
[!] The `app [Release]` target overrides the `OTHER_LDFLAGS` 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.
And
[!] The `app [Debug]` target overrides the `OTHER_LDFLAGS` 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.
EDIT:
I followed #mef link but did not know where to place the code?
Based on Mefs link I was able to get it working. If anyone is wondering where to put $(inherited), put it in the Other linker Flags section of your project.

Resolving CocoaPods target overrides warnings for compilers

I'm using CocoaPods and am getting the warnings below. The error says to change the default settings to $(inherited), but that's not possible with these targets. You can only select from a list of options. Everything seems to be working, so I'm happy to just ignore the warnings, but if anyone can shed some light, I'd appreciate it!
[!] The `VitogoTests [Debug]` target overrides the `CLANG_CXX_LANGUAGE_STANDARD` build setting defined in `Pods/Target Support Files/Pods-VitogoTests/Pods-VitogoTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `VitogoTests [Debug]` target overrides the `CLANG_CXX_LIBRARY` build setting defined in `Pods/Target Support Files/Pods-VitogoTests/Pods-VitogoTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `VitogoTests [Release]` target overrides the `CLANG_CXX_LANGUAGE_STANDARD` build setting defined in `Pods/Target Support Files/Pods-VitogoTests/Pods-VitogoTests.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `VitogoTests [Release]` target overrides the `CLANG_CXX_LIBRARY` build setting defined in `Pods/Target Support Files/Pods-VitogoTests/Pods-VitogoTests.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
I can't say for sure, but from my research, the warnings are from a bug in cocoapods, so it's safe to ignore them.

Resources