launchdarkly / ios-client-sdk

LaunchDarkly Client-side SDK for iOS (Swift and Obj-C)
https://docs.launchdarkly.com/sdk/client-side/ios
Other
69 stars 84 forks source link

Xcode 11.4 beta (11N111s) fails to build projects that depend on LaunchDarkly #207

Closed brandon-haugen closed 4 years ago

brandon-haugen commented 4 years ago

Is this a support request? No, this is an issue with the SDK compiling when included in an iOS project being built with Xcode Version 11.4 beta (11N111s)

Describe the bug Building iOS projects, that depend upon LaunchDarkly, using Xcode Version 11.4 beta (11N111s) fail with a compiler error.

Pods/LaunchDarkly/LaunchDarkly/LaunchDarkly/LDClient.swift:639:28: error: protocol 'Collection' can only be used as a generic constraint because it has Self or associated type requirements

  • (fallback is Collection ? " The fallback value type is a collection. Make sure the element of the fallback value's type is not too restrictive for the actual feature flag type." : "")

To reproduce

Expected behavior

Logs

Pods/LaunchDarkly/LaunchDarkly/LaunchDarkly/LDClient.swift:639:28: error: protocol 'Collection' can only be used as a generic constraint because it has Self or associated type requirements

  • (fallback is Collection ? " The fallback value type is a collection. Make sure the element of the fallback value's type is not too restrictive for the actual feature flag type." : "")

SDK version

Language version, developer tools

OS/platform

Additional context Xcode Version 11.4 beta (11N111s) was just released a week or so ago, I am still in the iOS betas so I had to upgrade to the latest Xcode to build/debug with my personal iOS device šŸ˜¢

bwoskow-ld commented 4 years ago

Hi @brandon-haugen,

Thanks for letting us know. We'll take a look at upgrading to the XCode beta to reproduce and fix the issue. Generally we don't guarantee compatibility with beta versions of downstream dependencies but we do understand the situation that you're in.

Tracked internally as 65670.

brandon-haugen commented 4 years ago

Thanks @bwoskow-ld! Just to be clear, this is not blocking me from anything other than testing on my own personal device so it is not a major issue for me, it just appears to be something that will need to be addressed before Xcode 11.4 goes out publicly unless Apple changes what is included in it and this error does not occur.

kielgillard commented 4 years ago

There's another error, too:

-sectalign and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
torchhound commented 4 years ago

Hi @brandon-haugen we have now written internal fixes for the Xcode 11.4 build errors and warnings.

Hi @kielgillard I was unable to replicate that specific error.

jdeff commented 4 years ago

11.4 is now public.

michalsrutek commented 4 years ago

@torchhound @bwoskow-ld Were you able to resolve this? Do you have a timetable for when you could release it to the public?

lietusme commented 4 years ago

Need fix for this ASAP

Oleg-Marchik-Neklo commented 4 years ago

@torchhound just remove this line + (fallback is Collection ? " The fallback value type is a collection. Make sure the element of the fallback value's type is not too restrictive for the actual feature flag type." : "") and build bug will be fixed

bwoskow-ld commented 4 years ago

We resumed work on this yesterday once the GA was made available. At the moment we're working through some test failures as one of our test dependencies doesn't work as expected with Xcode 11.4.

We'll update this issue when a new version with the fix is available. We expect to have this out in the next couple days. Thank you for your patience.

nraptis commented 4 years ago

Please fix. Can't compile code with your library.

AnthonySmith01 commented 4 years ago

Hi All, thanks for LaunchDarkly it is great.

Any ETA on this fix? XCode 11.4 is now public and out of beta.

idrougge commented 4 years ago

I was holding off running any betas because of this, can't believe it is still a thing when the GM release is out.

hariDasu commented 4 years ago

+1 for this, currently downgrading to 11.3 since we rely on this tool so heavily!

torchhound commented 4 years ago

Hi all, Xcode 11.4 support was just added in iOS client SDK version 4.5.0.