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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

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
251
2w
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.
1
0
108
2w
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
168
2w
No option to set baseline for UI Test metrics
I'm trying to measure app launch time in an existing Xcode project. I added a simple test that's supposed to display a "no baseline" message and a button to set a baseline, but when I run the test, it just succeeds without showing the pop-up. It works in a new project, so I suspect there might be a specific setting in my existing project that's causing the issue. The project is about 6 years old. Does anyone know if there's a particular setting I need to enable for launch tests to display the baseline pop-up in older projects? I'm running the test from new project in Xcode 14.2. Existing project in Xcode 15.2 and 14.2 both succeed with no baseline message. Thank you!
3
0
117
2w
How to configure App Clip Only XCode project
I have an App, and I want to publish an App Clip in addition to that app. Due to size restrictions I cannot share any of my assets or code, so I made a new XCode project (for background, the original project is a build from Unity, so it would be inconvenient to link them into one XCode project). I have set up an XCode project with an App Clip, then deleted the main App from it, and now I want to distribute the App Clip to XCode. I could not push to the App Store in the organizer (only 'custom' available under 'method for distribution', then I can only select 'Built Products' or 'Archive', no upload to App Store, see screenshot) until I found that my App Clip target (the only target in my project) had Build Settings -> Deployment -> Skip Install set to Yes. When I turn that to No, in the Organizer when pushing to App Store Connect, it now tries to create a new App instead of connecting it to the already existing app (see next screenshot, actual bunlde id removed but it matches) The already existing app has a bundle id io.mycompany.maypp, and the app clip has io.mycompany.myapp.Clip Is what I am trying even possible, or do the main app and app clip need to be published in the same XCode project? Which settings do I need for this?
1
0
213
May ’24
App Clip not opening from QR Code/Appclip codes
I have a Appclip in my App, which should open by scanning QR code or Appclip code(downloaded from Apple itself). When clicking on universal link of App clip its working just fine and opening the it but when making a QR code of the same link its not working, the Appclip card is popping up where the banner image is also displayed properly but the content shows App Clip is unavailable.(This QR code is working when the app is installed) I checked in diagnostic tool as well and its showing everything is well configured so now sure why the Appclip couldn’t be launched from the QR code of universal link or QR of Associated domain.
2
0
136
3w
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
161
2w
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
113
2w
Upgrade to 17.1.1 and now my iPad is "waiting to reconnect to iPad"
Was working on an app and then upgraded my iPad to 17.1.1 and now I get "waiting to reconnect to iPad" When I connected the mac to the iPad is asked to trust which I do. Then I go into the waiting to reconnect to iPad. I've also tried "clear trusted computers' but go into the same process of trusting and then waiting. If I press run I get "waiting to reconnect to iPad Previous preparation error: An error occurred while communicating with a remote process.. The connection was invalidated." xcode : 15.0.1 (check for updates on app store but this is the latest) macOS : Somoma 14.1.1
5
0
610
Nov ’23
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
241
2w
Unable to import local XCFramework module
Our project is split up into multiple Pods with CocoaPods and I'm currently trying to convert all of our podspecs to SPM. One of our projects has XCFramework dependencies that I'm trying to include from a local source, but my project files are complaining that the modules couldn't be found when I try to import them. Is there something I'm missing here? My Package.swift file looks something like this: // swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package(     name: "MyPackage",     defaultLocalization: "en_us",     platforms: [         .iOS(.v12),         .watchOS(.v6),         .macOS(.v10_15)     ],     products: [         .library(             name: "MyPackage",             targets: [                 "MyPackage"             ]),     ],     dependencies: [     ],     targets: [         .target(             name: "MyPackage",             dependencies: [                 .byName(name: "LocalXCFramework")             ],             path: "Sources/"         ),                  .binaryTarget(             name: "LocalXCFramework",             path: "Frameworks/LocalXCFramework.xcframework"         )              ] ) In this example, if I try to import the modules from LocalXCFramework, I get an error saying it couldn't be found.
10
0
6.8k
Jun ’20
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
139
2w