-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using use_modular_headers!, NSUInteger is cast in Swift as Int instead of UInt #7589
Comments
This seems to be caused by cd554f4 In the test project, the content of
If I remove the This thread indicates that NSUInteger is bridged as Int for system frameworks like Foundation/AppKit/UIKit, and as UInt for user frameworks. |
Well that’s unfortunate, and undocumented in the clang modules page :(. All it says the system modifier does is suppress warnings from headers |
We might have to remove this. |
This issue also prevents apps using SwiftyDropbox from switching to |
PR #7638 |
I still can't build RealmSwift with CocoaPods on the master branch. The Realm subpod defines a module map with CocoaPods/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb Line 628 in 0a93634
|
1.5.1 hasn't shipped yet. did you try with latest master branch? |
Oops @MaximeLM you are right this should also be removed. |
Let me open a PR |
@dnkoutso yes I used the latest master |
@MaximeLM PR up |
@dnkoutso the app compiles with your fix, thank you! Two warnings have appeared in our app:
I guess that is an issue with Realm? |
No, it’s a CocoaPods issue that we don’t know how to fix for static libraries |
🌈
Report
What did you do?
In the Podfile of a Swift project, replace
use_frameworks!
with:The project uses an Objective-C pod. The Objective-C pod use
NSUInteger
in its public interface.What did you expect to happen?
NSUInteger should be cast in Swift as
UInt
. This is the previous behavior.What happened instead?
NSUInteger is cast is Swift as
Int
. The swift project fails to compile.CocoaPods Environment
Stack
Installation Source
Plugins
Podfile
Project that demonstrates the issue
https://github.com/MaximeLM/TestNSUInteger.git
This is a simple project that demonstrates the issue. Reverting to
use_frameworks!
in the Podfile makes the project build again.This issue is preventing apps that use RealmSwift to build with the new setting: realm/realm-swift#5663
The text was updated successfully, but these errors were encountered: