50ButtonsEach / fliclib-ios

The fliclib framework for iOS
35 stars 5 forks source link

swift compatibility #2

Closed galileomd closed 9 years ago

galileomd commented 9 years ago

hi, built a basic swift app with the latest library and getting these errors on compile... any ideas? here's the sample code with demo appid and appsecret keys: https://gist.github.com/729bc24a493c23af546f.git

Undefined symbols for architecture x86_64: "_OBJCCLASS$_SCLFlicButton", referenced from: testflic.ViewController.flicManagerDidRestoreState (testflic.ViewController)(ObjectiveC.SCLFlicManager) -> () in ViewController.o type metadata accessor for ObjectiveC.SCLFlicButton in ViewController.o "_OBJCCLASS$_SCLFlicManager", referenced from: type metadata accessor for ObjectiveC.SCLFlicManager in ViewController.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

AntonMeier commented 9 years ago

Hi, Swift compatibility should not be an issue, I am currently running a Swift app just fine with it. The problem that you are seeing I believe occurs because you are trying to run the framework in the simulator, am I correct? Currently the framework is not built for both simulator and device. We have been looking at it and might add support for it in the future, but for now it is not the highest priority. Hope that answers your question. Apologize for the inconvenience!

galileomd commented 9 years ago

ah.. trying on actual device… now getting THIS error: dyld: Library not loaded: @rpath/fliclib.framework/fliclib Referenced from: /private/var/mobile/Containers/Bundle/Application/832470B6-F107-40AB-A1C9-DDAB16E5736A/testflic.app/testflic Reason: image not found

any chance you could post a working swift demo?

On Thursday, October 15, 2015 at 2:28 PM, AntonMeier wrote:

Hi, Swift compatibility should not be an issue, I am currently running a Swift app just fine with it. The problem that you are seeing I believe occurs because you are trying to run the framework in the simulator, am I correct? Currently the framework is not built for both simulator and device. We have been looking at it and might add support for it in the future, but for now it is not the highest priority. Hope that answers your question. Apologize for the inconvenience!

— Reply to this email directly or view it on GitHub (https://github.com/50ButtonsEach/fliclib-ios/issues/2#issuecomment-148480977).

AntonMeier commented 9 years ago

Sounds like you might have forgot to do Step 4 under "Set up xcode" in the iOS Tutorial Part 1, but I could be wrong. I'll take a look at it tomorrow and will try to upload a working swift demo within a few days or so.

galileomd commented 9 years ago

i made sure to include the bridging header in the build settings... will look forward to your demo. thanks!

AntonMeier commented 9 years ago

Posted a demo project earlier today that you can take a look at. "ios-boilerplate-swift".