Xcode 10 GM multiple command produce... Pods issues - ios

Just switched to xcode 10 Golden Master and start getting the error with one of my pods, FDTake. Tried this thread but I don't have a plist in my build phases, so it didn't work. Is this issue pod related?
Showing All Messages
:-1: Multiple commands produce '***/Xcode/DerivedData/app-fgyqhwrvkbjquheilgwhyjltujtz/Build/Products/Dev-iphonesimulator/FDTake/FDTake.framework/Info.plist':
1) Target 'FDTake' (project 'Pods') has copy command from '***/GoogleDrive/dev/_ios/Work/sutulp/Pods/FDTake/Source/Info.plist' to '***Xcode/DerivedData/app-fgyqhwrvkbjquheilgwhyjltujtz/Build/Products/Dev-iphonesimulator/FDTake/FDTake.framework/Info.plist'
2) Target 'FDTake' (project 'Pods') has process command with output '***Xcode/DerivedData/app-fgyqhwrvkbjquheilgwhyjltujtz/Build/Products/Dev-iphonesimulator/FDTake/FDTake.framework/Info.plist'
I also tried to remove the derived data folder, but it didn't work either. Tried to clean the project and so on – no luck. Any advice is appreciated.
Switch to old build system will not be a solution.

I had same problem with Xcode 10 GM. In my case Cocoapods not found. So, require to re-installed it.
To find if Cocoapods is installed or not run command on terminal. pod --version
if the result is Not Found Pods is not installed. So, run command on terminal $ sudo gem install cocoapods --source http://rubygems.org
Hope it's helps to you...

This looks very similar to this question: Xcode 10 Error: Multiple commands produce
Here is a link to the most voted answer https://stackoverflow.com/a/50719379
If this doesn't work, you may have a Pod dependency cycle for that pod.
In my case, there was such an issue.
In my pod project the target Lock had a target dependency to the Lock-Auth0 framework so I had to remove the line for "Lock-Auth0" for the Lock target by going to Build Settings > Target Dependencies > & Copy Bundle Resources (this will be undone if you run pod install again) .
I took a look at the Lock.podspec and realized that the dependency has been removed on the latest version so upgrading to the most recent version of the Pod will be my next step.
Hope this helps.
here is a screenshot of my error

Related

Could not build module 'nanopb' error in Xcode 12.0.1

I upgraded my Xcode to 12. Everything was working perfectly and all of a sudden I kept getting bellow error message (Image below)
SO link have tried using to solve this issue
SO Link
What I've done so far
Cleaned Build Folder
Restarted Xcode
Updated Cocoapods
Deleted DerivedData
Cleared pod cache
Deleted pods directory and file and reinstall
None of them worked and its getting frustrating.
Pod file
All I did was to follow the instruction(see image below) and it got fixed.
Source here
I had the same problem with a project still targeting iOS 8 as the minimum iOS version. This steps solved my problem:
Update minimum target iOS version to iOS 9 on Podfile file;
Open terminal on project folder, remove all pod file dependencies and update them by running:
rm -rf /Pods
pod repo update
pod install
Update minimum project target iOS version to iOS 9;
Remove DerivedData;
Clean project;
Compile/run project again.
A simpler solution is to update cocoapods to the 1.10 version
First, update the CocoaPods installation :
[sudo] gem install cocoapods
Then, update your project : bundle update cocoapods
Finally, run pod install and everything should be OK :)
If the previous solutions did not help someone, then try changing it this way:
#include <nanopb/pb.h>
->
#include "nanopb/pb.h"
This issue CAN be the result of developing iOS on an M1 (Apple Silicon) machine. In this case, the only way to fix the problem is to download a Ruby extension called "ffi" which you can read about here (for extra information): https://rubygems.org/gems/ffi/versions/1.0.9
To do this:
In Terminal, install ffi onto your machine using this command:
sudo arch -x86_64 gem install ffi
Then in your project file, install your podfile with this command:
arch -x86_64 pod install
This should allow you to install your pods (especially if you were getting a "zsh: abort pod install" problem. Notice Terminal will warn you "a bug in the Ruby interpreter or extension libraries".
After this, if your pod was FireStore/FireBase you may have to get another GoogleService-Info.plist file in your project.

Xcode 10.2 Update issue Build system error -1: Unable to load contents of file list: input/output xcfilelist

After upgrading to Xcode 10.2 I am getting 2 errors
:-1: Unable to load contents of file list: 'xxxxx/Pods/Target Support
Files/Pods-xxxx/Pods-xxxxx-frameworks-Debug-input-files.xcfilelist'
(in target 'xxxxx')
:-1: Unable to load contents of file list: 'xxxxx/Pods/Target Support
Files/Pods-xxxxx/Pods-xxxxx-frameworks-Debug-output-files.xcfilelist'
(in target 'xxxxx')
I updated all my pod and changed build system to "Legacy Build System" but still getting the same build error
I struggled with this for several hours today and this is what finally worked for me:
sudo gem update cocoapods --pre
pod update
clean
build
From what I've read, this is an issue with the new build process that is enabled by default in Xcode 10.2 though I've not found the workaround clearly documented anywhere yet. There may be a more elegant solution than what I described.
delete 'Pods/', 'Podfile.lock', 'yourappname.xcworkspace'
pod deintegrate
pod install
it's work for me
I have encountered this problem every time, using the above method to solve, I do not know why, how to completely solve
To illustrate the answer of #nfranzmeier:
Go to your project:
Select the right target
Build Phases
Unfold [CP] Embed Pods Frameworks script phase
Remove the files under Input Files Lists and Output Files Lists sections by selecting each of them and clicking on the - button
And you're done!
None of the solutions above worked for me. What did the trick was:
Go to Xcode > Project > Info > Configurations
Set the values for Debug > Pods-XXX.debug and Release = Pods-XXX.release
This solved the issue for me on Xcode 12.0 beta
Just pod install fixes this.
You don't necessarily want to update your pods (especially if you have not locked in versions explicitly). We had this error after creating a new Scheme.
This solved my problem:
Open **Terminal**
1) run -> pod deintegrate
2) run -> pod install
In **Xcode**
3) Click Product Menu
4) Keep Pressing Option Button
5) Click Clean Build Folder
6) Run
This worked out for me:
cd ios && pod deintegrate
pod install
Then go ahead and rerun your project
I had changed the Run Configurations, from: Debug to DEV, but didn't change the Scheme:
On top left, select your project name, next to your device:
Then, select your project and click "Edit"
Last, change from Debug to your desired "Run configuration", in my case was DEV:
Do that, for every single one in the list on the left, but for Profile, leave that one as Release or your equivalent:
You can just edit your xxxx.xcodeproj/project.pbxproj file and delete the offending lines xxxinput-files.xcfilelist and xxxoutput-files.xcfilelist from the inputFileListPaths() outputFileListPaths() so they're empty again and then save it and rebuild
In my case the error happened when archiving the app.
The cause was that the wrong build configuration was selected in the build scheme. This happened after introducing xcconfig-files for staging environment.
How i fixed it:
select the build scheme in Xcode (next to the "play" button)
select product -> scheme -> edit scheme
check if the correct build scheme is selected
see here:
For me, this was caused because I was setting up a custom configuration (.xcconfig) file for different environments.
I wasn't importing the Pods/Target Support Files/Pods-XXXXXX/Pods-XXXXXX.release.xcconfig into my configuration file.
This guide helped me find the missing step.
https://thoughtbot.com/blog/let-s-setup-your-ios-environments
Thanks Patrick.
In my case
-> pod deintegrate
-> pod clean
-> pod install
then rebuild the project works fine.
My XCode = 11.3.1
cd ios
rm Podfile.lock
edit Podfile as below
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
>> Uncommented and bumped the version to 10
flutter clean
flutter pub get
pod repo update
pod update
For myself it works like that:
For example app name is "xyz"
click xyz(top) -> project(xyz)-> info -> configuration -> Debug -> xyz -> "Select Pods-xyz.debug"
xcode-13 or above
For me (using Mac Mojave) using the above solutions didn't work..
I manage to successfully overcome this issue by installing RVM on my Mac via:
curl -L https://get.rvm.io | bash -s stable --auto-dotfiles --autolibs=enable --rails
As described on this page.
And then re-install cocoapods via:
gem install cocoapods
And lastly run again:
pod install
I hope this helps someone who was stuck endlessly like me :)
I have the same issue and do the below steps and now am able to make build successful
go to Project->Configurations and set the valid configuration file for configuration.
if you see already set correct valid configuration file then do pod install
if you are not able see valid configuration file then pod install and Now you can see the valid configuration file just choose the right one now.
Note : I have this issue on Xcode 11.7
These are the steps that worked for me:
In the terminal, inside of project document, type:
pod update
If pod is not found, you should install Cocoapods:
sudo gem install cocoapods
If it returns a ruby/gem error, you should install (or reinstall) Ruby:
curl -L https://get.rvm.io | bash -s stable
rvm install ruby-2.7.2
sudo gem install cocoapods
Try to update pods again, and when it is finished, open .xcworkspace file.
I solve the cloud_firestore not found the issue as well by this after integrating a new version of that cloud_firestore.
(optional) update the podfile with the required version of cloud_firestore for fast compiling (saves 500k+ lines of execution).
delete 'Pods/', 'Podfile.lock', 'yourappname.xcworkspace'
pod deintegrate
pod install
If still have this problem and using flutter, you should open Runner Info Tab (in Xcode) set configuration file to None. then run pod deintegrate pod install.
I resolved this issue with....
Go to your Targets in xcode
Go to Build Phases
Next go to Run Script and check it has any files in input file lists or output file lists
Now, Remove files (input-files.xcfilelist / output-files.xcfilelist) using symbol - from Input file Lists and Output file Lists respectively
Try to go to your project directory.
Navigate to /ios
Remove Podfile.lock
Run project
Change build configuration from release mode to debug mode.

iOS: Cocoa Pods: Code Compile Issue

The Problem
I recently started working on a project.
Which Uses Cocoa Pods as the dependency manager.
It also uses Crashlytics for crash reporting.
Image Magick for Icon generation and Synx for reorganizing the project folder.
I was given Git access.
So I cloned the repo.
did a pod install
and compiled the code but it started giving me following error.
Project target is iOS 7.
Cocoa Pods Version is 0.36.4 also tried Latest 0.38.2
It is an iphone only app.
What I have done So far trying to solve this issue
So I sat down with the Original developer who was very helpful and had a working copy of the code on his machine. As it was a code handover so he was helping me setting it up on my machine.
We have tried all the usual suspects.
Clean and Build
Clean Quit Xcode Reopen and build
Quit xcode delete the Pods Directory and do a pod install
pod setup
pod update
Checked PODS_ROOT paths for different build configurations with working copy on another machine where it compiles correctly
My pods were latest so I uninstalled cocoapods using sudo gem uninstall cocoapods and installed the version the original developer had sudo gem install cocoapods -v 0.36.4
Matching Xcode versions xcode 6.4
Checking Configurations under Info in Project
Another pull from Github at a different location and doing all above steps.
Clear Xcode derived data folder.
So basically we checked all this retried all the above steps many times and also verified project settings build phases etc.
code is running fine on his machine.
Some weird behaviour i noticed was that one time instead of above mentioned error in picture it gave the famouse xyz.h file not found error for one of the libraries in Pods. But doing a pod install reverted back to original error.
Any ideas?
I remember this one.. I think it is due to cocopods changed the directory of there "copy pods resources" shell script from one version to the other. Look under your targets build phases and check for a "run script" entry i think. Look at the path and then check in finder to see where the shell script is really located.
Not really certain of the details... it might have been one of the other cocopods enters in the build phase section. Look around there, I do remember it was pretty easy to spot when you know where to look.
Should probably be the "Check Pods Manifest.lock" section under Build Phases.
Make sure you are opening workspace project(.xcworkspace) instead of XCode Project..
Else
Remove podfile.lock
Remove Pods Folder
Remove .xcworkspace
Remove manifest.lock (if exists)
Go to path of pod file and Run pod install
Then it will generate .xcworkspace.
Now onwards you need to use workspace instead of xcodeproj
Hope it helps you..!

The sandbox is not in sync with the Podfile.lock-ios

I have got the following errors after trying multiple answers from the google.
PhaseScriptExecution Check\ Pods\ Manifest.lock /Users/apple/Library/Developer/Xcode/DerivedData/Build/Intermediates/FoodSpot.build/Debug-
iphonesimulator/FoodSpotTests.build/Script-36819C3C1B6A30F50091382D.sh
cd "/Users/apple/Downloads/FoodSpot 2"
/bin/sh -c /Users/apple/Library/Developer/Xcode/DerivedData/Build/Intermediates/FoodSpot.build/Debug-iphonesimulator/FoodSpotTests.build/Script-36819C3C1B6A30F50091382D.sh
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.
I have updated and installed many times, but they are of no use.
For me, the reason was missign User-Defined variables in the Build Settings!
Looking into the issue, the Build Phases tries to diff 2 files.
diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
Just because of missing PODS_PODFILE_DIR_PATH and PODS_ROOT variables, assumes them as "" so ${PODS_PODFILE_DIR_PATH}/Podfile.lock points to /Podfile.lock and same for the other one.
So it fails in
diff /Podfile.lock and /Manifest.lock
I fixed this by adding 2 User-Defined settings to the Build Settings
PODS_ROOT = ${SRCROOT}/Pods
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
After hours of searching this is the only solution that worked for me
For me, it works after the following:
pod deintegrate --verbose
pod install --verbose
Run 'pod install' or update your CocoaPods installation.
You have answer in the error itself !
The error message states that you should update your CocoaPods installation.
You could remove libPods in frameworks and libraries and update Cocoapods using pod install.
Also:
clean and build the project
SO references :
CocoaPods Errors on Project Build
Error:"The sandbox is not in sync with the Podfile.lock..." after installing RestKit with cocoapods
I had been searching for hours and I found solutions as follow:
In my case, method 3 works.
Method 1:
choose the target > go to Build Phrases > click Link Binary With Libraries > remove all libPods.a files
open Terminal > direct to your project > run:
pod install
clean and build project
ref.1
Method 2:
open Terminal > direct to your project > run:
pod deintegrate --verbose
pod install --verbose
ref.2
Method 3:
choose the target > go to Build Settings > click "+" sign
add 2 User-Defined Settings: [to the left = to the right]
PODS_ROOT = ${SRCROOT}/Pods
and
PODS_PODFILE_DIR_PATH = ${SRCROOT}/
ref.3
Just go to Build phases and click on [CP]check Pods Manifest.lock.
diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
Both PODS_PODFILE_DIR_PATH and POD_ROOT should define in user-Defined in build settings.
POD_ROOT should have correct path to Manifext.lock file and
POD_PODFILE_DIR_PATH should have correct path for Podfile.lock
So Add below in build settings.
PODS_ROOT ---- ${SRCROOT}/Pods
PODS_PODFILE_DIR_PATH ---- ${SRCROOT}
The problem is Podfile.lock and Manifest.lock cannot be found by the Check Pods Manifest.lock Script in your targets build phase.
This is usually caused by PODS_PODFILE_DIR_PATH and PODS_ROOT variables not being defined.
Go to build settings tab to define them.
You will need to look for Podfile.lock and Manifest.lock in your project and get the the full paths of their directories. The directory paths will be the values you use for PODS_PODFILE_DIR_PATH and PODS_ROOT.
Deleting the derived data did the trick for me . I deleted by going into the finder itself.
Make changes in the podfile as given below:
Older pod file
target :TargetName, :exclusive => true do
Changed pod file
target 'TargetName' do
I'm pretty sure that you have opened your Projects' workspace which you try to install new Pods. So try out the following (for me this worked):
Clean the project
Close the project
Run pod install
Open the project and try re-building it once more
Problem might have been resolved.
Edit
It turned out my issue was due to a new line at the end of the Manifest.lock that was not present in the PodFile.lock file. Running a diff on the two files highlighted the issue.
Adding a new line to the end of the PodFile.lock file solved it.
Original Answer
None of the answers have worked for me so I have just checked the "For install builds only" under "[CP] Check Pods Manifest. lock" which is found in the build phases tab.
I believe this setting means it will only run that check when archiving, allowing me to continue developing as I don't need to archive the app on my machine.
Use with caution though as it may not be the best solution for everyone.
This happens if cocoa pods don't install or uninstall properly
If you want to install cocoa pods run
pod install
if you you want to uninstall cocoa pods then run command
pod deintegrate
I had the same issue. Turned out the cocoapods version on Manifest.lock was higher than what I had on my mac. I had to do a 'sudo gem install cocoapods', to get the version of the cocoapods upto what was specified on the Manifest.lock file. This fixed the issue and I had no errors on building the project.
Im facing the same issue now and fixed using this command after navigating to project location in terminal.
pod install --repo-update
I fixed this by adding 2 User-Defined settings to the Build Settings
PODS_ROOT = ${SRCROOT}/Pods
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
In my case, I got same error after integrating my other targets. To solve problem I needed to add both targets in Podfile:
abstract_target 'myApp' do
use_frameworks!
pod 'Alamofire', '~> 3.0'
pod 'SwiftyJSON'
target 'myAppOtherTarget'
end
Make sure you add a "pod install" command line build step, before the Xcode Project build step.
The error is coming from the build phase run script in your Xcode project's target, which is unable to find Podfile.lock. This file is generated by CocoaPods, which must be installed in a build step in your TeamCity project.
My build steps look like:
Command line: bundle install --path .bundle (installs cocoapods local to the project using Gemfile).
Command line: bundle exec pod install --verbose (uses Podfile)
Command line: carthage update --platform iOS (uses Cartfile)
Xcode Project
Command line to build an archive
Command line to upload a build
Hope this helps.
In my case, the errors were occurring on a _Tests target. I didn't need the _Tests target, and so I deleted it. This resolved the error.
If you happen to move your Podfile like i did and face this issue, the solution discussed below may help -
Delete all of the following - Pods folder, xcworkspace
file, podlock file (skip the ones that are not available for subfolders)
delete all steps that has [cp] in it from the build phase tab
repeat step 1 & 2 for all the sub projects that you have in your workspace
open workspace, go into each project and delete framework for pods, and delete the pods folder from each project
close workspace
run pod install
you should now be able to open, build and run the project
I just fixed it by updating the Cocoapod, cause before the error there was log where the warning shows we need to upgrade our cocoapods as the pod files are not supported by the current cocoapod version, So clean the project , upgrade cocoapod then install pod.
1. Clean project
2. sudo gem install cocoapods/gem install cocoapods
3. pod install (optional if your project still shows error)
Note: I found this error for my flutter application in iOS platform
I think you are trying to use your old project pod folder in your current project, you have to copy Manifest.lock file of your current project and replace that file in your old project's pod folder which you added. Manifest.lock file location YourProject->Pods->Manifest.lock
Hope This was helpful. worked for me!
Please check Top Sites - Sandbox Sync iOS for more explanation. I fixed the issue by changing file paths from
diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
to
diff "${SRCROOT}/Podfile.lock" "${SRCROOT}/Pods/Manifest.lock" > /dev/null
in Xocde -> "Open Your Project" -> "Select Your Project" -> "Select Your Target" -> Build Phases -> Check Pods Manifest.lock
If not, try changing paths as mentioned above, along with Legacy Build System. To change build system Xcode -> File -> Workspace Settings -> Build System -> Legacy Build System
I hate to say this, but I just removed the pods/ or didn't include them in the project and it built. I don't know if this will have a long-term effect on the project though.
This is presently my .sh build script for ionic5 for ios. It will probably change in the future.
# BUILDING FOR IOS
##################################
#
# MAKE SURE YOU UNPLUG ALL DEVICES!!!!!
#
##################################
ionic cordova platform remove ios
ionic cordova prepare ios
ionic cordova platform add ios
ionic cordova build ios --prod --release --buildFlag="-UseModernBuildSystem=0" --verbose
cd platforms
cd ios
open "MyApp.xcworkspace/"
cd ..
cd ..
It had be plaguing my project, so I thought I'd take them out. I am yet to deploy the project so far though... so who knows.
BigSur 11.1, XCode 12.4 (12D4e)

Cannot compile Cocoapods with XCode/Obj-C – "Pods-prefix.pch.dia: No such file or directory"

I am using XCode 4.5.1 and iOS 6.0 base SDK.
Here is the error I am receiving:
i686-apple-darwin11-llvm-gcc-4.2: /Users/fahim/Library/Developer/Xcode/DerivedData/Currenthiphop-emodxxwwaiojlcboaxuodksuwuww/Build/Intermediates/PrecompiledHeaders/Pods-prefix-evibdktwbatdnbabmrlnderfsxxi/Pods-prefix.pch.dia: No such file or directory
There is only 1 file in the Pods-prefix-xxx directory:
Pods-prefix.pch.pth.hash-criteria
Here is my Podfile:
platform :ios
pod 'LibComponentLogging-Core'
pod 'LibComponentLogging-LogFile'
pod 'LibComponentLogging-qlog'
pod 'LibComponentLogging-pods'
pod 'Facebook-iOS-SDK'
pod 'RestKit'
Any help is appreciated. Thank you!
I actually found this solution right here that details opening up Xcode using normal means (Finder or the Dock), as opposed to using the open <Workspace>.xcworkspace command. I've always used Xcode from my dock, whereas the other developer (who couldn't build the project and was getting the error you were) was using the open command from the command line. Once he opened Xcode from the Dock, and manually browsed to open the project that way, he could build it successfully.
If you are using CocoaPods 0.18.0, this might be cause by CocoaPods and is fixed in https://github.com/CocoaPods/CocoaPods/issues/956
Extra quote in "$(inherited)" was the cause (https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/generator/xcconfig.rb#L150). It should not be quoted. If you remove them from the xcconfig the project will build again. You may want to check your xcconfig and see if there are extra quote.
This issue can be caused by a few different factors but in my case and the case of some colleagues, this resolved the missing pch.dia
Uninstall CocoaPods and install 0.17.1
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 0.17.1 --verbose
Lock your Kiwi version to 2.05 if Kiwi is one of your pods:
target :KiwiUnitTest, :exclusive => true do
pod 'Kiwi', '2.0.5'
Clean your Xcode project including Derived Data. Close down Xcode, re-open the project and build.

Resources