Xcode-归档项目时在框架模块内部包含非模块化标头错误

时间:2019-12-12 21:30:09

标签: ios objective-c swift xcode cocoapods

我目前正在尝试归档我的项目,以便在遇到此问题时最终在应用商店上更新我的应用。

我在XlsxReaderWriter框架中的多个文件上遇到此错误。

Include of non-modular header inside framework module 'XlsxReaderWriter.BRARelationship': '/Users/dannyespina/Documents/iOS_Applications/LoanMaster/loan-master/Pods/XMLDictionary/XMLDictionary/XMLDictionary.h'

enter image description here

enter image description here

我过去在此框架上遇到过问题,但不幸的是,这是这种类型的唯一一种可以写入excel文件的类型。我必须进行一些更改才能使其正常工作,如here所示。

我尽一切努力解决了这个问题,例如:

  • 将Pods项目和LoanMaster的“允许框架模块中的非模块化包含”设置为“是”
  • 清理项目并删除一堆数据
  • 重新安装Xcode。
  • 将XMLDictionary.h放置为堆栈溢出答案之一中提到的公共标头
  • 确保该框架是公共的
  • 已将广告连播更新到最新版本(1.8.4)

奇怪的是,我过去使用此框架对该项目进行了存档,但对其进行了完全相同的更改。该库在3年内没有更新,因此没有新的原因。新版本的Xcode是否存在问题?

我真的只想更新过去6个月中一直在使用的应用程序:(

任何帮助都会很棒!


Podfile

# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'

target 'LoanMaster' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for LoanMaster
  pod 'MPNumericTextField', '~> 1.4.0'
  pod 'Charts', '~> 3.2.1'
  pod 'LGButton'
  pod 'RealmSwift'
  pod 'SpreadsheetView'
  pod 'IQKeyboardManagerSwift'
  pod 'GoogleMobileAdsMediationMoPub'
  pod 'PersonalizedAdConsent'
  pod 'PopupDialog', '~> 1.1'
  pod 'NVActivityIndicatorView'
  pod 'FBAudienceNetwork'
  pod 'Firebase/Core'
  pod 'Firebase/AdMob'
  pod 'XlsxReaderWriter', '~> 1.0'
  pod 'M13Checkbox'

    post_install do |installer|
      installer.pods_project.targets.each do |target|
        if ['SpreadsheetView', 'IQKeyboardManagerSwift', 'NVActivityIndicatorView'].include? target.name
          target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '4.0'
          end
        target.build_configurations.each do |config|
          config.build_settings['CLANG_WARN_DOCUMENTATION_COMMENTS'] = 'NO'
        end
      end
    end
  end

end

2 个答案:

答案 0 :(得分:0)

尝试从podfile中删除XMLDictionary的pod,然后再次添加它将起作用。

答案 1 :(得分:0)

我通过将XMLDictionary.h添加到XlsxReaderWriter的公共标头并将导入“ XMLDictionary / XMLDictionary.h”更改回“ XMLDictionary.h”来解决了该问题。

我遵循了这个answer

我希望这对仍在使用这个古老而又被遗忘的框架的人有所帮助。