You can clone with
HTTPS or Subversion.
I get an error when trying to build my application with custom build configurations.
ld: library not found for -lPods
As noted here, this can be fixed by also adding custom build configurations with the same names to the Pods project, but these changes get overwritten whenever I run pod install.
I noticed in that the Debug and Release build configurations are explicitly created for the Pods project. Would it be possible to also create any custom build configurations that are defined in the parent project during this step? Or as an alternative, define them in the Podfile?
I'd give this a go myself but I could really use some input.
Good point. The problem is that, currently, we don’t do anything with the app project, except when asked to setup with pod install MyApp.xcodeproj. But that should change, also because of ticket #76.
pod install MyApp.xcodeproj
If you want to start work on that, then please do go ahead :)
As an immediate workaround, you can add the configuration in a post_install hook in your Podfile with code similar to what you linked to.
FYI, I’m currently using the workaround on a project:
post_install do |installer|
settings = Xcodeproj::Project.send(:build_settings, Pod::Platform.new(:ios), :debug)
configs = installer.project.build_configurations
configs.new('name' => 'Spec', 'buildSettings' => settings.merge('CONFIGURATION_BUILD_DIR' => '$(BUILD_DIR)/Debug$(EFFECTIVE_PLATFORM_NAME)'))
Actually, that’s not complete, I’ll have to update that tomorrow.
Any update on the complete workaround?
@alloy please add the complete workaround, same problem here.
Sorry guys, I’m currently sick and not able to think clear. If you want to look into this, then please check the exact diffs before adding the config by hand and afterwards, then use the above as a starting point.
@maikg Did you get a chance to look into this?
I got around this in my app by adding this build setting to my App Store configuration's Library Search Path setting:
Library Search Path
@alloy Sorry for responding to this so late. I haven't got around to this yet. I think I prefer a shortcut that allows me to overwrite the default build configuration list in my Podfile, since parsing the parent xcodeproj would involve extending the Xcodeproj project extensively (if I'm not mistaken).
Would that solution work for you?
@maikg The majority of the code needed to add the necessary configurations present in the user project is already in the multiple-platforms branch, but it’s currently still a bit rough, so let’s wait a bit more until I’m done with the current work.
Is there any thoughts on the workaround, since it looks like it might be a while before we see the ability to set this in the podfile?
I just spent the afternoon twiddling with this:
to no avail. I could sometimes get a Staging configuration to show up, but it wouldn't be properly duplicated from the Debug configuration, as it gets when you do it manually in Xcode. I had all manner of scariness implemented over the course of the afternoon with little in the way of success. Curious if anybody else has any luck with it, or if @alloy was willing to throw me a bone :)
@peelman adding a library search path work for me
Thanks, but that won't work for us. We want to be able to do automated builds; having to manually intervene with Xcode after running pod install kind of ruins that play.
@peelman you just have to add the library search path to your custom configuration once, later run of pod install should still be okay.
@peelman See #215 for an example of what @siuying means.
Doh, yeah I misread / misinterpreted that when i first read it. I just did some testing and it appears that works for us. Looking forward to being able to define configurations, but this appears to be a solid work around for the time being.
Actually add the user's build configurations to Pods.xcodeproj.
Closes #105, #121, #215.
Closed by 81d3550.
Sorry to bring this up so late, but what can I do to an existing project with this problem? I upgraded to the newest version of cocoapods.... now what?
@elsurudo This xcodeproj del directive of the Podfile should get you on the right track.
Please use the mailing list to ask questions about CP usage. The issues are reserved for features and bugs.
Any word on this?