ryanmcgrath / cacao

Rust bindings for AppKit (macOS) and UIKit (iOS/tvOS). Experimental, but working!
MIT License
1.8k stars 65 forks source link

cacao 0.3.0 doesn't compile for iOS #36

Closed Miha-Rozina closed 1 year ago

Miha-Rozina commented 1 year ago

I get the following error after upgrading cacao to the latest version.

error[E0308]: mismatched types --> .../cacao-0.3.0/src/image/image.rs:211:26 211 false => { __^ 212 #[cfg(target_os = "macos")] 213 panic!("SFSymbols are only supported on macOS 11.0 and up.") 214 } _____^ expected *-ptr, found ()
= note: expected raw pointer `*mut Object`
             found unit type `()`
ryanmcgrath commented 1 year ago

Hmmm, are you trying to construct an Image here? At first I though this issue was a duplicate that'd be solved by #46, but now I suspect you're trying to do something that's not supported on iOS yet.

Have a code block I could glance at?

ryanmcgrath commented 1 year ago

49 should have fixed this, I think - curious if it takes care of your issue~

ryanmcgrath commented 1 year ago

Closing this for now as I can't reproduce this - but if you (or anyone) can, feel free to comment and I can take another look~

Miha-Rozina commented 1 year ago

I think the problem was just me not noticing that with cacao 3+ you need to enable uikit feature for ios development.