[feature] Apple platforms - weak frameworks
See original GitHub issueConan has convenient way to list frameworks to link against:
self.cpp_info.components["..."].frameworks
Standard way to pass weak framework to linker doesn’t work:
self.cpp_info.components["..."].exelinkflags.append("-weak_framework CoreHaptics")
it’s translated into
-weak_framework  -lCoreHaptics
The only other (and working) way is using -Wl,-weak_framework,CoreHaptics, but it’s rather tedious to type manually.
There can be multiple solutions:
- extend link flags properties to accept some kind of ArgGrouptype
- add new weak_frameworksproperty similar to the existingframeworks
- extend frameworksproperty to accept some kind ofAppleFrameworktype that would have anis_weakproperty
- just create a helper function like linked_weak_framework(framework)that would returnf"-Wl,-weak_framework,{framework}"
This was briefly discussed in https://github.com/conan-io/conan-center-index/pull/12472#issuecomment-1224500256 and next comment.
- I’ve read the CONTRIBUTING guide.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
 Top Results From Across the Web
Top Results From Across the Web
Frameworks and Weak Linking - Apple Developer
Weak Linking and Apple Frameworks Apple wraps new interfaces in its frameworks with availability macros to indicate which version of the ...
Read more >How to access weak linked framework in iOS? - Stack Overflow
I want to use Twitter framework for iOS 5, but be able to run my app in older OS. I added weak referenced...
Read more >Add support for weak framework linking (Apple) - GitLab
I just wanted to chime in on how important this issue is. Apple frequently deprecates APIs and adds new ones, usually tied to...
Read more >Native References iOS, Mac, and Bindings Projects - Xamarin
Native references gives you the ability to embed a native framework into a Xamarin.iOS, Xamarin.Mac, or binding project.
Read more >How to Weak Link a Lib in iOS? - CoderCrunch
Ios Framework Weaklink In an iOS project you specify a ... Every release of the SDK some new classes and function are added....
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

@franramirez688 changed SDL’s test package to use CMakeDeps: yes, you’re absolutely right, it works!
I guess the issue can be closed then?
@kambala-decapitator
That’s great news! So glad to hear it!
Yes, I think so.