I expected to see warnings in Xcode when developing a pod. I am unsure if this is a bug or a feature request.
Created a project using pod lib create
in order to develop a pod. I expected Xcode to inform me of warnings in the code of my development pod.
Warnings in the development pod should be presented by Xcode.
I didn't notice the warnings until doing a pod repo push
.
I have tested on both 0.39.0 and and 1.0.0.
Warnings appear only for the headers that are imported into the host app.
CocoaPods : 1.0.0
Ruby : ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin15]
RubyGems : 2.4.5.1
Host : Mac OS X 10.11.4 (15E65)
Xcode : 7.3.1 (7D1014)
Git : git version 2.7.4 (Apple Git-66)
Ruby lib dir : /Users/james/.rbenv/versions/2.2.5/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ ecd86890d08f04e17d4bf0053834ad81d2d9d671
Executable Path: /Users/james/.rbenv/versions/2.2.5/bin/pod
cocoapods-deintegrate : 1.0.0
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.0.0
cocoapods-try : 1.0.0
use_frameworks!
target 'WarningPod_Example' do
pod 'WarningPod', :path => '../'
target 'WarningPod_Tests' do
inherit! :search_paths
end
end
Example project created with pod lib create
is here: https://github.com/jtreanor/cocoapods-warning-sample.
The pod has one simple class with a #warning
in both the header and implementation. Only the warning in the header is shown by Xcode when building the WarningPod-Example
target.
AFAIK, there's nothing we can do to enable this. Xcode used to show warnings from implicit target dependencies automatically when building, but that was changed at some point (I think with Xcode 7). Do you have any implementation ideas?
Interesting, I wasn't aware this was due to an Xcode change. It really damages the usefulness of development pods 😞
I don't have any ideas but I'll dig into it a little to see what I can find.
I have found the problem, someOne have a solution ?
I have found the problem too。
The only workaround I've found so far is to edit my app scheme and manually add the Pods-MyApp
target as part of the build items (regardless whether "Find implicit dependencies" are checked).
This will cause warnings from all other Pods
targets to show up like before (including development Pods).
The only workaround I've found so far is to edit my app scheme and manually add the Pods-MyApp target as part of the build items (regardless whether "Find implicit dependencies" are checked).
To clarify:
You should end up with something like this:
Cool
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.
The issue hasn't been resolved but given that it seems to be an Xcode limitation rather than a CocoaPods problem, closing is reasonable.
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:
Most helpful comment
To clarify:
You should end up with something like this:
