raspu / Highlightr

iOS & OSX Syntax Highlighter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to install Highlightr without issues?

welljsjs opened this issue · comments

Hey, I installed 'Highlightr' the following way:

cd "My_App"
pod init
Edited Podfile:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'My_Target' do
pod 'Quick'
pod 'Nimble'
pod 'Highlightr'
end

I only want to use Highlightr for OSX.


pod install

Successful install is said in terminal.
Open my_app.xworkspace...
Building....
Build failed due to 23 issues, all related to Highlightr, f.ex. the first one saying "Swift Compiler Error"

"[...]/Highlightr/Pod/Classes/CodeAttributedString.swift:93:24: Method does not override any method from its superclass"

It's probably my mistake, but I don't know what to do. Could you help me out? Couldn't find any install instruction on the internet.

Thanks in advance!

I'm not sure it's required, but does adding the platform to the podfile work?

platform :osx, '10.12'

@rudedogg Does not seem to help. Still 23 errors displayed.

I have no idea why I am getting so many errors. Running OSX High Sierra, 10.13. Shouldn't be a problem

@welljsjs Are the errors related to Swift 4? In your Xcode workspace, if you go to the "Pods" project, and click the "Highlightr" target, is there a build setting for the swift version? You may try toggling it to 3.0 if it's set to 4.0.

That looks good! Setting the swift version to 3.2 (you can choose between 3.2, 4.0, undefined) removed all errors.
Hopefully Highlightr will support Swift 4 soon.

Thanks a lot for your help! 😃

@welljsjs Awesome! No problem.

You'll have to do the same thing if you run pod update unfortunately. Hopefully this will be fixed soon by either CocoaPods/CocoaPods#7134 or a PR to update Highlightr to Swift 4

Guys, I am closing this issue, I created #26 as a follow up.