luckymarmot/ThemeKit

Demo for Objective-C

dilmerv opened this issue · 5 comments

Hi there I love your source code but I haven't been able to integrate it into my objective-c code. Is there a way you can also post a demo for objective-c ?

Thanks!

Hi Dilmer!

Unfortunately, the demo project is built in Swift - only. I have provided some basic instructions for Objective-C on the Usage section - can you be more specific on the issues you're facing with?

Thanks for the info. These are the errors that I see right now.

/Users/dvalecillos/Code/Personal/# Apps/pythonic/Pods/macOSThemeKit/Sources/NSObject+ThemeKit.swift:41:56: Cannot convert value of type 'UnsafeMutablePointer<Method?>!' (aka 'ImplicitlyUnwrappedOptional<UnsafeMutablePointer<Optional>>') to specified type 'UnsafeMutablePointer?' (aka 'Optional<UnsafeMutablePointer>')

/Users/dvalecillos/Code/Personal/# Apps/pythonic/Pods/macOSThemeKit/Sources/NSDictionary+UserTheme.swift:91:40: 'range(at:)' has been renamed to 'rangeAt(_:)'

/Users/dvalecillos/Code/Personal/# Apps/pythonic/Pods/macOSThemeKit/Sources/NSDictionary+UserTheme.swift:196:50: Overloads for 'NSImage.Name' exist with these partially matching parameter lists: (coder: NSCoder), (stringLiteral: StaticString), (format: NSString, CVarArg...), (string: NSString), (utf8String: UnsafePointer), (UTF8String: UnsafePointer), (string: String), (contentsOfFile: String), (contentsOf: URL), (contentsOfURL: URL), (cString: UnsafePointer), (CString: UnsafePointer)

I am also getting this when I open Xcode via terminal command:

open Pythonic.xcworkspace/

The target “macOSThemeKit” contains source code developed with Swift 2.x. Xcode 9 does not support building or migrating Swift 2.x targets.

Use Xcode 8.x to migrate the code to Swift 3.

I picked the right version in the Podfile see my settings below:


# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'Pythonic' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for Pythonic
  pod 'macOSThemeKit', '1.2.0'
end

For some reason, your pod is not up-to-date - all the errors above are Swift version related.
ThemeKit has been written in Swift 3 and migrated to Swift 4 back on ThemeKit 1.1.1.

Try to update your pods with pod update, then pod install. If that fails, you can try a deep cleaning instead.

Due to limited resources, an Objective-C demo project won't be provided. Closing.