Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Compatible with swift 3? #113

Open
jolaroux opened this issue Sep 23, 2016 · 12 comments
Open

Compatible with swift 3? #113

jolaroux opened this issue Sep 23, 2016 · 12 comments

Comments

@jolaroux
Copy link

Hello, I follow the instructions to integrate the SDK into my existing swift 3 project, and I'm getting an error in the objC header file that says swift can't find the <HueSDK_iOS/HueSDK.h> files, and thats after I imported the framework file and the Lumberjack files. Is this SDK compatible with Swift 3? Is that what this issue means? and if its not, please help me figure out what the problem is.
Thanks so much!

@ibuprofane
Copy link

I am using the SDK with Swift 3, so it's definitely compatible. Since the library is obj-C the Swift version should be irrelevant. I believe there were only a few instances where XCode updated my code for some optionality issues, but otherwise there was no difference for me in upgrading from Swift 2 to Swift 3 either in code or performance. Have you checked for linking issues?

@jolaroux
Copy link
Author

Thanks for giving me hope! Here's my problem. The first error it's giving me is that it can't find the <HueSDK_iOS/HueSDK.h> files, and the error is where I have the import statement in the Header file thats automatically created. and I added the -objC linker in the build settings. Can you think of what the problem is?

@ibuprofane
Copy link

This is what I have in my bridging file:

#import <HueSDK_iOS/HueSDK.h>
#import "PHBridgeSelectionViewController.h"
#import "PHBridgePushLinkViewController.h"

If it's still not finding it, there's probably a reference missing somewhere; could be lots of reasons why, but I'd compare with the QuickStart app and make sure that you add the SDK to the appropriate place(s) in your project settings.

@jolaroux
Copy link
Author

Oh hmm all I have in my bridging file is
#import <HueSDK_iOS/HueSDK.h>
which is what it says to do in the instructions, How did you come to what you have? I'm ready to try anything. And yes i'll look at the quick start app

@jolaroux
Copy link
Author

Huh in that last comment it didn't finish the import statement,
its supposed to say <HueSDK_iOS/HueSDK.h'> after the import
and i think in your comment it edited out the first one too.

@jolaroux
Copy link
Author

"HueSDK_iOS/HueSDK.h'" is what it edited out of my last 2 comments

@ibuprofane
Copy link

Oh, interesting should be

#import <HueSDK_iOS/HueSDK.h>

@jolaroux
Copy link
Author

Yeah thats what I have too, But that's all I have in my bridging file, and its saying it can't find the files. And I have already imported the iOSFramework folder, and the lumberjack files. So I don't know what to do but I'm looking :(

@jolaroux
Copy link
Author

http://www.developers.meethue.com/documentation/apple-sdk this is what i'm following, thanks so much for your help by the way

@jolaroux
Copy link
Author

screen shot 2016-09-23 at 5 48 19 pm

screen shot 2016-09-23 at 5 49 16 pm

these are the error I'm getting, and the files in my project.

@jolaroux
Copy link
Author

Could you possibly help with this if you can? I fixed on thing, It turned out that I wasn't selecting "Copy items if needed" when i put the SDK files in Xcode, but now I'm getting a different set of issues.

These are the errors I'm getting.
http://imgur.com/a/Lc9LV

If you knew anything about how to fix this, that would be amazing!! Thank you so much

@SamwiseChepoackra
Copy link

Does anyone know the best way to implement selecting which group to affect with lightstate changes in swift 4?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants