contentful.swift
contentful.swift copied to clipboard
Fix runtime dyld Symbol Not Found crash when also linking contentful-persistence
Use Swift 5.4 and Xcode 12.5. This bug does not occur on earlier versions of Swift or XCode as far as I know.
Steps:
- Use Carthage 0.38.0 to build contentful.swift and contentful-persistence.swift .xcframeworks
- Link both frameworks to fresh project
- Project crashes at runtime:
dyld Symbol Not Found crash
When building contentful-persistence locally, I found a suspicious warning coming from contentful.swfit:
Using 'class' keyword for protocol inheritance is deprecated; use 'AnyObject' instead
Fixing this warning and making contentful-persistence reference the updated contentful.swift library fixes the issue. I don't know why all this is happening but the fix definitely works.