Hi so i have a given project where I am trying to use components within the PhotosUI Framework with Xcode26 and Xcode26.0.1
Just for reference here is an attached screenshot
This sample code compiled successfully with xcode16.4 and was in production.
There is no change in the pbxproj file , all the build settings have remained the same. Attaching it for reference.
project.pbxproj.txt
While showing declarations of PHPickerViewControllerDelegate i get two options
which is the same as in Xcode16.4
while browsing online found this reddit thread which is very similar
https://www.reddit.com/r/Xcode/comments/1nkku20/my_project_wont_compile_after_xcode_26_update_due/
Pls help :)
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
To reproduce this bug create a new Xcode Project for IOS choose UIKit. In the app delegate add the following lines.
As you can see in the above image . Line 19 with the initialization of PHPickerViewController has no compilation failure.
Now lets add import WidgetKit
As soon as widgetKit is imported a compiler error is thrown which is PHPickerViewController is not in scope.
This worked with Xcode 16.4
It was possible to have a swift file with both WidgetKit implementations and PhotosUI implementations. This behavior has changed in Xcode 26/26.0.1 .
Does anybody know why this happens , could not find any clues within the different versions of documentations.
P.S
Found a work around which raises further questions
Adding import SwiftUI fixes this problem , I am genuinely curious on how this is happening on a compiler level.
LINKS
To my previously published post :https://developer.apple.com/forums/thread/804059