Post not yet marked as solved
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?
Post not yet marked as solved
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.
Post not yet marked as solved
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?
Post not yet marked as solved
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…
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?
Post not yet marked as solved
I just realized that my game has some problems on the iPad mini’s 2266×1488 screen.
It’s actually a UIKit app, and I do a fair amount of adapting to different screen sizes. However, my designer made the (then-reasonable) assumption that iPad screens were at least 768 points high. The mini is only 744 points, and so UI screens that were designed to exactly hold their content, don’t have enough room.
If this were a Unity game, everything would probably just be scaled down a little from a 1024×768 display. Is there a way to do that as a UIKit app? This wouldn’t be ideal, but it would let mini owners play the game.
Post not yet marked as solved
I’m preparing an update and can’t post it until I have 6.5 inch (iPhone XR) screen shots. I don’t own a device, so I am trying to take them from Simulator with File > New Screen Shot. This generates 1792 * 828 pixel images, which are rejected for not being 2688 * 1242.How do I get the full resolution screen shot while running Simulator? (Choosing Pixel Accurate doesn’t seem to make a difference.)
Post not yet marked as solved
I recently upgraded to Xcode 11 and ran into a very annoying problem: it is breaking my formatting when I copy & paste lines of code (which happen to be in Lua or a DSL).I had been doing this for years, and what I copied was always pasted intact. I did some searching, and verified that “Re-indent on paste” was unchecked (as was “Indent when typing:” in the Indentation preferences).I am still on macOS Mojave, if that matters.Since I do this a lot, it is extremely frustrating. Is there a way to get the old (correct) behavior back?Note: I just filed FB7422240 since this seems to be a regression with no known workaround.
Post not yet marked as solved
I am migrating my game from UIWebView to WKWebView.I use HTML to show the game manual and lore.In the UIWebView version, I specified a font size in my CSS, and (as near as I can tell), UIWebView rendered text at that size.WKWebView is deciding on its own how to render. I have added this line to each HTML file<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">but it doesn’t seem to give me consistent results. I actually seem to be getting a different type size depending on the amount of text (i.e. when it scrolls, it is larger!).I looked at https://webkit.org/blog/7367/new-interaction-behaviors-in-ios-10/ which seems to suggest that ignoresViewportScaleLimits is false by default and gives you the iOS 9 behavior (which is good because I need to support iOS 9). But I am not seeing any way to tell WKWebView to do no scaling and just show the font at the size I asked for. This is not arbitrary HTML that WK needs to guess at. It comes from a local file and is intended to match the rest of the UI.
Post not yet marked as solved
Just gave my game (which is landscape-only, and implemented with UIKit) a trial. My iPad is (naturally) in portrait mode. When I launched my game, the trackpad did not take the rotation into account.Is this a bug, or is there an API I need to use?(If I turn off rotation lock, things seem OK. But users should not have to do that.)
Post not yet marked as solved
I’ve got a game I would love to bring to macOS. Since it uses UIKit, Catalyst is the obvious choice. However, scaling my 1024 * 768 pt iPad game to 77% would be silly. Is there a way to make it pixel-identical in a 1024 * 768 window?
Post not yet marked as solved
I’m trying to update an old Cocoa app to be 64-bit. It’s NSDocument-based, so I would like its windows to be tabbed, the way say TextEdit handles it.The “Show Tab Bar” item didn’t appear in the view menu. As an experiment, I set tabbingMode to preferred in the window .xib file. That made tabbing work — too much. All windows appeared in tabs, which is not what my users expect (or how the Dock preferences were set:p [NSWindow userTabbingPreference](NSWindowUserTabbingPreference) $0 = NSWindowUserTabbingPreferenceManual).I tried making a brand new app and everything just worked.The tabbingIdentifier is blank, so I would not expect windows to be grouped.Documentation for tabbing is a bit sparse, so any pointers on how to get the default Cocoa behavior would be appreciated.
Post not yet marked as solved
I was under the impression that the GKAchievement property percentComplete wouldn’t go backwards. That is, if in one session I set it to 100, then a later session that set it to 50, it would remain at 100.I haven’t been able to reproduce this, but I have circumstantial evidence that it’s happening. I’m also not seeing my assumption documented, so it’s probably wrong.
Post not yet marked as solved
I’ve been using // Fill in a mask buffer, with black pixels for what's explored
UInt8* bufr = malloc(aSize.width * aSize.height * kBytesPerMaskPixel);
memset(bufr, 0xFF, aSize.width * aSize.height * kBytesPerMaskPixel); // Clear (to white)
// Now we loop through the hexes and draw the appropriate ones.
// Create a 1-bit mask image (still with 8 bits per pixel)
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, bufr, aSize.width * aSize.height, NULL);
CGImageRef maskImage = CGImageMaskCreate(aSize.width, aSize.height, kBytesPerMaskPixel, 8, aSize.width, provider, nil, false);and in iOS 12, get the assertionAssertion failed: (bitsPerComponent == 8), function CGImageMaskCreate, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreGraphics/CoreGraphics-1216.4.3/CoreGraphics/Images/CGImage.c, line 636.The documentation still says “Image masks must be 1, 2, 4, or 8 bits per component” so I wonder if this is a known change, a bug [I filed 40901713], or something that shouldn’t have worked in the past. (I would hate to take 8 times the memory for this mask.)Oh,#define kBytesPerMaskPixel 1
I’d like to show several buttons (including Delete) when the user swipes left in a UITableView. However, at least one tester has been too exuberant, and did a long swipe which deletes without confirmation. They were surprised and unhappy.Is there a way to prevent that long swipe from doing anything other than exposing the buttons?(I know this is changed behavior, on iOS 9 for iPad 2, you cannot do the long swipe. I believe in my app, safety should prevail over convenience, and the original behavior makes more sense.)