Posts

Post not yet marked as solved
5 Replies
3.0k Views
Prior to iOS 14.5, I adopted the following workflow for my Game Center enabled game - At the launch, if there is no authenticated GKLocalPlayer, then store the viewController passed in the completion handler and display it later to the user (i.e. not immediately after the app completes launching). I am using the following code for the authentication process -         GKLocalPlayer.local.authenticateHandler = {viewController, error in             if (viewController != nil){ //store the viewController and present it at a later time             } else if (GKLocalPlayer.local.isAuthenticated) { //successfully authenticated             } else { // player could not be authenticated             } Since iOS 14.5 the callback to the authenticationHandler seems to have changed. The login prompt is displayed automatically after app launch, if there is no authenticated player. I checked - the completionHandler is not even being called in this case before the login prompt is presented. If there is already an authenticated player on the device, then the handler is called as expected. How can I prevent the login prompt from being displayed automatically by the system? Is there a new workflow for authenticating a player from iOS 14.5 onwards? thanks,
Posted Last updated
.
Post not yet marked as solved
0 Replies
668 Views
I'm new to RealityKit and facing the following issue - I'm trying to load 8 models asynchronously using the following code - cancellable = Entity.loadModelAsync(named: "m1") .append(Entity.loadModelAsync(named: "m2")) .append(Entity.loadModelAsync(named: "m3")) .append(Entity.loadModelAsync(named: "m4")) .append(Entity.loadModelAsync(named: "m5")) .append(Entity.loadModelAsync(named: "m6")) .append(Entity.loadModelAsync(named: "m7")) .append(Entity.loadModelAsync(named:"m8")) .collect() .sink(receiveCompletion: { loadCompletion in if case let .failure(error) = loadCompletion { print("Unable to load model \(error)") } self.cancellable?.cancel() }, receiveValue: { entities in }) //cancellable is an instance property defined as var cancellable:AnyCancellable? The code works as expected. However there is an Xcode issue I'm facing - the editor constantly gets stuck at "Indexing: Processing Files" and subsequently the Build process gets stuck too. This only happens when the number of models in the above chain is more than 3-4. Is there any way to break down the above loading step into smaller parts, without needing to load the models individually (i.e. without .append)?
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.5k Views
I am upgrading my app for iOS 13 beta 6. I'm noticing the following issues -1) After successful authentication of the user on Game Center, the standard "Welcome back XXXX" banner is not being shown. I'm using the same code that worked perfectly fine upto iOS 12.x -let localPlayer = GKLocalPlayer.locallocalPlayer.authenticateHandler = {(viewController:UIViewController?, error:Error?) inif (viewController != nil){} else if (localPlayer.isAuthenticated) { //successful authentication print("authentication successful") //at this point although authentication is complete successfully, no "Welcome Back" banner is displayed} else {//authentication failed}}2) When submitting a GKAchievement to Game Center, I set the showsCompletionBanner = true on the GKAchievement object. The achievement is successfully submitted but the completion banner is not shown. (It worked fine upto iOS 12.x)I also noticed that in both the above issues, at the time of authentication (or GKAchievement submission) the following message is displayed in the XCode Console -Error in UIKit client: -[UIWindow setScreen:] should not be called if the client adopts UIScene lifecycle. Call -[UIWindow setWindowScene:] instead.I have adopted the new iOS 13 UISceneDelegate lifecyle in my app. So I'm guessing this error message indicates the issue lies in the UIScene workflow. Is it something I need to configure at my end or is it a GameKit bug? Any solutions or workarounds will be much appreciated.
Posted Last updated
.
Post not yet marked as solved
3 Replies
16k Views
This question has been discussed in the past, so apologies in advance for raking it up once again. However I’d really appreciate some inputs on the following, with regard to the current Macbook range -I develop iOS games and am currently using a MacBook Pro 13” (early 2011), with an Intel Core i5 2.3 Ghz processor. Over the years I’ve upgraded its RAM to 8GB and also replaced the original HDD with an SSD drive. However over the past year, the simulators (especially iPhone X) run extremely slowly, and there are unresolved issues with the Graphics Card as mentioned on these threads -https://forums.developer.apple.com/thread/96511https://forums.developer.apple.com/thread/88446I’m looking to purchase a new MacBook and am trying to decide between the MacBook Air and MacBook Pro (without Touch Bar), both 13” and 256GB hard disk capacity.There is a considerable price difference between the two, and I wanted some feedback on whether the current MacBook Air is adequate for the purpose of iOS Development.I often have Photoshop and Illustrator running alongside Xcode during the development phase. Also Safari is in use most of the time. Sometimes I use Cheetah 3D for modelling. And ya - iTunes is also running in the background for playing music.1) Can the current MacBook Air handle the above load without hiccups?2) Do the iOS simulators (iPhone X especially) run smoothly on the MacBook Air?3) This thread highlights the unresolved issue with Intel HD3000 Graphics Cards, that affect the Simulators - https://forums.developer.apple.com/thread/96511Is this issue also present in the current MacBook Air that has HD6000 Graphics Card?~Thanks,
Posted Last updated
.
Post not yet marked as solved
18 Replies
18k Views
I recently installed iPadOS 13.1 Beta 3 on my iPad. I've updated my apps for iOS / iPadOS and they are running fine. However I'm seeing a weird behaviour on the iPad device -After launching and then exiting my app, it obviously appears in the Recents section on the Dock. Tapping the app icon on the Dock does NOT re-launch the app. In fact nothing happens when I tap on the app icon in the Dock. However if I tap on the app icon on the main screen of the iPad, then it launches just fine with no issues.This is only happening with my apps built against Xcode GM Seed, and on the device. The system apps like Settings, Safari etc launch perfectly fine from the Dock. Furthermore, my apps launch fine from the Dock on the Simulator. Its only on the device that they fail to launch from the Dock.Any suggestions or explanations why this is happening?
Posted Last updated
.
Post not yet marked as solved
1 Replies
2.1k Views
I have a UIView animation that I want to reverse and repeat 5 times. Prior to iOS 13, I used the following code -UIView.animate( withDuration: 0.5, delay: 0.0, options: [.repeat, .autoreverse], animations: { UIView.setAnimationRepeatCount(5.0) //stuff to be animated }, completion: {(hasFinished:Bool) in } )Now it seems that from iOS 13 onwards, UIView.setAnimationRepeatCount is deprecated. Xcode gives a deprecation warning with the message "use the block based animation API instead". I've searched the docs and cant seem to find a substitute. What is the alternative process to repeat and reverse an animation a fixed number of times?
Posted Last updated
.
Post not yet marked as solved
0 Replies
619 Views
I'm using XCode Beta 6, iOS 13.At the time of app launch, I start the process to authenticate the player for Game Center. The authentication code works fine and the GKLocalPlayer authenticateHandler is called correctly. However after the authentication is complete, the "Welcome back XXXX" banner is not being displayed. There is no issue with the authentication process, because after the authentication I can access the GKGameCenterViewController and see all leaderboards and scores. Score submission is also working fine. Has the "welcome back" banner been disabled on iOS 13?
Posted Last updated
.
Post not yet marked as solved
0 Replies
782 Views
I'm using Xcode 11 Beta 5.I have created an image set in the Asset Catalog, and I'm using this image in my Launch Storyboard file. After dragging an ImageView object onto the storyboard and specifying the image, when I set the constraints to Align Center horizontally and vertically, the resulting preview (in Interface Builder) shows the image going way beyond the screen bounds, and NOT adhering to the expected intrinsic size.Strangely though, when I build and run on the Simulator, then it shows the image at the CORRECT (expected) size in the launch screen. I've checked my image sizes and resolutions in the Asset Catalog, and there is no issue with those. Am I missing some setting or configuration for Interface Builder?
Posted Last updated
.