PhilipsHue / PhilipsHueSDK-iOS-OSX

The Software Development Kit for Philips Hue on iOS and OS X (beta)
579 stars 169 forks source link

Move JSONKit dependency outside the framework #20

Closed nestorlafon closed 10 years ago

nestorlafon commented 11 years ago

The SDK framework uses JSONKit and other frameworks may use it as well or maybe the project uses a newer JSONKit version. Linking the framework in that case will hit "duplicate symbol error".

I think either JK (JSONKit) prefix is changed in the classes used in the framework or JSONKit dependency is moved outside de framework. In my case the other framework already including JSONKit is more important for the project and we will have to dump HUE support if we can't solve this problem

waynehartman commented 11 years ago

Better yet: dump JSONKit altogether and just use the NSJSONSerialization APIs available in iOS 5.

lightbow commented 11 years ago

I second the notion to use the system-provided NSJSONSerialization. From JSONKit's own github page, "The behavior of JSONKit compiled without ARC mixed with code that has been compiled with ARC is normatively undefined since at this time no analysis has been done to understand if this configuration is safe to use. At this time, there are no plans to support ARC in JSONKit." Obviously HueSDK.framework supports ARC and ARC is the future for all Objective-C development, so it seems like this is a problem.

jhvdb87 commented 11 years ago

We can not remove the JSONKit dependency, because the SDK supports iOS 4.x and unfortunately NSJSONSerialization is only available in iOS 5 and above.

jtayler commented 11 years ago

Oh yes you can. And remove it you should.

That’s like saying you need to support Windows 3.1 until the year 2423

Honestly, fork the GIT

this legacy dependency is not a trivial issue, it is fundamental and must be removed.

ignoring that engineering fact because of imagined injustice for iOS4 is not a reasonable position.

all those in favor, say “I"

On Aug 16, 2013, at 2:18 PM, jhvdb87 notifications@github.com wrote:

We can not remove the JSONKit dependency, because the SDK supports iOS 4.x and unfortunately NSJSONSerialization is only available in iOS 5 and above.

— Reply to this email directly or view it on GitHub.

ghost commented 11 years ago

That's completely unnecessary. 

93% of iPhones are running iOS 6. You are hobbling the sdk to support a fraction of a percent of users. 

—

Sent from Mailbox for iPhone

On Fri, Aug 16, 2013 at 11:20 AM, jhvdb87 notifications@github.com wrote:

We can not remove the JSONKit dependency, because the SDK supports iOS 4.x and unfortunately NSJSONSerialization is only available in iOS 5 and above.

Reply to this email directly or view it on GitHub: https://github.com/PhilipsHue/PhilipsHueSDKiOS/issues/20#issuecomment-22784090

kevintoms commented 11 years ago

You have a valid point but iOS 4.x support is what we are working to at the moment. That does not mean that it won't be subject to review, but it is the current position

lightbow commented 11 years ago

(Hey everyone, let's try to keep the tone a little more positive!)

I wholeheartedly agree with dropping JSONKit and therefore iOS 4 support. There's just no reason to keep it up. According to the latest data from Apple, this would affect less than 1% of the user base, and I can guarantee you those people aren't in the demographic dropping $60 for a lightbulb!

http://www.engadget.com/2013/06/21/apple-publicly-charts-ios-fragmentation/

If you look on the App Store itself for third-party Hue apps, you'll see that ALL of them require iOS 5 or later (many of them iOS 6 or later) so dropping iOS 4 will have no effect on your developer base. Don't bother forking—skip the extra work and focus on making the SDK great.

jhvdb87 commented 10 years ago

In v1.1.1beta JSONKit has been removed and we also dropped iOS 4 support.