Xcode 15 has problem of generated Swift NSObject headers: Property type 'NSInteger' (aka 'long') is incompatible with type 'NSUInteger' (aka 'unsigned long') inherited from 'NSObject'

The generated Obj-C header for Swift is called

@property (nonatomic, readonly) NSInteger hash;

However, it caused a compiler error:

Property type 'NSInteger' (aka 'long') is incompatible with type 'NSUInteger' (aka 'unsigned long') inherited from 'NSObject'

Version 15.0 beta (15A5160n)

I'm seeing this too. However, I'm having trouble reproducing the warning in a small sample project.

Hopefully Apple will hash it out quickly

I'm having the same issue with a UITabBarController subclass and overriding selectedIndex, and bridging that subclass back to Objc:

Property type 'NSInteger' (aka 'long') is incompatible with type 'NSUInteger' (aka 'unsigned long') inherited from 'UITabBarController'

Bridging issue still persists in Xcode 15 Beta 2

Dont know what apple is doing here

Created a radar: FB12411092

We're running into the exact same issue in one of our products, and are unable to produce a demo project. The error does not trigger in the demo project, even though the type for hash is NSInteger in the header generated by Swift as well.

I've tried to find out how to disable this error by having a look at the clang source code, but it doesn't seem to be tied to a warning flag.

Created another radar as well: FB12485128

This seems to be fixed in Xcode 15 beta 3. 🥳

Xcode 15 has problem of generated Swift NSObject headers: Property type 'NSInteger' (aka 'long') is incompatible with type 'NSUInteger' (aka 'unsigned long') inherited from 'NSObject'
 
 
Q