Defaults icon indicating copy to clipboard operation
Defaults copied to clipboard

Xcode 13.3 workaround does not compile when using xcodebuild

Open davidwernhart opened this issue 2 years ago • 1 comments

Hey guys,

I am having problems with my custom Codable struct that I am persisting through Defaults.

I have created the workaround as described in #93 and I am using the newest version of Defaults. All works fine when I start the app or archive it through Xcode.

However, when I want to use my custom deploy script, xcodebuild fails with multiple errors. For every extension in the workaround file, I get a error message like this:

error: 'Defaults.TopLevelCodableBridge<Value>' initializer is inaccessible due to 'internal' protection level public static var bridge: Defaults.TopLevelCodableBridge<Self> { Defaults.TopLevelCodableBridge() }

It seems like this way of building does not recognise the public init(){} workaround that was added in version 6.2.1 I have tried many different flags, but unfortunately I could not find the root of the issue so far.

Thank you so much for your help in advance!

Kind regards, David

davidwernhart avatar Aug 14 '22 14:08 davidwernhart

Are there any updates on this issue yet?

davidwernhart avatar Sep 22 '22 11:09 davidwernhart

I would recommend upgrading to Xcode 14 and remove the workaround.

sindresorhus avatar Sep 22 '22 16:09 sindresorhus