|
Is there a smart way to know what I'm swift_releasing / swift_retaining here? This is in my draw loop and I want to avoid the overhead.
|
# ? Dec 9, 2019 05:14 |
|
|
# ? May 16, 2024 13:47 |
|
lord funk posted:Is there a smart way to know what I'm swift_releasing / swift_retaining here? This is in my draw loop and I want to avoid the overhead. What does your function look like? Sadly, I ran into some issues I couldn't figure out how to mitigate until I wrapped draw in autoreleasepool.
|
# ? Dec 9, 2019 23:10 |
|
im presenting at the thing today, come say hi
|
# ? Dec 12, 2019 20:00 |
|
I would but I'm on the wrong side of the country.
|
# ? Dec 12, 2019 20:36 |
|
The CIEdges (as well as other CIFilters) are no longer working consistently the same between devices and iOS versions. So I decided to find edges with a convolution filter. Success: I can get a good black and white mask of the images, and let a gradient or solid color show through: Problem is, I can't figure out a good way to variably adjust the line thickness. One way I tried was to decrease a version of the source image, and apply the convolution and upscale on top of the black and white camera image. That sort of works, but the lines look jaggy and gross. Any ideas? Here's my code: code:
|
# ? Dec 20, 2019 18:59 |
|
rjmccall posted:I would but I'm on the wrong side of the country. I had fun! I, unknowingly, called someone's code bloated to their face. They insinuated I would be replaced by a shell script. Good times!
|
# ? Jan 7, 2020 02:00 |
|
edit 1/21/20: deleting my derivedData folder fixed it. Anyone know why the command+click "Jump to definition" would jump to the wrong definition in Xcode? Just started happening these last few days. Tried closing/opening project, restarting machine, cleaning build folder. Good Sphere fucked around with this message at 17:51 on Jan 21, 2020 |
# ? Jan 8, 2020 18:50 |
|
I've started a new job and inhereted a giant React Native act. Every cell in my body is crying out for the sweet release of death. loving Javascript! Oh my beloved Swift, we shall meet again, one day. edit: Oh and heres something trippy. You know the 3D view controller inspector thing? Try it on a react native app. Turns out it really is using Native widgets and not skinned up HTML.
|
# ? Jan 16, 2020 16:56 |
|
duck monster posted:I've started a new job and inhereted a giant React Native act. Every cell in my body is crying out for the sweet release of death. loving Javascript! React Native is actually pretty loving good. Data bindings work really well, and the magical LayoutAnimation.ConfigureNext function does wonders to transition between view states. JS is not the best language but in my opinion it's universal enough that pretty much any dev can get up and running quickly. And if you hate its perks, you can always transpile from TypeScript.
|
# ? Jan 16, 2020 20:19 |
|
duck monster posted:I've started a new job and inhereted a giant React Native act. Every cell in my body is crying out for the sweet release of death. loving Javascript! Quit
|
# ? Jan 16, 2020 22:52 |
|
go play outside Skyler posted:React Native is actually pretty loving good. Running animations from a background JS thread does wonderful things for battery life too! Oh wait, "wonderful" was the wrong word...
|
# ? Jan 17, 2020 05:32 |
|
Simulated posted:Running animations from a background JS thread does wonderful things for battery life too! Not to derail this thread but React Native has had a "useNativeDriver" option for a while now which simply triggers the animation and lets a native background thread handle the rest. It's all about how you use the tool, really. go play outside Skyler fucked around with this message at 12:35 on Jan 17, 2020 |
# ? Jan 17, 2020 07:26 |
|
Hi everyone. At work it appears we found a nasty issue with building Xcode projects after upgrading to 11.1. I'm not that experienced with development on Mac, and am more of a back-end, non user-facing developer. However, I have to do work on the front end from time to time and one of our supported front-ends is Mac. So we have a .pbxproj file for an Xcode project checked into version control. I modified this file on a wip branch - just removing and renaming files - and our CI system then built the project on a dedicated Mac machine. Okay, so what? The funny thing was, it seemed like CI was building the Xcode project based on the old .pbxproj file. On my repo, it built correctly, and two other people pulled my branch and tried it too, no problem. I tried multiple random things to make the CI build work, but guess what? The CI machine needed to delete its DerivedData folder before building and then it was just fine. I had no access to the CI machines so I couldn't have just logged in to find that out, though admittedly the DerivedData being the problem seems obvious now. Our CI people had to submit a fix to make the Mac machines always delete DerivedData before doing a build. Meanwhile I dropped my work item for a day while our CI team figured out what was going on and I blew another day before struggling to fix it. I'm not angry about that at all. So PSA: DerivedData is evil. America Inc. fucked around with this message at 08:46 on Jan 17, 2020 |
# ? Jan 17, 2020 08:42 |
|
Bash code:
Doc Block fucked around with this message at 10:39 on Jan 17, 2020 |
# ? Jan 17, 2020 10:35 |
|
Simulated posted:Running animations from a background JS thread does wonderful things for battery life too! I mean, iOS' render server runs out of process...running animations on background threads is a good idea for the kind of programming model JS has, and most simple apps with noninteractive animations. I personally favor a slightly different model than, but borrowing from, React, which I suspect resembles SwiftUI in some respects, which I'm working on on the side.
|
# ? Jan 17, 2020 10:43 |
|
Does anyone know what the query parameters lsp and _ext for the Apple Maps url scheme are? It's not mentioned in the documentation but they come up if I search for a place in Apple Maps and copy the link. lsp is a 4 digit integer _ext is a long string of lower/uppercase characters and symbols e: I'm also assuming that "auid" is a unique identifier for specific places in Apple Maps?
|
# ? Jan 21, 2020 11:03 |
|
LookingGodIntheEye posted:Hi everyone. At work it appears we found a nasty issue with building Xcode projects after upgrading to 11.1. Pretty please if you can narrow down the change that caused this I will make sure the right people see it. Did you move types between modules? Add or remove targets? If you can share the code (which I understand many can't) even better.
|
# ? Jan 22, 2020 05:45 |
|
Doctor w-rw-rw- posted:I mean, iOS' render server runs out of process...running animations on background threads is a good idea for the kind of programming model JS has, and most simple apps with noninteractive animations. I was being glib about the fact that no one bothers to even check the perf impact because developer convenience has become the be-all end-all in our industry lately.
|
# ? Jan 22, 2020 05:49 |
|
Simulated posted:I was being glib about the fact that no one bothers to even check the perf impact because developer convenience has become the be-all end-all in our industry lately. No, it just survives project cancellations better than big native platforms which can meet that performance bar, but take forever to get good. There's Darwin and then there's Android, and a bunch of dead or never-even-announced platforms strangled in the crib by execs who didn't understand their own strategy. I'm not bitter or anything...
|
# ? Jan 22, 2020 15:50 |
|
Is there a way to pop items off of an UndoManager stack without performing them? or to reopen the last closed undo group? I have a case where ending dragging a slider closes an undoGroup, but the slider handle also can be tapped. If the tap is successful (there is a delay for checking), I want to reopen the last group for the next actions to join in. edit: on second thought, that's probably not the way to do it. reworked things and should be better off now. lord funk fucked around with this message at 09:00 on Jan 27, 2020 |
# ? Jan 27, 2020 06:13 |
|
Does anyone have any good experiences with (or work for a good) iOS / Android dev shop? The company I work for is going to be outsourcing our mobile apps because our team is not large enough and doesn't have enough folks with mobile experience to handle it in-house. The two options brought to our attention so far are https://www.thesmythgroup.com/ and https://www.equalexperts.com/ . Happy to take answers here or in PMs / email (gmail: veddermatic) If this is inappropriate for this thread, I will edit and ask a dumb iOS question instead =)
|
# ? Jan 30, 2020 16:44 |
|
Today I made this meme I'm sure this wouldn't actually work, but after dealing with months of wHiCh eMaiL DiD i uSe tO LOg iN it would be real slick if you could connect user accounts to some encrypted id of their fingerprint and then be like "get user for fingerprint and log em in". Edit: YOU CAN? https://developer.apple.com/documentation/localauthentication/logging_a_user_into_your_app_with_face_id_or_touch_id Why don't apps do this? I guess cause most apps have a crappy website you need to be able to login to? awesomeolion fucked around with this message at 21:28 on Jan 30, 2020 |
# ? Jan 30, 2020 21:21 |
|
awesomeolion posted:Today I made this meme FaceID & TouchID authorize, not authenticate. They will allow you to store some data securely and release it if the face is recognized but if the problem you’re trying to solve is either substituting a username or password (or equivalent) with them you’ll be disappointed. They are basically hardware unlocks allowing the secure element hardware on the device to decrypt stuff.
|
# ? Jan 30, 2020 21:56 |
|
Doctor w-rw-rw- posted:FaceID & TouchID authorize, not authenticate. They will allow you to store some data securely and release it if the face is recognized but if the problem you’re trying to solve is either substituting a username or password (or equivalent) with them you’ll be disappointed. Gotcha, in that case it sounds like more of an alternative or supplement to Keychain?
|
# ? Jan 31, 2020 11:39 |
|
awesomeolion posted:Gotcha, in that case it sounds like more of an alternative or supplement to Keychain? A backend for a subset of keychain item types.
|
# ? Jan 31, 2020 12:26 |
|
My iOS app has documents and data build up. I'm not sure what it my code is to blame at this point. I did find something inside a function for sharing video:code:
|
# ? Jan 31, 2020 17:23 |
|
I think there is a method for checking if a path exists you can call from FileManager.default
|
# ? Jan 31, 2020 17:51 |
|
edit 2: I'll need to control the copy of the image somehow. From the Apple docs:quote:tmp/ https://developer.apple.com/library...0010672-CH2-SW4 edit: I call this function: code:
--------------------------- I found out with certainty that my question wasn't the problem. I was happy to find I could save an exact copy of the app to my computer, with all the current documents and data, by going to Window >> Devices and Simulators >> Click phone on left pane >> Click installed app >> Click gear settings icon >> Download container. There, (by exploring the package contents) I found all the photos inside the tmp folder were ones I imported from Photos, and not anything taken from the camera. I also just did a test to see that it happens immediately when I choose the image from imagePickerController. How does it save to the tmp folder at this point? I don't know yet. There's nothing there where I'm explicitly telling it to store the image to a URL. Good Sphere fucked around with this message at 19:30 on Jan 31, 2020 |
# ? Jan 31, 2020 18:23 |
|
I figured it out. I'm using a different function, since I didn't know how to get access to the UIImagePickerController's url otherwise, but with a few extra steps, it was nothing hard and I'm able to delete the temporary file. Test a lot, and at zero documents and data gain. code:
|
# ? Jan 31, 2020 22:13 |
|
It seems strange to me that you need to manage anything in the dictionary passed to that delegate method. I would expect the image picker to clean up after itself. Why do you need to delete the temp image file?
|
# ? Jan 31, 2020 23:09 |
|
pokeyman posted:It seems strange to me that you need to manage anything in the dictionary passed to that delegate method. I would expect the image picker to clean up after itself. Why do you need to delete the temp image file? Because they just pile up in the app's tmp directory; ever increasing the documents and data. Maybe iOS eventually decides to delete some or overwrite it, but it's annoying for users to see an app swallowing up all their available storage. It's strange to me too, but it looks like Apple wants your app to be responsible for cleaning it up. Storing the image to tmp with UIImagePickerController is one of those things that doesn't make itself obvious, and you have to remember to deal with it. Good Sphere fucked around with this message at 23:20 on Jan 31, 2020 |
# ? Jan 31, 2020 23:16 |
|
Maybe give users a way to wipe out the whole tmp/ directory (or do it automatically if it’s above a certain size) than jump through a lot of hoops worrying about it.
|
# ? Feb 1, 2020 01:34 |
|
Good Sphere posted:Because they just pile up in the app's tmp directory; ever increasing the documents and data. Maybe iOS eventually decides to delete some or overwrite it, but it's annoying for users to see an app swallowing up all their available storage. I'd need to check the source code but I suspect the image is not actually taking up space. It is likely an APFS clone. This may just be a bug in the storage view that is counting clones against the app.
|
# ? Feb 1, 2020 02:46 |
|
Doc Block posted:Maybe give users a way to wipe out the whole tmp/ directory (or do it automatically if it’s above a certain size) than jump through a lot of hoops worrying about it. I agree. Maybe they see it as an optimization to conserve battery power, but the fact that they would be doing it only with the case of importing images using UIImagePickerController makes me doubt that. The OS will make more free space eventually, though I can see users getting frustrated that their phone is running out of space without a good reason. I also noticed a lot of apps on my phone take up a huge amount of space in documents and data, when it makes no sense that they need to. Simulated posted:I'd need to check the source code but I suspect the image is not actually taking up space. It is likely an APFS clone. This may just be a bug in the storage view that is counting clones against the app. After I saved a copy of the app from my phone to the computer, the images in the tmp directory came along with it. Any possibility those images are just pointing to my photo library on my phone, but when I make a copy of the app that's downloaded onto my computer, it also makes copies of those images? I thought it was making an exact copy of what was on the phone. e: one weird thing I noticed is the app is storing ".closure" files in the tmp directory. I have no idea what these are for. Opening them as text is indecipherable. Good Sphere fucked around with this message at 17:37 on Feb 3, 2020 |
# ? Feb 3, 2020 17:14 |
|
An app’s tmp/ directory doesn’t really count as filling up the drive IMHO, since the operating system can just clear it out as needed. As you said, the problem is when they put stuff in Documents they should’ve put in tmp or cache.
|
# ? Feb 3, 2020 20:40 |
|
Hey so I need to make a Swift Framework! Looks like it's not the worst thing in the world, but I need some help with setup. I see that the sim and device frameworks are separate and folks on SO are putting this post build scripts to merge the two frameworks into a single fat library. Additionally, it looks like there needs to be ANOTHER script to shed the x86 stuff for when it's time to upload an app using the framework to the AppStore? Does that sound right? The goal is to just make a cocoapod available to the public.
|
# ? Feb 5, 2020 04:53 |
|
It sounds like you're looking to distribute the framework as a compiled binary? Because if you're ok shipping .swift files to users for them to compile then life is much easier. The technically correct way to ship a binary framework is as an .xcframework. Unfortunately CocoaPods has not yet shipped a stable release that supports .xcframework. You can try the beta version (and your users will need to use beta CocoaPods too), and/or you can put together an .xcframework yourself and ship that bundle to users. It shouldn't be hard to "install" an .xcframework into an existing project (just drag it in) if you can get away without CocoaPods support for now. Also .xcframework requires Xcode 11 or higher, so if you need Xcode 10 support then welp. The supposedly incorrect way is to build each architecture separately and then lipo the binaries together (which is what those scripts you see will do). Everyone does it, Apple folk say not to do it, and here we are with nothing supporting or using .xcframework months after its reveal. Basically it's a mess with some promise on the horizon. edit: Yes, if you lipo a bunch of binaries together you'll need to strip them back out of what you submit to the App Store, or your build will be rejected.
|
# ? Feb 5, 2020 06:18 |
|
It really isn’t valid though, and you really should not do it. For example, what will you do when one of your customers says “Where’s the Mac Catalyst version?” What will you do when a different customer asks “Hey, can I get a version of your library for tvOS?” Use the xcframework mechanism, support all of Apple’s platforms if possible (including both macOS and Mac Catalyst), and don’t worry about CocoaPods or support for older versions of Xcode.
|
# ? Feb 5, 2020 06:44 |
|
Unless shipping your library in binary form is a hard requirement because your library is closed-source, just support one or more of cocoapods/carthage/swiftpm and you don't have to worry about any of the fat library nonsense because the package manager deals with all of that for you. If you do need to ship in binary form then you really don't want to do so via cocoapods. xcframeworks are sort of a half-baked mess, but assuming that building in swift library evolution mode doesn't cause any problems for you they aren't actively worse than the old workarounds so there's no reason not to use them for a new library.
|
# ? Feb 5, 2020 08:02 |
|
|
# ? May 16, 2024 13:47 |
|
Does swiftpm work in Xcode yet
|
# ? Feb 5, 2020 09:08 |