美文网首页
Cocoapods 第三方库报mas_makeConstrain

Cocoapods 第三方库报mas_makeConstrain

作者: 独孤流 | 来源:发表于2019-05-13 14:01 被阅读0次

    由于没用use_frameworks!导致pods创建的是静态库,不是framework导致的问题

    修改前的的Podfile

    # Uncomment the next line to define a global platform for your project
    platform :ios, '9.0'
    
    target 'MainSubControllerDemo' do
      # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
      # use_frameworks!
    
      # Pods for MainSubControllerDemo
    
      target 'MainSubControllerDemoTests' do
          inherit! :search_paths
        # 返回侧滑适配有导航栏和没导航栏的切换
        pod 'FDFullscreenPopGesture', '~> 1.1'
        pod 'ZJScrollPageView'
        pod 'YYModel'
        pod 'Aspects'
        pod 'Masonry', '~> 1.1.0'
        pod 'MJRefresh', '~> 3.1.13'
      end
    
      target 'MainSubControllerDemoUITests' do
        inherit! :search_paths
        # Pods for testing
      end
    
    end
    
    
    tmp74e19371.png
    问题1:

    -[UITableView mas_makeConstraints:]: unrecognized selector sent to instance 0x7f9ee6855000

    问题2:

    Undefined symbols for architecture x86_64:
    "OBJC_CLASS$_MJRefreshHeader", referenced from:
    objc-class-ref in HomeViewController.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    修改成如下的格式后的Podfile就ok了,原因是之前的pod引用的是静态类库,后面这种引用的Library的格式

    # Uncomment the next line to define a global platform for your project
    # platform :ios, '9.0'
    platform :ios, '9.0'
    use_frameworks!
    
    inhibit_all_warnings!
    def m_pods
    
        # 返回侧滑适配有导航栏和没导航栏的切换
        pod 'FDFullscreenPopGesture', '~> 1.1'
        pod 'ZJScrollPageView'
        pod 'YYModel'
        pod 'Aspects'
        pod 'Masonry', '~> 1.1.0'
        pod 'MJRefresh', '~> 3.1.13'
    end
    
    target 'MainSubControllerDemo' do
        m_pods
    end
    
    tmp2d3e4df0.png

    相关文章

      网友评论

          本文标题:Cocoapods 第三方库报mas_makeConstrain

          本文链接:https://www.haomeiwen.com/subject/pumlaqtx.html