Post

Replies

Boosts

Views

Activity

Reply to Invite image not working - GKMessageImage.png
I turned two iPhones off/on (ie: rebooted them) and sent an Invite from one to the other and still see the default Game Center "colored bubbles" image being sent and received.When the GKMatchMakerViewController is displayed and I select "Invite Friends" button I see the default Game Center "colored bubbles" image displayed even before selecting friends to invite. Of course, once I select a friend and send the invite via text message then the text message received has the same the default Game Center "colored bubbles" image.Any other ideas how to get this working?Is the "GKMessageImage.png" the correct filename to be used?I placed my "GKMessageImage.png" image file into the Assets.xcassets folder in my Xcode project. Is this the correct place?
Apr ’20
Reply to Where is XCode 11.4 ?
Thanks Claude! When clicking via the App Store, it took me to a place where they had only Beta Release downloads for some reason,.After going to developer.apple.com, clicking Download, then clicking the "More" link (top right), I can now see Xcode 11.4 listed.
Apr ’20
Reply to Dispatch.main queue questions since I might be confused
I updated all my delegate callback functions to ensure any UI updates are made on the main thread by placing the UI code logic in DispatchQueue.main.async. With my debug logging I can see the UI code is now being executed after the current function (and any parent calling functions) have completed. So far, it is ok for my UI logic to take place at that point so I might be good. I will start testing and ccross my fingers that my crashes go away so I can finally submit my application for review.Thanks again John for your time.
Mar ’20
Reply to Dispatch.main queue questions since I might be confused
Thanks for the input.I am not an advanced user and do not user concurrent queues (at least not intentionally) at all. I am just learning about Dispatch queues now due to some unexpectedly crashes I am experiencing in my application.Throughout my testing I have had Xcode's "Main Thread Checker" indicate a couple areas in my code where I needed to wrap around a Dispatch.main to ensure that code is running on the main thread so I am using Dispatch in these areas.One more thing to share. I created a game which uses the GameKitHelper class to interface into Game Center. I set up a delegate to this GameKitHelper class to receive callback function calls when certain events occur. When a certain delegate function is called, my code will create and then present a new ViewController using this code:let storyBoard = UIStoryboard(name: "Main", bundle: nil) if let myVC: myViewController = storyBoard.instantiateViewController(withIdentifier: "myViewController") as? myViewController { present(myVC, animated: true, completion: nil) }During testing, my application occasionally experiences a crash at the point the new ViewController should be displayed. Since I am inside a delegate callback function, which deals with UIStoryboard and creating a new ViewController to be presented (ie: displayed in the UI), then I am thinking I might need to have the code (above) wrapped in DispatchQueue.main.async to avoid the crash.Would you expect an application to crash in the case described above when no Dispatch is being used ? I print out the current thread name using "Thread.current.threadName". I do see most of the time the thread is the Main Thread, however, I did see one time a thread name was called "com.apple.root.default-qos" so I know it is not always the Main Thread. If the thread is not the Main Thread (for some reason) and the code above (with no Dispatch) is called then would a crash occur?
Mar ’20
Reply to No longer can load or test application on iPhone via XCode 11
Thanks for the reply Claude !After 3 hours of searching/reading I was able to find a Google posting which had the right answer for me:I solved my issue with these steps:Open keychain access.Right-click the 'login' keychain and request to "Lock" itRight-click the 'login' keychain and request to "Unlock" it (enter your PC account password)In XCode, clean the project by selecting Product/Clean Build Folder optionSelect your attached iPhone in Xcode and Build the projectEnter your PC account password everytime you are prompted (I was prompted 5 separate times)
Mar ’20
Reply to Issues Surrounding GKPlayer's playerId Deprecation in iOS 13
I started to play around with teamPlayerID value since Apple indicated in most cases we would be using the teamPlayerID value.A) Once a match has been created, the teamPlayerID can be obtained for each player by looping through each player in the match (myMatch) data providedfor player in myMatch.players { print("teamPlayerID = \(player.teamPlayerID)") }B) The teamPlayerID can also be obtained by calling the GKPlayer.loadPlayers(forIdentifiers:) function to obtain all player information. You can then loop through the provided GKPlayer "players" array to obtain the teamPlayerID for each player.let playerIDs = myMatch!.players.map { $0.playerID } as [String] GKPlayer.loadPlayers(forIdentifiers: playerIDs) { (players, error) in ... for myGKPlayer in players { print("teamPlayerID = \(myGKPlayer.teamPlayerID)") }(Note: Creating the player map array using $0.teamPlayerID does not result in any data being returned)Issues Found:1) If Player1 performs (A) and (B) then they will notice the teamPlayerID values for each player in the match from (A) are not the same values as the ones from (B)2) If Player1 performs (A) and Player2 performs (A), then both players will have different teamPlayerID associated with them both? Meaning ...Player1 sees a different teamPlayerID value for Player2 than Player2 sees for themselvesPlayer2 sees a different teamPlayerID value for Player1 than Player1 sees for themselves3) Calling myGKPlayer.scopedIDsArePersistent( ) for each GKPlayer in the provided players array, in (B) above, always returns FALSE.As a result of these issues, it does not seem the teamPlayerID value can be used to uniquely specify a particular "player" like everyone has mentioned.I also confirmed one player cannot send data to another player (via GameKitHelper) since both players do not have the same teamPlayerID values that represent each player in the match.The WWDC2019 video indicates the teamPlayerID values would remain consistent between all applications produced by my team, however, I clearly see the teamPlayerID value does not remain consistent within one single application only.I will have to keep using playerID value until proper usage can be explained/fixed.
Mar ’20
Reply to How to prevent 2 players from joining a match together?
I "think" 3 non-host players having separate 00000F00, 000000F0 and 0000000F attributes will still form a 3-player game themselves since none of the attributes overlap. I believe as long as the number of players is satisified and the attributes do not overlap then the match will start.For my case, I think I would need to do the following and then wait for the right mixture of players to exist which could join with the host player (who has attribute 0xFFFF0000)For a 2-player game, I would need to assign all non-host players the following attribute: 0x0000FFFFfor a 3-player game, I would need to randomly assign all non-host players one of the following attributes: 0x000000FF 0x0000FF00For a 4-player game, I would need to randomly assign all non-host players one of the following attributes: 0x000000FF 0x00000F00 0x0000F000
Mar ’20
Reply to How to prevent 2 players from joining a match together?
Hey PBK,Yeah I read this earlier and this would most certainly work for a 2-player game. The player who is not a host would simply use a player attribute of 0x0000FFFF like you stated .However, my issues are the following:1) How can I get this to work with 3 or 4 player matches where there should be only one HOST player and up to 3 other players who want to simply join a match only (ie: not be the host)? Each player joining the match would have to randomly select a player attribute of either 0x0000000F, 0x000000F0 or 0x00000F00 to be allowed to join a match together, however, randomly selecting one of these attribute values for each player does not seem like the correct approach since if each player selects the same sttribute value them they will not be joined into a match together.2) Additonally, how do I ensure all players who simply want to join a game do not form a match by themselves, without a host player even existing? For example, if there are 3 players who are all looking for a 3-player game to join, then I see all 3 of these players are joined into a match by Game Center. This match does not have any HOST player included. So I wanted to know whether there was a way to ensure a player can only join a match which currently has the 0xFFFF0000 (Host attribute) existing.I do not believe there is a way to resolve (1) or (2) issues above. I think I might have to rework my game logic to support matches which do not have a host included. I would have to select one of the players to be the host automatically and then have that selected host player start the game up themselves with proper options, etc... It is just more work, but not impossible
Mar ’20