iOS App CocoaPod Blues:Podfile不再拉入Frameworks了

时间:2018-04-03 16:35:22

标签: ios xcode frameworks cocoapods podfile

我有一个Build问题(使用cocoapods)一直困扰着我一天。 由于Builds工作正常,直到昨天才出现。

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

对于框架

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的设置方式是:

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)

  

块引用

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

enter image description here 正如你所看到的,除了GodZippa之外 - 没有其他的Pod正在安装。

我不知道为什么昨天停止工作。 应用程序构建在我在XCode中构建生产目标的时候开始失败,然后切换回构建Dev Target。框架构建工作正常

某些Pod因以下错误而失败:

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

感谢您帮助解决这个问题!

1 个答案:

答案 0 :(得分:0)

我重新启动了我的Mac并重新启动了用于应用程序的pod安装和XCode构建,它运行得很好..

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