|
Alright I need a sanity check. Can someone pop this into an iOS playground in Xcode 7.1 and tell me what happens?Swift code:
|
# ? Oct 25, 2015 18:49 |
|
|
# ? Jun 8, 2024 05:55 |
|
A black box?
|
# ? Oct 25, 2015 18:57 |
|
An error. Something's up with mine.
|
# ? Oct 25, 2015 19:28 |
|
Ok cool, not just me. Best case I get the black box, otherwise I get beachball.
|
# ? Oct 25, 2015 20:24 |
|
UIApplication posted:Why/how does this happen because it brings my piss to a boil too What's happening here is straightforward. In the C compilation model, every single source file ("translation unit") is independent. The language(s) impose a small number of assumptions about how declarations not defined in the current file will be defined (the "ABI"), but for the most part, every file is supposed to stand alone, allowing other files to be compiled with different options or even use completely different source languages. This creates a really nasty problem for debug info, because in theory you want the debugger to know about everything that the compiler can see, but different files are supposed to be independent, and you don't actually want the compiler to make every single object file include 20MB of redundant and unused declarations, because it would make compile times twenty times longer just from sheer I/O overhead. So instead the compiler drops a ton of stuff, and then it's a really interesting problem to find ways to make it available to the debugger anyway, and sometimes those mechanisms don't quite work perfectly. And Swift is affected because, as much as we've tried to evolve beyond the C compilation model, it's a lot of work to integrate this into tools built around that model, and sometimes the polish is scratched. So please file bugs with as much information as you have, and we'll try to do what we can.
|
# ? Oct 26, 2015 07:32 |
|
So as of this AM, my project will not build any more. Well, at least not in the 35 minutes I've let it run both before and after deleting derived data. I made a single line change to a string. Also, it has been "processing files" in indexing for over an hour. Have restarted Xcode many times, deleted derived data as mentioned... Running Version 7.0.1 (7A1001). Any suggestions? Update to 7.1?
|
# ? Oct 26, 2015 15:07 |
|
Restart your computer?
|
# ? Oct 26, 2015 15:18 |
|
pokeyman posted:Restart your computer? Pull it out and blow into the cartridge.
|
# ? Oct 26, 2015 15:22 |
|
rjmccall posted:What's happening here is straightforward. In the C compilation model, every single source file ("translation unit") is independent. The language(s) impose a small number of assumptions about how declarations not defined in the current file will be defined (the "ABI"), but for the most part, every file is supposed to stand alone, allowing other files to be compiled with different options or even use completely different source languages. This creates a really nasty problem for debug info, because in theory you want the debugger to know about everything that the compiler can see, but different files are supposed to be independent, and you don't actually want the compiler to make every single object file include 20MB of redundant and unused declarations, because it would make compile times twenty times longer just from sheer I/O overhead. So instead the compiler drops a ton of stuff, and then it's a really interesting problem to find ways to make it available to the debugger anyway, and sometimes those mechanisms don't quite work perfectly. And Swift is affected because, as much as we've tried to evolve beyond the C compilation model, it's a lot of work to integrate this into tools built around that model, and sometimes the polish is scratched. So please file bugs with as much information as you have, and we'll try to do what we can. Thanks for the info, but this is in an Obj-C project (no Swift). Bug reported anyway.
|
# ? Oct 26, 2015 15:28 |
|
pokeyman posted:Restart your computer? If only it were that easy. It has something to do with dictionary literals. I have code along the lines of: Swift code:
EDIT: and SourceKitService is taking ~400% CPU and causing center of the sun heat when this happens... EDIT2: If I remove any of the rows so there are NINE users... it builds and runs. Lumpy fucked around with this message at 21:01 on Oct 26, 2015 |
# ? Oct 26, 2015 20:28 |
|
pokeyman posted:
This was touted as a feature in the LLDB session at WWDC. I had to repeatedly punch my own leg to avoid jumping up and screaming "THEN WHY THE gently caress DOESN'T IT DO THAT BY DEFAULT". Debugging in Xcode compares to debugging in Visual Studio like a go-kart compares to a Ferrari, only the guys building the go-kart think they've built something awesome. Now back to Test Flight being an utter piece of poo poo and sitting on random builds for hours. Oh world's most profitable company? Too bad, you get old Bondi-Blue iMacs for Test Flight servers. Hate your own life fuckers, haha! * * When I asked some Apple folks if they had VM farms or the ability to spin up instances internally they told me people just run everything on Mac Minis under their desks. It's just a sad state of affairs.
|
# ? Oct 26, 2015 23:35 |
|
Lumpy posted:It has something to do with dictionary literals… Expressions with a lot of literals can currently cause exponential behaviour in the type inference engine. Add some explicit types somewhere. Also your test users should clearly be structs, if your example is representative.
|
# ? Oct 26, 2015 23:40 |
|
I have an app which dynamically creates a bunch of UIViews, all of which override drawRect:. After upgrading to XCode 7.1 my memory usage has gone through the roof and am getting out of memory errors. I understand that overriding drawRect: will create a backing bitmap but did anything change with 7 or 7.1 to make doing this have a bigger memory footprint? I really need to have custom drawing for my views - is there a more memory efficient way to go about it compared to drawRect:? Maybe using CALayers or something? EDIT: A little bit of data. In one example I'm creating 117 444x555 size images on an iPad Mini. By my simple math ( 444 x 555 x 4 bytes for ARGB ) each backing bitmap should be about 1MB so I should see about 117MB of memory usage. I'm seeing 480MB which would make sense if the backing bitmap was being created at retina resolution - maybe previously they were being created at the view resolution which was not the case before?? fankey fucked around with this message at 00:18 on Oct 27, 2015 |
# ? Oct 27, 2015 00:02 |
|
Ender.uNF posted:When I asked some Apple folks if they had VM farms or the ability to spin up instances internally they told me people just run everything on Mac Minis under their desks. It's just a sad state of affairs. Well I guess it's kinda nice to know that OS X servers are such a shitshow because the infrastructure just hasn't been developed at all and not because someone at Apple decided not to release important tools.
|
# ? Oct 27, 2015 00:51 |
|
jawbroken posted:Expressions with a lot of literals can currently cause exponential behaviour in the type inference engine. Add some explicit types somewhere. Thank you x2. Switching to structs not only was the smarter thing, it resolved my issue completely.
|
# ? Oct 27, 2015 14:33 |
|
Lumpy posted:Thank you x2. Switching to structs not only was the smarter thing, it resolved my issue completely. WE MUST RETAIN ALL CLASSES ALL THE TIME. RETAIN RETAIN RETAIN.
|
# ? Oct 27, 2015 15:47 |
|
lord funk posted:WE MUST RETAIN ALL CLASSES ALL THE TIME. RETAIN RETAIN RETAIN. Except when you get them from (some?) factory methods.
|
# ? Oct 27, 2015 16:21 |
|
Nice. Time Profiler just doesn't do anything. Is it because I'm running on a 7.1.1 device? I'm going numb. edit: yeah it's a bug lord funk fucked around with this message at 19:09 on Oct 27, 2015 |
# ? Oct 27, 2015 18:59 |
|
Am I missing a very obvious cause for this crash? I may be doing something unsavory to a UIWebView. I don't expect any relevant delegates or views to be disappearing while a request is running. It's possible that I'm sending a UIWebView multiple calls to loadRequest without canceling an already-running one. I tried doing that on purpose and was unable to reproduce this. ManicJason fucked around with this message at 20:39 on Oct 27, 2015 |
# ? Oct 27, 2015 20:36 |
|
pokeyman posted:
For real?!? This is what I was needing in the Swift thread the other day. Edit: Maybe not 100% though. ultramiraculous fucked around with this message at 00:02 on Oct 28, 2015 |
# ? Oct 27, 2015 23:51 |
|
It doesn't always help:code:
|
# ? Oct 28, 2015 06:24 |
|
Hot drat, finally tried out the Fastlane tools. Just integrated our alpha builds from our CI onto Crashlytics and beta builds straight to iTunesConnect and TestFlight. This seriously owns.
|
# ? Oct 28, 2015 21:58 |
|
I'm normally not a fan of kooky tool/library names but I'm on board with a provisioning profile utility called "sigh".
|
# ? Oct 28, 2015 22:52 |
|
Doh004 posted:Hot drat, finally tried out the Fastlane tools. Just integrated our alpha builds from our CI onto Crashlytics and beta builds straight to iTunesConnect and TestFlight. Oh yeah, they are amazing. Totally recommend them. They ought to be first party imo.
|
# ? Oct 28, 2015 23:11 |
|
pokeyman posted:I'm normally not a fan of kooky tool/library names but I'm on board with a provisioning profile utility called "sigh". That's why I was initially hesitant. But when sigh allows my CI to login to iTunes Connect and download my ad hoc provisioning profile (the one where I can just add devices onto) into the current instance instead of having to download it and put it into git, I'm willing to budge. Glimm posted:Oh yeah, they are amazing. Totally recommend them. They ought to be first party imo. I'm super pumped that Fabric (Twitter) acquired the library. Hopefully it'll increase its adoption among the community even more.
|
# ? Oct 29, 2015 03:13 |
|
Doh004 posted:I'm super pumped that Fabric (Twitter) acquired the library. Hopefully it'll increase its adoption among the community even more. And the other shoe drops As long as I don't need to install Fabric.app to use a loving rubygem, I'm ok. I give it a year.
|
# ? Oct 29, 2015 03:21 |
|
pokeyman posted:And the other shoe drops Not a fan of Fabric? I'm genuinely curious as I'm still new to it all. Things have been pretty good so far.
|
# ? Oct 29, 2015 14:54 |
|
edit: never mind
Doc Block fucked around with this message at 19:02 on Oct 29, 2015 |
# ? Oct 29, 2015 18:48 |
|
Doh004 posted:Not a fan of Fabric? I'm genuinely curious as I'm still new to it all. Things have been pretty good so far. I'm suspicious of agglomeration for no clear benefit. I've never liked the whole "you must install our Mac app to use our framework". Plus it's free. I guess I've been waiting for the other shoe to drop for awhile. It's very possible my fears are groundless, though, and I don't mean to dissuade anyone who derives value from these products. While I'm complaining, it would also be nice if they fixed their Crashlytics pod to declare its dependency on the Fabric pod. Why even bother officially embracing a dependency manager just to do everything but?
|
# ? Oct 29, 2015 23:49 |
|
Doh004 posted:Not a fan of Fabric? I'm genuinely curious as I'm still new to it all. Things have been pretty good so far.
Fabric makes me angry.
|
# ? Oct 30, 2015 00:21 |
|
Doctor w-rw-rw- posted:Crashlytics and Fabric would ruin builds by updating its framework files in place. Thanks, I was just looking for an unexpected and automatic change to distract me while debugging something else. Especially if I was bisecting someone else's build with an automatically-updated Crashlytics inserted in an unrelated commit, and and Crashlytics decides now's a great time to update the framework. Sure, not devastating. Persistently annoying, though. Can't believe I forgot this one. It's fixed if you're using the pod.
|
# ? Oct 30, 2015 00:58 |
|
Oh God, blocks. Trying to use Metal Performance Shaders and getting a compile error. Why doesn't this work: Objective-C code:
Incompatible block pointer types sending 'id<MTLTexture> _Nonnull (^)(MPSKernel * _Nonnull __strong, id<MTLCommandBuffer> _Nonnull __strong, id<MTLTexture> _Nonnull __strong)' to parameter of type 'MPSCopyAllocator _Nullable' (aka 'id<MTLTexture> _Nonnull (^)(MPSKernel * _Nonnull __strong, id<MTLCommandBuffer> _Nonnull __strong, id<MTLTexture> _Nonnull __strong)') What stupid thing am I missing that will make this compile? Doc Block fucked around with this message at 02:48 on Oct 30, 2015 |
# ? Oct 30, 2015 02:42 |
|
Doc Block posted:Oh God, blocks. Oh god, I'm sorry, I might have advised them on this API. Look up the actual header, I think you probably needs NS_CONSUMED and/or NS_RETURNS_RETAINED. Alternatively, I think you can use the typedef and the compiler will give you parameters automatically. ETA: also please file a bug about the inadequate type-printing.
|
# ? Oct 30, 2015 04:29 |
|
rjmccall posted:Oh god, I'm sorry, I might have advised them on this API. Thanks. Yeah, it needed NS_RETURNS_RETAINED, once I added that it worked fine: Objective-C code:
|
# ? Oct 30, 2015 06:37 |
|
What is the best way to handle having 3 different versions (dev, staging, prod) of my app installable on a single device, but with different icons / pointing at different web services? In the past I've used targets for this - it's pretty straight forward, but error prone. Forgetting to add a file to a particular target can cause problems, it's annoying to keep the versions / build numbers in line, and really it feels like using targets incorrectly (it is the same app after all). The right way to do this seems to be different build configurations. I think I'm missing something straight forward in how to use them though, for example: I send builds out internally on staging, but the 'archive' Xcode option is pointing to the production (Release) configuration. It seems bizarre to manually edit my scheme's Archive option every time I send an internal build out. How do I make archive sometimes use production and at other times use staging?
|
# ? Oct 30, 2015 15:25 |
|
Everything can be handled via build settings. App Icon: https://engineering.circle.com/different-app-icons-for-beta-dev-and-release-builds/ For your services you can use compile time flags.
|
# ? Oct 30, 2015 16:01 |
|
Kallikrates posted:Everything can be handled via build settings. App Icon: https://engineering.circle.com/different-app-icons-for-beta-dev-and-release-builds/ Right, sorry I wasn't clear - how do I archive my dev configuration vs staging configuration vs production configuration without creating separate schemes that point to a different configurations within their archive steps?
|
# ? Oct 30, 2015 16:59 |
|
Are promo codes just not available in iTunes Connect right now, or have they moved again?
|
# ? Oct 30, 2015 21:57 |
|
Glimm posted:Right, sorry I wasn't clear - how do I archive my dev configuration vs staging configuration vs production configuration without creating separate schemes that point to a different configurations within their archive steps? Change the build configuration before archiving:
|
# ? Oct 30, 2015 21:58 |
|
|
# ? Jun 8, 2024 05:55 |
|
Doh004 posted:Change the build configuration before archiving: Yeah I think he wants something to set once ( I always forget to unset the release flag). A separate scheme or a build script might be the only options.
|
# ? Oct 30, 2015 22:55 |