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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

Xcode Version 13.2.1 - install ios 18 and ios 17.5
I created an application in xcode 13, and I need to install it on my iPhone 12 iOS 18. I already went to the Apple Developers website and downloaded the files iOS_17.5_Simulator_Runtime.dmg and also the file iOS_18_beta_Simulator_Runtime.dmg I copied them to the folder on my Mac /Library/Developer/CoreSimulator/Profiles/Runtimes/ And even so, when I opened xcode and went to deployment info, the most recent iOS version is still 15.2 and the last one I downloaded doesn't appear. what should I do ? I preferably want to install iOS 18 beta on my iPhone 12
0
0
40
9h
Xcode 15 build error Info.plist "error: Build input file cannot be found:..."
I've been trying to add an 'Info.plist' file this afternoon and get a recurring error that I haven't seen before. I see a lot of other people have posted similar errors over the time but I con't seen any solutions posted. I'd appreciate anyone reading this giving it a boost to perhaps have an engineer post a solution so others will not waste as much time on this as I have. . Info.plist has the proper path, I do not have a 'script phase' or 'custom build rule', and I don't know what "Did you forget to declare this file as an output of a script phase or custom build rule" means. I've had Info.plists before, I'm just not sure why I'm getting this error or how to bypass it.
1
0
47
11h
App data file not being read in TestFlight
An app I'm developing uses a text data file to access some words. The app runs fine in all simulators and when directly hard-wired from my Mac to my iPhone. When I download it to App Store Connect and run the app in TestFlight the app runs fine except when it tries to access the data file. The error it gives me is that it can't access the same data that I access when running the app in the simulators.
0
0
29
12h
Unable to use SWIFT_EXPLICIT_MODULES
I'm following the guidance from [wwdc24/10171] using Xcode 16 beta 2 on Sonoma (https://developer.apple.com/wwdc24/10171) and find myself unable to active the _EXPERIMENTAL_SWIFT_EXPLICIT_MODULES = YES setting. I tried both in the project file and in the XCConfig file and nothing. After cleaning and building with timing summary, I can't find any "Compiling Swift module" nor any "modules report". I only get multiple statements of "Compiling clang module" and the "GenerateClangModulesReport" What am I doing wrong?
1
0
53
19h
Predictive code completion is not supported in this region
I'm using beta 2 of Xcode 16 on an M1 MacBook with 32 GB of memory, running macOS 15 beta 2. It didn't appear that predictive code completion was working as exhibited in the developer videos, so I tried to figure out what's going on. The Xcode documentation mentions that you can disable predictive code completion in Settings, so I checked there. The checkbox to turn it on is disabled. When I click the "I" button to its right, it tells me that "Predictive code completion is not supported in this region." I am in the US with my system set to US English. What do I have to do to be able to experience this feature?
0
0
70
1d
How does NSFetchRequest compare custom objects?
I have a CoreData-based app that's many years old, so it's been a long time since I've actually dealt with CoreData. Over recent years, I've noticed that fetch requests aren't finding the object I know is in there. The entity is called Folder and has a single attribute named url, which is of type Transformable. The transformer is a custom one that converts a url into a dictionary with 2 keys; one is a security scoped bookmark created from the url, and the other is the original url in case the bookmark fails. The dictionary is then converted to NSData using NSKeyedArchiver securely. The reverseTransformedValue does the opposite; unarchives the data to a dict, attempts to resolve the bookmark back into the url. The fetch request is set up to fetch all Folder objects where: Custom Predicate: url == $THE_URL So is the fetch request comparing the NSData that's stored in the file and comparing that to $THE_URL after running it through the transformer to arrive at an NSData, or is it running each one through the transformer to get the underlying url and comparing those with $THE_URL? Could there be a better way to compare urls in Core Data, when the app is sandboxed and must use security scoped bookmarks?
0
0
42
1d
change the way build c++ code
when building my project with Xcode16 Beta, I came across several compile errors in c++ code, which used to be ok when building with Xcode15. It's not easy to fix them because some of them came from third part libraries. Is there a way to configure Xcode to build c++ code conforming to the Xcode 15 manner? (I know I can get back to Xcode15 temporarily, but I worry these issue can not be fixed even in the official release version)
1
1
76
2d
Xcode error at preview after changing my macOS user account name
Hello, Today earlier I changed my macOS user account name and now I'm getting error at Xcode 16 at Preview. A piece of error report is: XOJITError: Could not create oop-jit code file directory /Users/victorvaz/Library/Developer/Xcode/UserData/Previews/Simulator Devices/CCCD8E24-3E82-4B02-9D30-0E2B5D09EB4A/data/Containers/Data/Application/D4EA132D-A318-4D58-8618-DFD428FD5F71/tmp/OOPJit/previews: Permission denied But "victorvaz" is my old macOS user account name, how can I make Xcode identify my new account name? Kind regards, Victor de Oliveira
2
0
89
3d
Receiving main camera stream
Hello, I recently got the entitlement for the Enterprise API this week. Although adding the license and the entitlement to the project, I couldn't get any frame from the cameraFrameUpdates. Here are the logs of the authorization and the cameraFrameUpdates [cameraAccess: allowed] CameraFrameUpdates(stream: Swift.AsyncStream<ARKit.CameraFrame>(context: Swift.AsyncStream<ARKit.CameraFrame>._Context)) Could anyone point out what I'm doing wrong in the process?
0
0
89
4d
Is there anyway to view output from an Xcode scheme's build pre-action / verify it completed successfully?
I've got a custom run script build phase in my Xcode iOS project, however I want it to run before the items in the Target Dependencies section get built. So I added a Pre-Actions phase to the target's build scheme and pasted the contents there. However, during a build, there's no way to see if the stuff in the pre action is successful or not. It's possible to put echo statements into a run script build phase which is useful to print values such as file paths etc. but these don't work when part of a scheme pre action. Also if I deliberately put garbage into the scheme pre action, then I can see Xcode is still running the pre action, but as its full of garbage it should fail, but Xcode doesn't report any errors anywhere. So, is there any way to see and confirm if a scheme pre-action was successful or not, or to output logging statements from it to verify values its using are as expected?
0
0
74
4d
Xcode 15: Multiple Commands Produce Duplicate Info.plist Error
I am encountering a persistent issue in Xcode 15 where multiple commands produce a duplicate Info.plist error. The specific error message is: M u ltiple commands produce '/Users/josephnicholas/Library/Developer/Xcode/DerivedData/Restaurant_Build-bapndkzqxdjxxbacjwattbpeqof/Build/Products/Debug-iphoneos/Restaurant Build.app/Info.plist': Target 'Restaurant Build' (project 'Restaurant Build') has copy command from '/Users/josephnicholas/Desktop/backups/Restaurant Build/Supporting Files/Info.plist' to '/Users/josephnicholas/Library/Developer/Xcode/DerivedData/Restaurant_Build-bapndkzqxdjxxbacjwattbpeqof/Build/Products/Debug-iphoneos/Restaurant Build.app/Info.plist' Target 'Restaurant Build' (project 'Restaurant Build') has process command with output '/Users/josephnicholas/Library/Developer/Xcode/DerivedData/Restaurant_Build-bapndkzqxdjxxbacjwattbpeqof/Build/Products/Debug-iphoneos/Restaurant Build.app/Info.plist' Despite following numerous troubleshooting steps, including deleting the Info.plist file, cleaning the build folder, and creating a new project from scratch, the issue persists. I have ensured the Info.plist path is correctly set in the Build Settings under Packaging, and verified the file's target membership. However, the error remains unresolved. Here is a detailed list of the steps I have taken: Deleted the Derived Data multiple times. Restarted Xcode. Deleted the Info.plist file and re-added it through File > New File. Created a new project and manually copied all the files. Verified the Info.plist path and target membership. Followed suggestions from various forums, including adjusting paths and cleaning the build folder. Unfortunately, these steps have not resolved the issue. Attached are screenshots detailing the error messages and my current project setup. I would greatly appreciate any insights or solutions to this problem.
3
0
101
4d
XCUITest Screenshots not saving
I have some (very old ObjC) XCUITests, in Xcode 15.2. I recently noticed programmatic screenshots are not saving. The screenshots generated automatically by XCUITest are saving fine. This is code that used to work as expected; I do not know when it broke as I haven't had need to run this in a while. -(void)takeScreenshotWithName:(NSString *)name { XCUIScreenshot *screenshot = XCUIScreen.mainScreen.screenshot; XCTAttachment *attachment = [XCTAttachment attachmentWithScreenshot:screenshot]; attachment.lifetime = XCTAttachmentLifetimeKeepAlways; attachment.name = name; [self addAttachment:attachment]; UIImage *image = screenshot.image; UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil); } During testing I added the UIImageWriteToSavedPhotosAlbum call, to verify the code is running and the image is available - and it does. But I really don't want these images cluttering up my library. The results are the same whether I run my tests from within Xcode, or via the command line. I need these screenshots so I have a set in PNG format, with standardized naming, for archiving, searching, and comparisons. The automatic screenshots are in Xcode's format - useful when reviewing a single test, which isn't my use case here.
0
0
61
4d
Swift Package with Demo project with Xcode 16
My current workflow to have a Swift Package with a Demo is like this: PackageFolder > DemoFolder I have a package, with a Demo folder inside. I can open the Demo project and Drag&Drop the local PackageFolder to override the remote dependency with the local one. This allows to edit the package while inside the demo project. With Xcode 16 this does no longer work because Xcode does not allow to drop an ancestor of the file path where the project is located. Xcode does not tell this while you drop, it just does not allow it. But it tells you thats the reason, when you try to add the local package as a dependency to the project: "The selected package cannot be a direct ancestor of the project.". (Dropping other local packages still works, see: https://forums.developer.apple.com/forums/thread/756824) What is the expected way to handle a package with a demo project with Xcode 16?
1
1
146
4d