Post

Replies

Boosts

Views

Activity

Reply to Need help to resolve error "using bridging headers with framework targets is unsupported"
Your Framework Umbrella Header will declare import of Frameworks that are needed for your Framework just like an App would do .. but .. !! Bridging means usually Objective-C to Swift. Exactly this is not supported to avoid the resulting mess. So you can not! But you can "publish" your additional Headers via Target Membership by clicking [x] and select option "public" or Drag 'n Drop those Headers into Build Phase -> Headers -> Public Once you did that they will be part of the Framework as a copy, but their location will be also relative to the Framework. Which means in case those Headers have relative imports to each other.. like some ExampleA-header.h file imports some ExampleB-header.hfile then you need to change some import rules like.. // ExampleA-header.h #import "subfoldername/subfoldername/ExampleB-header.h" //oops, this will not work #import "FrameworkName/ExampleB-header.h" //cool, this will work. and such resulting ExampleA-header.h file could be import'ed in the Umbrella Header with.. // Framework Umbrella Header // Frameworks this Framework needs. #import <Foundation/Foundation.h> //your own header, see here we use < & > #import <FrameworkName/ExampleA-header.h> //! Project version number for FrameworkName. FOUNDATION_EXPORT double FrameworkNameVersionNumber; //! Project version string for FrameworkName. FOUNDATION_EXPORT const unsigned char FrameworkNameVersionString[]; //here you can declare Class interfaces that you want to use as wrapper/interface to your inner workings when your framework is used in another app. @interface MyFrameworkName : NSObject @property (nonatomic) FantasyType *fantasyValue; @end when you still get the error message then you have to change Build Settings in Xcode for your particular Framework Targeted Project. For this you can search for Build Settings of SWIFT_OBJC_BRIDGING_HEADER and erase some possibly accidentally $(PROJECT_DIR)/ProjectName-Bridging-Header.h entry. As long your framework target build settings contain such entry the error will always appear. Be careful when you have multiple Targets in your Project, because you might erase your Bridging entry for other Targets as well.. so make sure you are in the right Column of this particular Framework Target when you erase this ...Bridging-Header.h... entry..
Jun ’22
Reply to "Build input file cannot be found"
a proper solution without fiddling Clean Up Build or "Hard Clean" or Renaming of Projects.. in Xcode 10+, and i think even earlier versions, goto.. Left Panel select Workspace then select <Projectname>.xcodeproj the middle section should present project settings by now in the middle section the right side shows your Project and its Targets, select the Target. from the presented Tabs choose Build Settings use the search field to find CLANG_USE_OPTIMIZATION_PROFILE, or type optim.. to filter all available options. by now you should see the section for Apple Clang - Code Generation in which you will find the build option CLANG_OPTIMIZATION_PROFILE_FILE. That is the location of the profile that is missing. You could change that. If you want to stop the use of profiling then just switch Use Optimisation Profile aka CLANG_USE_OPTIMIZATION_PROFILE to NO
Dec ’21
Reply to How to handle cocoa arrow key events without warning sound?
This solution is so simple - you might (and you will) laugh about it. just return nil; [NSEvent addLocalMonitorForEventsMatchingMask:NSEventMaskKeyDown handler:^NSEvent * _Nullable(NSEvent * event) { switch (event.keyCode) { case 126: //up case 125: { return nil; } break; //down default: { /* what ever you want to do with all other keys goes here */ } break; } return event; }]; for the specific event.keyCode to stop this exact event from passing on to your event handling system (NSResponder). See how this example still returns all other events, so your UI does not become unresponsive to all other key events.
Apr ’21