Hello. I was working on a Unity game for iPhone, but Apple said that it is impossible to prohibit downloading to iPad. They tested it on iPad Air 5, and for some reason the game did not work correctly - nothing happened when launched, although everything was fine in the iPad Air 5 simulator and in the real iPhone. Please tell me what to do?
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Posts under Xcode tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Starting Xcode 14, iOS Simulator is able to communicate with APNs in order to register for notification in the sandbox environment. I created a sample test for this.
A dumb iOS application that registers for notifications. It has UITests to automatize the tap on the consent popup (it is not possible to ask for the permission via CLI sadly).
Once the application registers, the AppDelegate method didRegisterForRemoteNotificationsWithDeviceToken is called and the device token is sent to a local server application (node.js).
The test itself creates an iOS 18.6 Simulator with xcrun simctl, builds such app and run the tests through through CLI with xcodebuild.
Running this on my personal Macbook Pro M1 2021 goes well every time, so I wanted to bring it on Github Actions (arm64 macOS machines), in order to test the works on a open source library I'm building (hapns).
Contacting Github support led me to test this on a macOS image running inside a VM inside a Veertu Anka container on my personal Macbook Pro, due to an VM architectural limit suspicion.
The results were the same: iOS simulator isn't able to receive the device token. Not even didFailToRegisterForRemoteNotificationsWithError is called (tested through some network probes-requests that communicate to the server which checkpoints the process reached).
So, as asked, I've setup a repro-case to be run in the VM and I've collected VM diagnostics ready to be tested and attached.
Does anyone know if there is some unspecified (or specified but buried in the documentation) limit for this? Thanks.
Github discussion link for further details, repro-case and so on: https://github.com/actions/runner-images/issues/12747
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
APNS
Xcode
User Notifications
Virtualization
I have a multi target project where every target relies on a built "web bundle" which is basically a collection of html, optimized images, and optimized javascript.
Right now that web bundle is built in a pre build step by running a script. The script takes awhile to run and outputs to a folder that is referenced into the project via a PBXFileReference which is then referenced in the Copy Bundle Resources step.
96516AC22BF928DD00576562 /* build */ = {isa = PBXFileReference; lastKnownFileType = folder; name = build; path = "../web-ui/build"; sourceTree = "<group>"; }
....
96516AC32BF928DD00576562 /* build in Resources */ = {isa = PBXBuildFile; fileRef = 96516AC22BF928DD00576562 /* build */; };
As a step, I wrote an aggregate target that can also run this script. I specified its input and output files and turned off sandboxing. It does exactly what I need it to. Critically it is ran based on dependency analysis. If I modify any file in web-ui it rebuilds, if I dont I can repeatedly build the aggregate target and it will not re-run the script. This is perfect.
A97590172E419CBA00741928 /* Build Web Bundle */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 12;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"$(SRCROOT)/xcodescripts/build-web-bundle.bash",
"$(SRCROOT)/web-ui/index.html",
"$(SRCROOT)/web-ui/vite-env.d.ts",
"$(SRCROOT)/web-ui/vite.config.ts",
"$(SRCROOT)/web-ui/tsconfig.json",
"$(SRCROOT)/web-ui/stats.html",
"$(SRCROOT)/web-ui/postcss.config.js",
"$(SRCROOT)/web-ui/package.json",
"$(SRCROOT)/web-ui/justfile",
"$(SRCROOT)/web-ui/src/",
);
name = "Build Web Bundle";
outputFileListPaths = (
);
outputPaths = (
"$(SRCROOT)/web-ui/build/",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "exec \"${SCRIPT_INPUT_FILE_0}\"\n";
};
You may notice I reference a src file. This is made possible via a flag USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES which allows Xcode to check folder dependencies recursively.
The problem is that my other targets do not automatically recognize that they need to run the "WebBundle" aggregate target in order to update a resource they copy in their "Copy bundle resources" phase.
So I tried adding it as a Target Dependency.
A9DE685B2E41C9A8005EF4E0 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = A97590132E419C1200741928 /* WebBundle */;
targetProxy = A9DE685A2E41C9A8005EF4E0 /* PBXContainerItemProxy */;
};
Unfortunately this breaks whatever magic was allowing the script to be run only when there are web bundle changes. Every build it runs the "Build Web Bundle" script.
I think what I am missing is a way to specify in these other targets that a resource they are used to copying from the Xcode PBXFileReference is produced by the aggregate target. This way they can start to reason about the dependencies.
Other possibilities are that I should be building the web bundle to a separate location. Or that these references are somehow broken in another way. To be clear the folder format is as thus
project/
iOS/
client.xcodeproj
web-ui/
build/ (web bundle build is output here and referenced relatively)
src/
index.html (and other things)
Is iOS 26 Beta 6 available in the iOS Simulator?
I saw that the latest betas launched earlier this week. I updated my dev machine to macOS 26 Beta 6, however this release had no corresponding Xcode 26 Beta 6.
So I am still running Xcode Beta 5 and when I go into Settings -> Components within Xcode there is no option to install iOS 26 Beta 6. It's still running Beta 5 for macOS and iOS. Is that correct? My current assumption is that iOS Beta 6 is for physical devices only?
Below is an English version of your post, ready to copy-and-paste into the Apple Developer Forums:
I’m seeing a crash in Xcode 26 beta 3 whenever the StoreKit symbol SKStoreProductParameterAdNetworkSourceIdentifier is present while running on an iOS 15 simulator.
Steps to reproduce
Install Xcode 26 beta 3.
Create any iOS app and run it on an iOS 15 simulator (device model doesn’t matter).
Add the following code anywhere and run:
override func viewDidLoad() {
super.viewDidLoad()
if #available(iOS 16.1, *) {
print("SKStoreProductParameterAdNetworkSourceIdentifier: \(SKStoreProductParameterAdNetworkSourceIdentifier)")
}
}
The project builds successfully, but before the #available(iOS 16.1, *) check is reached, the app crashes with:
Symbol not found: _SKStoreProductParameterAdNetworkSourceIdentifier
When I build the same project with Xcode 16.4 and launch it on an iOS 15 simulator, it runs without crashing.
Investigation so far
Because SKStoreProductParameterAdNetworkSourceIdentifier is just an NSString, I could substitute the string literal "SKStoreProductParameterAdNetworkSourceIdentifier" as a temporary workaround, but that doesn’t feel like a proper fix.
The symbol is still declared in both SDKs:
/Applications/Xcode-16.4.0.app/.../StoreKit.framework/Headers/SKAdNetwork.h:48:
SK_EXTERN NSString * const SKStoreProductParameterAdNetworkSourceIdentifier API_AVAILABLE(ios(16.1)) API_UNAVAILABLE(macos, watchos, visionos);
/Applications/Xcode-26.0.0-Beta.3.app/.../StoreKit.framework/Headers/SKAdNetwork.h:48:
SK_EXTERN NSString * const SKStoreProductParameterAdNetworkSourceIdentifier API_AVAILABLE(ios(16.1)) API_UNAVAILABLE(macos, watchos, visionos);
So the symbol hasn’t been removed in the beta SDK. Given that the code is wrapped in #available(iOS 16.1, *), I don’t believe the sample itself is at fault.
Questions
Could this be a bug in Xcode 26’s availability checking or linker?
Has anyone else encountered the same issue or found a more robust workaround?
Any insights would be greatly appreciated.
Hi,
Ever since upgrading to Version 26.0 beta 5 (17A5295f) Xcode constantly locks up with the Beach Ball of Death icon. I can't even work on any apps/projects.
Anyone else having issues?
Dan Uff
Ok, I'm going crazy here. I have a static library for iOS that I want to build for the simulator. I use xcodebuild -destination="iOS Simulator" and then check the library using otool which tells me the platform is 6, which is Mac Catalyst.
When I look at the output of xcodebuild, it says
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, variant:Mac Catalyst, id:00006041-0008492E3AA1801C, name:My Mac } ...
It has the simulator listed too, way down the list:
{ platform:iOS Simulator, arch:x86_64, id:AB7A99B3-8D24-4F73-A42D-9BB45321928D, OS:18.6, name:iPad (A16) }
When I put all of that into xcodebuild for the platform, it still says there are multiple matching destinations and chooses Mac Catalyst. Why? How? What? Does platform="iOS Simulator" mean nothing? How in the world does "Mac Catalyst" match "iOS Simulator"?????
I don't want Mac Catalyst, I don't need Mac Catalyst, and I can't get rid of Mac Catalyst. Nothing I specify in xcodebuild results in anything I can build that will compile for the simulator.
What the heck am I doing wrong?
With Xcode 26.0 beta 5 (17A5295f) when I run the following command
xcodebuild -downloadComponent metalToolchain
I get the following error:
xcodebuild[48851:12478851] Writing error result bundle to /var/folders/b_/g67r_tl557z244g20ncr_qmsd9wrz1/T/ResultBundle_2025-07-08_11-10-0012.xcresult
xcodebuild: error: Failed fetching catalog for assetType (com.apple.MobileAsset.MetalToolchain), serverParameters ({
RequestedBuild = 17A5295f;
})
I can't install the toolchain from the Xcode GUI also. Does someone know a workaround ?
Xcode 26 Beta 5 Universal: Not able to install iOS 26 Beta 5 simulator on intel macs
Below log is shown:
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
User Info: {
DVTErrorCreationDateKey = "2025-08-08 06:37:48 +0000";
}
Download failed.
Domain: DVTDownloadableErrorDomain
Code: 41
System Information
macOS Version 15.5 (Build 24F74)
Xcode 26.0 (24198.5) (Build 17A5295f)
Is simulator run time for Xcode 26 Beta 5 not given out yet?
However I am able to download simulators on Apple Silicon macs with same Universal installer.
Has anyone faced similar issue?
My Xcode version is 16.4, I have added an old version simulator (iPhone 13 with iOS 17.2) to the simulator list, but I can't use it for debugging, and all on display are iPhone 16 with 18.6 (the latest iOS devices).
The setting "Minimum Deployments" for my App is 16.6.
In addition, when I downloaded an iOS 16.0 version simulator, Xcode automatically added all iPhone 15 models of the simulator, but I still can't use them. In short, I can only use the default iPhone 16 simulators.
So, if I want to debug my App using iPhone 13 (iOS 17.2), what should I do?
Thank you for your reply. :)
Another small issue, my App's destination has been set to support only iPhone, why are those iPad simulators still appearing?
Xcode 26 beta 4 and iOS 26 beta 4 unable to build: facing issues in sideloading using Xcode
Unable to find a DDI that can be used to enable DDI services on the device
I have a visionOS 2 project created on Xcode 16, when I updated to Xcode 26 beta5, I can't build it any more, every time it stuck in process like the picture shows below:
Already tried many methods to fix this issue, such as clear build folders, but don't work.
MacBook Air M2 / MacOS 26 beta5 / Xcode 26 beta5
**Background:
Many iOS/macOS developers have faced issues like:
• Autocomplete randomly stopping
• Indexing freezing or slowing down
• SwiftUI previews breaking unexpectedly
• Build process hanging or crashing
Even after multiple updates, these issues seem to come back in different forms.
**
Do you think Apple should consider a full architectural rewrite of Xcode?
Would separating SDK updates from IDE updates help?
How do you personally deal with Xcode’s instability in your workflow?
Updated Xcode from 16.2 to 16.4, running Time Profile in Instruments, it launches the trace, but does not install or load on connected device, breaks the functionality. I am unable to debug...
ERROR:
Connection with the remote side was unexpectedly closed : <dictionary: 0x1f3c8b6d0> { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => <string: 0x1f3c8b850> { length = 22, contents = "Connection interrupted" }
}
Domain: IXRemoteErrorDomain
Code: 6
User Info: {
DVTErrorCreationDateKey = "2025-08-09 00:47:53 +0000";
}
--
Connection with the remote side was unexpectedly closed : <dictionary: 0x1f3c8b6d0> { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => <string: 0x1f3c8b850> { length = 22, contents = "Connection interrupted" }
}
Domain: IXRemoteErrorDomain
Code: 6
IOS 18.5
I am facing a recurring issue with Xcode iOS simulator. I want to preview a SwiftUI for iOS in Xcode, but the Simulator app fails to boot up.
I receive the follow error in Xcode:
Cannot Preview in this file. Simulator was shutdown during an update.
I have tried the following:
Deleting Xcode cache
Reinstalling iOS Simulator runtimes
Completely uninstalling Xcode and deleting all developer data, then reinstalling
None of the above steps fix the problem. The only fix I have found is to completely reinstall MacOS 15.4.1. THIS IS TERRIBLE!
I have already reinstalled MacOS 15.4.1 once to fix the issue, and I don't want to do it again. If there is another solution, please help me find it!
Thank you!!
Hello. I was working on a Unity game for iPhone, but Apple said that it is impossible to prohibit downloading to iPad. They tested it on iPad Air 5, and for some reason the game did not work correctly - nothing happened when launched, although everything was fine in the simulator and in the real iPhone. Please tell me what to do?
This question is a component of this question and an extension to this question which has been solved. This situation might feel a pinch constructed but it is a simplified version of one step of the original question.
Basically in my app I have a script that outputs a folder with a few files inside of it. This folder is output to $(BUILT_PRODUCTS_DIR)/build/ and is referenced via a PBXBuildFile. Because I put a wait in the script (to simulate a long build I have in my real project) it is very obvious when the script is or isn't run. The goal would be for it to run only when its dependencies have changed.
The trick is if I put this script as a "run script" phase within my final target dependency analysis works great. The script only runs when the dependencies are updated. However if I put the "run script" phase into an aggregate target then add it as a Target Dependency in the main target Xcode wants to run the script every time. Regardless of if the dependencies have changed. However if you build just the aggregate target alone everything goes just fine. It only builds when it has to.
To me this does not quite make sense. I thought that dependency analysis of the script within my aggregate target would be the same regardless of whether that script was within the aggregate target or the main target.
In my app I ideally need the aggregate target to be shared by multiple other targets. While I could put the script in each it would be more foolproof to have them share an aggregate target.
Why would dependency analysis come to a different conclusion when the script is within an aggregate target that is a target dependency of the main target?
If it helps here is the script and the entire project can be found here on GitHub if you would like to play with it.
mkdir -p "${SCRIPT_OUTPUT_FILE_0}/build/"
echo "Pausing for 10 seconds before creating files..."
sleep 10
cat "${SCRIPT_INPUT_FILE_0}"
cat > "${SCRIPT_OUTPUT_FILE_0}/build/index.html" << EOF
<!DOCTYPE html>
<html>
<head>
<title>Simple Page</title>
</head>
<body>
<h1>Welcome to Simple Page</h1>
<p>Generated at: $(date)</p>
</body>
</html>
EOF
cat > "${SCRIPT_OUTPUT_FILE_0}/build/page.html" << 'EOF'
<!DOCTYPE html>
<html>
<head>
<title>Simple Page</title>
</head>
<body>
</body>
</html>
EOF
One of the bar button items of my bottom toolbar needs to be a custom view., and I’m trying hard to get it to behave like the proper bar button items when it comes to Liquid Glass and matching the appearance of all the other bar button items on my toolbar. I’ve tried many variations of embedding custom views within visual effect views, and this comes closest.
I inited a UIBarButtonItem with a custom UIView like you’re supposed to, and then I placed a UIVisualEffectView with Vibrancy within that, so that I could place a UIImageView inside it and the UIImageView would respect the adaptive color changing that comes with being within a Liquid Glass bar button item. I’ve made sure that the UIImageView is using an SF Symbol and a rendering mode of .alwaysTemplate, and that the .tintColor is set to .label, to ensure that I’m not overriding any Liquid Glass rendering.
Below, you can see the bar button item with my custom view on the left, and a native Bar Button Item with the same SF symbol on the right, in several scenarios. It gets part of the way there there: against light backgrounds the image view turns black like it should. But against darker backgrounds, instead of turning white, the symbol has an additional vibrancy that comes close to the right white look against certain grays, but then is obviously too translucent against black.
The symbol is still visible/experiencing some vibrancy, so I assume it might be some configuration of the UIImageView within the Vibrancy that can correct the behavior to match the images in the native bar button items in all conditions. Anyone got thoughts on what the missing piece might be?
when launch my app from the Xcode 26 beta on iOS 16 I get this crash:
Referenced from: <BB79205B-F03B-382A-A5D7-3F0C8A3135E5> /private/var/containers/Bundle/Application/7C842707-BB01-4C34-A2E0-318DC6E5B3D8/My APP.app/My APP.debug.dylib
Expected in: <44798FBF-5AD6-37FB-A58C-DE1B58F2A2E7> /System/Library/Frameworks/UIKit.framework/UIKit
Symbol not found: _UIMenuAutoFill
Referenced from: <BB79205B-F03B-382A-A5D7-3F0C8A3135E5> /private/var/containers/Bundle/Application/7C842707-BB01-4C34-A2E0-318DC6E5B3D8/My APP.app/My APP.debug.dylib
Expected in: <44798FBF-5AD6-37FB-A58C-DE1B58F2A2E7> /System/Library/Frameworks/UIKit.framework/UIKit
dyld config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/usr/lib/libBacktraceRecording.dylib:/usr/lib/libMainThreadChecker.dylib:/usr/lib/libRPAC.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
Hello, we are working on a iOS game project, as progress, the project grows larger and larger. Because we are using other game dependencies and libraries, here larger and larger refers to the whole project, and our source files integrated and compiled by Xcode are not many. Now, it seems we hit a bottleneck, when I add new files or functions to the previous files to implement a new feature, Xcode compile stucks(stops), it's Indexing | Initializing datastore forever, cannot produce a final build.
macOS 15.1, Xcode 16.2
Can you provide any solutions to solve this problem?
Also submitted Feedback ID #FB18432749