Post

Replies

Boosts

Views

Activity

External soundbar not playing nice with TV
Apple TV Samsung TV SONOS Soundbar + S1 stereo speakers Apple TV Preferences Sound output = SONOS soundbar Samsung Preferences Sound Output = SONOS HDMI eArc soundbar start with Apple TV movies and as I switch from movie to movie, sound comes out stereo as it should however when I switch to Netflix or YouTube TV with stereo content, sound comes out mono .. until I manually change the ATV Preferences to stereo. As ong as I stay with Netflix content, stereo output. But change to YouRube TV or ATV, it automatically changes to mono. ?????
2
0
188
Feb ’25
Cannot add a iOS Distribution Certificate to my Project or Target?
Cannot add a iOS Distribution Certificate to my Project or Target? During the Submission for Review process, it states I should choose a Build (for Distribution) and I need to do the above add before I can do that. Here is a screen shot of my Certificates set in my Developer Account: Here is the screen shot when I double-click on the iOS Distribution Certificate above: Here is a screen shot of that Certificate in the Finder: Yet in spite of all the above evidence, here is a screen shot of my Target for both my iOS and tvOS Project: So, please provide some hints because this is the only step left before I finally submit my App to the App store.
3
0
2.4k
Feb ’23
Error processing request from MAD on result: Error Domain=NSOSStatusErrorDomain
New after update to Xcode 15: Error processing request from MAD on result: Error Domain=NSOSStatusErrorDomain Code=-128 "Request was canceled" Here is my code which I call within my GameViewController's viewDidLoad(). present(itsPlayerController!, animated:true) { self.itsMoviePlayer?.play() self.itsMovieIsFinished = false } Here is my code which I call at various times via playMovie(movieName: "pose"): func playMovie(movieName: String) { NotificationCenter.default.addObserver(self, selector: #selector(playerDidFinishPlaying), name: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: itsPlayerController?.player?.currentItem) present(itsPlayerController!, animated:true) { self.itsMoviePlayer?.play() self.itsMovieIsFinished = false } } // playMovie @objc func playerDidFinishPlaying(note: NSNotification) { self.itsPlayerController?.dismiss(animated:false, completion:nil) nextScene() changeScene() // re-init for next time setupMovie(theMovieName: "pose") } NB: If I do not call playMovie ==> NO ERROR THE PROBLEM = my call to present within playMovie. If I totally comment out present, = NO ERROR If I comment out just the guts of present, other errors are introduced. I have checked the syntax of calling present and I don't see any error there. All the above pertains to the Destination = iPad Mini (6th Generation If the Destination = Apple TV, then we get within GameViewDidLoad Unable to simultaneously satisfy constraints. For both Destinations, the Game runs OK - it's just these Warnings?? HAALP
3
0
2.0k
Sep ’23
UIBezierPath *not* showing?
I am developing a game in which my Locomotive is following a UIBezierPath that mimics an oval shaped Track. The math of the following is not "adding up" .. if it is, I am obviously not understanding the math of the layout. Bottom line = the following code does not display the UIBezierPath. Here's the code that creates this UIBezierPath .. please note the math in the comments: func createTrainPath() { trackRect = CGRect(x: 0.0, y: 0.0 - roomHeight/2 + tracksHeight, width: tracksWidth, height: tracksHeight) // trackRect = (0.0, -207.0, 940.0, 476.0) // portrait // trackRect = (0.0, -274.0, 470.0, 238.0) // landscape print("trackRect = \(trackRect!)") trackPath = UIBezierPath(ovalIn: trackRect) let theTrackShapeNode = SKShapeNode(path: trackPath.cgPath, centered: true) theTrackShapeNode.zPosition = 100 // for testing theTrackShapeNode.position = myTracks.position theTrackShapeNode.lineWidth = 4.0 theTrackShapeNode.strokeColor = SKColor.blue if let ourScene = GameScene(fileNamed: "GameScene") { print("here") // this shows ourScene.addChild(theTrackShapeNode) // does *not* show? } } // createTrainPath In Portrait mode, the UIScreen measures 1024 x 1366 and the Track measures 940 x 476 with its top edge down 207 from the center of the UIScreen. In Landscape mode, the UIScreen measures 1366 x 1024 and the Track measures 470 x 238 with its top edge down 274 from the center of the UIScreen. In both modes, the bottom edge of the Track is supposed to be flush with the bottom edge of the UIScreen .. and it is. If the math is correct, then I am obviously not understanding the math of the layout .. because the UIBezierPath is not showing. The math appears correct .. but the UIBezierPath just is not showing. So where is my brain off-center?
3
0
719
Dec ’23
How to prevent initial rotation of a node when following a UIBezierPath?
Problem = I have a locomotive trying to follow an oval-shaped UIBezierPath. The challenge is that when I use orientToPath:true in my call to SKAction.follow, the locomotive immediately rotates even though the locomotive is initially positioned on the straight portion of the oval before it reaches the rounded portion of the oval. If I could prevent this initial rotation, then the rotation would not happen until it reached the rounded portion of the oval - as it should. So, can you please provide some guidance as to how I could prevent this initial rotation? Here is the code: func createTrainPath() { // this custom method ensures that the locomotive // moves CW, versus CCW trackPath = getBezierPath(theNode: myTrain, offset: 0.0) } // createTrainPath func startFollowTrainPath() { let theSpeed = Double(5*thisSpeed) var trainAction = SKAction.follow( trackPath.cgPath, asOffset: true, orientToPath: true, // <== speed: theSpeed) trainAction = SKAction.repeatForever(trainAction) myTrain.run(trainAction, withKey: runTrainKey) } // startFollowTrainPath
3
0
719
Jan ’24
Moving a SKSpriteNode image in response to a change in its position
Moving a SKSpriteNode image in response to a change in its position is not working. Based on the code below, does anyone have an idea why? N.B. I change the position of the image within my class GameScene. Then, I call, e.g., this function: func drawBall() {             let positionInSceneCoordinates = CGPoint(x: ballPosX, y: ballPosY)             myBall!.removeAction(forKey: "moveTO")     let moveTO = SKAction.move(to: positionInSceneCoordinates, duration: TimeInterval(1))     myBall!.run(moveTO, withKey: "moveTO)") } Selective placement of print statements prove that the ballPosX, ballPosY are changing as they should, but I am observing zero movement on the Xcode Simulator via the call to myBall!run(..). I am at a loss here on how to proceed. Thanks bunches!
4
0
635
Feb ’23
Nimbus+ game controller **not** working with Ventura 13.3 and comparable tvOS
Nimbus+ game controller not working with Ventura 13.3 and comparable tvOS Prior to updating these OS' yesterday, my Computer App in the App Store worked. After updating, not working. I have contacted SteelSeries, the mgr of Nimbus+, and they refuse to admit it's their firmware. And I have definitely started up their SteelSeries CG application and looked for a firmware update -- none. Replacement of hardware is not the solution. Any contrary ideas you folk may have would be extremely helpful.
4
0
1.6k
Apr ’23
Why is Add Emitter to Node not happening immediately?
Why is Add Emitter to Node not happening immediately? Within an extension to GameViewController I have: func addEmitterToNode(_ particleName: String, _ theNode:SKSpriteNode) { if let emitter = SKEmitterNode(fileNamed: particleName) { emitter.name = "emitter" emitter.position = CGPoint(x: 0, y: 0) // = at center theNode.addChild(emitter) } } // addEmitterToNode Here is the func (extension to GameViewController) wherein I call the above. The problem is the explosion sound plays but the smoke particle emitter is not immediately added. func increaseSpeed() { if thisSpeed > maxSpeed { pauseGame() // sets myTrain.isPaused = true playSound(theSoundName: "explosion") addEmitterToNode("smokeParticle.sks", myTrain) trainHasCrashed = true } } // increaseSpeed What I do not understand is that the following within GameScene's sceneDidLoad, the smoke particle emitter is added = override func sceneDidLoad() { if itsGameViewController.trainHasCrashed { itsGameViewController.addEmitterToNode("smokeParticle.sks", myTrain) } }
4
0
757
Jul ’24
How do I correctly show a PDF document?
How do I correctly show a PDF document? iPad and Xcode 15.4 Within my GameViewController, I have: func presentScene(_ theScene: SKScene) { theScene.scaleMode = .resizeFill if let skView = self.view as? SKView { skView.ignoresSiblingOrder = true skView.showsFPS = true skView.showsNodeCount = true #if os(iOS) let theTransition = SKTransition.doorway(withDuration: 2.0) skView.presentScene(theScene, transition: theTransition) #elseif os(tvOS) skView.presentScene(theScene) #endif } } // presentScene I believe presentScene(theScene) goes to the sceneDidLoad() func of theScene which adds various SKSpriteNodes to the scene via a call to addChild(theNode). So far so good ... Until I have a SKScene wherein I wish to display a PDF. I use this snippet to display this PDF with this call within the SKScene's sceneDisLoad(): displayPDF("ABOUT_OLD_WEST_LOCOMOTIVE") func displayPDF(_ itsName:String) { let pdfView = PDFView() guard let path = Bundle.main.path(forResource: itsName, ofType: "pdf") else { return } print("path") guard let pdfDocument = PDFDocument(url: URL(fileURLWithPath: path)) else { return } print("pdfDocument") pdfView.displayMode = .singlePageContinuous pdfView.autoScales = true pdfView.displayDirection = .vertical pdfView.document = pdfDocument } // displayPDF The 2 print statements show, yet the SKScene does not display the PDF via pdfView.document = pdfDocument? Anyone have a clue what errors I have committed? Appreciate it.
4
0
956
Jul ’24
How to detect the location of a mouseDown event using Swift?
How to detect the location of a mouseDown event using Swift? With the following code snippet, I get the error "Cannot find type 'NSEvent' in scope"? import SpriteKit func mouseDown(with event: NSEvent) { if let ourScene = GameScene(fileNamed: "GameScene") { let location = event.location(in: view) let node:SKNode = ourScene.atPoint(location) if (node.name == "creditsInfo") { showCredits() } } // if let ourScene } // mouseDown Anybody have a floodlight to shine on this very basic error?
5
0
1.3k
Feb ’24
Detecting touching a SKSpriteNode within a touchesBegan event?
Detecting touching a SKSpriteNode within a touchesBegan event? My experience to date has focused on using GamepadControllers with Apps, not a touch-activated iOS App. Here are some short code snippets: Note: the error I am trying to correct is noted in the very first snippet = touchesBegan within the comment <== shows "horse" Yes, there is a "horse", but it is no where near the "creditsInfo" SKSpriteNode within my .sksfile. Please note that this "creditsInfo" SKSpriteNode is programmatically generated by my addCreditsButton(..) and will be placed very near the top-left of my GameScene. override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { if let ourScene = GameScene(fileNamed: "GameScene") { if let touch:UITouch = touches.first { let location = touch.location(in: view) let node:SKNode = ourScene.atPoint(location) print("node.name = \(node.name!)") // <== shows "horse" if (node.name == "creditsInfo") { showCredits() } } } // if let ourScene } // touchesBegan The above touchesBegan function is an extension GameViewController which according to the docs is okay, namely, touchesBegan is a UIView method besides being a UIViewController method. Within my primary showScene() function, I have: if let ourScene = GameScene(fileNamed: "GameScene") { #if os(iOS) addCreditsButton(toScene: ourScene) #endif } with: func addCreditsButton(toScene: SKScene) { if thisSceneName == "GameScene" { itsCreditsNode.name = "creditsInfo" itsCreditsNode.anchorPoint = CGPoint(x: 0.5, y: 0.5) itsCreditsNode.size = CGSize(width: 2*creditsCircleRadius, height: 2*creditsCircleRadius) itsCreditsNode.zPosition = 3 creditsCirclePosY = roomHeight/2 - creditsCircleRadius - creditsCircleOffsetY creditsCirclePosX = -roomWidth/2 + creditsCircleRadius + creditsCircleOffsetX itsCreditsNode.position = CGPoint(x: creditsCirclePosX, y: creditsCirclePosY) toScene.addChild(itsCreditsNode) } // if thisSceneName } // addCreditsButton To finish, I repeat what I stated at the very top: The error I am trying to correct is noted in the very first snippet = touchesBegan within the comment <== shows "horse"
5
0
1.4k
Mar ’24