Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd option to disable `generate_multiple_pod_projects` for specific pod #9274
Comments
|
Can you not specify If it doesn't then I will mark this as an enhancement. |
|
@dnkoutso Interesting idea! Tried, but CocoaPods crashed. Command
Report
Stack
Plugins
Podfilesource 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
use_frameworks!
install! 'cocoapods', :generate_multiple_pod_projects => true, :incremental_installation => true
workspace './ClassDojo'
project 'ClassDojo.xcodeproj'
# ignore all warnings from all pods
inhibit_all_warnings!
def extension_includes
# Logging
pod 'Crashlytics', '~> 3.14', :project_name => 'Logging'
# Other
pod 'SAMKeychain', '~> 1.5', :project_name => 'Other'
pod 'DeviceUtil', '~> 6.0', :project_name => 'Other'
end
def all_pods
extension_includes
# Firebase
pod 'Firebase/Messaging', :project_name => 'Firebase'
pod 'Firebase/Analytics', :project_name => 'Firebase'
# Logging
pod 'CocoaLumberjack', '~> 3.5', :project_name => 'Logging'
pod 'LogglyLogger-CocoaLumberjack', '~> 3.0', :project_name => 'Logging'
# Networking
pod 'Alamofire', '~> 5.0.0-rc.2', :project_name => 'Networking'
pod 'PINRemoteImage', '3.0.0-beta.14', :subspecs => ['iOS', 'PINCache', 'WebP'], :project_name => 'Networking'
# Other
pod 'Cache', '~> 5.2', :project_name => 'Other'
pod 'DifferenceKit', '~> 1.1', :project_name => 'Other'
pod 'iRate', :git => 'https://github.com/classdojo/iRate', :branch => 'master', :project_name => 'Other'
pod 'PromiseKit/CorePromise', '~> 6.11', :project_name => 'Other'
pod 'PubNub', '~> 4.10', :project_name => 'Other'
pod 'SSZipArchive', :project_name => 'Other'
pod 'SwiftLint', '~> 0.35', :project_name => 'Other'
pod 'SwiftyStoreKit', '~> 0.15', :project_name => 'Other'
pod 'Texture', '~> 2.8', :subspecs => ['Core', 'Video', 'Photos'], :project_name => 'Other'
# UI
pod 'AMPopTip', '~> 4.1', :project_name => 'UI'
pod 'FLAnimatedImage', '~> 1.0', :project_name => 'UI'
pod 'Hero', '~> 1.4', :project_name => 'UI'
pod 'JDStatusBarNotification', '~> 1.5', :project_name => 'UI' # Not supported anymore
pod 'Layout', '~> 0.6', :project_name => 'UI'
pod 'lottie-ios', '~> 3.1', :project_name => 'UI'
pod 'pop', '~> 1.0', :project_name => 'UI'
pod 'SnapKit', '~> 5.0', :project_name => 'UI'
pod 'SwiftEntryKit', '~> 1.1', :project_name => 'UI'
pod 'TTTAttributedLabel', '~> 2.0', :project_name => 'UI'
pod 'UICollectionViewLeftAlignedLayout', '~> 1.0', :project_name => 'UI'
pod 'UIImageViewModeScaleAspect', '~> 1.5', :project_name => 'UI'
# Debugging
# pod 'GDCoreDataConcurrencyDebugging', :project_name => 'Debugging'
pod 'Tweaks', '~> 2.3', :project_name => 'Debugging'
end
abstract_target 'App' do
all_pods
target 'ClassDojo' do
target 'ClassDojo Unit Tests' do
inherit! :search_paths
pod 'OHHTTPStubs/Swift', '~> 8.0', :project_name => 'Testing'
pod 'SnapshotTesting', '~> 1.6', :project_name => 'Testing'
pod 'Criollo', '~> 0.5', :project_name => 'Pods'
end
target 'UI Tests' do
inherit! :search_paths
pod 'OHHTTPStubs/Swift', '~> 8.0', :project_name => 'Testing'
pod 'SnapshotTesting', '~> 1.6', :project_name => 'Testing'
pod 'Criollo', '~> 0.5', :project_name => 'Pods'
end
target 'Integration Tests' do
pod 'Criollo', '~> 0.5', :project_name => 'Pods'
end
pod 'FLEX', '~> 3.0', :configurations => ['Debug'], :project_name => 'Debugging'
end
target 'ClassDojo_Alpha' do
pod 'FLEX', '~> 3.0', :project_name => 'Debugging'
end
end
abstract_target 'Extensions' do
target 'Notifications Service' do
extension_includes
end
end
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
if target.name == "Tweaks"
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'FB_TWEAK_ENABLED=1']
end
end
if target.name == "SwiftyStoreKit"
target.build_configurations.each do |config|
if config.name == 'Testing'
config.build_settings['ENABLE_TESTABILITY'] = 'YES'
end
end
end
end
end
endError
|
|
Yeah probably not working out properly. I'll mark this as enhancement. |
|
This can be accomplished by fixing the crash instead. |
|
I switched that to being a bug and we can fix it for 1.9.x |
|
1.9.0.beta.2 is out, but I believe there is no change related to any of this (Either :project_name => 'Pods' (that would be great, but no idea how to fix the crash) or option to not do it for specific pod). I hope Milestone 1.9.0 still applies! |
|
We discussed this and I think its actually way more complicated to support than I had initially thought. I am not quite sure we will get to it in 1.9 or if ever to be honest. cc @sebastianv1 |
|
Does it apply also to fixing the crash when project name is “Pods”? |
|
I think so? Not quite certain. |
Motivation: Fix build errors with CocoaPods project using new generate_multiple_pod_projects CocoaPods/CocoaPods#9274


Report
What did you do?
generate_multiple_pod_projectsin PodfileWhat did you expect to happen?
What happened instead?
Info
I know this is mostly problem of
podsitself, but as defined in blog post (http://blog.cocoapods.org/CocoaPods-1.7.0-beta/):Warning: Switching your project to use multiple .xcodeproj may result in some compiler errors if your pods have relied on importing headers using the quote syntax for its dependencies. For example #import "PDDebugger.h" will no longer work in a pod that depends on PonyDebugger. Instead, we highly suggest you update your headers to correctly import the framework and its associated header: #import <PonyDebugger/PDDebugger.h>. This is intentional since this feature is currently opt-in.I believe this blocks tons of users from using it and testing it because there is some pod that doesn't support this yet. (even if it's one of 30 like in our case, and it's only development pod)
Ideally current definition of
podinpodfilewould change from:to
Then
podsmarked like this would stay inPods.xcodeprojas a target where the rest of them would be in separate project files.Thanks!