@@ -327,7 +327,15 @@ enum CocoaPodUtils {
327
327
in installedPods: [ String : PodInfo ] )
328
328
-> [ VersionedPod ] {
329
329
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)
331
339
}
332
340
}
333
341
@@ -406,10 +414,11 @@ enum CocoaPodUtils {
406
414
// Loop through the subspecs passed in and use the actual Pod name.
407
415
for pod in pods {
408
416
podfile += " pod ' \( pod. name) ' "
417
+ let podspec = String ( pod. name. split ( separator: " / " ) [ 0 ] + " .podspec " )
409
418
// Check if we want to use a local version of the podspec.
410
419
if let localURL = LaunchArgs . shared. localPodspecPath,
411
420
FileManager . default
412
- . fileExists ( atPath: localURL. appendingPathComponent ( pod . name + " . podspec" ) . path) {
421
+ . fileExists ( atPath: localURL. appendingPathComponent ( podspec) . path) {
413
422
podfile += " , :path => ' \( localURL. path) ' "
414
423
} else if let podVersion = pod. version {
415
424
podfile += " , ' \( podVersion) ' "
0 commit comments