|
Anybody got a link to a VIP / CleanSwift article that is short and concise and not unnecessary verbose ? Just a simple example or something?
|
# ? Nov 28, 2018 23:07 |
|
|
# ? May 15, 2024 14:32 |
|
Good Sphere posted:Anyone know anything special I need to change when developing for devices that have a native color space of Display P3 instead of sRGB? It has nothing to do with my assets, but images I'm pulling through the camera rendered onto a MTKView and applying CIFilters to. It seems like devices with Display P3 a very unsaturated compared to ones using sRGB, and I need to figure out whatever needs to be changed to make them look more similar. I've only tested the iPhone XS that has Display P3 personally, and it may have to do with something else other than the color space, but have no clue if this is true and where to start off to understand why the camera's image is so much less saturated. Something to do with color space conversions maybe?
|
# ? Dec 1, 2018 02:05 |
|
Anybody know how to make Xcode display the GPU performance gauges when running a Metal app? Could've sworn it used to show GPU performance stats alongside CPU and Memory stats in the debug panel while your app was running. It'll show them when I do a GPU Frame Capture, but right now I'm more interested in seeing the basic stuff while the app is running (FPS and GPU load/frametime) like Xcode used to do. edit: mashing this button and changing to View Process by Queue then back to View Process by Thread made the GPU perf gauges show up Doc Block fucked around with this message at 02:20 on Dec 1, 2018 |
# ? Dec 1, 2018 02:08 |
|
Doc Block posted:Anybody know how to make Xcode display the GPU performance gauges when running a Metal app? I've been working with Metal for 3 years, and all I know is that the GPU tools come and go like the weather.
|
# ? Dec 1, 2018 15:56 |
|
Boris Galerkin posted:I'm currently using the IFTTT app on my iPhone with a webhook to trigger a rich notification to be sent to my phone (via the IFTTT app). It works but I'd like to be be able to add rich actions(?) to the notification, such as "remind me later" or "remind me tomorrow." For various reasons Reminders doesn't work for me/fit into my workflow here. So I had an idea to create a single purpose iOS app that will let me push notifications to it (also via a rest webhook set up on my own server) with those rich notification actions. Pushover might be an easy win over writing an app from scratch.
|
# ? Dec 2, 2018 01:31 |
|
Doc Block posted:Something to do with color space conversions maybe? The difference I'm seeing are images coming through the camera, where the iPhone Xs is much less saturated. That could possibly be it, but I don't know where to look. I don't see anywhere where I'm setting something to sRGB for instance. I see CGColorSpaceCreateDeviceRGB(), which there are no other choices. I see kCVPixelFormatType_32ARGB for my CVPixelBuffer. Maybe that's a problem? Not really sure.
|
# ? Dec 3, 2018 16:00 |
|
So i'm looking to play around with some iOS development however the only problem is that I don't have any OSX devices. It looks like from looking around any post 2012 macbook will do. Is this still the case? I was looking at getting a 2014 (or 2015) macbook air from a friend who was looking to sell his.
|
# ? Dec 4, 2018 20:21 |
|
AnimeIsTrash posted:So i'm looking to play around with some iOS development however the only problem is that I don't have any OSX devices. It looks like from looking around any post 2012 macbook will do. Is this still the case? I was looking at getting a 2014 (or 2015) macbook air from a friend who was looking to sell his. The 2015 Air was a bit long in the tooth in 2015 (they were refreshed this year), but is still servicable. A 2015 MacBook Pro will have quite a bit more headroom.
|
# ? Dec 5, 2018 05:50 |
|
I still use a 2015 i7 MacBook Pro and it works great. So does my family 2012 i7 Mac mini. If some component hadn’t died on it recently, my 2012 i7 MacBook Pro would also be reasonable.
|
# ? Dec 5, 2018 06:40 |
|
The only performance issue for anything made in the past five or so years is going to be RAM if you're running simulators.
|
# ? Dec 5, 2018 06:51 |
|
I was able to do some freelance on a new app last year on my 2012 MB air. 2014 or 2015 will be fine. The biggest annoyance is actually SSD space. 128 is woefully inadequate given the size of macOS, XCode and simulators.
|
# ? Dec 5, 2018 17:15 |
|
Oh man it's been a while since I've updated my apps. Anyone have any tips for a privacy policy? The only thing I'm 'collecting' is crash reports from Apple. I don't use Crashlytics anymore, or collect / retain any other data. Anyone here use a legal document generating service? edit: nvm, found some decent info lord funk fucked around with this message at 21:19 on Dec 7, 2018 |
# ? Dec 7, 2018 15:36 |
|
It's too bad there's no way to check if the device is put to sleep. I have a MIDI app that has to be able to run in the background if it's being used with other audio apps, but it will run forever even after the device is put to sleep. Normally the user can tell if an app is doing this, because it continues to make sound. But my app doesn't, because it's a MIDI app. Just got rejected for accessing a private API, which is understandable. The solution is to kill a bunch of people's battery life when they think they're putting their devices to sleep. :/
|
# ? Dec 11, 2018 02:19 |
|
lord funk posted:It's too bad there's no way to check if the device is put to sleep. I have a MIDI app that has to be able to run in the background if it's being used with other audio apps, but it will run forever even after the device is put to sleep. Normally the user can tell if an app is doing this, because it continues to make sound. But my app doesn't, because it's a MIDI app. Can you put something in the keychain that has the kSecAttrAccessibleWhenUnlocked flag, and try to access it periodically and shut down if it can't be accessed? I dunno if that's a horrible idea or not. It might be
|
# ? Dec 11, 2018 04:20 |
|
You dont need to mess around with the keychain, just use UIApplication.isProtectedDataAvailible. Obviously, tat doesnt work if the phone isnt passworded, but in that case, battery life is the least of user's problems.
|
# ? Dec 11, 2018 10:36 |
|
Nah I'm done caring about it. Just needed to vent. Also need to vent that none of my apps successfully run Instruments >> Time Profiler. Hooray for Xcode v.perpetual beta!
|
# ? Dec 11, 2018 21:01 |
|
You could send a local notification reminder every so often notifying the user that it’s still running and allow a config option to disable it
|
# ? Dec 12, 2018 01:09 |
|
Doctor w-rw-rw- posted:You could send a local notification reminder every so often notifying the user that it’s still running and allow a config option to disable it Jesus christ no. iOS has enough performance-ending notifications already (it's a music app, after all). A bassist friend of mine just posted that she was in the middle of an orchestra movement, reading off of her iPad score software, when an audience member sent her a picture through Air Drop. Turns out even when in Airplane mode and with Notifications off this is still possible.
|
# ? Dec 12, 2018 20:28 |
|
lord funk posted:Jesus christ no. iOS has enough performance-ending notifications already (it's a music app, after all). Lol, that's hilarious.
|
# ? Dec 12, 2018 23:50 |
|
lord funk posted:Jesus christ no. iOS has enough performance-ending notifications already (it's a music app, after all). She should know to turn off Bluetooth That is really dumb tbh, and sucks a lot.
|
# ? Dec 13, 2018 14:00 |
|
To be fair, I'm always amazed at people who haven't turned off airdrop for anyone that isn't a contact.
|
# ? Dec 13, 2018 16:26 |
|
Anyone know why CustomStringConvertible + description wouldn't work? I still get a full list of every property, their properties, etc. when I try to print(self) in the debugger.code:
|
# ? Dec 14, 2018 17:09 |
|
Not sure if it’s relevant but the comment says debug string convertible but the implementation is for plain old string convertible.
|
# ? Dec 14, 2018 17:16 |
|
pokeyman posted:Not sure if it’s relevant but the comment says debug string convertible but the implementation is for plain old string convertible. Oh nope that was just me trying to troubleshoot. I tried both CustomStringConvertable and CustomDebugStringConvertable and neither did anything.
|
# ? Dec 14, 2018 18:04 |
|
lord funk posted:Oh nope that was just me trying to troubleshoot. I tried both CustomStringConvertable and CustomDebugStringConvertable and neither did anything. `p` in the debugger does not invoke any of that machinery, but `po` does (or at least it should).
|
# ? Dec 14, 2018 21:12 |
|
Simulated posted:`p` in the debugger does not invoke any of that machinery, but `po` does (or at least it should). Oh poo poo that'll do it. I stopped using 'po' a while ago with Swift because it was slow and buggy as hell. I switched to just using 'print'. Thanks.
|
# ? Dec 14, 2018 21:17 |
|
Looking to understand real time chroma keying "green screen" effects. Luckily Apple's docs has an example of chroma keying, but it's not really suitable to be used in real time. After looking at the code for a bit, I noticed the first constant "size" defined in chomaKeyFilter(). I'm not sure what it does. I set it from 64 to 16, and I don't notice much visual difference, but the performance dramatically increased! Anyone have any guesses? code:
|
# ? Dec 19, 2018 20:39 |
|
It’s the size of the kernel. Making it smaller appears to lower the number of surrounding pixels that get sampled.
|
# ? Dec 19, 2018 20:58 |
|
Doc Block posted:Its the size of the kernel. Making it smaller appears to lower the number of surrounding pixels that get sampled. It's interesting because it seems I can kind of circumvent that by expanding the from and to range. And I realized pretty late into playing around with it those ranges need to be in a 0.0 to 1.0 range, and not the actual radians below pi. One thing I can't seem to get right is affecting the red part of the spectrum without it racing by it if I'm scanning across the range. Seems to do that on the violet part of the spectrum a bit too.
|
# ? Dec 19, 2018 23:05 |
|
UI tests. Sometimes finds my elements?! Sometimes not. I say 90% of the time they are found for any single test. Now do this with 20 tests and you can see why making this part of our CI flow pisses me off! I'd really like the folks at Apple not make this suck so hard! Any hot tips?
|
# ? Dec 21, 2018 04:38 |
|
Don't do UI tests.
|
# ? Dec 21, 2018 05:09 |
|
Yeah I know right ?! Problem is director guy has a mandate to make our releases be DevOppy and have no actual human beings required for testing. Just automation and unit tests . It's a noble goal but goddamn we gotta figure something out.
|
# ? Dec 21, 2018 05:19 |
|
What are the failures that you’re running into? If there are particular elements that aren’t showing up in the element hierarchy at the point your test is trying to interact with them, you can create a predicate expectation and then wait on that before actually querying that element. Be sure to explicitly create an expectation and then wait on it, the implicit expectation stuff is risky to use in building a library of test infrastructure because implicit expectations just accumulate on creation, and you can only wait on any particular expectation once. Also be sure to use a predicate for the expectation, rather than write a block or something; predicates will be more efficient because the testing infrastructure can optimize how they’re checked vs. running arbitrary code in your test that periodically tries to access state in your app.
|
# ? Dec 21, 2018 06:55 |
|
Stringent posted:Don't do UI tests. It’s important to test both your application’s logic itself and the way your users interact with it. As an added bonus, creating UI tests will also help build out your application’s accessibility. Just using it via tests probably won’t result in perfect accessibility compared to what a VoiceOver or other assistive technology user will expect, but it’ll go a long way towards addressing their needs, and any changes you make to improve the experience for them will probably also improve your tests. Oh, and the other thing to do is to create a library of app-specific abstractions to use in your tests, so your UI tests can be written at a very high level relative to your app. I.e. if your app needs to log in to a server, your library would have a concept of logging in that abstracts away the specific UI involved, so if you need to change the UI only that part of your tests needs to change. This is also a good place to put expectations that you need to wait on for e.g. UI transitions.
|
# ? Dec 21, 2018 07:04 |
|
Yeah we use the expectations with generous timeout values and it works but only 90% of the time.
|
# ? Dec 21, 2018 14:12 |
|
eschaton posted:What are the failures that you’re running into? And if you just need to wait for an element to show up, -[XCUIElement waitForExistenceWithTimeout:] handles things for you. Mikey-San fucked around with this message at 23:43 on Dec 21, 2018 |
# ? Dec 21, 2018 20:39 |
|
TheReverend posted:Yeah we use the expectations with generous timeout values and it works but only 90% of the time. Can you give a specific example? Without more detail, all we can do is speculate about common problems people encounter. (One or more of the issues may not be timeout-related at all.)
|
# ? Dec 21, 2018 23:48 |
|
Weird. I've done UI tests on a handful of projects now, and I've yet to run into failure rates of finding stuff anywhere near 90% I've also posted in here before about the strategy I prefer to follow when architecting UI Tests (notably, a screen-based approach); and I've found that spending some time up-front thinking about how you want to architect the UI tests to reduce duplication helps immensely in the long run in terms of getting test stability. I do think there are good arguments to be had about how extensive UI Tests should be in a given app (that is, value vs. time-to-run), and on my current project we're setting up two different UI Test flows: one that just covers core functionality of the app and runs in CI, and another that covers a lot more ground in the app, to be run manually when it's time to do things like regression test (and to be fair, we're still hammering out how exactly we want to structure all this and cadence of things).
|
# ? Dec 22, 2018 17:40 |
|
Yeah actually I've been using your ideas for screen based where possible. Problem is it's an old app and dependency injection wasn't something anyone cared about. We're working on it though. Problem is they want UI testing to be the sole testing framework for regression and release purposes. By the time we cover everything it'll take eons to tun! I'll find some examples of where these tests seem to fail.
|
# ? Dec 23, 2018 04:31 |
|
|
# ? May 15, 2024 14:32 |
|
So who wants to take bets that 2019 is year of the Swift
|
# ? Dec 28, 2018 02:07 |