optonaut / ActiveLabel.swift

UILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift
MIT License
4.47k stars 686 forks source link

the version in cocoapods is still 0.7.1 ? #211

Closed ruixingchen closed 6 years ago

ruixingchen commented 7 years ago

and so in the podspec file?

sherwinzadeh commented 7 years ago

I made a PR. You can use my fork and it seems to work: https://github.com/sherwinzadeh/ActiveLabel.swift

pod 'ActiveLabel', :git => 'https://github.com/sherwinzadeh/ActiveLabel.swift', :commit => '4bec2dae617cca42263b9b6efc84e8f4822cc4ad'

ruixingchen commented 7 years ago

@sherwinzadeh thanks, Xcode9 now understands Swift3 codes, the old 0.7.1 version still works good as usual, just a little tap to tell Xcode this target is using Swift3.2, :P

gygreene commented 6 years ago

@ruixingchen How do you do that?

JustinBobo commented 6 years ago

@gygreene go to pods, then build settings, then the target for the pod, and change "Swift Language Version" to 3.2.

screen shot 2017-10-23 at 11 41 43 pm
ruixingchen commented 6 years ago

@gygreene Yes @JustinBobo said is right, but if you had far more pod target than 1, like 10 or more, changing it manually will take a lot time, try this

post_install do |installer|
    oldSwiftTargets = ['Toast-Swift', 'StatefulViewController', 'Kanna', 'SwiftyJSON', 'GDPerformanceView-Swift']
    installer.pods_project.targets.each do |target|
        if oldSwiftTargets.include? target.name
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '3.2'
            end
        end
    end
end

just add the block to your podfile, :)

gygreene commented 6 years ago

Thanks @JustinBobo and @ruixingchen! Got it working!

maziyarpanahi commented 6 years ago

Version 0.8.1 is now available on CocoaPods: https://cocoapods.org/pods/ActiveLabel