pod installproject.pbxproj should be unchanged if no changes were made in podfileproject.pbxproj gets modified (some properties are added/deleted, see screens)pod install modifies project.pbxproj only once (if changes were made in podfile) and after opening up Xcode 10.2 project.pbxproj does not get modified again.
It did not modify the file with previous version of Xcode 10.2
Xcode 10.2 modifies the Pods project.pbxproj file after opening up the project
We are currently using CocoaPods 1.5.3 but I experienced the same issues with version 1.6.1 and 1.7.0 beta 3
CocoaPods : 1.5.3
Ruby : ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin18]
RubyGems : 3.0.3
Host : Mac OS X 10.14.4 (18E226)
Xcode : 10.2 (10E125)
Git : git version 2.21.0
Ruby lib dir : /usr/local/Cellar/ruby/2.6.2/lib
The name properties get removed


A bunch of new knownRegions are added altough we just had en before

We set some custom configs in our Podfile but Xcode 10.2 then just overrides it
target.build_configurations.each do |config|
if config.name == 'Debug'
config.build_settings['SWIFT_COMPILATION_MODE'] = 'wholemodule'
config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone'
end
end

So yeah, I am not exactly sure if this is a problem (if this is problem at all?) with CocoaPods or Xcode and I also don't know which project.pbxproj is the correct one.
Because if anyone in our team makes a pod install and then commits the changes without having the project open in Xcode 10.2, the project.pbxproj file gets modified again for any other team member who then pulls these changes.
Any help, ideas and proposals would be appreciated.
Can you please upload it as a sample app?
I have the same issue. There is a sample project I created to illustrate the issue - https://github.com/alex-kovalenko/Sample-8689.
The issue seems to be related to how localized strings are defined in the Podspec file.
Changing
s.resources = [
'Resources/Strings/**/*'
]
to
s.resources = [
'Resources/Strings/*.lproj'
]
in the https://github.com/alex-kovalenko/Sample-8689/blob/master/Framework/Framework.podspec fixes the problem.
Thanks for your sample @alex-kovalenko .
I was only able to reproduce this issue with our companies project. Neither with a fresh one nor with my private projects.
It looks like this happens once when upgrading from the Xcode 10.1 to Xcode 10.2. After accepting the changes, Xcode is not modifying anything else and seems to be working without issues.
@okalentiev but when you run pod install again when Xcode 10.2 is closed it should modify the file again.
The exact same thing is happening to me as well in my project. Any time I open the project after a pod install in Xcode 10.2 the same kind of changes in the pbxproj file. This is the first version of Xcode where I've noticed this happening. It's inhibiting our developers from getting on the latest version of Xcode to develop our project.
This is happening as of the latest cocoapods RC 1.7.0.rc.1
Still happening on 10.2.1. It's happening for one of my projects but not the other. The solution proposed by @alex-kovalenko is patching Podspecs which I do not own. Are there any other suggestions for this issue?
@jwilliams-handy as a temporary workaround you could create your own version of third-party podspecs. We maintain few 3rd party specs in our private podspec repository.
@alex-kovalenko I've checked some of the specs that are displaying that issue and they don't have similar declarations as you referenced earlier.
I also have 2 applications which share a lot of the same Pods but I only see this issue in one of the applications so I don't think this is the full solution.
I found this issue: https://github.com/CocoaPods/CocoaPods/issues/8494 which seems related but I still can't get this to stop happening.
@dnkoutso would you have any other suggestions?
Not from the top of my head sorry.
@alex-kovalenko I've checked some of the specs that are displaying that issue and they don't have similar declarations as you referenced earlier.
I also have 2 applications which share a lot of the same Pods but I only see this issue in one of the applications so I don't think this is the full solution.
I found this issue: #8494 which seems related but I still can't get this to stop happening.
Yeah, there might be other issues as well. I had to disable pods in my project one by one until I found few causing the issue. Then I had to compare what was different in the podspec files between problematic and working pods. That's how I found this workaround and steps to reproduce.
@alex-kovalenko I took your advice and started removing Pods one by one. I was able to reduce the issue to the Stripe SDK. I tried updating to their latest version with no luck so I started going through the history to see when this started happening by essentially changing the version number until the Xcode changes stopped happening. I was able to find the culprit being the version change from v8.0.4 -> v8.0.5. There's no diff in each podspec except for version.
I forked the repo and created branches so I could compare the code underneath and see if something there that started causing this issue. A comparison can be found here: https://github.com/jwilliams-handy/stripe-ios/compare/8.0.4...jwilliams-handy:8.0.5. It looks like they added some localization files and the issue is what you mentioned before @alex-kovalenko with the resources setting. I found the guide on creating a private Spec repo but how would you make sure the Stripe in the private repo takes precedence or do you just change the name?
@dnkoutso is this something that can be fixed from the Cocoapods side or do we need to reach out to the developer of this pod?
I forked the repo and created branches so I could compare the code underneath and see if something there that started causing this issue. A comparison can be found here: jwilliams-handy/[email protected]:8.0.5. It looks like they added some localization files and the issue is what you mentioned before @alex-kovalenko with the
resourcessetting. I found the guide on creating a private Spec repo but how would you make sure theStripein the private repo takes precedence or do you just change the name?@dnkoutso is this something that can be fixed from the Cocoapods side or do we need to reach out to the developer of this pod?
If you have a workaround you could create your private spec of the pod, and specify priorities in the Podfile:
source 'ssh://[email protected]/private/private-spec.git'
source 'https://github.com/cocoapods/specs.git'
source 'https://github.com/SomeOther/iOSSomeOther.git'
I took your advice and started removing Pods one by one. I was able to reduce the issue to the Stripe SDK.
I looked into their Podspec file, and it looks like they use resource bundles: Stripe.podspec, L17.
I've seen that causing this issue as well, and I could not find a workaround for it.
@alex-kovalenko meaning you tried the exact same thing you proposed above but with resource_bundle instead of resources but couldn't get it to work anyway? Also, was going to try the private spec repo thing. Is the way to do that to just fork the stripe repo, update the .podspec and then push the version change to my private spec repo?
I'd love to take a look at the underlying code but I'm not sure where to look to see how that setting gets parsed and implemented by Cocoapods. I looked in a couple repos like Xcodeproj with no success.
Anyone familiar with what actually translates this particular setting if I wanted to poke around?
meaning you tried the exact same thing you proposed above but with
resource_bundleinstead ofresourcesbut couldn't get it to work anyway?
Yes, we've attempted to convert one framework from using resources to resource bundles. That transition introduced this issue as well.
I found this pull request from @efirestone in 2015 which seems to be related. Trying to at least start here to look at potential issues/solutions.
we might be re-doing all of resources DSL for 1.10.0 I am moving this issue there.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1:
Sorry for opening this thread and re-pinging you all, but I am still seeing this issue in Xcode 11 (all versions), with compiled binaries, like Crashlytics, Usabila, NewRelicAgent, etc. Those podspecs do not define resources. Any assistance here would be appreciated if anyone has solved the problem.
Sorry for opening this thread and re-pinging you all, but I am still seeing this issue in Xcode 11 (all versions), with compiled binaries, like Crashlytics, Usabila, NewRelicAgent, etc. Those podspecs do not define resources. Any assistance here would be appreciated if anyone has solved the problem.
I have the same issue...
Most helpful comment
I have the same issue. There is a sample project I created to illustrate the issue - https://github.com/alex-kovalenko/Sample-8689.
The issue seems to be related to how localized strings are defined in the Podspec file.
Changing
s.resources = [ 'Resources/Strings/**/*' ]to
s.resources = [ 'Resources/Strings/*.lproj' ]in the https://github.com/alex-kovalenko/Sample-8689/blob/master/Framework/Framework.podspec fixes the problem.