-
-
Notifications
You must be signed in to change notification settings - Fork 51
Issues With Compiling Package In Xcode 16.1 #96
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
Comments
👋 Hello @paulmeddaugh, thank you for submitting a
From your description, it seems you're encountering compiler errors when trying to run the Xcode projects with the
Please make sure you've searched existing issues to avoid duplicates. If you need to add any additional information, feel free to comment on this issue. An Ultralytics engineer will review your report soon and provide further assistance. Thank you for helping us improve the project! 🙌 |
@paulmeddaugh
(If you are using the yolo11n-seg model but the task is .obb, please change the task to .seg and try again.) |
Hi @john-rocky, Thanks for responding so quickly. I have used both the YOLOSingleImageSwiftUI and the main app sample apps, though I particularly would like to get the YOLOSingleImageSwiftUI app working. It looks like most of the sample apps use the same local YOLO package, so my assumption has been that errors in that folder would effect most sample apps though. In my YOLOSingleImageSwiftUI sample app, the YOLO class is initialized as follows: The compiler errors for the ObbDetector.swift file mentioned above are still present though. |
@paulmeddaugh |
@john-rocky Hi, Is there any Update on the solution? |
I am quite new to the Ultralytics world, and have been following the tutorial on the README here to run a YOLO segmentation model. After cloning the repository, I am creating a yolo11n-seg.mlpackage file with the following python code:
The exported

yolo11n-seg.mlpackage
file displays in Xcode with the following prediction inputs and outputs:Upon opening either the YOLOiOSApp.xcodeproj file or any example projects in the ExampleApps folder however, I have been initially met with these compiler errors in the ObbDetector.swift file:
Capture of 'pointer' with non-sendable type 'UnsafeMutablePointer<Float>' in a
@sendableclosure
--
Capture of 'rawDetections' with non-sendable type '[Detection?]' in a
@sendableclosure
--
Mutation of captured var 'rawDetections' in concurrently-executing code
I first edited the ObbDetector.swift file with some temporary changes to get around these issues, but it eventually seems to reveal around 15 compiler errors total in the YOLO folder before being able to run any Xcode project in the repository. Nearly all errors seem to have to do with some kind of @sendable or concurrency issue similar to the ones above.
I noticed the README has an image mentioning Xcode version 15.2, so my thought was that it had to do with Swift 5 -> 6 migration issues, but even after setting the Swift Language Version to 4.2 in the Build Settings of a project, the errors persist.
Am I possibly setting up the Xcode projects incorrectly? My environment details are additionally as follows:
I truly do appreciate any time taken to resolve this. Thanks.
The text was updated successfully, but these errors were encountered: