Post

Replies

Boosts

Views

Activity

Creating "type-safe" CIFilter fails
I'm getting consistent errors in Xcode 16.1 while trying to implement type-safe CIFilter instances as documented on the page at https://developer.apple.com/documentation/coreimage/cifilter. After pasting in the example code on that page for a "FalseColor" filter into a simple test project's ContentView, I get an error explaining that: "Type 'CIFilter' has no member 'falseColor'". Same thing with pasting in the example code at https://developer.apple.com/documentation/coreimage/cifilter/3228278-boxblur, and other examples. I have imported CoreImage, so that shouldn't be the issue. Am I doing something wrong, or is this functionality just broken? I have had success creating filters with the string-based API, but access to a type-safe API would obviously be preferable, so any suggestions are greatly appreciated.
2
0
75
4d
Predictive code completion is not supported in this region
I'm using beta 2 of Xcode 16 on an M1 MacBook with 32 GB of memory, running macOS 15 beta 2. It didn't appear that predictive code completion was working as exhibited in the developer videos, so I tried to figure out what's going on. The Xcode documentation mentions that you can disable predictive code completion in Settings, so I checked there. The checkbox to turn it on is disabled. When I click the "I" button to its right, it tells me that "Predictive code completion is not supported in this region." I am in the US with my system set to US English. What do I have to do to be able to experience this feature?
2
1
1.4k
Jul ’24
Running iOS app from Xcode on Apple Silicon results in LaunchServices error
I am trying to run an iOS project as a Mac app on my M1 Mac Book Pro. It builds fine, but refuses to launch with an error that reads: "The LaunchServices launcher has returned an error. Please check the system logs for the underlying cause of the error." The details of the error start out: "Could not launch “” Domain: IDELaunchErrorDomain Code: 20 Recovery Suggestion: The LaunchServices launcher has returned an error. Please check the system logs for the underlying cause of the error. User Info: { DVTErrorCreationDateKey = "2022-08-03 16:08:24 +0000"; DVTRadarComponentKey = 968756; IDERunOperationFailingWorker = IDELaunchServicesLauncher; } The operation couldn’t be completed. Launch failed. Domain: RBSRequestErrorDomain Code: 5 Failure Reason: Launch failed. Launchd job spawn failed Domain: NSPOSIXErrorDomain Code: 153 " I have gotten this error in both Xcode 13.3.1 and in the last three Xcode 14.0 betas (3, 4 & 5). The project runs fine in the iPhone simulator in all cases. I have tried rebooting the Mac to see if that would clear out bad caches. That didn't help. This is very strange because I successfully ran this iOS project as an Apple Silicon Mac app about a month ago. I even tried resetting the project to remove the few minor changes I made to it back to when it successfully ran as a Mac app. Anybody know what's going on here and how to fix it?
1
1
1k
Aug ’22
Running Xcode 13 beta project in Xcode 12 results in "letterboxed" appearance
I have been able to reproduce a problem with running a SwiftUI iOS app project converted in Xcode 13 beta for use in Xcode 12. Doing so is consistently resulting in the main view's top and bottom being cut off and centered within a black background (I believe this is referred to as "letterboxing"). Here are the steps to follow: Use xcode-select to set your environment for the Xcode 13 beta and launch it. Create a new SwiftUI app In its ContentView file, add some content Run the project in the iOS Simulator Select the project in the Project navigator and in the File Inspector, change the Project Format dropdown menu to Xcode 11.4-compatible or Xcode 12-compatible. Quit the Xcode beta and the Simulator. Use xcode-select to set your environment for Xcode 12.5 and launch it. Open the project you created in Xcode 13 beta and run it in the iOS Simulator. Your simulator screen should look something like the screenshot below. I have not been able to find any way of fixing this problem once the file has been opened in Xcode 12. After relaunching Xcode 13 and rerunning it there the black borders do not appear (but there are other problems I've run into that make me want to continue development in Xcode 12 for the project where I ran into this problem.)
0
0
1.4k
Jun ’21
Combine in AppKit - issue with publisher(for: NSControl.textDidChangeNotification...
I'm trying to learn how to use Combine in an AppKit app I'm working on. I found an Apple Developer article that explains pretty much exactly what I'm trying to achieve, delaying input from an NSTextField with the .debounce operator. (https://developer.apple.com/documentation/combine/receiving-and-handling-events-with-combine) Unfortunately it doesn't seem to be working for me. I have created a function in a NSTableCellView subclass that gets called as part of the cell's configuration which looks like:     private func watchForSearchTextEntries() { print("Setting up search text observer") let sub = NotificationCenter.default .publisher(for: NSControl.textDidChangeNotification, object: searchTermText) .map( { ($0.object as! NSTextField).stringValue } ) .sink(receiveCompletion: { print ($0) }, receiveValue: { print ($0) })  } When I run the app and type in that field, nothing gets printed to the Console. As a test, I also tried adding a NotificationCenter observer that calls a method to print out the notification's object. NotificationCenter.default.addObserver(self, selector: #selector(receivedTextChangeNotification(_:)), name: NSControl.textDidChangeNotification, object: searchTermText) That works as expected. So what's going on with my attempted use of Combine?
1
0
1.1k
Apr ’21