Xcode 12 Framework: 'Double-quoted include in framework header, expected angle-bracketed instead'

I've got an iOS framework that I've had around for ages. It's a mixture of Objective-C and Swift.

Since installing Xcode 12, I'm now getting a bunch of warnings of the type:

'Double-quoted include in framework header, expected angle-bracketed instead'

If I go to the various source files and say change:

Code Block
#import "Place.h"

to

Code Block
#import <VegasKit/Place.h>

then I get an error saying it can't find the file. If I try this:

Code Block
#import <Place.h>

then I get an error telling me to go back to double-quotes, i.e. undo the change.

Any idea what I can do to get this all setup correctly? Thanks.

i had this issue all day today. i tried all kinds of things so not 100 percent on how i fixed it but, my project was on icloud and the framework project that gave me the issues was on my local drive. i moved the framework to the folder adjacent to my project on icloud and it worked.

i might of had the framework paths wrong and not looking into the original framework location but the paths are very hard for me to grasp :P

This is not just an issue with Cocoapods projects, and it's a compile error instead of a warning in Xcode 15.0.1. I was having this problem in a native macos application, where one of my application modules is a framework, and the framework module has a C header file referenced by two other C header files, also in the framework. In my codebase, the framework module is named IslepopAUFramework, and the three header files (all at the root level of the framework project) were coded as such:

islepop_editapi_types.h:

#ifndef islepop_editapi_types_h
#define islepop_editapi_types_h

typedef enum {
    UNKNOWN,
    EDIT_AUDIO_CONFIGURATION,
    GET_PATCH_BANK,
    SAVE_PATCH_BANK,
    NEW_PATCH_BANK,
    LOAD_PATCH_BANK,
    NEW_PATCH,
   ...

islepop_external_bindings.h:

#ifndef ISLEPOP_EXTERNAL_BINDINGS_H
#define ISLEPOP_EXTERNAL_BINDINGS_H

#import "islepop_editapi_types.h"

//Edit API
void fire_the_engine();
void shut_it_down();
RustEditAPIResponse* send_command(RustEditAPICommand* command);
void free_response(RustEditAPIResponse* response);
...

#endif

islepop_midi_1_0_bindings.h:

#ifndef islepop_midi_1_0_bindings_h
#define islepop_midi_1_0_bindings_h

#import "islepop_editapi_types.h"

//CRUD operations for MIDI subscriptions.. or at least the CR and D:
RustEditAPIResponse* add_midi_subscription(int32_t patch_id, int32_t patch_unit_id, int32_t parameter_id, double_t range_low, double_t range_high);
RustEditAPIResponse* remove_midi_subscription(int32_t subscription_id, uint8_t message_type, uint8_t message_subtype);



RustEditAPIResponse* send_command_to_midi(RustEditAPICommand* command);
void free_midi_response(RustEditAPIResponse* response);

#endif

As noted at the bottom of this post (https://developer.apple.com/forums/thread/69606), I had to add all of my C header files to the Headers section of the Build Phases tab of my framework target. I also had to change the #import statements in islepop_external_bindings.h and islepop_midi_1_0_bindings.h to angle-bracketed imports, as such -- notice that the angle brackets include the framework name, even though all of these header files are in the same place, at the root of IslepopAUFramework:

#import <IslepopAUFramework/islepop_editapi_types.h>

With these two changes, the error requiring angle-bracketed includes is fixed, and the compiler can actually find the header files.

I have the same issue : The following did the trick for me:

Step 1 : Open the terminal and got to project directory using cd command

Step 2: Clear Xcode’s Derived Data: run this command

rm -rf ~/Library/Developer/Xcode/DerivedData/

Step 3: Clear CocoaPods Cache: run this command

rm -rf ~/Library/Caches/CocoaPods/

Step 4: Deintegrate CocoaPods: run this command

pod deintegrate

Step 5 : Update CocoaPods: run this command

pod update

After running these commands, it's usually a good idea to clean your Xcode project (Shift + Command + K) and then rebuild to ensure that everything is properly recompiled.

Xcode 12 Framework: 'Double-quoted include in framework header, expected angle-bracketed instead'
 
 
Q