Xcode Forum

2 views
Skip to first unread message

Onfroi Baird

unread,
Aug 5, 2024, 11:56:26 AM8/5/24
to cioukiddumppa
Goodmorning to everyone. I have a big question with Xcode, to see if someone can help me, please. I explain: I am doing a view and I insert 3 buttons with their corresponding constraints. When I do a preview in xcode (using the editor settings), the view is perfect for me. But when I run it on an emulator for both iphone 8 or any other, the buttons are reduced or are out of place or do not appear ... and I do not understand what the problem is, due to the constraints and everything is perfect. Also, in the xcode when I select some iphone emulators I get 2 of the same type. For example, I get 2 from the iPhone SE (2nd generation), specifically I get iPhone SE (2nd generation) (040BBDPC-2F ....) and iPhone SE (2nd generation) (161B06F7-3DA ...),

Could someone help me or tell me something about this matter? I have had the project paralyzed almost 15 days ago. THANK YOU SO MUCH EVERYONE!!


Previews have the luxury of appearing as the only item on a screen. On the simulator, they must now obey the layout constraints placed on them by whatever parent they have. If that parent has too many children or is itself weirdly positioned, your perfectly working child will never the less be affected by this.


In my code, I have found that when this happens, it usually means I have too much code, I am trying to specify things too much. If I get rid of modifiers and parameters, usually the hiding child shows up, and I can tweak things again, one by one to see what happens.


If you are using explicit constraints, a rule of thumb is that one generally needs no more than 4 of them. You must somehow communicate the view's x and y position, and it's size. I often would find that if I had too many constraints on something, the system would get confused.


Why is it offtopic ?? .. because you say so ?? .. this is a forum dedicated to programming and Xcode is a programming tool. And not something from the operating system.

What if xcode is used, but this problem is driving me crazy. Please, if you are not going to help, you better not say anything. Thank you !!


It's off-topic because the guidelines that were setup by the forum creators make them off-topic. These forums are for discussions about the open-source Swift language and support infrastructure that should be applicable to all platforms, Darwin, Linux, Windows, zOS, etc.. When these forums were setup, the forum creators noted that there are plenty of resources available for Apple-specific frameworks, tools, and other infrastructure, and, because they did not want these discussions to devolve into Apple-only discussions, it was decided to discourage discussions of Apple-specific technologies and try to refer questioners elsewhere for answers. Note that Apple-private frameworks include SwiftUI and Combine, for which it seems more latitude is being given.


I'd guess that many devs who do not complain are working on pure-swift project with relatively small codebase. And on the other hand, many devs working on big projects with huge codebases, that combine swift and obj-c, include plenty of external dependencies, etc, do experience issues that make them almost unproductive (and this is for projects that are completely fine under Xcode 8!).


Well, I am a developer who's working on a pure Swift pet project with a relatively small codebase in the spare time, and I am experiencing all of the issues that you mentioned. Hence, I am not even using pods. To be more productive, I had to switch to the AppCode to edit the code and to use Xcode purely for debugging and interface building.


Unfortunately, High Sierra has many problems. Tthe Spotlight API devlivers uncomplete results and the Social API is not working any more. So we have to find workarounds for our previously working app.


I feel the same. The deterioration is a result of the yearly release software cycle which Apple self-imposed a couple of years ago. Given that the system will continue to increase their complexity year-over-year (and thanks to the completely unnecessary invention of yet another language, but don't get me started on that), I'm pretty sure that things will continue to go downhill.


You can actually try to dig into the segfault log after failed compilation (e.g. after making a typo in swift code). There should be a common place listed there at the end, where you should look for unconventional things, for example:


Probably it might help to someone: when XCode freezes on compilation or during some other activities - you can try to kill SourceKitService process and then Xcode become responsive again. Saves me hours of debugging.


I wanted to see how Apple handles popovers on iPad when orientation changes. It took a bit to find one but if you open a simple Notes app on iPad, press on one of the top buttons that opens a popup and then rotate device you will see that it is not handled at all, it is bugged, it changes position and becomes a mess! Then their weather app keeps acting off, you need to kill it and relaunch it sometimes to actually see any data. The mailing apps are a joke (on OSX I need to restart if from time to time even)... Even as I am writing this sometimes the position where I am writing jumps back up somewhere in the middle of the text! Wow Apple, this is unbelievable!


Anyway, Xcode is the champion of them all. I have been a professional iOS developer for 8+ years now and have seen quite a few things. I think most issues came to Xcode with introduction to Swift and even now the Objective-C projects work extremely well (I still have a few that need support). There is no excuse like "it works for some", I do not believe it! I have a company here with multiple developers on different computers, different projects, settings, requirements...


Next to that I know loads of people from different companies, different locations around the world and I have failed to find one single person who is experiencing no issues with Xcode 9. I do admit that projects that have less dependencies like cocapods work better and Objective-C projects have great benefits. Stiall thias ias nao excuase faor creaating suach catastraophic IDaE.


- It fails to build for any stupid reason (file size zero) and even worse it does not indicate it. It sometimes just start rebuilding and I am waiting for the app to start on my device while the prosess has stopped quite some time ago.


- Migration from 2 to 3 was not really much of a Swift change then it was a change in the standard library interfaces. The method names have changed and that is why we spent in average 2 days per project for migration!?


- We got new class like String which lost loads of functionality that is still in NSString. But wait, NSString tools still return String instead of NSString so we need to do like ((("name.txt" as NSString).deletingPathExtension as NSString).appendingPathComponent("addedName") as NSString).appendingPathExtension(".dat").


Reading all these posts was very sad, but also at the same time so helpful. I was so sure it was my old Macbook Air and it only having 4 gigs of memory, and that was why XCode was running so poorly, as it uses so much memory and the system was building up rather large paging files to try to deal with it. However, I can confirm, that 2 brand new $2000 Mabook Pros with 16 gigs of memory have been running their fans pretty much non stop trying to keep XCode moving along. As soon as I quit XCode everything is back to normal again. If I have an error that is left unfixed as I am completing typing some code out, the memory issue gets even worse, and things begin to hang up and load slower and slower. I do have a big project, but it should not be bringing a brand new $2000 machine that I could barely afford to purchase, to it's knees on an hourly basis. I use CocoaPods a lot and can't even beging to explain what a pain in the **** issues with pods have been, as with every version of XCode I see more and more issues with Pod files I'm using, which leave me the option of adding them to my project manually or removing them. At least if I add them to my project manually I can update the code Apple claims needs to be updated. I have reguarly updated the pod file to make sure Im using the newest versions too. I really think the main issue I am having though, is with IBDesignables demanding a tons of resources from the storyboard to render just for design purposes. There is zero errors and warings in any of my IBdesignables, so not sure why that would be. If my iPhone runs the app that this code generates with zero probelmes and all my pods and IBdesignables work as expected, why the **** is the same project bringing my less than one month old, brand spankin new MacBook Pro to its kees, because XCode has memory issues and it's getting outrageouly bad. I love the new simulator look, but besides that, everythig else is worse, and it uses tons of of resources. What I mean by that is, with nothing else open, besides the HomeKit Simulator and Regular iPhone 7 Simulator, XCode should never be taking up 8-10 gigs or more of memory, I dont care what I have open in XCode. How much memory does it take to run the app on my iPhone, oh ya, not even close to that much?? Apple needs to fix XCode obviously!!!!!!! Also, change the device requirements for XCode to be a 16 gig machine at this point, unless you can actually get XCode running well on 4 gigs of memory, which nothing thus far makes me believe you can, because a 4 gig Macbook Anything, will have to create such a huge paging file in this scenario, that nothing else functions correctly. This is really getting embarrasing at this point. How is a kid for example, without a brand new expensive Mac, ever going to be able to learn to code, when he has to worry about XCode crashing or hanging up the machine so bad, it has to be force quit almost DAILY???????????????????????????????????? Also, seeing as much of coding requires Internet research during the process, this is a great time to mention the memory management issue Safari has with YouTube. If left open for long enough YouTube often causes isses in Safari with memory, so trying to watch YouTube videos on a coding topic I'm researching, is getting increasingly more difficult, the worse Apple lets XCode get here. I thought with a brand new machine it would be a lot better, but only a little, and most deifnitely not $2000 better!!!!!!! I have debated downloading the developer beta of XCode 9.1 beta 2, as it's really that bad, but they have never been any better in the past, so I'm probably going to wait for the next public update. Come on guys. Get it together please!!!!

3a8082e126
Reply all
Reply to author
Forward
0 new messages