Post

Replies

Boosts

Views

Created

- (BOOL) contentsAreFlipped needs to be true for .nib layouts
I have an odd bug, if I use initWithFrame as the init routine for NSView subclass that uses layers I don't see this bug. But if I embedded this view into a storyboard with a .nib file and use initWithCoder, I need to return true on (BOOL) contentsAreFlipped From the NSView subclass If I don't the CALayer actually renders from 0,0 from the view upwards and off the window. The frame sizes for the NSView and the CALayer are good.. when I see them in updateLayer. Obviously I have a fix.. but I would like to understand why.
0
0
204
1w
How to eliminate frameworks from being picked up by Xcode
I wrote my own framework and it uses some OpenGL calls, I have my own direct replacements for these calls. But Xcode complains when I try to integrate these calls into a NSApp that all of these calls are deprecated. It must be in some module that Appkit or Cocoa uses to include all the headers as I went through and eliminated all potential references. I could just encapsulate all of this in a separate C or C++ file, but I would rather write it all in Obj-C. I know it's just a warning, but I like to treat warnings as errors to catch as many bugs as possible.
1
0
90
1w
How do I build a framework and be able to use it within the same project
I am building a framework and an app, the framework is a dependent on the app so that works.. But within the app I can't use #import <OpenGL_4_6/OpenGL_4_6.h> But I have to use #import "OpenGL_4_6/OpenGL_4_6.h" I can see the framework being built its in a directory that I can't seem to express with the $ macros for Xcode Library/Developer/Xcode/DerivedData/MGL-bpbwpidwnbulrxgcndprcdmfrosb/Build/Products/Debug I tried to set my framework search path to this.. but to no avail.
4
0
107
1w
How to connect to a IOUSBHostInterface
I have poked around the web looking for a good example to do this and I haven't found a working example. I need to connect to a USB Device, its multiple ports and supports what looks to be a root port and 4 other ports I am no expert in USB but I do know how to write a kext and client drivers, but thats really not the way to solve this. I need to display the serialized output from these USB ports for a development board. I would rather do this on my Mac than have to cobble up a Linux machine and mess around with Linux. Here is the output from ioreg MCHP-Debug@03100000 <class IOUSBHostDevice, id 0x105f6fdc2, registered, matched, active, busy 0 (20 ms), retain 27> MCHP-Debug@0 <class IOUSBHostInterface, id 0x105f6fdc8, registered, matched, active, busy 0 (13 ms), retain 5> +-o MCHP-Debug@0 <class IOUSBHostInterface, id 0x105f6fdc8, registered, matched, active, busy 0 (13 ms), retain 5> +-o MCHP-Debug@1 <class IOUSBHostInterface, id 0x105f6fdc9, registered, matched, active, busy 0 (11 ms), retain 5> +-o MCHP-Debug@2 <class IOUSBHostInterface, id 0x105f6fdcb, registered, matched, active, busy 0 (9 ms), retain 5> | | | | | +-o MCHP-Debug@3 <class IOUSBHostInterface, id 0x105f6fdcc, registered, matched, active, busy 0 (7 ms), retain 5> I have been able to open a inservice to the device at the top level, but I get an error when I use. usbHostInterface = [[IOUSBHostInterface alloc] initWithIOService:usbDevice options: IOUSBHostObjectInitOptionsNone queue: queue error: &error interestHandler: handler]; Error:Failed to create IOUSBHostInterface. with reason: Unable to obtain configuration descriptor. Assertion failed: (usbHostInterface), function main, file main.m, line 87. I started using DeviceKit but I received signing errors and I shouldn't have to go down that path just to dump data from a USB port? Any suggestions would be great, most of the Apple documentation on USB ports is like 20 years old and the new stuff pushes you towards DeviceKit.
1
0
283
Nov ’25