Post

Replies

Boosts

Views

Activity

Reply to Using Swift, how do I *continuously* test for a GamePad being on/connected?
SOLVED -- 1st and foremost, I want to sing the praises of Keith at Apple DTS without whom I could never have chased down the cause of my problem. His assistance on this one issue totally pays for my $99. A significant part of the solution rests with the just released update of Xcode to 14.3 and tvOS to 16.4 Now the expected CONNECTED and DIS-CONNECTED Console messages appear as anticipated. I've got some more work to do, but at least Apple's NotificationCenter.default.addObserver(..) works as Apple advertises. WHOOPIE!! Thank you Justin for not throwing a brick at me.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’23
Reply to With Xcode 14.2, I unpaired my apple tv and now the apple tv does not show
By some magic, the ATV appeared, so I paired it. But now it shows as locked. So, I unlocked it. Now the error msg = Failed to prepare device for development". AHAH "You are getting the Failed to prepare device for development message because the device is running a newer version of iOS than Xcode supports." So when will Xcode be updated to support ATV 16.4??? I had just updated my ATV to 16.4 which update now prevents me from showing my Xcode App on my ATV. HAALP!
Topic: App & System Services SubTopic: Core OS Tags:
Apr ’23
Reply to TSI Status
Jason, I am going to level with you .. and you aren’t going to like it .. but it’s the truth I feel. I have my xcodeproj for you as I have stated. I had provided a link when I initiated my TSI, a link that delineates what I have done via debugging + swift code. I believe no one looked at this link and some robotic humanoid pushed the MRE button. Sorry, you guys state you are experts on iOS programming. IF true, that link should be sufficient. Maybe it’s not sufficient because my premise is false. The xcodeproj I have is my whole damn Project, not any MRE. If you don’t like it . . tough! My idea of asking for help is not for me to do more work to provide a MRE xcodeproj. I have worked my **** off trying to solve the test for game controller being connected In that back and forth with Justin I say the programmer who implemented the Bluetooth Menu did it right. So just provide that Code. I show the Bluetooth Menu. I toggle off/on my Nimbus+ Controller => it immediately shows Disconnected/Connected. Your iOS boilerplate connect code never calls the disconnect option. I call this boilerplate code in my GameViewController class. Have tried also the didMove func in my GameScene class. No luck. The competent programmer for the Bluetooth Menu did it right. But that’s too damn simple .. burden us with more work so you can avoid more work. The $99 fee is going to increase the end of May. FOR WHAT .. pushing the MRE button. My wife says I am sometimes a Royal Pain in the ***. I wouldn’t want to disappoint her here. God forbid I should prove any woman wrong!!
Mar ’23
Reply to Using Swift, how do I *continuously* test for a GamePad being on/connected?
Stepping back from code for a moment ... What do I want to do? 1) upon initial start up of app, I want to wait for a gamepadconnected Event. 2) Once I get this Event, I immediately change a SKSpriteNode's color and then start looking for: a) button presses on the gamepad and b) a gamepaddisconnected Event 3) So while I am executing code based on 2(a), I receive 2(b) .. I immediately change the above color to something different, followed by looking for another gamepadconnected Event. Back-and-forth Back-and-forth.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’23
Reply to Using Swift, how do I *continuously* test for a GamePad being on/connected?
Using Apple's very own ObserveForGameControllers() which I call in my GameViewController's viewDidLoad(), even when my Nimbus+ Game Controller is set to off when I initially Run my Project, Apple's Code consistently shows "CONNECTED" This totally blows my mind. Furthermore, Apple claims that their two NotificationCenter.default.addObserver() calls are continuously called. So, I should be able to toggle my Nimbus+ off and on while playing ... and Apple claims that these two addObserver() are cotinuously called. I deliberately have print statements in each @objc and while this toggling is going on, there should be a whole slew of print statements that toggle between "connected" and "dis-connected". Never happens??
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’23
Reply to Using Swift, how do I *continuously* test for a GamePad being on/connected?
While my TSI is being worked … I know how to solve the Gamepad Connectivity problem. Within Apple Inc there are many, many programmers. Premise: there’s one set of programmers that work on System stuff, eg, the Bluetooth Menu. there’s a 2nd set of programmers that work on Xcode stuff. Set 1 did the Connectivity right. Stare at the Bluetooth Menu while you’re turning off & on your Game Controller. Said Menu shows within a split second this toggling. SPOT ON. Instruct Set 2 to copy their code. DONE! 👍👍👍
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’23
Reply to Using Swift, how do I *continuously* test for a GamePad being on/connected?
Not small Project, but I already have print statement in the @objc disconnect code and the statement is never called EVER EVER I would like to submit the whole project to the Developer shop + a link to this very long conversation. Anyway I will use my first TSI red flag and do that after I print out my existing changes and stare at them until Friday. And then let them work. That oughta get me some bang for my $99 bucks, at least $49.50 worth. Let them work for awhile. Most of the App Review process is done by inanimate bits and bytes. So it’s time to get some breathing mammals into the fray, don’t you think. When I first submitted my very 1st App and was initially rejected for something stupid. I yelled $@!? and someone here said you’re yelling at a damn computer. So I calmed down and submitted an Appeal which overturned the Rejection. and BAMB .. “Monster Paddle Pong” is up on Store in all its glory. Got work to do folks
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’23
Reply to Using Swift, how do I *continuously* test for a GamePad being on/connected?
Okay, Justin, I turned on my Apple TV Within Xcode, I chose the destination = "TV Room" = my Apple TV Under Xcode's Window Menu, I selected "Devices and Simulators" Paired with "TV Room" Ran the App within Xcode My App showed on the Apple TV Same Problem(s) (a) I guess this is definitely not your idea of a "Real Device" OR (b) I have a coding problem Speaking of code, here is my updateGameStatus func     func updateGameStatus() {                 if itsScene.isPaused { // Set within the connect/disconnect @objc handlers written by Apple // The reason for itsScene.isPaused syntax is because I moved all the // NotificationCenter stuff from my GameScene (SKScene) class // to my GameViewController (UIViewController) class.             itsStatusNode.fillColor = SKColor.black             itsStatusNode.strokeColor = SKColor.black         }         else if ballIsMoving { // set = true when I start/resume the Game or = false when I pause the Game             itsStatusNode.fillColor = SKColor.white             itsStatusNode.strokeColor = SKColor.white         }         else {             itsStatusNode.fillColor = SKColor.black             itsStatusNode.strokeColor = SKColor.black         }     } This func demonstrates my problem because when the Game is running (ballIsMoving) and I press the "Home Button" of my Nimbus+ to turn it off, the light stays white. In the meantime, I am trying to discover my coding problem. FWIW, I did attempt to insert a Timer that polls the above func, but no such luck = that would have been too easy. John
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’23
Reply to Using Swift, how do I *continuously* test for a GamePad being on/connected?
Justin, are you 100% certain that the Simulator is the certain culprit and the only source of my problems? I say this because you are saying the Simulator is 100 % defective on this issue. And it’s a significant issue because you & I know game development has a very large % of all development. You are asking me to do a whole bunch of work and so I need to be 100% certain. I am not inclined to do all this work on a maybe.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’23
Reply to Using Swift, how do I *continuously* test for a GamePad being on/connected?
Justin, I totally understand what you are saying about the Simulator because it has a whole slew of problems associated with Sound errors and others as well. But ... when my Nimbus+ is connected, the Nimbus' Buttons and Joysticks work as I have coded them ... and when it is not connected, nothing works as you would expect. So, so far everything is good. Nimbus+ on, Buttons and Joysticks work ... Nimbus off, they do not work. Simple and very good! Two challenges: (1) if the Nimbus+ is off when I initially Run my App, Apple's code still registers the Nimbus+ as connected. In short, the @objc func disconnectControllers() doesn't get called. (2) if the Nimbus+ is on and the Game is running as it should, and then I press the Home Button of the Nimbus+ to turn it off, once again @objc func disconnectControllers() is not called. A significant update = Initially I had all the Game Controller code in my GameScene = SKScene, with the call to ObserveForGameControllers within the SKScene's didMove and all I have reported happens. Then, I spent a bunch of time moving all the Game Controller code to my GameViewController = UIViewController, with the call to ObserveForGameControllers now moved to its viewDidLoad(). Conceptually I believe the Game Controller code properly belongs as part of a ViewController and not a UIView because, again conceptually, the Game Controller controls all Scenes, not just one Scene. Anyway, now the Game Controller code in GameViewController, including Apple's func setupControllerControls(...). The latter calls Apple's func controllerInputDetected(...)which is also moved to my GameViewController. This last funccalls a whole slew of funds located in my GameScene... like pressing "Y" to move a Game Piece "up". All the Buttons and Joysticks work great when the Nimbus+ is on and don't work when the Nimbus+ is off ... identical to when my Game Controller Code was part of my GameScene = SKScene. But the problems of turning off the Nimbus+ before App is run and while the App is running remain .
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’23