Build, test, and submit your app using Xcode, Apple's integrated development environment.

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Seeking advice on building a multiplatform PDF viewer app
Hi everyone, I’m planning to develop a cross-platform PDF viewer app for iOS and macOS that will read PDFs from local storage and cloud services (Google Drive, iCloud, WorkDrive, etc.). The app should be read-only and display both the PDF content and its metadata (author, title, creation date, etc.). Key Features: View PDFs: Local and remote (cloud storage integration). Display metadata: Title, author, page count, etc. Cloud integration: Google Drive, iCloud, Zoho WorkDrive, etc. Read-only mode: No editing features, just viewing. Questions: Xcode Template: Should I use the Document App or Generic App template for this? PDF Metadata: Any built-in libraries for extracting PDF metadata in a read-only app? Performance: Any advice or documentation on handling large PDFs or cloud fetching efficiently? Thanks in advance for any advice or resources!
0
0
84
6d
Debug Memory Graph does not show memory leaks.
Here is a modified code from the documentation example https://www.swift.org/documentation/server/guides/memory-leaks-and-usage.html#troubleshooting : class ViewController: UIViewController { var closure: () -> Void = { () } public func doNothing() {} public func doSomethingThatLeaks() { self.closure = { // This will leak as it'll create a permanent reference cycle: // // self -> self.closure -> self self.doNothing() } } override func viewDidLoad() { super.viewDidLoad() // Memory leak example: doSomethingThatLeaks() // Abandoned memory example: // NotificationCenter.default.addObserver(forName: .init("Abandoned"), object: nil, queue: nil) { _ in // print("\(self)") // } } deinit { print(#function, Self.self) } } If you place it, for example, in a navigation controller, do a push-pop several times, deinit will not be printed. But if you look in the Debug Memory Graph, it will not even show that there is a strong reference to this controller: Only if you manually select: You can see that it is held by the closure context, which it holds: This is definitely not abandoned memory (like the commented piece of the code example), but it is not shown either in the Debug Memory Graph or in Instruments Leaks. Why?
0
0
75
3d
error: type for self cannot be reconstructed: type for typename
Hi, i have met error below when i tried to po one attributes of an instance in my Xcode lldb: error: type for self cannot be reconstructed: type for typename "$xxxxx" was not found (cached) error: Couldn't realize Swift AST type of self. Hint: using `v` to directly inspect variables and fields may still work. Is there anybody met the same error before? I urgently want to know why this happen and how to fix this issue. My macOS Version is Sequoia v15.0.1, Xcode16.0. This problem showed after i upgraded my macOS and Xcode version.
9
21
1.1k
Oct ’24
App will not install on Apple Watch 8
Xcode 15.2 will not assign a UDID Identifier to my watch Apple 8 (ver. 10.2), therefore I do not see that Watch on my Dev account list of devises. When I build my App it will work fine on my iPhone 14 and it will show on the Available Watch App list on the phone and even (although shaded) on the Watch's Apps list itself, but it will not install and when I try to install I get this message: "This App could not be installed at this time". I know of many others that have the same problem. We have tried many ways to solve this problem, but without any success. It seems like Xcode 15 does not see the Watch. In fact when I click on the "Window-Devises" of Xcode I can see the iPhone and its identifier UDID, but it doesn't show the Watch although it is properly paired. Also, please note that the App will Install and Works perfectly fine in my old Watch 4 ( 10.2). However this particular Watch is present on the list of my DEV Account Devises as it was entered there by an earlier version of Xcode some two years ago. So it would appear that two versions of Xcode 15.x are a culprit in creating this problem. Any feedback or a solution to this problem would be greatly appreciated by many. Thank you
1
1
294
Jan ’24
App alternative icon not working when archieve.
I add the following info in the build settings of my app. Then I also add the icon to my asset. I build the app, it works normally, but I notice that when I changed the icon to 'AppIcon-Defaults', The icon change alert didn't appear. but it succeeds . I uploaded the archive to App Store I got: ITMS-90895: Missing Icon - The Info.plist key CFBundleIcons.CFBundleAlternateIcons contains an entry “AppIcon-Defaults” that references asset “AppIcon-Defaults.” No such asset is present in the asset catalog. Then I use xcrun --sdk iphoneos assetutil --info Assets.car to check the assets inside the archieved app, It have the asset.
1
0
107
4d
SwiftData/ModelCoders.swift:1762: Fatal error: Passed nil for a non-optional keypath
I updated today at Xcode 16 beta 6, and my app using SwiftData on iOS 18 (beta 6) is getting now this new error when saving the model in the modelContext. I don't understand if it is a regression introduced in the beta 6 or if it is enforced something that previously wasn't. It seems to be always referred to the ID property, for example: SwiftData/ModelCoders.swift:1762: Fatal error: Passed nil for a non-optional keypath \MyModel.id In this case (and in most of the cases in my models) the ID is defined as following @Attribute(.unique) public var id: UUID I also tried to add the initialization inline, but didn't help @Attribute(.unique) public var id: UUID = .init() I also tried to remove the @Attribute(.unique), didn't help as well. Does any of you have the same issue?
6
3
738
Aug ’24
Persistent Xcode validation errors
We recently updated the codebase of our existing iOS application to improve compatibility with the latest versions of iOS. For several months, our attempts to deploy the updated application to TestFlight for testing and validation have consistently failed due to four recurring Xcode validation errors. Please see the attached document "X-Code Validation Errors.txt" for details on these errors. <see: XCode Validation Errors (forum).txt> Our application is developed using Visual Studio 2022 for PC with the .NET MAUI framework, as Microsoft no longer supports Visual Studio for Mac. After a successful build and testing using a virtual iPhone interface, Visual Studio connects remotely to the MacBook (Mac OS 15.1) sending the necessary project files that automatically triggers the Xcode (16.1) validation to begin. We have made numerous edits to both the plist.info and the project file in an attempt to resolve the validation errors with little to no success. We are confident that is a configuration mismatch between what the plist says and the structure of the project itself. We are hoping that someone here in the developer group has some answers for us. Our team is relatively new iOS development and have spent hours trying to resolve this issue. What are we doing wrong and what specifically do we need to change to correct these errors so that we can finally get this project into TestFlight? I have attached copies of our plist.info, project structure, and error messages. Please help XCode Validation Errors (forum).txt Info.plist
2
0
110
4d
ERROR: "Failed to build the scheme (APP NAME)"
Hello, I'm kinda new to Xcode and I was trying to get back to programming while I follow a course. There seemed to be a problem with the preview and it looks like there was nothing wrong with the code, at least from what I know. I can say this because the code is the default one that Xcode gives you when you start a new project. here is the error log. == PREVIEW UPDATE ERROR: SchemeBuildError: Failed to build the scheme “App” linker command failed with exit code 1 (use -v to see invocation) Link App.debug.dylib (arm64): Undefined symbols for architecture arm64: "_main", referenced from: ___debug_main_executable_dylib_entry_point in command-line-aliases-file ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) == PREVIEW UPDATE ERROR: SchemeBuildError: Failed to build the scheme “App” linker command failed with exit code 1 (use -v to see invocation) Link App.debug.dylib (arm64): Undefined symbols for architecture arm64: "_main", referenced from: ___debug_main_executable_dylib_entry_point in command-line-aliases-file ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
1
0
119
5d
Unable to build complex Mac app project with 8 targets since upgrading to Mac OS Sequoia
I have a complex project that used to compile without any problems that i could not solve before I bought a new iMac (the latest, M4), which came with macOS Sequoia. I've ben able to compile the whole project since 1998, which has evolved into an AppKit Mac app written almost completely in Swift. I am also able to compile this project on Xcode 16.1 on MacOS Sonoma. However, since I upgraded to MacOS Sequoia, I am stumped with lots of errors that I don't know how to fix. Many of them are related to new build system, which works fine in smaller projects I have written, but it completely breaks when I use this more complex project. I've been unable to create a focused project so I can file a DTS incident, because when I try to recreate it in a new, more focused project, the problem goes away. I tried to transfer the code to a freshly created project, and I was able to make it build again without errors, but then this new project just creates empty bundles without any resources and executables in them. In almost 25 years of experience in coding, I've never encountered such huge problems with just a MacOS upgrade. I would like to have some guidance on how to proceed. Here is an example of the errors I'm getting: error: unable to write file '/SchIS64.build/Objects-normal/arm64/SchIS64.LinkFileList': fopen(/SchIS64.build/Objects-normal/arm64/SchIS64.LinkFileList, wb): No such file or directory (2) (in target 'SchIS64' from project 'Scheduler (Cocoa)') WriteAuxiliaryFile /SchIS64.build/unextended-module.modulemap (in target 'SchIS64' from project 'Scheduler (Cocoa)') cd /Users/admin/Documents/Development/Scheduler/Scheduler write-file /SchIS64.build/unextended-module.modulemap WriteAuxiliaryFile /SchIS64.build/unextended-module-overlay.yaml (in target 'SchIS64' from project 'Scheduler (Cocoa)') cd /Users/admin/Documents/Development/Scheduler/Scheduler write-file /SchIS64.build/unextended-module-overlay.yaml WriteAuxiliaryFile /SchIS64.build/SchIS64.hmap (in target 'SchIS64' from project 'Scheduler (Cocoa)') cd /Users/admin/Documents/Development/Scheduler/Scheduler write-file /SchIS64.build/SchIS64.hmap
3
0
134
1w
Run identical UI/Unit tests on different build targets
I have different versions of my iOS App (written in SwiftUI). The app on the store, the App Clip, and one or two next version apps not yet released (e.g. A/B comparison). All good. But now I've started creating UI and Unit tests and I'm confused about how to get this working. Each build target has its own scheme. And in that scheme I have a Test plan for that target. E.g. The App Clip scheme has an App Clip test plan. Since all the app variants are very similar, I only have one set of unit tests and one set of UI tests so each test plan includes the same unit test target and the UI test target. Problem: When I selected a scheme (e.g. for the App Clip) and ran the tests, it turned out that all the tests ran for another build target, not the target of the scheme. I think this might be because within the definition of the test target there's a field specifying the host application. I.e. the build target. Question: How can I set up my project so that the test plan uses the relevant target build? Or do I have to duplicate all the test targets (one for each target)? Or do I have to manually change each test target before running it for a particular build target?
1
0
117
1w
dyld: Symbol not found: swift34swift50override_conformsToProtocol
I am getting following error from one of the pod frameworks while running the app (Build is a success). dyld: Symbol not found: __ZN5swift34swift50override_conformsToProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEPFPKNS_18TargetWitnessTableIS1_EES4_S8_E. Referenced from: X framework Expected in: frameworks/DeviceKit.framework/DeviceKit mac OS 10.15 Xcode 12.4 React native 0.63 cocoapods: 1.10.1
9
2
14k
Aug ’21
compilation error in CoreFoundation - visionos
when trying to build wireshark I'm getting the following, any idea how to solve it? [ 13%] Building C object wsutil/CMakeFiles/wsutil.dir/os_version_info.c.o In file included from wireshark/wsutil/os_version_info.c:23: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:54: /Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:676:195: error: expected ',' 676 | void *CFAllocatorAllocateTyped(CFAllocatorRef allocator, CFIndex size, CFAllocatorTypeID descriptor, CFOptionFlags hint) API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0)); | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:679:211: error: expected ',' 679 | void *CFAllocatorReallocateTyped(CFAllocatorRef allocator, void *ptr, CFIndex newsize, CFAllocatorTypeID descriptor, CFOptionFlags hint) API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0)); | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:682:165: error: expected ',' 682 | void *CFAllocatorAllocateBytes(CFAllocatorRef allocator, CFIndex size, CFOptionFlags hint) API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0)); | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:685:181: error: expected ',' 685 | void *CFAllocatorReallocateBytes(CFAllocatorRef allocator, void *ptr, CFIndex newsize, CFOptionFlags hint) API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0)); | ^ In file included from wireshark/wsutil/os_version_info.c:23: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:73: /Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumberFormatter.h:144:147: error: expected ',' 144 | CF_EXPORT const CFNumberFormatterKey kCFNumberFormatterMinGroupingDigits API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0)); // CFNumber | ^ 5 errors generated. make[2]: *** [wsutil/CMakeFiles/wsutil.dir/os_version_info.c.o] Error 1 make[1]: *** [wsutil/CMakeFiles/wsutil.dir/all] Error 2 make: *** [all] Error 2
1
0
100
6d
NSMuatableAttributedString's appendString method only exist in iPhone-device build in iOS18, and not exist in Simulator-build
I have defined a method appendString method in a NSMuatableAttributedString category like this: @implementation NSMutableAttributedString (HTML) // appends a plain string extending the attributes at this position - (void)appendString:(NSString *)string { NSParameterAssert(string); NSUInteger length = [self length]; ... And this method is worked well in iOS17 and before . But when it cames iOS18 . this appendString will not be called. So I doubt maybe there is a system-defined appendString already. So I write a demo in empty project to print all the NSMuatableAttributedString method in iOS18 like these: @interface ViewController () @end @implementation ViewController void printNSStringCategories() { unsigned int count; Class nsStringClass = [NSMutableAttributedString class]; // 获取所有的方法 Method *methods = class_copyMethodList(nsStringClass, &count); for (unsigned int i = 0; i < count; i++) { SEL selector = method_getName(methods[i]); NSString *methodName = NSStringFromSelector(selector); NSLog(@"NSMutableAttributedString method: %@", methodName); } free(methods); } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. printNSStringCategories(); } And test it in my iPhone (iOS18.2) , the log will printed NSMutableAttributedString method: appendString:withAttributes: NSMutableAttributedString method: cr_appendStorage:fromRange: NSMutableAttributedString method: cr_appendString: NSMutableAttributedString method: appendString:withAttributes: NSMutableAttributedString method: appendString: So it seems a appendString: is aleady defined in system SDK . But the weird thing is when I run this code in the Xcode simulator (iOS18.1) this appendString: will not print . 1 Is it a bug of SDK ? because the appendString: only exist in device-build , and not exist in simulator-build? two more furthur question: 2.1 if the SDK contains appendString: already , why the appendString: defined in my category not cause the duplicate symbol error when compile 2.2 As the question 2.1 said , there maybe same symbols in runtime . Is there any way to find the framework/library which defined those same-name symbols ? (e.g: there are two appendString:withAttributes: in the log , I want to find the two places define each appendString:withAttributes: exactly)
1
0
127
6d
Xcode Install: Predictive Code Completion Model Failed
Does anyone know a workaround for this issue during downloads? Predictive Code Completion Model Failed -- There was an error processing the asset. I have tried installing the latest Xcode 16.1 and 16.2beta2, and both fail the same way. It has not been resolved for 2 days, so I don't think it is temporary server issue. I also tried 2 different network providers and a hotspot as related posts with different details mentioned. Details: The operation couldn’t be completed. (IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $13003dd20).DownloadError error 3.) The operation couldn’t be completed. (IDELanguageModelKit.IDEModelDownloadAdapter.(unknown context at $1101b5d90).DownloadError error 3.) FB15799470 FB15801257
3
0
164
6d
Xcode16 missing dSYM in Firebase
The problem is that when building the application with Debug mode on Xcode 16.1, the dSYM files fail to upload to Crashlytics. It worked in latest Xcode 15 version. The workaround is to disable Debug Dylib Support in the target's Build Settings. However, this causes SwiftUI previews to stop working. Reproducing the issue Set ENABLE_DEBUG_DYLIB=YES for build options Build the application in Xcode 16.1 Firebase SDK Version 11.4.0 Xcode Version 16.1 Installation Method Swift Package Manager Firebase Version 11.5.0 Relevant Log Output warning: (arm64) /Users/dustin/Library/Developer/Xcode/DerivedData/MyAppName-cicejndcecececfe/Build/Products/Debug-iphonesimulator/MyAppName.app/ MyAppName empty dSYM file detected, dSYM was created with an executable with no debug info. The warning seems like is from XCode/lldb compiler rather than Crashlytics (https://lldb.llvm.org/cpp_reference/SymbolFileDWARF_8cpp_source.html line655). This is probably something on Apple side, Crashlytics only consumes dSYM which is generated from Xcode. (ref:https://github.com/firebase/firebase-ios-sdk/issues/14054#issuecomment-2477235548) This is related to: Firebase Issue
0
2
259
6d
dyld[1472]: Symbol not found:
dyld[1472]: Symbol not found: __ZN5swift34swift50override_conformsToProtocolEPKNS_14TargetMetadataINS_9InProcessEEEPKNS_24TargetProtocolDescriptorIS1_EEPFPKNS_18TargetWitnessTableIS1_EES4_S8_E Referenced from: <821B1759-9915-33D1-B140-D718775DFA97> /private/var/containers/Bundle/Application/EE9AE8CE-9635-4A97-AFC2-F577B888FA5A/FoxyApp.app/Frameworks/PayUUPICoreKit.framework/PayUUPICoreKit Expected in: <7D840427-6CBD-37E8-8C87-3445FFF34AE7> /private/var/containers/Bundle/Application/EE9AE8CE-9635-4A97-AFC2-F577B888FA5A/FoxyApp.app/Frameworks/Starscream.framework/Starscream app is installed on mobile but it crashes when i try to open it
0
0
56
1w
Using a Sysdiagnose Log to Debug a Hard-to-Reproduce Problem
I regularly talk to developers debugging hard-to-reproduce problems. I have some general advice on that topic. I’ve posted this to DevForums before, and also sent similar info to folks who’ve opened a DTS incident, but I figured I should write it down properly. If you have questions or comments, put them in a new thread here on DevForums. Put it in the Developer Tools & Services > General topic area and tag it with Debugging. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@" + "apple.com" Using a Sysdiagnose Log to Debug a Hard-to-Reproduce Problem Some problems are hard to reproduce in your office. These usually fall into one of two categories: Environment specific — This is where some of your users can easily reproduce the problem, but you can’t reproduce it in your environment. Intermittent — In this case the problem could affect any user, but it’s hard to predict when a given user will see the problem. A key tool in debugging such problems is the sysdiagnose log. This post explains how to make this technology work for you. IMPORTANT A sysdiagnose log might contain private information. If you ask a user to send you a log, make sure they understand the privacy impact of that. If you want to see how Apple handles this, run the sysdiagnose command on a fresh Mac and read through it’s initial prompt. Sysdiagnose Logs All Apple platforms can generate sysdiagnose logs. For instructions on how to do this, see our Bug Reporting > Profiles and Logs page. The resulting log is a .tar.gz file. Unpacking that reveals a bunch of files. The most critical of these is system_logs.logarchive, which is a snapshot of the system log. For more information about the system log, including links to the documentation, see Your Friend the System Log. This log snapshot includes many thousands of log entries (I just took a log snapshot on my Mac and it had 22.8 million log entries!). That can be rather daunting. To avoid chasing your tail, it pays to do some preparation. Preparation The goal here is to create a set of instructions that you can give to your user to capture an actionable sysdiagnose log. That takes some preparation. To help orient yourself in the log, add log points to your code to highlight the problem. For example, if you’re trying to track down a keychain problem where SecItemCopyMatching intermittently fails with errSecMissingEntitlement ( -34018 ), add a log point like this: import os.log let log = Logger(subsystem: "com.example.waffle-varnish", category: "keychain") func … { let err = SecItemCopyMatching(…) log.log("SecItemCopyMatching failed, err: \(err)") } When you look through a log, find this specific failure by searching for SecItemCopyMatching failed, err: -34018. You might also add log points at the start and end of an operation, which helps establish a time range of interest. Log points like this have a very low overhead and it’s fine to leave them enabled in your released product. However, in some cases you might want to make more extensive changes, creating a debug build specifically to help investigate your problem. Think about how you’re going to get that debug build to the affected users. You might, for example, set up a special TestFlight group for folks who’ve encountered this issue. Go to Bug Reporting > Profiles and Logs and look for debug profiles that might help your investigation. For example, if you’re investigating a Network Extension issue, the VPN (Network Extension) debug profile will enable useful debug logging. Now craft your instructions for your user. Include things like: Your take on the privacy impact on this Instructions on how to get the necessary build of your product If there’s a debug profile, instructions on how to install that Instructions on how to trigger the sysdiagnose log And on how to send it to you IMPORTANT Make sure to stress how important it is that the user triggers the sysdiagnose immediately after seeing the problem. Finally, test your steps. Do an initial test in your office, to make sure that the log captures the info you need. Then do an end-to-end test with someone who’s about as technically savvy as your users, to make sure that your instructions make sense to Real People™. Prompting for a Sysdiagnose Log In some cases it might not be obvious to the user when to trigger a sysdiagnose log. Imagine you’re hunting the above-mentioned errSecMissingEntitlement error and it only crops up when your product is performing some task in the background. The user doesn’t see that failure, they’re not even running your app!, so they don’t know that action is required. A good option here is to add code to actively monitor for the failure and post a local notification requesting that the user trigger a sysdiagnose log. Continuing the above example, you might write code like this: func … { let err = SecItemCopyMatching(…) log.log("SecItemCopyMatching failed, err: \(err)") if err == errSecMissingEntitlement { … post a local notification … } } Obviously this is quite intrusive so, depending on the market for your product, you might not want to deploy this to all users. Perhaps you can restrict it to your internal testers, or your external beta testers, or a particularly savvy set of customers. You can use the applefeedback URL scheme to make it easy for users to run Feedback Assistant. For more info about that, see Developer > Bug Reporting. Looking at the System Log Once you have your sysdiagnose log, unpack it and open the system log snapshot (system_logs.logarchive) in Console. The hardest part is knowing where to start. That’s why adding your own log entries, as discussed in Preparation, is so important. A good general process is: Search for log entries from your subsystem. An easy way to initiate that search is to paste the text subsystem:SSS, where SSS is your subsystem, into the Search field. Continuing the above example, find that log entry by pasting in subsystem:com.example.waffle-varnish. Identify the log entry that indicates the problem and select it. Then remove your search and work backwards through the log looking for system log entries related to your issue. The relevant log entries might not be within the time range shown by Console. Customise that by selecting values from the Showing popup in the pane divider. Once you have a rough idea of the timeframe involved, select Custom from that popup to focus on that range. If the log is showing stuff that’s not relevant to your problem, Console has some great facilities for filtering those out. For the details, choose Help > Console Help. Talk to Apple A key benefit of this approach is that, if your investigation suggests that this is a system bug, you can file a bug report and attach this sysdiagnose log to it. The setup described above is exactly the sort of info needed to analyse the bug. Likewise, if you start a thread here on DevForums about your issue, your friendly neighbourhood DTS engineer will find that sysdiagnose log very handy. Revision History 2024-11-14 Added a reference to the applefeedback URL scheme. Made other minor editorial changes. 2023-10-13 First posted.
0
0
1.9k
Oct ’23
Xcode simulator & preview not loading
Hello, I recently decided to start learning how to code for iOS. I don't have much coding experience but I still wanted to explore it for fun at least. I downloaded Xcode on my Macbook, and opened a new iOS file after downloading iOS 18.1 so I could run the simulator/get a preview of my code. Even though I only had the basic "Hello World!" that is auto-generated in my code, the preview would never show and sat at a loading screen for multiple hours, saying "Preparing (Automatic) iPhone Simulator" at the top. There is probably a simple solution that I'm missing. I would appreciate any tips! Thanks.
1
0
112
1w
Download & replace app container
I used to download and replace the app container when I was testing, essentially downloading the container from the live app, and restoring it into the test app in order to not affect the live app, but to test major changes on "live" data. it seems the option for downloading and replacing in Xcode no longer works, I will sometimes get a container downloaded, other times it only part downloads. I can never seem to get it to replace. No errors, but it doesn't work on the new device. It used to be that devices & simulators showed when it was downloading and replacing but it no longer does that. Is there another way of doing this? Currently I'm having to take a backup of the live phone, restore on the test device, then delete all the unneeded apps, otherwise the restore takes ages, then backup the test device and restore every time I need to restart.
0
1
92
1w
Xcode 16 project build malfunction
I have one project, it has one Swift (AppKit) App and one C++ dylib project, I don't have problem in build the dylib, but when build the UI App, there will be an error: "ld: multiple errors: file cannot be open()ed, errno=2 path=/Users/steventang/Library/Developer/Xcode/DerivedData/doodle-girdwlxpmnbetjdldjvdgddoetub/Build/Intermediates.noindex/doodle.build/Debug/doodle.build/Objects-normal/arm64/AppDelegate.o in '/Users/steventang/Library/Developer/Xcode/DerivedData/doodle-girdwlxpmnbetjdldjvdgddoetub/Build/Intermediates.noindex/doodle.build/Debug/doodle.build/Objects-normal/arm64/AppDelegate.o'; file cannot be open()ed, errno=2 path=/Users/steventang/Library/Developer/Xcode/DerivedData/doodle-girdwlxpmnbetjdldjvdgddoetub/Build/Intermediates.noindex/doodle.build/Debug/doodle.build/Objects-normal/arm64/ViewController.o in '/Users/steventang/Library/Developer/Xcode/DerivedData/doodle-girdwlxpmnbetjdldjvdgddoetub/Build/Intermediates.noindex/doodle.build/Debug/doodle.build/Objects-normal/arm64/ViewController.o'; file cannot be open()ed, errno=2 path=/Users/steventang/Library/Developer/Xcode/DerivedData/doodle-girdwlxpmnbetjdldjvdgddoetub/Build/Intermediates.noindex/doodle.build/Debug/doodle.build/Objects-normal/arm64/GeneratedAssetSymbols.o in '/Users/steventang/Library/Developer/Xcode/DerivedData/doodle-girdwlxpmnbetjdldjvdgddoetub/Build/Intermediates.noindex/doodle.build/Debug/doodle.build/Objects-normal/arm64/GeneratedAssetSymbols.o' clang++: error: linker command failed with exit code 1 (use -v to see invocation)" Clean project folder and rebuild - it won't fix I tried remove the two Swift files and added it again- it won't fix Delete DerivedData folder - it won't fix I upgraded to Xcode 16.1 - also tried above, it won't fix BUT: the project doesn't have any problem when build with Xcode 15
2
0
147
1w