|
I was unclear: I am not against calling didSet after withUnsafeMutableBufferPointer. I just got real worried that Swift was trying really hard to save me from myself inside the block too. So, just to be clear, this is okay? Or am I committing some unheard of horror. code:
|
# ¿ May 17, 2020 13:51 |
|
|
# ¿ May 16, 2024 19:13 |
|
Doh004 posted:How concerned do I need to be that OpenGL has been deprecated for "2 years" now and won't work in iOS 14? Where are you seeing it as "won't work" in iOS 14? I'm only seeing rumors.
|
# ¿ May 22, 2020 20:31 |
|
Doc Block posted:Is there a reason you haven’t switched to Metal already? If this is true it just means a complete waste of time and effort to continue supporting an app that works perfectly fine.
|
# ¿ May 23, 2020 21:19 |
|
Doctor w-rw-rw- posted:So yeah Apple probably would rather you just get onboard their ship since it's either them or you and they chose you. Yeah, this is by far the worst part about developing for Apple. Instead of my platform supporting me, I support my platform. It's rear end backwards IMO.
|
# ¿ May 24, 2020 15:22 |
|
ultramiraculous posted:Yeah it's kinda the nature of the platform, unfortunately. I wish sometimes that they'd at least offer the ability to boot up older versions of the OS for one purpose or another, like even just like spinning up a Corellium-y thing so you can run ancient OSes and play with apps that have since been purged from the App Store. There's definitely a value to looking forward rather than back all the time, but it's a trade off. Looking forward / looking back are not mutually exclusive. Progress will be made whether apps are purged or not. You could freeze iOS and macOS for 5 years and it would make zero difference on whether new experiences would happen on the platform or not. All I see is that Apple has zero respect for legacy software. They 100% subscribe to the idea that old == useless. But they forgot that old can equal classic, or vintage, or timeless.
|
# ¿ May 24, 2020 15:32 |
|
Okay... FileWrapper. Typically, an image file (like a PNG) gets loaded into an app as image data, using UIImage. So when it is saved and loaded, it tends to look like this:code:
code:
Is there a way to skip UIImage, and instead just move the existing PNG into the FileWrapper? Also, when loading from the FileWrapper, is there a way to just point to the stored PNG file instead of allocating a data instance of it?
|
# ¿ Jul 10, 2020 20:08 |
|
Hmm seems like I should just be able to read into the package like a directory, no? And I guess I don't mind too much to waste the extra time allocating the UIImage during the save operation. Could be worse.
|
# ¿ Jul 10, 2020 21:00 |
|
Is it possible to set a file's icon from an app? I'm saving user documents, and would like each one's icon to use a screenshot of the doc (that is already part of the document). So, not a single icon, but each file gets its own?
|
# ¿ Jul 15, 2020 23:24 |
|
Dog on Fire posted:Maybe this method? I’ve never done this so I don’t know which ... limitations it has. Ooh, I'll look into that, thanks. Searching for 'custom file icons xcode' gets a million links about app icons, not files.
|
# ¿ Jul 16, 2020 14:07 |
|
Doctor w-rw-rw- posted:Hah. That’s a very suggestive req. I have a feeling I know exactly what it’s going for, having gone down that route.
|
# ¿ Jul 17, 2020 14:11 |
|
Okay this gets me every time. Why does load(fromContents:type:) call in a UIDocument when you first create the document with save(to:for:completionHandler:)? It's like, you create this blank document, and then a second later it tries to load its contents? edit: hmmm nope maybe there is something going on in my document that's causing this edit 2: double nope, I am confused as hell. I made a blank test document class, and in my app it calls load(fromContents:type:) after save(to:for:completionHandler:). But in a new blank project, the same thing doesn't happen solution: okay figured it out. If the file already exists at the fileURL, and you call save(to: fileURL for: .forCreating), it will load the contents. But if it's actually a new file, it won't. lord funk fucked around with this message at 17:02 on Jul 19, 2020 |
# ¿ Jul 19, 2020 16:10 |
|
Finally got tired of SF Mono not having the U+203E 'overscore' character so I edited the font: Before: After:
|
# ¿ Jul 28, 2020 17:54 |
|
3D people, some advice. I would like to draw 'letterbox' black bars on the top and bottom of my scene. One way I could do this is just do another render pass, and draw the black boxes on top of the already rendered 3D scene. However, I think it would be better to simply stencil out the top and bottom. This would leave it black (yay!) and also skip any rendering underneath (performance!). And, I wouldn't have to load up another render encoder to draw the black bars (performance!). My question is: how do I draw directly on the depth texture / stencil texture? In Metal, they are the same texture (which confuses me... why does the stencil texture show up black in the inspector?). I could blit copy in from another texture, but I'm not really sure how to do that if I also clear the depth texture on load.
|
# ¿ Sep 1, 2020 17:59 |
|
Doc Block posted:They’re “together” because of legacy reasons (Depth24Stencil8 hardware formats), but people use 32-bit float depth buffers now with stencil existing in a separate texture and so it’s just done for convenience. 👍🏻👍🏻👍🏻 scissor rects is exactly what I needed.
|
# ¿ Sep 2, 2020 21:38 |
|
frogbs posted:I realize i'm just getting started with Swift, so everything is going to have a learning curve, but i'll be damned if I can't wrap my head around using Codable to parse even moderately complicated/nested JSON. Yeah good luck. I just went through this a few weeks ago, and was surprised at how difficult heterogenous arrays were to encode / decode.
|
# ¿ Sep 9, 2020 18:44 |
|
I won't be getting a silicon Mac any time soon, but does this mean that Metal apps will run natively in the Simulator?
|
# ¿ Nov 17, 2020 22:06 |
|
Pulcinella posted:Sorry just needed to vent. The start of learning new things is always the most painful. Yeah one day I realized that doing all my layout in code means not having to go through growing pains every time the latest UI toolset comes along.
|
# ¿ Nov 21, 2020 23:15 |
|
Right. That falls under my general rule of: UI responders don't do anything but call functions that do stuff. Because inevitably that update needs to be triggered from four different sources.
|
# ¿ Nov 25, 2020 17:23 |
|
I'm a little surprised no one has mentioned the new Small Business Program. Getting a 15% increase in revenue is really a big deal, and I'm happy that Apple is doing this. Just got my notice today.
|
# ¿ Dec 23, 2020 17:47 |
|
jabro posted:It’s actually a 21% increase in revenue! Math! Good point.
|
# ¿ Dec 23, 2020 23:22 |
|
All I ever wanted was crash reporting. Crashlytics >> Fabric >> Firebase just became a sea of bloat that I didn't want any part of.
|
# ¿ Jan 12, 2021 23:07 |
|
I also don't get analytics. The one time I went to WWDC I was floored how often devs were talking about sales analytics. In the 11 years I've had stuff on the App Store I've looked up my total sales once.
|
# ¿ Jan 13, 2021 02:41 |
|
Y'all are smart, so maybe you can point me in the right direction here. I have an audio thread running C code that references an array of floats (it's a sound waveform). I would like to update that array with new values from the Swift side / main thread. code:
|
# ¿ Jan 17, 2021 17:37 |
|
I think I'm headed towards the sophisticated techniques. Locks are pretty verboten in audio, and there's a link there to a circular buffer that I think is what I'm looking for.
|
# ¿ Jan 17, 2021 22:56 |
|
prom candy posted:I don't, is there a better way if I want to do everything programmatically? Subclassing is a fine idea. Alternatively you could make a label formatter object that you could pass them through.
|
# ¿ Jan 20, 2021 18:11 |
|
I guess maybe reuse of labels too. It might be fine if the only time you format them is initialization, but in a reusable view that might become an issue.
|
# ¿ Jan 20, 2021 18:15 |
|
Glimm posted:Does anyone use Applanga or a similar tool to handle translations? Any thoughts on it? I don't know anything about Applanga, but I've used Applingua for translation before, and they did a good job.
|
# ¿ Feb 12, 2021 19:14 |
|
It'd be super nice if the App Store screenshot section actually told me which device produces the exact resolution they want instead of making me guess which of the 50 simulators is 5.5".
|
# ¿ Feb 19, 2021 17:09 |
|
Thanks, yeah I had to find a website to help out. It's just dumb that it's not at all clear in the actual screenshots area of App Store Connect. Speaking of dumb complaints: thanks Xcode for giving me a warning for EACH AND EVERY OPENGL FUNCTION IN MY APP. Yes, I know it's deprecated. No, I'm not rewriting my graphics engine, and 695 warnings won't make me.
|
# ¿ Feb 19, 2021 17:47 |
|
Well gently caress. Looks like running my app on iOS 14 causes saved files to have data payloads of nothing because of deprecated keyed archiving. Awesome! Glad my data is more secure because of the move to NSSecureCoding! gently caress.
|
# ¿ Feb 24, 2021 17:57 |
|
Just ran into the bug where network access permissions are missing, and there's no way to reset it. I'm already annoyed at the barrage of permissions popups that happen when you open an app for the first time (great user experience!). But now I can't even get those to appear. Awesome.
|
# ¿ Mar 6, 2021 17:28 |
|
smackfu posted:I’m trying to do something I think should be supported natively but I can’t figure out... I have a list of currency values that have an amount and currency code. Like 800 USD or 700 EUR. How much have you looked into localization? I think in this case you might want localizedString(from:number:), although, might want to look at some examples to see if it's what you need. Having a pre-existing list of currency codes might require your own lookup table, though.
|
# ¿ Apr 7, 2021 14:58 |
|
I noticed that Xcode.app was 29 loving gigabytes, so I dug down and found that the .platforms take up most of that. So I tried deleting the AppleTV and WatchOS platforms, but Xcode complains that they're missing when you load it up and you have to reinstall. Lame. I will never develop using those, so they're just going to take up >12GB of space for nothing.
|
# ¿ May 2, 2021 14:10 |
|
I mean, this is ridiculous. Last time I noticed the size was when it pushed passed 10GB. Suddenly it's 3x bigger? It's half of my entire Applications directory size. But, you know, we should all be reducing our little mobile app sizes.
|
# ¿ May 4, 2021 13:32 |
|
While we're on the subject, don't put view creation in viewDidLoad, because the view is almost definitely not its actual size yet, which sucks for layout. That leaves viewWillAppear, which calls multiple times, but you can put an 'if view == nil { ... }' check in there for that.
|
# ¿ May 27, 2021 04:13 |
|
I kinda wish I learned VS years ago, because it seems like everyone really likes it. But I tried it for some Unreal development and just couldn't get over my Xcode habits, and found myself being pretty clunky.
|
# ¿ Jan 2, 2022 09:05 |
|
|
# ¿ May 16, 2024 19:13 |
|
Data Graham posted:It was perfectly fine when the trackpad was half this size.
|
# ¿ May 14, 2022 00:55 |