I am preparing a static library that does not use NSAttributedString(data:options:documentAttributes) API at all.
Unfortunately, my client, who is using this static library sees a crash in their app wherever they have used this API and this happens only after my static library is added to the project.
When I create a sample project which uses this API and adds the static library discussed above, I see no crash.
Note: My client is using this API in the main thread.
Summary:
My client's app with NSAttributedString(data:options:documentAttributes) API code = No crash
My client's app with NSAttributedString(data:options:documentAttributes) API code + My static library = crash
Build settings of my static library delivered to the client:
Configuration: Release
Apple Clang - Code Generation > Optimization Level: Fastest, Smallest [-Os]
Swift compiler - Code Generation > Optimization Level: Optimize for Speed [-O]
@eskimo: Do you have a hint of what could be going wrong here?