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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

fed up with xcode and its recurring bugs
Xcode doesn't download the “manual” provisioning profiles for my iOS apps, and when I do so from the site there's no way to install them properly. One day Apple will have to fix this, it's really the annoying thing every time we renew our certificates or update macOS and Xcode!
4
0
288
Sep ’24
One embedded framework takes forever to sign when uploading
Hello, I have an iOS app with a lot of embedded frameworks. It works well when I start it from Xcode, it works well once it is on the AppStore or in TestFlight. My only problem is when uploading it using Xcode 13. At the "Processing symbols for ....framework" stage, when reaching a specific framework, it keeps going forever (I've tried letting it run for a night, and it did not move). I can upload with Xcode 12 without problems, but not with any version of Xcode 13 or 14. Since it keeps going forever, I do not have an error message that could help me in identifying the issue. The issue seems to be with a specific framework, but I cannot identify anything that this framework has that is different from the other frameworks (they've all been compiled from C code, using a Makefile and the same CFLAGS and LDFLAGS options). I couldn't find any similar issues on the forum. Do any of you guys have a suggestion on how to fix the issue?
2
0
1.3k
Sep ’24
Predictive Code Completion Fails to Install (Apple Silicon M2 Max) - macOS 15 & Xcode 16
On both RC versions of macOS 15 and Xcode 16, predictive code completion fails to install with the following error message: The operation couldn’t be completed. (ModelCatalog.CatalogErrors.AssetErrors error 1.) Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 User Info: { DVTErrorCreationDateKey = "2024-09-09 21:23:43 +0000"; } -- Failed to find asset: com.apple.fm.code.generate_small_v1.tokenizer - no asset Domain: ModelCatalog.CatalogErrors.AssetErrors Code: 1 -- System Information macOS Version 15.0 (Build 24A335) Xcode 16.0 (23050) (Build 16A242) Timestamp: 2024-09-09T17:23:43-04:00
21
6
4.4k
Sep ’24
Shell script phases not running in parallel from xcodebuild
I tried to enable FUSE_BUILD_SCRIPT_PHASES in my project (based on https://projects.blender.org/blender/blender), and this improves the build time when I use Xcode, but not on my CI machine, which builds the same project from command line via xcodebuild. And indeed, xcodebuild runs the shell script phases sequentially, even if I set -jobs 20. What am I doing wrong?
0
0
466
Sep ’24
(Sequoia) Are Xcode versions < 16 not-installable by design or bug?
Several of my colleagues had unfortunately autoupdated to Sequoia and were unable to run Xcode 15 as usual (we found a workaround by executing from inside the package content). I have instructed the rest of my colleagues from the organization to avoid updating to Sequoia for now. So my question is, is this intended and will this restriction persist for future versions of Sequoia or can we wait for an update to Sequoia that would "fix" this problem?
2
3
952
Sep ’24
How to (re)symbolicate crashlog in Xcode 16.0?
I got a crashlog of my iPad App from a user and now I have to find out where in the app the problem lies. I use Xcode Version 16.0 (16A242d) and then follow these steps: Attach an iPad Xcode -> Window ->Devices and Simulators Open Recent Logs Navigate to the .ips file Open it Result: I can see that the app exceeds the wall-clock allowance All calls of my app are not symbolicated. Question: How can I get Xcode to symbolicate the crashlog properly?
2
0
1.4k
Sep ’24
Build Errors for Reality Composer Pro Packages in Xcode 16 Beta 6 for iOS 18
Using Xcode 15.4, I have successfully built and run my app using Reality Composer Pro Version 1.0 package. I then successfully submitted that app version for release. Now, using Xcode 16 Beta 6, I've created a new branch repository for updating my app for iOS/iPadOS 18 and visionOS 2. However, once I created and switched to the new branch and did a build, I get build errors. It seems to be regarding the package manifest that relates to my Reality Composer Pro package that is part of my app. When I go to the package file in my project navigator and click the Open in Reality Composer Pro button, my package opens in Reality Composer Pro 2.0, which makes sense since it it the version for Xcode 16. However, I don't know how to address/get rid of the build errors. I've added and image of my build errors.
5
0
1.1k
Sep ’24
Xcode 16 RC - Cannot add packages
When opening the package management sheet there is a loading indicator going forever preventing the button to be enabled. The window displays collections but not "Recently used" (which also loads indefinitely). Anyone else seeing this? Any way to clear Xcode preferences/caches for the manager?
8
8
2.2k
Sep ’24
Could not build Module 'UIKit'
Im currentrly having this issue when compiling iOS for my react native app. The error is "Could not build Module 'UIKit'" which brings more subsequent errors down the line like "Could not build module 'DarwinFoundation'" and "Could not build module 'Foundation'. Might it be an error of dependencies or something like that. Im currently on MacOS sequoia, running XCode 16 and trying to build on iOS 18 with react native 0.75.3. For context, i inherited the project with React native 0.69.7 and had to upgrade. Please help, i've been stuck for days and i do not know what to do. Everything in the internet talks about XCode 16 beta but not the actual public release.
2
0
2.3k
Sep ’24
[WatchOS 11, Xcode 16] Can't get watch to appear in Xcode
This morning I bought my first-ever Apple Watch for the sole purpose of development and proceeded to spend six hours failing at the first step of development: getting the device to enter developer mode and connect to Xcode. Since I'm not seeing any WatchOS 11 posts on this issue, it might just be me. This is why I'm making a new thread that's specific to WatchOS 11, Xcode 16, and maybe Series 10. Some particulars for my case: Overall __Followed Xcode 16.0 documentation On a watchOS device that you use for development, go to Settings > Privacy > Developer Mode. To toggle Developer mode, use the Developer Mode switch. To pair an Apple Watch to a Mac, connect its companion iPhone to the Mac with a cable, and ensure that the iPhone is paired for development. After this step, follow any instructions on the Apple Watch to trust the Mac. When paired through an iPhone running iOS 17 or later, Xcode connects to the Apple Watch over Wi-Fi __Tried all the folk remedies listed in the (many) previous posts on enabling development mode and connecting to Xcode iOS 18.0 __In developer mode __Connected to macOS via USB, trusts computer WatchOS 11.0 __Prompt to trust computer appears and trust is established __‘Developer Mode’ list item never appears at end of the ‘Privacy’ menu under ‘Settings’ __‘Developer’ item sometimes appears at the end of ‘Settings’ Despite never having seen or toggled ‘Developer Mode’ under ‘Privacy’ Persists across reboots Possible that WatchOS 11 eliminated the item under Settings > Privacy? If so, documentation not up to date Xcode 16.0 __Watch never appears under ‘Manage Run Destinations’ After installing sample app to phone, then attempting to install WatchOS app via iOS Watch app, “Cannot install at this time” alert appears App icon appears on watch, and tapping on it leads to an alert with, “This app cannot be installed because its integrity could not be verified”, despite wi-fi working Watch apps for other apps (e.g. Apple Store) can be successfully installed via iOS Watch app Above suggests the watch isn't truly in developer mode despite Settings > Developer appearing and persisting across reboots __The network path from Xcode to WatchOS should be clear Reconfigured router such that devices on the same network can talk to each other iPad and iPhone appear with network icon when not connected via cable and Xcode can run code on them Watch on same network as iPad and iPhone macOS 15.0 __Due to security policy, cannot use Wi-Fi (disabled both physically and via sudo /usr/sbin/networksetup -setnetworkserviceenabled 'Wi-Fi' off) Possible that Xcode can only establish a connection to WatchOS via Wi-Fi and not via ethernet bridged to wifi. If so, a confirmation would be hugely helpful. This is currently my prime suspect. Wi-fi cannot be re-enabled, so I'm trying workarounds like connecting watch to phone's hotspot (doesn't work) and somehow using phone to provide network to the Mac. __Due to security policy, firewall configured to block all incoming connections Shouldn't be an issue since Xcode doesn't need incoming connections to see non-watch devices __Due to security policy, mDNSResponder and mDNSResponderHelper disabled Also shouldn't be an issue, but including just in case
2
2
2.2k
Sep ’24
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?
5
6
1.7k
Sep ’24
SwiftUI [[stichable]] metal shader & CIFilter written in metal extern"C" can't work at the same time
In my project, I used two metal shaders in two ways. One is link to SwiftUI's modifier .colorEffect(ShaderLibrary.myShader()), which metal shader marked as [[stichable]]. Another one is a custom CIFilter, which kernel been written in external "C" closure. Because custom CIFilter must add build rules so Xcode can compile it, so I added -fcikernel to Metal Compiler and -cikernel to Metal Linker from Build Settings, just like Apple's document told me that. But the result is weird, if I add rules, custom CIFilter works, [[stichable]] shader doesn't work. if I delete rules, and comment out code of CIFilter(for avoiding warning), [[stichable]] shader works, but now I can't use my custom CIFilter. Actually, once these two shaders works well in my project, but when I updated Xcode from 15 to 16, it became weird, the 2 shaders can't exist at same time. Even though I go back to Xcode 15, I can't save them. I have no idea, please help, thank you. XCode 16 / iOS 18 on iPhone 14 Pro
2
0
749
Sep ’24
Xcode 16 Error AppShortcut phrases may have at most one parameter
I suppose this is a bug in compiler. Xcode 16.0 (16A242d) - AppStore release version When building a project from Xcode 15 in Xcode 16, an error occurs: appintentsmetadataprocessor[12633:13677489] error: At least one halting error produced during export. No AppIntents metadata have been exported and this target is not usable with AppIntents until errors are resolved. AppShortcut phrases may have at most one parameter, but found phrase, "Set Dark Mode ${darkMode} for Widget ${widget}" with more than one parameter: darkMode, widget Apparently this is an Xcode bug because I have a production app with this AppShortcut and it works fine in Apple Shortcuts. Everything is made according to the official WWDC video about AppShortcuts https://developer.apple.com/videos/play/wwdc2022/10170
0
1
610
Sep ’24
error: unknown type name 'CFAttributedStringRef'
OS ERROR] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:104:27: error: cannot combine with previous 'type-name' declaration specifier [OHOS ERROR] CFAttributedStringRef string ) CT_AVAILABLE(macos(10.5), ios(3.2), watchos(2.0), tvos(9.0)); [OHOS ERROR] ^ [OHOS ERROR] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:132:27: error: unknown type name 'string'; did you mean 'std::string'? [OHOS ERROR] CFAttributedStringRef string, [OHOS ERROR] ^ [OHOS ERROR] ../../prebuilts/clang/ohos/darwin-arm64/llvm/bin/../include/c++/v1/iosfwd:249:65: note: 'std::string' declared here [OHOS ERROR] typedef basic_string<char, char_traits, allocator > string; [OHOS ERROR] ^ [OHOS ERROR] In file included from ../../ide/tools/previewer/util/unix/ClipboardObjc.mm:18: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:15: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAccessibilityColor.h:9: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSColor.h:46: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:10: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:10: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:10: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:39: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:26: [OHOS ERROR] In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTFramesetter.h:21: [OHOS ERROR] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTTypesetter.h:132:5: error: unknown type name 'CFAttributedStringRef'; did you mean 'NSAttributedStringKey'? [OHOS ERROR] CFAttributedStringRef string, [OHOS ERROR] ^ [OHOS ERROR] /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSAttributedString.h:22:20: note: 'NSAttributedStringKey' declared here [OHOS ERROR] typedef NSString * NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM; [OHOS ERROR] ^ [OHOS ERROR] In file included from ../../ide/tools/previewer/util/unix/ClipboardObjc.mm:18:
0
1
366
Sep ’24
After building the Watch app, Xcode prompted 'Could not install the preview host' test Watch App. app 'on Apple Watch Series 10 (46mm)
I don't know where the settings were set incorrectly. Unable to install and use applications in preview and virtual machines. I have tried many online methods but have not been able to solve it. It seems that the compiled app file cannot be found. The folder structure of Build is as follows: Build Intermediates.noindex Products Debug-iphonesimulator Debug-watchsimulator Thank you all for your assistance.
0
0
235
Sep ’24