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
This warning is disabled via .xcconfig file when using the Core Plot project. The top-level header files do use fully qualified framework references. We can't change the includes in each CPT* file because one of the supported configurations is an iOS static library. The framework references don't make sense in that context.
Are you using CocoaPods? If that's the problem, we can add the warning setting to the podspec.
I then link against the resulting .framework in my project:
The problem is, when importing a header file from Core Plot, my project fails (I have treat warnings as errors enabled). I would like to keep the warning on for my project, but that makes it impossible to build the project.
If you absolutely must keep the includes as is—and you don't—you should use the following syntax for including:
But I don't think it is necessary. For a static framework, you can specify where the header files should be installed when building, so that the <Module/Header.h> syntax works as expected.
To do this, you add a header phase (like in the dynamic framework target), define public and private headers, and then set the Public Headers Folder Path setting to include/$(PROJECT_NAME). (See here). After this step, #import <Module/Header.h> should work for static framework as well.
Otherwise, the project can no longer be used if users want to enable the Xcode 12 warning.
We already provide an iOS framework, too. It may be time to retire the static library option. That's a legacy from early in iOS history when it didn't support user frameworks.
Using Xcode 12.3, I cannot reproduce any build errors. Not even warnings (except for a known problem with unit tests: ld: warning: dylib (/Applications/Xcode123.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/XCTest) was built for newer macOS version (10.15) than being linked (10.10))
Using release-2.4 branch. Master works fine as well. Am on Catalina, could that be it?
AFAIK this problem is still not fixed in release-2.4. I had to disable -Wquoted-include-in-framework-header in my master project to build the dynamic iOS framework.
No need to disable the warning for the entire project -
just disable the warning locally in the relevant files (e.g. in the view importing CorePlot) via
Activity
eskroch commentedon Jun 28, 2020
This warning is disabled via .xcconfig file when using the Core Plot project. The top-level header files do use fully qualified framework references. We can't change the includes in each
CPT*file because one of the supported configurations is an iOS static library. The framework references don't make sense in that context.Are you using CocoaPods? If that's the problem, we can add the warning setting to the podspec.
LeoNatan commentedon Jun 28, 2020
Hello,
I have the project as a submodule in my project, and I am building the macOS framework using the following command:
I then link against the resulting .framework in my project:
The problem is, when importing a header file from Core Plot, my project fails (I have treat warnings as errors enabled). I would like to keep the warning on for my project, but that makes it impossible to build the project.
If you absolutely must keep the includes as is—and you don't—you should use the following syntax for including:
But I don't think it is necessary. For a static framework, you can specify where the header files should be installed when building, so that the <Module/Header.h> syntax works as expected.
To do this, you add a header phase (like in the dynamic framework target), define public and private headers, and then set the
Public Headers Folder Pathsetting toinclude/$(PROJECT_NAME). (See here). After this step,#import <Module/Header.h>should work for static framework as well.Otherwise, the project can no longer be used if users want to enable the Xcode 12 warning.
eskroch commentedon Jun 28, 2020
We already provide an iOS framework, too. It may be time to retire the static library option. That's a legacy from early in iOS history when it didn't support user frameworks.
LeoNatan commentedon Jun 28, 2020
If the framework targets iOS 8 or above, there really is no need for a static library really.
eskroch commentedon Jul 6, 2020
I created a Twitter poll to see if there's any opposition to removing the static library. The poll is open until July 9, 2020. Please vote.
eskroch commentedon Jul 12, 2020
The poll result is unanimous—it's time to remove the static library. I'll do this for the 2.4 release.
LeoNatan commentedon Jul 12, 2020
Thank you for the update!
lexuanquynh commentedon Oct 1, 2020
I got the same issue. How to fix:
DivineDominion commentedon Jan 22, 2021
Using Xcode 12.3, I cannot reproduce any build errors. Not even warnings (except for a known problem with unit tests:
ld: warning: dylib (/Applications/Xcode123.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/XCTest) was built for newer macOS version (10.15) than being linked (10.10))Using
release-2.4branch. Master works fine as well. Am on Catalina, could that be it?altimac commentedon Oct 13, 2022
AFAIK this problem is still not fixed in release-2.4. I had to disable -Wquoted-include-in-framework-header in my master project to build the dynamic iOS framework.
jayMcBee commentedon Feb 3, 2023
No need to disable the warning for the entire project -
just disable the warning locally in the relevant files (e.g. in the view importing CorePlot) via
Updated everything for compatibility with Xcode 14.3. Fixed numerous …
eskroch commentedon Apr 9, 2023
This should be fixed on the
release-2.4branch. Let me know if anyone is still seeing this issue with the latest code.