-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync crashes if the contentful output does not contain default locale data #68
Comments
This is closely related to #65 |
Thanks @sebastianludwig . The |
I do have a fix in mind: Should be pretty straight forward to add the client locale to the Currently in a meeting, will get back to you asap |
… of using objc_setAssociatedObject.
… of using objc_setAssociatedObject.
… of using objc_setAssociatedObject.
… of using objc_setAssociatedObject.
Our output only contains
de_DE
data. That leads to the assertionassert(mapping.count > 0, "Empty mapping for \(type)")
inContentfulSynchronizer.swift:165
increate(_:fields:type:mapping)
to fail.In the
create
methods theContentfulSynchronizer
callsderiveMapping
withfoo.fields.keys
.foo.fields
takes the fields set from thelocalizedFields
map that's mapped to the "current locale", or thedefaultLocale
as fallback (seeContentful/Assets.swift
orEntry.swift
).The "current locale" is saved on the json
NSDictionary
(Client.swift:164
). But not as additional entry or anything, but usingobjc_setAssociatedObject
(inDecoding.swift
). When tried to be retrieved indetermineDefaultLocale
it's not there anymore.The bug comes down to
Client.swift:166
:p.s. personal opinion:
objc_setAssociatedObject
is almost never a good idea and should be avoided.The text was updated successfully, but these errors were encountered: