You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now if we inspect the symbols present in Framework2 (by using `nm`) we find that the private func `bar()` is present.
This gives us big issues because we cannot rely on semantic versioning with prebuilt frameworks because of this (we use binary caches per swift version). To make this more clear:
Say we compile Framework2 with Framework1 version 1.1 which added some public methods and adds a private method (say `bar()`) in an open class.
However: Framework2 only requires version 1.0 of the Framework1 API and receives Framework1 version 1.0 at runtime.
=> A crash will occur at runtime because the added private method (which was introduced in 1.1) is not available.
The text was updated successfully, but these errors were encountered:
I just tried that, however even when building both frameworks with "BUILD_LIBRARY_FOR_DISTRIBUTION=YES" there are still private symbols present in the undefined symbols of Framework2.
e.g.
private symbol Framework1.x is listed in the output of `nm -u Framework2.framework/Framework2`
If you open and build the UseSwiftFramework.xcodeproj project and list the symbols in UseSwiftFramework.framework there should not be a mention of the symbol bar.
Attachment: Download
Environment
Xcode 11.2.1, Swift 5.1.2
Additional Detail from JIRA
md5: 53dfcb5053681526ac625a63f033a5a4
Issue Description:
We work with a lot of dynamic Swift frameworks and ran into the following scenario:
Framework1:
Framework2:
Framework2 links to Framework1.
Now if we inspect the symbols present in Framework2 (by using `nm`) we find that the private func `bar()` is present.
This gives us big issues because we cannot rely on semantic versioning with prebuilt frameworks because of this (we use binary caches per swift version). To make this more clear:
Say we compile Framework2 with Framework1 version 1.1 which added some public methods and adds a private method (say `bar()`) in an open class.
However: Framework2 only requires version 1.0 of the Framework1 API and receives Framework1 version 1.0 at runtime.
=> A crash will occur at runtime because the added private method (which was introduced in 1.1) is not available.
The text was updated successfully, but these errors were encountered: