Xcode 13 auto building problem (indexing) - swift

I'm using Xcode 13 and I didn't have such problems in Xcode 12 now I don't know what to do. I get built automatically my app after the slightest change (Even one space).
If I leave even a space, it is constantly trying to build. I can't write code anymore.

Related

Flutter huge app size in iOS compared with React Native original

I've recreated a simple app that was originally made in React Native with 5MB file size on the app store. The app has no images or anything of any particular size, but it does use Admob ads.
After uploading it to the app store the build is showing as 35MB...not sure what the reason is but it when opening the package contents of the build archive it seems that a bunch of dylib files in SwiftSupport/iphoneos are created that are very large. that's the biggest folder in the archive anyway. I think it has to do with the Pods folder created in order to use Admob.
I'm guessing it can never be as small as the React Native original app but surely it should not be seven times the size...is there some way to remove the SwiftSupport files or another way to shrink it?
EDIT: Also in the Runner project folder in the build archive in Frameworks there are loads of Swift dylib files in there too that are large. Really all the space is being taken up by these Swift support dylib files...
Just built the app for Android and it's 8.33MB so quite a difference there, even though both versions of course use Admob.
This isn't really related to Flutter. Every iOS app containing code that wants to support iOS 11 and lower, needs to contain additional flutter libraries.
You can disable this in Xcode by setting "Always Embed Swift Standard Libraries" to false, and raising the deployment target to iOS 12.
Example of my flutter app with respect to different deployment targets. There is no change in build setting but deployment target only. iOS 13 does not include swift libraries with the build.
iOS version -> App build size
10 -> 127.8 MB
11 -> 127.8 MB
12 -> 90.9 MB
13 -> 49.6 MB
I have two sources: first [1] is titled 'Flutter vs Swift' and second [2] 'How to enable swift support for existing project in flutter'. Reading the both we observe flutter and swift do not have to co-exist and observing the latter we can see how it is enabled with a flag when creating the IOS package. I would first check that IOS folder is created without swift reference.
Third link [3] shows that Admob usage can be done in dart only.
About size, I am not sure though if using dart and disabling Swift would 100% make the trick. Flutter vs Swift link [1] has a native Swift app and 'comparison' equal Flutter app and conclusion was the size of flutter app was doubled about that of Swift app. And sizes where around 20 and 50 MB respectively, Flutter being the biggest.
Edit
It shows up the Swift is part of the plugin / module you use and thus cannot be easily just removed. About the size, Flutter app is normally already bigger than app with Swift and now the solution combines the both. Rise in size is as espected.
[1] https://blog.codemagic.io/flutter-vs-swift/
[2] How to enable Swift support for existing project in flutter
[3] https://flutterawesome.com/easily-implement-ads-into-a-flutter-app/

QuickLook framework not working properly in iOS 10 (with Xcode 8.0 beta 3) to display .csv file

I have developed and updated a medical application for cardiac ultrasound since 2011. One feature of the app is a user-generated document library for documents, images, and movies, all displayed using QuickLook.framework. QuickLook has functioned well until now with iOS 10. At this point .csv files (generated by the app to store calculated data) display as simple text (including the commas) instead of as a spreadsheet. I have not found any Apple documentation to explain this change in behavior. The log in Xcode shows no error messages when displaying a .csv file.
I am using the iOS Simulator at this point to test my app with iOS 10. However, I have verified that the El Capitan (10.11.5) version of QuickLook opens a .csv file in the simulator library on the desktop without a problem, with the expected spreadsheet format. Therefore, I do not suspect any problem with the .csv files that my app is producing.
I suspect this problem with .csv display is a bug in iOS 10, but with no resolution after 3 beta releases, I am concerned that the problem persists. Any help would be much-appreciated. My hope is that there will not be a need to adopt a new document display method, since QuickLook has worked so well for several years now.
Of note, my app does not use any Swift code.
iOS 10 is still in beta and will be in beta until at least the second half of September.
One of the main advices there is while testing beta software is to test it on the real device with something like iOS 10 Public Beta build installed.
If you are 100% positive that this is a consistent, well repeatable bug on Apple's side (not on your own or any other 3rd-party library you might use) consider filing a radar.
Concerning your specific problem, as far to my knowledge, Apple didn't make any significant changes to the QuickLook functionality in iOS 10, but once again, you can prove me wrong, by carefully browsing through all the latest changes in the official iOS 10 changelog.

upgrading to iOS 7 and Xcode 5 - having issues with UIAccelerator, UIStringDrawing and NSObject

I updated my iPad to iOS 7, and discovered that the Enterprise app that I have been working on for over a year crashes. OK, no problem, I'll see where in Xcode it's crashing.
OK, Problem: I have to upgrade to Xcode 5 to debug iOS 7. OK, no problem, I'll upgrade to Xcode 5.
OK, Problem: The source code in Xcode 5 now shows 19 errors: One in NSObject.h, three in UIStringDrawing.h, and the rest in UIAccelerometer.h.
And, for a bonus, it adds one at the bottom, "Too many errors emitted, stopping now." Which is not all that comforting.
I've really scoured the internet for answers, but I must be using the wrong search terms because I am finding nothing that addresses this. Surely I am not the only one.
I have been developing iOS apps for almost two years now, I think, but I am still pretty stupid when it comes down to the nitty-gritty stuff. I usually just hit "Run" and hope it works. So far that has been a pretty effective strategy, but now I am stumped.
Can anyone tell me what I am doing wrong? Except the obvious, being that I should have left everything well enough alone.
I will also have to update my previous app, because it has iOS 7 issues too, but it scares me to even think of it.
I appreciate any help anyone can give.
I found the answer here: http://blog.spacemanlabs.com/2013/09/how-to-support-old-ios-sdks-in-xcode-5/#comment-1056917662
After figuring out how to do all this, the app showed a couple more errors unrelated to the original problem. Turns out I had a couple of XIBs set for Autolayout. Those being disabled, the app worked great on my iOS 6 phone with Xcode 5.
Glad you were able to switch back to the iOS 6 SDK. I had the same errors in UIAccelerometer.h and NSObject.h, but wanted to stick with the iOS 7 SDK.
For me, these errors were the result of stray copies of UIKit.framework, Foundation.framework (And a couple of other frameworks) inside my project folder. These were seen by the linker, hence the "duplicate symbol" error messages thrown. As soon as I got rid of the frameworks in the project folder and re-linked to the frameworks in "Build Phases" -> "Link Binary With Libraries," everything built.

Xcode 4.2 not debugging properly

I've imported an iPhone app that I have developed for iOS and am now maintaining it. I've came across a couple of bugs when trying to add to the iPhone's calendar, which I'm happy to try and sort out myself with a bit of debugging.
One problem is that when I go to run the application on the iPhone simulator, it seems to run an older version of the app than the one I am running. I've removed and added another button since then and the old button is still showing when I run it in the simulator. However, when I compile and run this on a device, it loads the correct version and displays the correct version number in the 'about' view.
But... my main problem is that it doesn't seem to debug on the device properly. The app actually works fine except for the calendar problems, but if I put a few breakpoints in so I can see exactly where this is going wrong, it just doesn't seem to step through! The app pauses, and Xcode says the app has paused! I can press step over and continue execution etc and it appears to work, but I can't see it stepping over the code, nor can I hover over variables to see their values.
I've tried reinstalling Xcode multiple times (I did have a problem installing an older version, so I had to wait until the next version was available before Xcode would install).
The stress is: Today is my last day at work, and I'd really like to get this app ready for iOS 5 before I leave.
Has anyone seen these symptoms before? Is there a debug setting that I've missed? Or is it a corrupted installation?
I wish I could help people a bit with more information, but I don't even know where to start looking here. Any code I can post? any settings? (not too familiar with this, I'm a .NET guy usually).
Thanks!
Sorry you're going through a tough moment there Connell; as you said you're not too familiar with all this, I'm laying down a few steps which might help you out. Some are pretty basic, yes, but I've resolved to these steps myself several times when I've encountered similar scenarios;
If you're testing on the simulator, do a 'Reset Content and Settings' from the 'iOS Simulator' main menu. This will remove all old data and settings and give you a clean start.
Do a 'Clean All Targets' from the Build menu. Then go to your physical project folder and delete the Build folder from it altogether before starting to build again.
Restart both XCode and the Simulator (and your Mac too if possible)
Make sure the mode is set to Debug and not Release or Distribution
Even on the device, remove the old app before putting the new one in, and restart it for good measure.
Delete all Provisioning Profiles from the device and install just the one you need.
On the code;
I've noted that the app appears to 'pause' like this a couple of times when I had accidentally created an infinite loop in the code. Double check to see whether there's something which may cause this.
Unless you haven't already done so, throw an NSLog or two in there to see if its really not being executed beyond the breakpoint.
I've had the exact same problem with a project that I started on xcode 3 and then switched to xcode 4. What fixed it for me was changing the compiler in the project settings.
The default compiler up to xcode 3 was gcc, while the default compiler on xcode 4 is LLVM gcc.
Now, I don't know exactly what's the issue that gdb could have with LLVM gcc, but switching the compiler back to gcc in my project settings and doing a clean build fixed my debugging issues.
Might be worth a try.
Have you checked which debugger is being used GDB or LLDB? Select Edit Scheme from the Product menu, and see what the Debugger setting is under the Debug scheme. You could try switching between GDB, LLDB, and None and running in between.

iPhone Dev, 3G Testing Device Launch Failures After App Rename and Upgrade to XCode 4

I have an iPhone app in the app store that I wanted to rename and make universal. I have done all the work for the rename (renamed the PRODUCT_NAME, not the binary identifier) and adding iPad support. Everything was running great on my iPad 2 (4.3.3) and my iPhone 4G (4.3.3). Before I packaged it up, I ran a test on my iPhone 3G (3.0).
I cannot get my app to launch properly on the 3G. When the app launches, the launch screen is displayed as it should be. The screen then goes to black with the status bar on the very top, like it has loaded a black nib or something. There are no error codes whatsoever -- nothing in the console, nothing in a pop up. The application does not even reach the "applicationDidFinishLaunchingWithOptions" method of my appDelegate. The application doesn't crash, either. It just sits there like it's waiting on input from a user, but like I said the application hasn't even finished launching.
The only things that have changed since the last time I tested on the old 3G (which was the last time I updated my app) are the application rename and the upgrade to XCode 4 w/base SDK 4.3.
In my XCode Scheme drop down, it does say: iPhone (3.0, Overriding Base SDK to 4.3). I don't know if that is inadvertently causing this hangup? I am running Xcode 4 with base SDK 4.3. The target deployment is 3.0.
Has anyone encountered anything like this? I would appreciate all insight and advice to the situation. So far I have deleted the application from my device, clean/build Xcode, delete Xcode build folder, delete and reinstall all provisioning profiles, reboot of device and XCode numerous times.
Thanks,
Brandie
As far as I have been able to determine the BEST solution (not the easiest) is to make a new project with the new project name and copy your files. Changing the PRODUCT_NAME gave me wierd results and I said "forget it, let's do it by the book".
If there is an easier solution, I have yet to find it and, frankly, given it takes me about 30 minutes (I've changed the name of an app 4 times - mostly because of name length), it causes me the least amount of grief.