Post

Replies

Boosts

Views

Activity

Game Center achievements staying hidden
I’m tracking down a bug report with a game that has a bunch of achievements that do work. I am trying to reveal the name of a hidden achievement once a player learns it is possible, but before they have any progress towards it. GKAchievement* a = [[GKAchievement alloc] initWithIdentifier: anAchievement]; a.percentComplete = 0; [GKAchievement reportAchievements: @[ a ] withCompletionHandler: ^(NSError * _Nullable error) { if (error != nil) { NSLog(@"revealAchievement: %@ failed %@", anAchievement, error); } }]; The documentation says “isHidden is set to NO anytime this method is invoked” but the achievement is not showing up in the UI. The achievement in question is returned by +loadAchievementsWithCompletionHandler:, but it is considered hidden there (lldb) po a <GKAchievement: 0x6000027993e0>id: MonsterKiller.DarkAge 0.000000 (lldb) p a.hidden (BOOL) $3 = YES I am pretty sure this code worked fine (it’s in a game that came out several years ago). Has Game Center changed (I know hidden is technically deprecated now, but I don’t see anything explaining how to reveal an achievement other than by using +reportAchievements:withCompletionHandler:. And yes, the achievement in question is configured on the server (it can be earned, just not revealed with zero progress).
2
0
2.2k
Jun ’23
My Command Line Tool Killed on M1 Mac from Terminal
I’m using Xcode 12.2 to build a tool I normally run from a script. (Previously on macOS 10.14 and earlier.) When I build and run it from Xcode, it runs fine. If I try to run it from Terminal, I get the message Killed This is the first time I’ve used Big Sur, do I now need to worry about signing my own tool? I’ve attempted to have Xcode manage this, and Sign to Run Locally. But nothing seems to make a difference. How can I build a program to be run from command line, for Apple Silicon?
2
0
3.4k
Jun ’22
Preferred Audio Formats in iOS?
I am going to be using AVAudioPlayer to play sound effects and looping music in a game. I haven’t been able to find any recent discussion of what format to use (given I almost certainly need to compress it). https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html#//apple_ref/doc/uid/TP40009767-CH2-SW28 is deprecated (and talks about “AAC” but afconvert -hf shows at least 7 different formats that can be saved in a CAF). Has that guide been updated? Does hardware vs software playback still matter in iOS 9+? I’m not really worried about performance in terms of impacting frame rate.
0
0
1.1k
May ’22
po $arg1 no longer working in Xode 6.4
I had set a breakpoint on objc_exception_throw, and added the debugger command po $arg1 (as mentioned in the latest WWDC, or http://natashatherobot.com/xcode-debugging-trick/For a while it worked great, but I recently updated Xcode and now I geterror: use of undeclared identifier '$arg1'Is there a new way to get the actual exception when you hit it?
9
0
6.2k
Feb ’22
Can I submit 32-bit (Universal) apps to iOS App Store
I just saw a developer claim that the App Store will no longer accept 32-bit builds. Which presumably means we won’t be able to submit universal. I had wanted to continue to support our few remaining iPad 2 customers, but it sounds like that won’t be possible. I haven’t had any luck finding any official statement about this. I’ve been using Xcode 13.1 and it still lets me target iOS 9…
1
0
1.6k
Jan ’22
Suppress line numbers in Code Review?
I just updated to Xcode 13.0. Now every time I choose a file in a File Review window/tab, Xcode decides I want to see line numbers. I have line numbers turned off in Preferences. And since I am using a GUI, and have side-by-side comparisons on, there is no reason I need line numbers. They take up space and make a side-by-side comparison less useful. There doesn’t appear to be a preference, is there a CLI default I can set?
1
0
954
Dec ’21
Game Center achievements staying hidden
I’m tracking down a bug report with a game that has a bunch of achievements that do work. I am trying to reveal the name of a hidden achievement once a player learns it is possible, but before they have any progress towards it. GKAchievement* a = [[GKAchievement alloc] initWithIdentifier: anAchievement]; a.percentComplete = 0; [GKAchievement reportAchievements: @[ a ] withCompletionHandler: ^(NSError * _Nullable error) { if (error != nil) { NSLog(@"revealAchievement: %@ failed %@", anAchievement, error); } }]; The documentation says “isHidden is set to NO anytime this method is invoked” but the achievement is not showing up in the UI. The achievement in question is returned by +loadAchievementsWithCompletionHandler:, but it is considered hidden there (lldb) po a <GKAchievement: 0x6000027993e0>id: MonsterKiller.DarkAge 0.000000 (lldb) p a.hidden (BOOL) $3 = YES I am pretty sure this code worked fine (it’s in a game that came out several years ago). Has Game Center changed (I know hidden is technically deprecated now, but I don’t see anything explaining how to reveal an achievement other than by using +reportAchievements:withCompletionHandler:. And yes, the achievement in question is configured on the server (it can be earned, just not revealed with zero progress).
Replies
2
Boosts
0
Views
2.2k
Activity
Jun ’23
My Command Line Tool Killed on M1 Mac from Terminal
I’m using Xcode 12.2 to build a tool I normally run from a script. (Previously on macOS 10.14 and earlier.) When I build and run it from Xcode, it runs fine. If I try to run it from Terminal, I get the message Killed This is the first time I’ve used Big Sur, do I now need to worry about signing my own tool? I’ve attempted to have Xcode manage this, and Sign to Run Locally. But nothing seems to make a difference. How can I build a program to be run from command line, for Apple Silicon?
Replies
2
Boosts
0
Views
3.4k
Activity
Jun ’22
Preferred Audio Formats in iOS?
I am going to be using AVAudioPlayer to play sound effects and looping music in a game. I haven’t been able to find any recent discussion of what format to use (given I almost certainly need to compress it). https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html#//apple_ref/doc/uid/TP40009767-CH2-SW28 is deprecated (and talks about “AAC” but afconvert -hf shows at least 7 different formats that can be saved in a CAF). Has that guide been updated? Does hardware vs software playback still matter in iOS 9+? I’m not really worried about performance in terms of impacting frame rate.
Replies
0
Boosts
0
Views
1.1k
Activity
May ’22
po $arg1 no longer working in Xode 6.4
I had set a breakpoint on objc_exception_throw, and added the debugger command po $arg1 (as mentioned in the latest WWDC, or http://natashatherobot.com/xcode-debugging-trick/For a while it worked great, but I recently updated Xcode and now I geterror: use of undeclared identifier '$arg1'Is there a new way to get the actual exception when you hit it?
Replies
9
Boosts
0
Views
6.2k
Activity
Feb ’22
Can I submit 32-bit (Universal) apps to iOS App Store
I just saw a developer claim that the App Store will no longer accept 32-bit builds. Which presumably means we won’t be able to submit universal. I had wanted to continue to support our few remaining iPad 2 customers, but it sounds like that won’t be possible. I haven’t had any luck finding any official statement about this. I’ve been using Xcode 13.1 and it still lets me target iOS 9…
Replies
1
Boosts
0
Views
1.6k
Activity
Jan ’22
Suppress line numbers in Code Review?
I just updated to Xcode 13.0. Now every time I choose a file in a File Review window/tab, Xcode decides I want to see line numbers. I have line numbers turned off in Preferences. And since I am using a GUI, and have side-by-side comparisons on, there is no reason I need line numbers. They take up space and make a side-by-side comparison less useful. There doesn’t appear to be a preference, is there a CLI default I can set?
Replies
1
Boosts
0
Views
954
Activity
Dec ’21