|
We create a hidden user using dscl for our application's server to operate as. For years we've been plagued by macOS updates deleting this user for some (but not all) of our user base. Our application installer creates the user like below. Is there a better way to create a hidden user to avoid it getting randomly deleted?code:
|
# ? Oct 1, 2018 20:51 |
|
|
# ? May 31, 2024 19:50 |
|
Good Sphere posted:Just as a side note, I’m taking a risk by storing whether or not someone purchased it in a plist, because that isn’t very secure. The user could trick the app into thinking it was purchased if they know what to put in that plist file by opening the application’s contents. I think it’s unlikely many people would make that sort of effort, especially for an app that’s probably going to end up being 1-2 dollars. I came to the same conclusion in terms of risk/reward for a few dollars' purchase. I felt like any efforts I made to obfuscate the content would just as likely cause unforeseen bugs for paying customers.
|
# ? Oct 3, 2018 00:49 |
|
tmesis posted:We create a hidden user using dscl for our application's server to operate as. For years we've been plagued by macOS updates deleting this user for some (but not all) of our user base. Our application installer creates the user like below. Is there a better way to create a hidden user to avoid it getting randomly deleted? What is $new_uid? It is illegal to create users <500 on macOS. Those are all reserved for the system. You might get away with it until an OS update includes a user with that ID. The installer will unceremoniously destroy your user to make way for the system user. You should query for the next-available uid >500: code:
Simulated fucked around with this message at 05:50 on Oct 3, 2018 |
# ? Oct 3, 2018 05:40 |
|
Simulated posted:What is $new_uid? It is illegal to create users <500 on macOS. Those are all reserved for the system. You might get away with it until an OS update includes a user with that ID. The installer will unceremoniously destroy your user to make way for the system user. Yeah we basically do that exact thing earlier in the function after we got bit in the rear end by that exact thing back in Mountain Lion(?) days. We also tried setting it > 1000 just for kicks and that did not work either.
|
# ? Oct 3, 2018 13:08 |
|
I have a Metal question that's been baffling to me. I create a CIImage by grabbing either half the height or width and flipping it using CGAffineTransforms to make a "mirrored" effect. When I go to render it on a MTKView and scale up the CIImage using CGAffineTransforms, I can see the seams between the mirrored images. I somewhat understand how this could happen since CIImages are just image data that can be represented as an image, but I don't understand how not make it happen when scaling it up in the MTKView's CIContext render. That same CIImage is fine when it is taken by the camera and saved because at that point it has nothing to do with Metal scaling it up. The draw function I'm using is here, with "image" being the CIImage being set: code:
|
# ? Oct 5, 2018 21:05 |
|
I want a 4x4 matrix type in Swift. Is _FixedArrayN the right way to make one? EDIT: Nope. I’ll just write my own with a struct. Doctor w-rw-rw- fucked around with this message at 00:41 on Oct 18, 2018 |
# ? Oct 18, 2018 00:17 |
|
Doctor w-rw-rw- posted:I want a 4x4 matrix type in Swift. Is _FixedArrayN the right way to make one? Yep that's what I did.
|
# ? Oct 18, 2018 15:37 |
|
Isn’t Accelerate.framework bridges to Swift? I’d use whatever it or Metal provide.
|
# ? Oct 18, 2018 20:00 |
|
In general “don’t write your own matrix math” should be right up with “don’t write your own sort.”
|
# ? Oct 18, 2018 20:03 |
|
Neither of those are open-source nor run on Linux. No real choice.
|
# ? Oct 19, 2018 03:52 |
|
Why do you care about running on Linux?
|
# ? Oct 19, 2018 09:23 |
|
It’s OK to have separate code paths for different platforms, you know. Good even, if it means the experience is better for users.
|
# ? Oct 19, 2018 09:24 |
|
eschaton posted:It’s OK to have separate code paths for different platforms, you know. Good even, if it means the experience is better for users.
|
# ? Oct 20, 2018 23:51 |
|
I wouldn’t expect Apple to just make every possible library and framework Open Source and bring it to Linux. Swift on Linux is very much about servers. That’s not to say things like matrix math are useless to servers, but they’re much more niche there than on end user systems.
|
# ? Oct 21, 2018 06:30 |
|
I think we’re literally at this moment discussing a SIMD library on Swift Evolution that includes a 4x4 matrix type.
|
# ? Oct 21, 2018 06:46 |
|
eschaton posted:I wouldn’t expect Apple to just make every possible library and framework Open Source and bring it to Linux. rjmccall posted:I think we’re literally at this moment discussing a SIMD library on Swift Evolution that includes a 4x4 matrix type. eschaton posted:Swift on Linux is very much about servers. That’s not to say things like matrix math are useless to servers, but they’re much more niche there than on end user systems.
|
# ? Oct 21, 2018 09:49 |
|
On a previous project, we created our own custom Matrix type for matrices that were 100x100 doubles or bigger. We started by manually writing out the matrix math, and it was ridiculously slow. We moved to the Accelerate framework (inside of the Matrix type itself) and sped up the math something like 1000%. It was pretty awesome. So yeah. Don’t write your own matrix math if you can at all avoid it.
|
# ? Oct 24, 2018 00:47 |
|
I get that, but between abandoning the thing (because the functionality I want doesn't exist), waiting a couple of months (because the functionality I want will exist), and writing some lovely thing that runs for now, I'm going to pick the last one.
|
# ? Oct 24, 2018 07:39 |
|
Anyone have a USB-C --> Headphone + USB-C adapter they use, and does the extra USB port allow it to connect to a computer normally, or is it only for power?
|
# ? Oct 30, 2018 19:20 |
|
Can I have my account be part of two developer teams, or do I have to create a second Apple ID?
|
# ? Oct 31, 2018 05:04 |
|
Small White Dragon posted:Can I have my account be part of two developer teams, or do I have to create a second Apple ID? I believe it can be a part of two developer teams.
|
# ? Oct 31, 2018 05:18 |
|
One account can be part of many development teams. You used to sometimes need multiple Apple IDs for App Store Connect, but they’ve fixed that recently.
|
# ? Oct 31, 2018 06:02 |
|
Could use some help figuring out how non-escaping v. escaping works. Opened a project in Xcode 10 and I'm getting this error: Timing is defined as: code:
|
# ? Nov 6, 2018 20:25 |
|
Try this:code:
|
# ? Nov 6, 2018 22:24 |
|
Here's an attempted explanation: the timing closure that's being passed into the function is expected to be non-escaping because it's not explicitly marked as escaping. When you put the closure into an array, you're storing it there for the lifetime of that array. Even though the array doesn't stick around past the end of that function (assuming that the call to Ramper.rampValues doesn't store it anywhere), the compiler doesn't know that, so it won't let you store it there and potentially let it escape.
|
# ? Nov 6, 2018 23:59 |
|
@rjmccall yep, that did it.dizzywhip posted:Here's an attempted explanation: the timing closure that's being passed into the function is expected to be non-escaping because it's not explicitly marked as escaping. When you put the closure into an array, you're storing it there for the lifetime of that array. Even though the array doesn't stick around past the end of that function (assuming that the call to Ramper.rampValues doesn't store it anywhere), the compiler doesn't know that, so it won't let you store it there and potentially let it escape. Yeah that totally clarifies. Thanks!
|
# ? Nov 7, 2018 01:51 |
|
What's the current thinking on custom attributes in Swift (or clang for that matter)? Using sourcekitten and picking up on custom attributes which don't otherwise affect compilation would be useful when building some tooling that benefits from static analysis.
|
# ? Nov 7, 2018 06:55 |
|
It's a big design space if you want any sort of validation / semantic effect at all, and in the short term it's pretty easy to get the same tooling impact by parsing comments.
|
# ? Nov 7, 2018 08:14 |
|
That makes a lot of sense. Dang.
|
# ? Nov 7, 2018 11:17 |
|
I'm looking to upgrade my own personal Mac laptop for home development as I'm still rocking my mid-2012 Macbook Air. I do more than just iOS development now want it to be capable of doing so. I'm thinking the refreshed Macbook Airs would be more than fine for this, right? I feel like XCode has only gotten better (Swift compilation definitely has), so the air should be more than capable. I'm much more willing to pay ~$1700 instead of a $2500 MBP, especially given my needs now. I have a 2017 MBP that's very beefy here at work and is very able to build our somewhat large iOS app in XCode just fine. (I know this is the iOS development thread and not the hardware thread)
|
# ? Nov 8, 2018 20:36 |
|
Either should be a reasonable development machine so it depends on whether you value weight/portability or performance. It really depends on what is right for you.
|
# ? Nov 8, 2018 21:52 |
|
Simulated posted:Either should be a reasonable development machine so it depends on whether you value weight/portability or performance. It really depends on what is right for you. I'd say for a personal machine (potentially do some freelance/contract work on the side), I'd value weight and portability. I'm not doing any game development or anything super heavy on the graphics.
|
# ? Nov 9, 2018 02:47 |
|
My thought is absolutely yes, especially if it's your only machine and you value portability. You'll be fine.
|
# ? Nov 9, 2018 02:55 |
|
I've had my app up for pre-order, version 1.0, for about a month. I created a version 1.01 in app store connect to capture all of the changes I've made since it went up for pre-order, but I want to make sure I don't accidentally do something stupid like nuke all of the pre-orders because they're tied to 1.0. Do I need to do anything to account for the fact that 1.0 is in pre-order, or can I just submit 1.01 for review and users that pre-ordered will get that on launch day?
|
# ? Nov 9, 2018 04:25 |
|
What are the requirements for being able to view the JavaScript console on a connected iDevice? I tried an iPhone 6S and 8+ (Both lates iOS), two cables, everything works on my Mojave 15” but neither work on my 2009 Mini running El Cap. The device shows in the safari develop menu but goes away befor you can use it.
|
# ? Nov 11, 2018 22:23 |
|
I’ve never seen any kind of official or even unofficial documentation of what works with what. I have seen that feature act incredibly strangely and suddenly start/stop working. For example, sometimes Safari stops working but Purple Safari works, or vice versa. Quitting or restarting various things sometimes changes what works. I’m guessing you’ve tried all that already, so basically all I’m saying is you’re not alone.
|
# ? Nov 12, 2018 05:49 |
|
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. Can I do this with a free developer account and side loading the app? Or do I need a $99 developer account? Can I even send non-local push notifications to my iPhone without the app being on the App Store? e: Looks like I'd need a $99 developer account to get access to remote push notifications. Boris Galerkin fucked around with this message at 09:28 on Nov 13, 2018 |
# ? Nov 13, 2018 09:11 |
|
Trying to create some subscriptions for an iOS app. Where the fr*ck is the "+" to add localizations??? e: after changing from "developer" to "admin," the problem is resolved, because now i just get an error page any time i go to the "my apps" section GameCube fucked around with this message at 20:15 on Nov 15, 2018 |
# ? Nov 15, 2018 17:05 |
|
Anyone know why I'm seeing two repositories now in my source control navigator? They both point to the same remote. I don't know if this is a Git issue or an Xcode one.
|
# ? Nov 25, 2018 17:28 |
|
|
# ? May 31, 2024 19:50 |
|
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.
Good Sphere fucked around with this message at 19:38 on Nov 28, 2018 |
# ? Nov 28, 2018 19:08 |