@@ -327,7 +327,15 @@ enum CocoaPodUtils {
327327 in installedPods: [ String : PodInfo ] )
328328 -> [ VersionedPod ] {
329329 return transitivePodDependencies ( for: podName, in: installedPods) . map {
330- CocoaPodUtils . VersionedPod ( name: $0, version: installedPods [ $0] ? . version)
330+ var podVersion : String ?
331+ if let version = installedPods [ $0] ? . version {
332+ podVersion = version
333+ } else {
334+ // See if there's a version on the base pod.
335+ let basePod = String ( $0. split ( separator: " / " ) [ 0 ] )
336+ podVersion = installedPods [ basePod] ? . version
337+ }
338+ return CocoaPodUtils . VersionedPod ( name: $0, version: podVersion)
331339 }
332340 }
333341
@@ -406,10 +414,11 @@ enum CocoaPodUtils {
406414 // Loop through the subspecs passed in and use the actual Pod name.
407415 for pod in pods {
408416 podfile += " pod ' \( pod. name) ' "
417+ let podspec = String ( pod. name. split ( separator: " / " ) [ 0 ] + " .podspec " )
409418 // Check if we want to use a local version of the podspec.
410419 if let localURL = LaunchArgs . shared. localPodspecPath,
411420 FileManager . default
412- . fileExists ( atPath: localURL. appendingPathComponent ( pod . name + " . podspec" ) . path) {
421+ . fileExists ( atPath: localURL. appendingPathComponent ( podspec) . path) {
413422 podfile += " , :path => ' \( localURL. path) ' "
414423 } else if let podVersion = pod. version {
415424 podfile += " , ' \( podVersion) ' "
0 commit comments