sindresorhus / Defaults

💾 Swifty and modern UserDefaults
https://swiftpackageindex.com/sindresorhus/Defaults/documentation/defaults
MIT License
1.97k stars 117 forks source link

Xcode 13.3 workaround does not compile when using xcodebuild #109

Closed davidwernhart closed 1 year ago

davidwernhart commented 2 years ago

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 commented 1 year ago

Are there any updates on this issue yet?

sindresorhus commented 1 year ago

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