The code in my app is split into frameworks that I can use both from my main app and its app extensions. In order to use the frameworks inside the app extension, I need to build them with the Xcode build setting Require Only App-Extension-Safe API set to Yes.
When I do that, debugging framework code in my main app no longer works properly. I can set a breakpoint, but any attempt to print a value via p or po will give a set of errors like the following:
error: module file /Users/.../Library/Developer/Xcode/DerivedData/...-daqfgouagvlkudfebrmzrurogmld/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules/_errno-B8I5WSZMM09RXHYLYEWSC1BLE.pcm cannot be loaded due to a configuration mismatch with the current compilation
error: Objective-C App Extension was enabled in PCH file but is currently disabled
How do I fix this?
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
In Xcode Version 16.2 (16C5032a) - and previous versions too, the download container in the Devices & Simulators functionality no longer works.
It will start downloading the container, however it will also:
show NO download progress
fail to download the whole container (the downloaded container is missing whole directories, eg. AppData/Library is missing - where my application stores the CoreData db)
show no errors
This was tested with the XCode version stated above (and previous versions) and with iPhone XR (18.1.1 - MR42CN/A) and with iPad (17.7.2 - MR7F2FD/A).
How can I debug this issue / make the Xcode download the whole container?
Running on Mac mini 15.1.1 (24B91).
Topic:
Developer Tools & Services
SubTopic:
Xcode
What I want?
I expect to use xcrun devicectl device process launch --device <uuid> <bundle-identifier> --payload-url <URL> to launch my app and pass the specified URL as I usually do in iPhone.
What I do?
Let's say the app A which I'm developing.
I try to use UIApplication.open(:options:completionHandler:) in another app to open the app A with registered schema. And whether app A is cold launch or background resumption, app A can go foreground with receiving URL.
If I use xcrun devicectl as above described, app A can still be opened. However, app A can't receive URL which I pass through --payload-url option. That's different from in iOS.
BTW: I as well try YouTube with UIApplication.open and xcrun devicectl, the former way work, the latter way not work.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Since iOS 18.2 the simulators have been missing the content under Apps menu for Settings. We are on to iOS 18.3 and still no Apps settings.
@dts
Use a project hosted by a filesystem/local Git repository.
Make changes to any file in the project.
Switch to the "Source Control" Navigator, and the "Changes" sub-navigator within that.
Select "Uncommitted Changes", or any file below that.
Verify that your changes appear in the source change browser/editor on the right.
Click the "Stage All" button.
Absolutely nothing happens, 90% of the time.
Go back to the Changes navigator, right-click on an item there and select the "Stage Changes in..." popup menu item. It works, every time.
I haven't found any pattern to the 10% of the time the "Stage All" button actually works, wrt what changes are selected in the navigator, whether I've already typed a commit message, etc..
I happen to be using Xcode 16.0 on two Macs: a Mac Studio running MacOS 14.6.1, and a 2019 MacBook Pro running MacOS 14.7.1. Both exhibit the same symptoms.
Topic:
Developer Tools & Services
SubTopic:
Xcode
I've used SPM to install some dependencies, however for one of them, CocoaLumberjackSwift the Embed section is blank and attempting to click in it doesn't brink up any dropdown menuetc.
Why is that, how can I change it or check what its set to if its blank?
(Code 16.2)
I am currently working on creating a virtual interior design app.
Can an app made with the Room Plan API be used on iPhones without LIDAR? If so, how much accuracy would be lost compared to iPhones with LIDAR?
Hi, I'm developing an app and after I change the app icon it's appear this error. Why?
Previously I noticed, and it still does, that in the app settings it does not keep the LauncScreen.storyboard. In the drop-down menu it appears but as soon as I change screen it loses it.
I don't know what to do....
Thanks!
The WatchOS developer is not allowed to obtain healthKit permission status. The result is always unauthorized (either by clicking the dot/cross in the upper left corner or by turning on all Health, on some, off all).
WatchOS 开发获取 healthKit 的权限状态authorizationStatus不准。结果始终都是未授权(无论是点击左上角的点叉号还是开启全部健康项开关,开启部分,关闭所有),怎么处理?
I have a xcode project generated by unity 6
my mac:
my x-code:
It's a simple project but the building time lasted over 10 minutes and I found a page
https://discussions.unity.com/t/optimizing-ios-and-macos-build-times-using-ccache/809570
I tried to run ccache in my mac and hope to accelerate the building.
I installed ccache in my MAC by brew
I made two script with +x mode
I created a testc folder to verify the script
and it did work.
Then I opened the xcode and added CC and CXX to the “Build Settings”
I triggered the building
But it didn’t work, the building used the default compiler.
I had repeated to ask AI about it and cleaned building cache many times, but the problem still exists.
Even without any probing executing of the ccache-clang script ( I configured the log file position, so if it has been executed once, there will be some logs)
Could someone help me check if there’s something wrong?
Topic:
Developer Tools & Services
SubTopic:
Xcode
I’m creating code that performs asynchronous processing using the Promises library (https://github.com/google/promises). In this context, when building the app in Xcode 15.4 and Xcode 16.2, the behavior differs between the two.
I’m using version 2.1.1 of the library. Also, I’ve tried using the latest version, 2.4.0, but the result was the same.
Has anyone encountered the same issue or know an effective solution?
Here's a simple code that reproduces this issue.
@IBAction func tapButton(_: UIButton) {
_ = getInfo()
}
func getInfo() -> Promise<Void> {
Promise(on: .global(qos: .background)) { fulfill, _ in
self.callApi()
.then { apiResult -> Promise<ApiResult> in
print("\(#function), first apiResult: \(apiResult)")
return self.callApi() // #1
}
.then { apiResult in
print("\(#function), second apiResult: \(apiResult)") // #2
fulfill(())
}
}
}
func callApi() -> Promise<ApiResult> {
Promise(on: .global(qos: .background)) { fulfill, _ in
print("\(#function), start")
self.wait(3)
.then { _ in
let apiResult = ApiResult(message: "success")
print("\(#function), end")
fulfill(apiResult)
}
}
}
struct ApiResult: Codable {
var message: String
enum CodingKeys: String, CodingKey {
case message
}
}
The Swift Language version in the build settings is 5.0.
The console output when running the above code is as follows:
When built with Xcode 15.4:
2025/03/21 10:10:46.248 callApi(), start
2025/03/21 10:10:46.248 wait 3.0 sec
2025/03/21 10:10:49.515 callApi(), end
2025/03/21 10:10:49.535 getDeviceInfo(), first apiResult: ApiResult(message: "success")
2025/03/21 10:10:49.535 callApi(), start
2025/03/21 10:10:49.536 wait 3.0 sec
2025/03/21 10:10:52.831 callApi(), end
2025/03/21 10:10:52.832 getDeviceInfo(), second apiResult: ApiResult(message: "success")
The process proceeds from #1 to #2 after completing the code comment in #1.
When built with Xcode 16.2:
2025/03/21 09:45:33.399 callApi(), start
2025/03/21 09:45:33.400 wait 3.0 sec
2025/03/21 09:45:36.648 callApi(), end
2025/03/21 09:45:36.666 getDeviceInfo(), first apiResult: ApiResult(message: "success")
2025/03/21 09:45:36.666 callApi(), start
2025/03/21 09:45:36.666 wait 3.0 sec
2025/03/21 09:45:36.677 getDeviceInfo(), second apiResult: Pending: ApiResult
2025/03/21 09:45:39.933 callApi(), end
The process does not wait for the code comment in #1 to finish and outputs the #2 print statement first.
Additionally, even with Xcode 16.2, when changing the #2 line to "print("(#function), second apiResult: (apiResult.message)")", the output becomes as follows. From this, it seems that referencing the ApiResult type, which is not a String, might have some effect on the behavior.
2025/03/21 10:05:42.129 callApi(), start
2025/03/21 10:05:42.131 wait 3.0 sec
2025/03/21 10:05:45.419 callApi(), end
2025/03/21 10:05:45.437 getDeviceInfo(), first apiResult: ApiResult(message: "success")
2025/03/21 10:05:45.437 callApi(), start
2025/03/21 10:05:45.437 wait 3.0 sec
2025/03/21 10:05:48.706 callApi(), end
2025/03/21 10:05:48.707 getDeviceInfo(), second apiResult: success
Thank you in advance
Topic:
Developer Tools & Services
SubTopic:
Xcode
I am using Xcode 15.2. I am loading a URL in a WKWebView, but a hand cursor appears above the web view. Scrolling up and down does not work. I tried adjusting the scroll bounds and isUserInteractionEnabled, but the hand cursor is still visible. How can I fix this?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Hi everyone,
I’m facing a major roadblock with my family location tracking app, and I need some advice or guidance from the community.
Background
Back in 2021, I implemented NSE filtering entitlement to send location-based notifications and retrieve the device's location in return (as suggested by Apple’s technical code support). Over time, I built my app around this entitlement, adding many features that depend on it.
When Location Push Service Extension was introduced for iOS 15+, I adapted accordingly:
NSE filtering was used for devices below iOS 15
Location Push Service Extension was used for iOS 15+
NSE filtering also played a crucial role in:
✅ Accepting/rejecting location-based notifications
✅ Checking device settings & location permissions (since location push won’t work without proper permissions)
The Issue
In November 2024, I created a new developer account to change my business entity. Since then, I’ve been requesting the NSE entitlement repeatedly for four months, but Apple keeps rejecting it. Meanwhile, they approved the Location Push Entitlement, but without NSE filtering, I’m forced to rewrite a huge part of my app’s core functionality.
I’ve sent multiple emails explaining my use case, but I keep getting rejected without any clear explanation or workaround.
My Ask
Has anyone faced a similar issue with NSE entitlement?
Are there any alternative approaches to achieve the same functionality?
Any advice on how to escalate this to Apple or get proper feedback on why it's being rejected?
I’ve invested years into this app, and a forced rewrite would take months. Any help, insights, or contacts who could assist would be greatly appreciated!
Thanks in advance! 🙏
Topic:
Developer Tools & Services
SubTopic:
Xcode
My application is in flightTest mode.
I received my first two crash reports in XCODE /Organizer. The context is well described, and I was able to isolate the locations where very serious errors occurred.
My application is connected. I'm missing one piece of data in this crash report: the time of the crash.
This will help me see what (in my case) static data was being read on the data server at that time. This will help me investigate.
Is it possible to obtain this information?
I have been using Xcode 16.2 for a long time. I downloaded it from the developer site. I recently downloaded Xcode 16.3. I was offline on an airplane and I got an error authenticating my account. Since then, I have not been able to sign my apps. I was able to create a new app that worked but in my effort to resolve the problem, I deleted my account and now I cannot add it back. I was getting a "bad URL" error. Now I'm getting "Could not connect to the server." I sent an email to Apple Dev Support and they told me to download Xcode from the App Store. I did that and it gave me the same error. Is anyone else having this problem? If Apple Dev Support cannot resolve it, I don't know how I am going to.
Topic:
Developer Tools & Services
SubTopic:
Xcode
I'm working on dext project (c++), Base SDK and Supported Platforms are set to DriverKit.
#include causes errors:
error "The iostreams library is not supported since libc++ has been configured without support for localization."
error "<locale.h> is not supported since libc++ has been configured without support for localization."
Also it's not possible to define custom log object: undeclared identifier 'os_log_create'. <os/log.h> included and os_log function is compiled correct.
macOS as additional SDK did not help. Thanks a lot for any hint.
Since upgrading from Xcode 15 to 16, we have been experiencing a build error during compilation. Building on Xcode 15 still works with no issues. The error happens only on the first build after a clean. Subsequent builds succeed. This is an issue because our CI process archives the project from a clean slate, and this causes it to fail every time. I will attempt to describe the issue and include information I believe is relevant in this document.
The error occurs on this import line within an Objective-C file during the Scan Dependencies step of compiling. This line imports our custom Objective-C to Swift bridging header file - "Swift2Objc.h".
Our custom Objective-C to Swift bridging header file is simply wrapping the project’s auto-generated Objective-C to Swift bridging header file - "KWISwift.h".
The error is specific to the import of the OfflineServices Swift Package.
Specifically, the OfflineServices-Swift.h file - the Swift Package’s auto-generated Objective-C to Swift bridging file.
Module JRE not found - the exact error (Also included as text on the bottom of the post)
JRE is a third-party library provided to us as an xcframework. It is placed directly into our Swift Package as a binary target.
The xcframework itself is composed of .a file and a Headers folder which includes header files and a module.modulemap.
The module.modulemap file looks like this.
Could not build inference plan - ANECF error: failed to load ANE model file:///System/Library/Frameworks/Vision.framework/Resources/saliency_attention_box_head_i4fgq3rswb_fp16.espresso.net Error=_ANEEspressoIRTranslator : error Espresso exception: "I/O error": Cannot open additional blob file (DESIGN)
Topic:
Developer Tools & Services
SubTopic:
Xcode
I'm having an issue specifically with SwiftUI previews in my iOS project. The project builds and runs fine on devices and simulators (in Rosetta mode), but SwiftUI previews fail to load in both Rosetta and native arm64 simulator environments. The main error in the preview is related to the Alamofire dependency in my SiriKit Intents extension:
Module map file '[DerivedData path]/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.modulemap' not found
This error repeats for multiple Swift files within my SiriKit Intents extension. Additionally, I'm seeing:
Cannot load underlying module for 'Alamofire
Environment
Xcode version: 16.2
macOS version: Sonoma 14.7
Swift version: 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Dependency management: CocoaPods
Alamofire version: 5.8
My project is a large, older codebase that contains a mix of UIKit, Objective-C and Swift
Architecture Issue: The project only builds successfully in Rosetta mode for simulators. SwiftUI previews are failing in both Rosetta and native arm64 environments. This suggests there may be a fundamental issue with how the preview system interacts with the project's architecture configuration. What I've Tried I've attempted several solutions without success:
Cleaning the build folder (⇧⌘K and Option+⇧⌘K)
Deleting derived data
Reinstalling dependencies
Restarting Xcode
Removing and re-adding Alamofire
If you need help investigating a crash, please include a crash report in your post. To smooth things along, follow these guidelines:
For information on how to get a crash report, see Acquiring crash reports and diagnostic logs.
Include the whole crash report as a text attachment (click the paperclip icon and then choose Add File). This avoids clogging up the timeline while also preserving the wealth of information in the crash report.
If you’re not able to post your crash report as an attachment, see Can’t Post Crash Report as Attachment below.
If you want to highlight a section of the report, include it in the main body of your post. Put the snippet in a code block so that it renders nicely. To create a code block, add a delimiter line containing triple backquotes before and after the block, or just click the Code Block button.
If possible, post an Apple crash report. Third-party crash reporters are often missing critical information and have general reliability problems (for an explanation as to why, see Implementing Your Own Crash Reporter).
Symbolicate your crash report before posting it. For information on how to do this, see Adding identifiable symbol names to a crash report.
If you need to redact the crash report, do so consistently. Imagine you’re building the WaffleVarnish app whose bundle ID is com.example.wafflevarnish but you want to keep your new waffle varnishing technology secret. Replace WaffleVarnish with WwwwwwVvvvvvv and com.example.wafflevarnish with com.eeeeeee.wwwwwwvvvvvvv. This keeps the text in the crash report aligned while making it possible to distinguish the human-readible name of the app (WaffleVarnish) from the bundle ID (com.example.wafflevarnish).
Finally, for information on how to use a crash report to debug your own problems, see Diagnosing issues using crash reports and device logs.
Can’t Post Crash Report as Attachment
Crash reports have two common extensions: .crash and .ips. If you have an .ips file, please post that [1].
DevForums lets you attach a .crash file but not an .ips file (r. 117468172). To work around this, change the extension to .txt.
If DevForums complains that your crash report “contains sensitive language”, leave it out of your initial post and attach it to a reply. That often avoids this roadblock.
If you still can’t post your crash report, upload it to a file sharing service and include the URL in your post. Post the URL in the clear, per tip 14 in Quinn’s Top Ten DevForums Tips.
Getting a Crash Report from the Xcode Organiser
The Xcode organiser shows crash reports from customers. If you’re investigating such a crash and want to post a crash report:
Navigate to the crash in the Xcode organiser.
Note If you can’t see the right crash, check the filter popups at the top.
In the list of crashes, secondary click on your crash and choose Show in Finder.
That reveals the Xcode crashpoint document (.xccrashpoint) in the Finder. Secondary click on that and choose Show Package Contents.
In the resulting Finder window, find a crash report (.crash) that accurately represents the crash you’re investigating and attach that to your forums post.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] Because it’s easy to go from an .ips file to a .crash file. I usually do this by choosing File > Quick Look in the Finder. For more info about these file formats, see this post.
Revision History:
2025-08-29 Added the Getting a Crash Report from the Xcode Organiser section.
2024-11-21 Added a recommendation to post the .ips format if possible.
2024-05-21 Added some advice regarding the “contains sensitive language” message.
2023-10-25 Added the Can’t Post Crash Report as Attachment section. Made other minor editorial changes.
2021-08-26 First posted.