关于xcode:iOS App CocoaPod Blues:Podfile不再拉入Frameworks

iOS App CocoaPod Blues: Podfile not pulling in Frameworks any more

我遇到了一个构建问题(带有cocoapods),困扰了我一天。
直到昨天,Builds都可以正常工作了,它突然变成了蓝色。

我的cocoapods的框架部分的设置方式是:

对于框架

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
platform :ios, '7.0'

def common_pods
  pod 'Godzippa'
  pod 'FrostyLIB', :path =>"~/dev/AppCode/FrostyLib/"
end

target 'CoolDocsSDK' do
  common_pods
end

target 'CoolDocsSDKTests' do
  common_pods
  pod 'OCMock', '~> 3.2'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'FROSTY'
      target.build_configurations.each do |config|
      config.build_settings['CLANG_WARN_DOCUMENTATION_COMMENTS'] = ['NO']
        if config.name == 'Release'
          config.build_settings['GENERATE_MASTER_OBJECT_FILE'] = ['YES']
          config.build_settings['STRIP_STYLE'] = ['non-global']
          config.build_settings['DEPLOYMENT_POSTPROCESSING'] = ['YES']
          config.build_settings['GCC_GENERATE_DEBUGGING_SYMBOLS'] = ['NO']
          config.build_settings['GCC_PRECOMPILE_PREFIX_HEADER'] = ['NO']
        end
      end
    end
  end
end

这完美构建。

App Podfile的设置方式为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
platform :ios, '10.0'

def common_pods
    # Pods for CoolDocsApp

    pod 'Fabric'
    pod 'Crashlytics', '~>  3.9'
    pod 'M13ProgressSuite'
    pod 'SwiftyStoreKit'
    pod 'OpenSSL-Universal', '~> 1.0'
    pod 'FacebookCore'
    pod 'AppsFlyerFramework'
    pod 'SideMenu'
    pod 'GoogleMaps'
    pod 'GooglePlaces'
    pod 'VideoBackgroundViewController'

    #Release Pod
    pod 'CoolDocsSDK', :path =>"~/Desktop/CoolDocsSDK-iOS/"
end

target 'CoolDocsApp' do
    use_frameworks!
    common_pods
end

target 'CoolDocsAppStaging' do
    use_frameworks!
    common_pods
end

框架构建良好。如您所见,该应用程序具有生产目标(CoolDocsApp)和登台目标(CoolDocsAppStaging)

Blockquote

应用程序在Pod安装过程中未安装以下Pod(显示在XCode中)

enter image description here
如您所见,除了GodZippa之外,其他Pod均未安装。

我不确定为什么昨天停止了工作。我在XCode中构建生产目标时,App的构建开始失败,然后又切换回构建Dev Target。框架构建良好

某些Pod失败,并出现以下错误:

1
2
3
The file"VideoBackgroundViewController.xcconfig" couldn’t be opened because there is no such file. (/Users/CooldocsMan/dev/AppCode/CoolDocsApp/Pods/Target Support Files/VideoBackgroundViewController/VideoBackgroundViewController.xcconfig)
error: unable to read module map contents from 'Target Support Files/VideoBackgroundViewController/VideoBackgroundViewController.modulemap': Error Domain=NSCocoaErrorDomain Code=260"The file"VideoBackgroundViewController.modulemap" couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/CooldocsMan/dev/AppCode/CoolDocsApp/Pods/Target Support Files/VideoBackgroundViewController/VideoBackgroundViewController.modulemap, NSUnderlyingError=0x7f8965daaa40 {Error Domain=NSPOSIXErrorDomain Code=2"No such file or directory"}}
error: unable to read module map contents from 'Target Support Files/VideoBackgroundViewController/VideoBackgroundViewController.module

感谢您的帮助以解决此问题!


我重新启动了Mac,然后重新运行了该应用程序的Pod安装和XCode构建,并且一切正常。

因此,在这种情况下,简单的重启会有所帮助。