ios - 安装后 Hook 问题,并发生段错误 11

标签 ios xcode cocoapods

我正在使用 pod 1.1.1 并遇到问题。

  • Mac 上的 Xcode 7.3.1:Sierra

在安装后 Hook 上遇到问题,如果将其删除,我会收到 Segmentaton Fault 11。

[!] An error occurred while processing the post-install hook of the Podfile.

# 的未定义方法“项目”

post_install do |installer_representation|
    installer_representation.project.targets.each do |target|
        if target.name == 'Pods-T-Appboy-iOS-SDK'
            target.build_configurations.each do |config|
                config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
                config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'ABK_ENABLE_IDFA_COLLECTION=1'
            end
        end
        target.build_configurations.each do |config|
            config.build_settings['ENABLE_BITCODE'] = 'NO'
        end
    end

最佳答案

Hooks-API 很久以前就已经发生了变化。

在您的 Podfile 中,将 project 替换为 pods_project,然后运行 ​​pod install

查找详细信息here .

关于ios - 安装后 Hook 问题,并发生段错误 11,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40586634/

相关文章:

ios - 对成员 'tableView(_:numberOfRowsInSection:)' 的不明确引用 为什么会出现此错误?

ios - 拖动放置在 UIStackView 上的项目

ios - 在 iOS 上静音 JWPlayer (Swift)

objective-c - 在 iOS 中逐字符读取文件

iphone - UIButton Transition - 跨屏幕运行

xcode - 错误 ITMS-90096 : Your binary is not optimized for iPhone 5

ios - 即使问题已修复,CocoaPods 规范也会失败

ios - 如何解决此错误,例如 Invalid `Podfile` file : [! ] Unsupported options `{:exclusive=>true}` for target

iphone - TableView 单元格中 TextView 的可变高度

ios - 使用现有静态库和 iOS 应用程序配置 Cocoapods