Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pods not found after creating new schemes?

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:

enter image description here

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:

enter image description here

My configurations settings looks like this:

enter image description here

like image 289
Recusiwe Avatar asked Oct 12 '18 13:10

Recusiwe


3 Answers

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 :)

like image 142
Md. Ibrahim Hassan Avatar answered Nov 14 '22 12:11

Md. Ibrahim Hassan


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:

enter image description here

After repeating this for each .xcconfig (Development, Production, QA, Beta, UAT) I was able to build and run the project succesfully.

like image 1
Victor Sanchez Avatar answered Nov 14 '22 12:11

Victor Sanchez


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

like image 1
question asker. Avatar answered Nov 14 '22 11:11

question asker.