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

Xcode Documentation

Post

Replies

Boosts

Views

Activity

No Apple plug-in library path found
Hey! I'm facing a problem I have 0 idea how to solve it. I'm building a project with Unity 2022.3.21 for visionOS and after a lot of exhausting problems I'm having the last one, I am kinda new to Xcode. I get the error "No Apple plug-in library path found", at the root of the project there Xcode should find the ApplePluginLibraries folder, and it's actually there with two folders inside Apple.Core and Apple.GameKit. Xcode is saying the path was not found and I can see it exists through finder. In Search Paths > Framework Search Paths I have: $(PROJECT_DIR)/ApplePluginLibraries/Apple.GameKit $(PROJECT_DIR)/ApplePluginLibraries/Apple.Core Also in Other Linker Flags I have: -L$(PROJECT_DIR)/ApplePluginLibraries/Apple.GameKit -L$(PROJECT_DIR)/ApplePluginLibraries/Apple.Core I was having a few errors and the last one is: Command PhaseScriptExecution failed with a nonzero exit code, and the description says about the path not found. My info: MacOS: Apple M1 Pro Sonoma 14.5 Xcode: 15.4 Unity: 2022.3.21f1 Any idea? Thanks!!
0
1
106
1w
Gaps in Xcode build timeline
Reposting (after a while) from the Swift forums - the build timeline for our project has a lot of weird gaps in the beginning - almost 15 seconds in total, which is quite a big chunk of the total build time. Is there any way to determine why they exist or how I could fix them? I hope it's just something hidden and not the build system literally doing nothing... This is on Xcode 15.4.
0
0
103
1w
SwiftData with CloudKit freezing previews in Xcode 16 beta
To reproduce: In Xcode, create a new project with SwiftData storage Add a new item in the preview — everything works fine so far Enable CloudKit sync for the target (add iCloud capability, check CloudKit, add a container) Go back to the preview and add a new item — Xcode will now freeze As soon as you modify the SwiftData storage, the preview freezes and the Xcode app becomes extremely slow until you either refresh the preview or restart Xcode.
0
0
95
1w
SwiftData: Unable to delete (Xcode 16)
I am using Xcode 16 and am doing a future app with SwiftData. I have the data in a List. When I try to delete a row, it deletes and seems to save the deletion. But when I list the data again, what I deleted comes back. Here's the code: { for index in indexSet { let chat = chatLog[index] modelContext.delete(chat) // do { // try modelContext.save() // // } catch { // // print("Error saving: \(error)") // // } } } CHAT: Is a variable to hold the data. CHATLOG: The variable in the List. Thank you. Dan Uff
4
1
172
1w
Xcode update madness
Every time XCode updates now, I am forced to download the latest version of iOS. I cannot continue to develop until I have done this. iOS is a 7+ GB download and I don't have the best internet in the world. The download often fails after a few GBs, and there is no download manager, so when that happens, I have to start the download all over again. Coding is my living and stopping me from developing stops me from working. It never used to be like this! Is everyone else experiencing this and as mad as I am with Apple? I was going to buy a new iPhone, but that purchase is on hold now!
0
1
80
1w
Xcode crash when start
I reinstall macOS system to monterey and restore from a higher version (sonoma), the xcode (version 15.4 on sonoma) can not run, so I delete it and reinstall xcode 14.2, but it always crash when start. here is the error log when I start it in Terminal: command: /Applications/Xcode.app/Contents/MacOS/Xcode error log: Error loading required libraries. If there is an ongoing installation please wait for it to complete. Otherwise reinstall. (dlopen(@rpath/libIDEApplicationLoader.dylib, 0x0001): Symbol not found: (_$s10Foundation10CocoaErrorV13userCancelledAC4CodeVvgZ) Referenced from: '/Library/Developer/PrivateFrameworks/CoreDevice.framework/Versions/A/CoreDevice' Expected in: '/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation') [1] 80496 abort /Applications/Xcode.app/Contents/MacOS/Xcode
1
0
125
1w
Code Completion in Xcode 16 beta can't be enabled again
Hey, I have been trying out the Xcode 16 beta's code completion for the last couple of days. I went do disable it through the settings, in the components section. I did this to go along with a tutorial and I didn't want it to help me out. But now that I want it back. I can't find a way to enable it again. I tried reinstalling both the beta and regular xcode, but it didn't show up again. Wanted to ask if someone knows how to get this back. Thanks!
0
0
169
1w
Compiling the JPEG-XL reference for iOS, or, "Is compiling C++ for iOS really this difficult!?"
I'm trying to add JPEG-XL encoding/decoding capabilities to my app and haven't been able to find a trustworthy pre-compiled version. The only one I've found is in https://github.com/awxkee/jxl-coder-swift. As a result I've been trying to compile my own iOS version from the reference implementation (https://github.com/libjxl/libjxl), having done virtually no compiling before. When I started out, my gut said, "Compiling for a different platform should be easy since it's not like I'm actually writing or modifying the implementation", but the more I research and try, the more doubtful I've become. So far I've figured out it means compiling all the dependencies (brotli, highway, libpng, skcms, etc.) too, but I've also gotten nowhere with them, having tried my hand at modifying cmake toolchains and CMakeList.txt files. As a novice, am I biting off more than I can chew with this? Is the seemingly simple task, "Compile this C++ library for iOS" actually something that freelancers charge huge amounts for? (If so, this makes the free compiled version mentioned above even more questionable) Any help or pointers would be greatly appreciated.
5
0
187
1w
Generate compile_commands.json from Xcode project
I need to generate a compile_commands.json for our C++ project. I need it for static code analysis tools as well as enabling clangd usage with other editors. I've tried two methods but it only works for some files with clangd. The logs of the clangd extension in VS Code indicate only that many files can't be compiled. If it works for a file, it's great, but sadly it's not consistent. I've used these two approaches to generate the compile_commands.json: using xcpretty xcrun xcodebuild -projectmyproject.xcodeproj -scheme myscheme clean build CODE_SIGNING_ALLOWED=NO | xcpretty -r json-compilation-database -o build/compile_commands.json the recommended way by sonarcloud xcrun xcodebuild -project myproject.xcodeproj -scheme myscheme \ -configuration Debug clean build CODE_SIGNING_ALLOWED=NO OTHER_CFLAGS="\$(inherited) -gen-cdb-fragment-path \$(PROJECT_DIR)/CompilationDatabase" sed -e '1s/^/[\'$'\n''/' -e '$s/,$/\'$'\n'']/' MacOS/Source/CompilationDatabase/*.json > MacOS/Source/compile_commands.json Is there something missing or are there better ways to generate the compile_commands.json without having to write a full cmake definition?
0
1
86
1w
Xcode Console: LLDB debug "po" command not working
Hi I have updated my Xcode version to 15.4 and now notice that the "po" command of the console is not working properly. It shows the below error whenever try to print any variable data (lldb) po sectionItem.collectionType error: Expression evaluation failed. Retrying without binding generic parameters error: Could not evaluate the expression without binding generic types. Do you have any idea why is it happening and the solution of it?
1
2
82
1w
Commit button disabled in Xcode
I am running Sonoma 14.5 on an Intel MacBook Pro. I had installed Xcode 15 previously and wanted to play with Swift Command Line tools. I created the project and had Xcode create a Git repo. When I make changes, they are marked as modified but when I go to the Source Control manager, my username and email show up, but the commit button is disabled. I tried creating a new test project and it has the same problem. I followed the instructions in StackOverflow and in other developer forum posts. I manually updated the git config from the terminal. I also went in and confirmed that they show up in Xcode -> Settings -> Source Control -> Git. As I mentioned before, user name and email are showing in Xcode. I can commit the changes in Terminal, but adding new changes still doesn't enable the commit button. I manually staged the files and it still didn't fix the problem. I created a new project and did not have Xcode create the git repo and then manually created the git repo from Terminal. Same problem. I tried restarting Xcode and then rebooting the computer. I even uninstalled Xcode and reinstalled it. Still has the same problem.
2
0
103
1w
How to try CoreSimulator Framework of Xcode previous versions
Related to https://developer.apple.com/forums/thread/756767 and https://feedbackassistant.apple.com/feedback/13893850 which was dismissed. Hi, I'm trying to install multiple Xcode versions with simulators on a single mac The problem is: xcrun simctl or any other simulator related process would hang several minutes after installing Xcode 16 beta additional components. If I delete /Library/PrivateFrameworks dir and reinstall additional components of Xcode 15.4, xcrun works fine without any hang. When hanging on CLI, simdiskimaged process skyrockets in CPU usage %, so that's why I assume CoreSimulator Framework is the main source of hang. Is there any way to use additional components(technically CoreSimulator Framework) of Xcode 15.4 on Xcode 16 beta? ※Plus, as I described in related thread, the hang disappears if I run Simulator.app on GUI. I already tried xattr -r -d com.apple.quarantine /Library/PrivateFrameworks or Xcode 16 beta with no use. Is there any command I can open Simulator.app headlessly on CLI?
0
0
114
1w
Mac OSX Ventura + XCode 15.2 + iOS Device v17.5.1 == XCode cannot install built app onto device...
Hi... I have a situation. I recently upgraded my iOS device from 15.1.1 to 17.5.1. I see that my version of XCode can no longer install and launch iOS apps onto the iOS device. Perhaps there are those in the Apple Community who are able to provide insight into my situation. Professionally, I support older iOS applications. The Mac OSX on the machine where I do all the work is Ventura 13.6.4. That machine is running XCode 15.2. I see that my computer does not support XCode 15.3 and XCode 15.4. Will I be required to upgrade the version of Mac OSX from Ventura to Somona for XCode to be able to install mobile apps that I've built onto this iOS device that has v17.5.1?
1
0
105
1w