" Swift不支持静态库。添加Swift podfile后

时间:2016-06-19 14:46:36

标签: ios objective-c swift cocoapods

我正在将swift集成到一个旧的Objective c项目中。 添加" use_frameworks!"在我的podfile中,项目顺利编译。 但是当我尝试添加一个Swift CocoaPods时,我得到了

"当"'。

时,Swift不支持静态库

podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

xcodeproj 'ProjectDaily', 'Preprod' => :release, 'Test' => :release, 'Automation' => :release, 'Beta' => :release

#link_with 'ProjectDaily', 'ProjectDailyShare'

target :ProjectDaily do

//当添加这个Swift cocoapods,或者在Swift中写的任何以太网pod时,我得到" Swift不支持静态库,当"

pod 'Kingfisher', '~> 2.4' // THIS 

    pod 'ProjectCommon', :path => 'Common/ProjectCommon'
    #pod 'Project-ios-sdk', :path => 'ProjectDaily/ProjectN/Project-ios-sdk'
    pod 'FormatterKit/TimeIntervalFormatter', '~> 1.4.3' # there is an issue with latest version
    pod 'SDWebImage', '~> 3.7.1'
    pod 'libextobjc', '~> 0.3'
    pod 'RSKImageCropper', '~>1.2.1'
    pod 'MGSwipeTableCell', '~>1.5.3' 
    pod 'libPhoneNumber-iOS', '~> 0.8' #Replaces ECPhoneNumberFormatter
    pod 'hpple'
    pod 'JTSImageViewController'
    pod 'TTTAttributedLabel'
    pod 'DTRichTextEditor'

    pod 'Reveal-iOS-SDK', :configurations => ['Debug']
    pod 'AFNetworkActivityLogger', :configurations => ['Debug']
    pod 'pop', '~> 1.0'
    pod 'FormatterKit'
    pod 'UINavigationBar+Addition'
    pod 'MBProgressHUD', '~> 0.9.1'
    pod 'Mixpanel', '2.9.3'
    pod 'Smartling.i18n', '~> 1.0'
    pod 'MTZImageFacePan', '0.2.0'
    pod 'CWStatusBarNotification', '~> 2.3.4'
end


target :ProjectDailyShare do
    pod 'ProjectCommon/Identity', :path => 'Common/ProjectCommon'
    pod 'UITextView+Placeholder', '~> 1.1'
    pod 'SDWebImage', '~> 3.7.1'
    pod 'ProjectCommon/SharedExtension', :path => 'Common/ProjectCommon'
    pod 'Smartling.i18n', '~> 1.0'
end

install! 'cocoapods',
         :deduplicate_targets => false

post_install do |add_app_extension_macro|
    add_app_extension_macro.pods_project.targets.each do |target|
        if target.name.include?("Pods-ProjectDailyShare")
            puts "Adding 'AF_APP_EXTENSIONS=1 SHARE_EXTENSION=1' to 'GCC_PREPROCESSOR_DEFINITIONS' in #{target.name}"
            target.build_configurations.each do |config|
                config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'AF_APP_EXTENSIONS=1 SHARE_EXTENSION=1']
            end
        end
    end
end

这种情况发生了吗?

0 个答案:

没有答案