Post

Replies

Boosts

Views

Activity

Reply to Building Lists and Navigation tutorial
It is now April 2020 and I too have run into this problem. The examples in the Building Lists and Navigation tutorial do not match the BuildingListsAndNavigation project files downloaded from the tutorial.In the example in Section 2, Step 1 of the tutorial, the LandmarkRows.swift file is shown as being saved into "Landmarks Views" folder. That folder does not exist in the downloaded resource files. So where do I save it?Also at the beginning of Section 1, Step 1 it mentions nothing about loading the BuildingListsAndNavigation -> StartingPoint -> Landmarks -> BuildingListsAndNavigation.xcodeproj so I am assuming that is what was needed in order to start with Step 1.And finally, to complicate matters even worse, there isn't even a folder named "Landmark Views" anywhere in BuildingListsAndNavigation -> Complete -> Landmarks -> Landmarks. It is named "Supporting Views" which isn't shown anywhere in this tutorial.It's like independent developers wrote the tutorial, others wrote the code, and no one verified the tutorial matches the example code and folder structure.
Apr ’20
Reply to Building Lists and Navigation tutorial
I was trying to open the xcodeproj file from the downloads folder. After moving the downloaded folder to the SwiftUI - Learning Test App folder where the Landmarks and Learning Test App folders were located from the first tutorial it opens and builds correctly. However, the folder structure does not match what is in the tutorial.This needs to be explained more clearly for us newbies who are trying to learn XCode and SwiftUI for the first time.
Apr ’20
Reply to Building Lists and Navigation tutorial
***** it! I have tried everything I can think of to get this tutorial to work and it is so **** buggy, I will just have to go somewhere else to learn how to develop using Apple's development environment. It's a shame because they charge so much money for their products and yet they can't even make a simple tutorial that works...
Apr ’20
Reply to No factory registered for id***
@OOPer, your solution doesn't work for me. This is now showing up on my console, but not causing a crash. The audio (mp3 file) still plays as expected. I use AVAudioPlayer from AVFoundation in my code on macOS Big Sur, XCode 12.3, Swift 5.3. I building a macOS app, not iOS. I declare my player as var player:AVAudioPlayer? (I had it also as AVAudioPlayer!) and both produce the same console message above. Like I wrote above, the audio still plays, but I would like to get this resolved so the message no longer appears. I stepped through my code and the error is appearing immediately upon calling player?.prepareToPlay() method. EDIT: Subsequent calls to this method does not reproduce the error in the console. It is only happening upon the initial call to this method. If I play a subsequent mp3 file it doesn't repappear. if player?.prepareToPlay() != nil { Thanks to anyone who can suggest how to resolve this.
Jan ’21
Reply to Remove the scroll in WebKit View
@Claude31, that solution only disables the scrollWheel. It does not turn off the scrollbars in the enclosingScrollView, and the user can still grab the scroll bars and drag the webView up or down or left to right. I even tried webView.enclosingScrollView.hasHorizontalScroller = false and webView.enclosingScrollView.hasVerticalScroller = false and that doesn't remove the scroll bars either.
Mar ’21
Reply to Apple Document - Creating a Basic Video Player
I finally got the video to play by going to the Signing & Capabilities tab in the Project Settings and checked Outgoing Connections (Client) under App Sandbox. Apple should make note of this requirement in their guide. However, I am still getting the following errors in the console: 2021-03-30 14:45:34.347266-0500 Streamer[12701:657907] [plugin] AddInstanceForFactory: No factory registered for id CFUUID 0x600003974980 F8BB1C28-BAE8-11D6-9C31-00039315CD46 2021-03-30 14:45:34.474219-0500 Streamer[12701:657916] validateSessionInfo: bundleID is invalid. Please specify the bundleID for kRTCReportingSessionInfoClientBundleID 2021-03-30 14:45:34.475221-0500 Streamer[12701:657894] startConfigurationWithCompletionHandler: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd} 2021-03-30 14:45:34.475366-0500 Streamer[12701:657894] startConfigurationWithCompletionHandler: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd} 2021-03-30 14:45:34.507482-0500 Streamer[12701:657907] [logging] volume does not support data protection, stripping SQLITE_OPENFILEPROTECTION* flags 2021-03-30 14:45:34.513188-0500 Streamer[12701:657907] [logging] volume does not support data protection, stripping SQLITE_OPENFILEPROTECTION* flags 2021-03-30 14:45:34.654719-0500 Streamer[12701:657415] Metal API Validation Enabled 2021-03-30 14:45:35.304861-0500 Streamer[12701:657894] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd} 2021-03-30 14:45:35.963419-0500 Streamer[12701:657895] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd} 2021-03-30 14:45:40.709591-0500 Streamer[12701:657896] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd} 2021-03-30 14:45:40.809438-0500 Streamer[12701:657895] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd} 2021-03-30 14:45:41.075516-0500 Streamer[12701:657896] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd} 2021-03-30 14:45:41.787596-0500 Streamer[12701:657894] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service on pid 0 named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service on pid 0 named com.apple.rtcreportingd} 2021-03-30 14:45:42.762731-0500 Streamer[12701:657896] [connection] nw_connection_add_timestamp_locked_on_nw_queue [C1] Hit maximum timestamp count, will start dropping events
Mar ’21
Reply to Opening NSWindow on a connected display
As pointed out on another site, the problem was caused by me setting the styleMask as .borderless without .titled, which prevents the window from becoming key or main according to this. Here's my updated code that works in Swift 5.5: import Cocoa class ViewController: NSViewController {     var externalDisplay: NSScreen?     var fullScreenWindow: NSWindow?     var fullScreenView: NSView?     override func viewDidLoad() {         super.viewDidLoad()         // Do any additional setup after loading the view.     }     override var representedObject: Any? {         didSet {         // Update the view, if already loaded.         }     }     @IBAction func showExternalDisplayButtonClicked(sender: Any?) {         // Open the external display window if one is present         if NSScreen.screens.count > 1 {             externalDisplay = NSScreen.screens.last             let mask: NSWindow.StyleMask = [.titled, .closable, .miniaturizable, .resizable, .borderless]             fullScreenWindow = NSWindow(contentRect: externalDisplay!.frame, styleMask: mask, backing: .buffered, defer: true, screen: externalDisplay)             fullScreenWindow!.level = .normal             fullScreenWindow!.isOpaque = false             fullScreenWindow!.hidesOnDeactivate = false             fullScreenWindow!.backgroundColor = .red             let viewRect = NSRect(x: 0, y: 0, width: externalDisplay!.frame.width, height: externalDisplay!.frame.height)             fullScreenView = NSView(frame: viewRect)             fullScreenWindow!.contentView = fullScreenView             fullScreenView?.window?.toggleFullScreen(self)         }     } }
Sep ’21