Environment: Xcode v. 16.2; Swift version 6+
Scenario: I have an .xcodeproj within an .xcsworkingspace that must follow the 'command-line' paradigm outside the sandbox.
My UnitTest (using the newer 'Swift Test' vs 'XCTest') is hitting runtime fatal errors due to sandbox violations.
Here's a typical error line from the compiler:
1 duplicate report for Sandbox: chmod(41377) deny(1) file-read-data /Users/Ric/Library/..
I've set the .entitlement to ignore sandbox:
<key>com.apple.security.app-sandbox</key>
<false/>
I also created a shell script in the project build phase to access my TestData which was copied via a Build Phase:
#!/bin/bash
BUILD_DIR="${BUILT_PRODUCTS_DIR}"
TEST_DATA="${SRCROOT}/SwiftModelTest/TestData"
mkdir -p "${BUILD_DIR}/TestData"
cp -R "${TEST_DATA}/" "${BUILD_DIR}/TestData/"
What do I need to allow real-time Testing of my code without worrying about the Sandbox?
Xcode
RSS for tagBuild, test, and submit your app using Xcode, Apple's integrated development environment.
Posts under Xcode tag
161 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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!
XCode 13 is super slow, build time is 10~20 times longer than Xcode 12。The worst release ever.
I submitted feedback as FB16463501 -- posting here for others to see, or maybe for Apple to share any help if there are workarounds, etc.:
Targets below iOS 18.x fail to launch app due to dyld[xxxxx]: Symbol not found: errors when referencing:
MeshResource.init(from:) async - https://developer.apple.com/documentation/realitykit/meshresource/init(from:)-b7hb
i.e. dyld[61511]: Symbol not found: _$s10RealityKit12MeshResourceC0A10FoundationE4fromACSayAD0C10DescriptorVG_tYaKcfC
MeshResource.replace(with:) async - https://developer.apple.com/documentation/realitykit/meshresource/replace(with:)-8uvri
i.e. dyld[78830]: Symbol not found: _$s10RealityKit12MeshResourceC0A10FoundationE7replace4withyAcDE8ContentsV_tYaKF
Targets tested that exhibit issue: (DYLD errors)
Device: iOS 17.7.2, iPhone 14 Pro Max
Simulator: iOS 17.5 (21F79), iPhone 15
System Information:
macOS Version 15.3 (Build 24D60)
Xcode 16.2 (23507) (Build 16C5032a)
MRE -- include this code in your app: (no need to invoke, just reference)
static func addOrUpdateEntityModel_MRE(_ entity: ModelEntity) async {
let descriptor = MeshDescriptor(name: "MyDescriptor")
do {
if let modelComponent = entity.model { // update existing ModelComponent
if let model = try? MeshResource.Model(id: "MyModelId", descriptors: [descriptor]) {
var contents = MeshResource.Contents()
contents.models = .init([model])
try await modelComponent.mesh.replace(with: contents) /// `dyld[78830]: Symbol not found: _$s10RealityKit12MeshResourceC0A10FoundationE7replace4withyAcDE8ContentsV_tYaKF`
}
} else { //create new ModelComponent
/// Comment-out the 2 lines below == dyld error for above `MeshResource.replace(with:)`
let meshRes = try await MeshResource(from: [descriptor]) /// `dyld[61511]: Symbol not found: _$s10RealityKit12MeshResourceC0A10FoundationE4fromACSayAD0C10DescriptorVG_tYaKcfC`
entity.model = .init(mesh: meshRes, materials: [SimpleMaterial()])
}
} catch {
fatalError()
}
}
I have an app, which is depended on custom SDK. Custom SDK has dependencies, included all dependencies in Podspec and custom framework/static lib ios.vendored_frameworks.
here I sample of my pod spec
Pod::Spec.new do |s|
s.name = "SDK"
s.version = "1.0.1"
s.summary = "SDK"
s.source = { :git => "https://github.com/ABC/SDK.git", :tag => "v"+s.version.to_s }
s.platform = :ios
s.ios.deployment_target = '16.0'
s.swift_version = '4.2'
s.static_framework = true
s.frameworks = 'Security'
s.frameworks = 'CoreLocation'
s.requires_arc = true
s.module_name = 'SDK'
s.library = 'z'
s.default_subspec = 'Shared'
s.subspec 'Shared' do |shared|
shared.ios.vendored_frameworks = 'SDKLib.xcframework'
shared.dependency 'CocoaAsyncSocket', '~> 7.4'
shared.dependency 'CocoaHTTPServer'
shared.dependency 'SocketRocket', '~> 0.6'
shared.dependency 'QNNetDiag'
shared.dependency 'SAMKeychain'
shared.dependency 'AFNetworking/Reachability', '~> 4.0'
shared.dependency 'AFNetworking/Serialization', '~> 4.0'
shared.dependency 'AFNetworking/Security', '~> 4.0'
shared.dependency 'AFNetworking/NSURLSession', '~> 4.0'
shared.dependency 'CocoaMQTT'
shared.dependency 'Starscream', '~> 4.0.8'
shared.dependency 'TrustKit'
shared.dependency 'Firebase/Analytics'
end
end
below error I am getting while linking lib
When I copy and paste example code in apple developer documentation, LongPressGesture does not work as expected in Xcode Version 16.0 (16A242) and iOS 18. It seems updating(_:body:) method does not work when used with LongPressGesture.
When I make a breakpoint in updating(_:body:) method and long press the blue circle on the screen of simulator(or device), it is expected to be caught in breakpoint or it is expected that color of circle turns from blue to red to green. However, it is not caught in breakpoint and never turns to red.
Question of Stackoverflow is about same issue and I can not use onLongPressGesture method to implement required feature of my app.
Development environment: Xcode Version 16.0 (16A242), macOS 14.5
Run-time configuration: iOS 18.0
I just finished my first mobile app using .Net Maui. I have created all of the required certificatee, identifier, and profile in my Apple developer account and downloaded them to my MacAir. On my Windows machine I connect to my MacAir in VS2022 and build my release. Then I go to publish and I get this error:
Cannot create an IOS archive 'AgentManagerMobile'. Process cannot be executed on XMA server.
MessagingRemoteException: An error occurred on client Build1647067 while executing a reply for topic xvs/build/16.4.7067/execute-task/{AppName}/399e8ad002fWriteAppManifest
ArgumentNullException: Value cannot be null.
Parameter name: path2
What is parameter path2? Can anyone help with solving this?
Thanks, Phill
We are getting the cookie from server side when user will do the login successful. Cookie store into app browser. This cookie need to clear when user will do the logout app.
We are using the Cordova framework to create the iOS application. In Cordova i have used plugin to clear the cookie. But in iOS device not able to clear the app browser cookie. And in android device same Cordova plugin is working fine.
Why the iOS device not able to clear the cookie using Cordova plugin?
Plugin name - https://github.com/Cartegraph/cordova-cookie-master
Kindly help me out with the solutions.
When inspecting the geometry in Xcode's metal debugger, I noticed that the shown "frustrum box" didn't make sense. Since Metal uses depth range 0,1 in NDC space, I would expect a vertex that is projected to z:0 to be on the front clipping plane of the frustrum shown in the geometry inspector. This is however not the case. A vertex with ndc z:0 is shown halfway inside the frustrum. Vertices with ndc z less than 0 are correctly culled during rendering, while the geometry inspector's frustrum shows that the vertex is stil inside the frustrum.
The image shows vertices that are visually in the middle of the frustrum on z axis, but at the same time the out position shows that they are projected to z:0. How is this possible, unless there's a bug in the geometry inspector?
After I upgraded to macOS 15.3, all of my current Xcode project have the signing issue, I spent half day and I didn't make any progress, I tried two projects, one is Swift AppKit App calling one C++ dylib, another one is a pure Swift AppKit app, when I build, there will be error:
Warning: unable to build chain to self-signed root for signer "Apple Development: Steven Tang (XXXXX)"
/Volumes/TwoTSSD/steventang/Library/Developer/Xcode/DerivedData/ImageEnhancement-ddbilgyraofrdyfeljyuknusunza/Build/Products/Release/ImageEnhancement.app: errSecInternalComponent
I tried remove account, add account back in Xcode, none of it worked, also tried ChatGPT's WWDR updating and it won't help.
Since upgrading to Xcode 16, I've noticed that when I add new files to my local Swift packages, the "Update Package" option is no longer available when I right-click on my local package.
In previous versions of Xcode, I used this feature to make Xcode recognize newly added files without any issues.
Now, with Xcode 16, the only way I've found to get Xcode to recognize new files is to remove and re-add the entire package, which is obviously not ideal.
I've tried cleaning the build folder and rebuilding the project, but it doesn't seem to help.
Is there a new workflow or method in Xcode 16 to refresh or update local Swift packages without needing to remove and re-add them every time?
Any suggestions or workarounds would be greatly appreciated!
What I’ve tried so far:
Cleaning and rebuilding the project
Looking for any options under "File > Packages" menu
Environment:
Xcode 16
Local Swift Package
Thanks in advance!
I'm trying to use Xcode UI tests for the first time. I added a UI Tests target and set up the signing, then opened the default AppnameUITests.swift file. I added a new function named testAboutPage(), clicked inside the block and clicked the Record UI Test button (red circle) at the bottom of the editor window. If the app is already running when I do this, Xcode crashes immediately. If the app is not running, Xcode builds and runs the app, then crashes.
I've seen reports of this going back years, but none of the posts have a solution. I do have a crash log to share. Does anyone know how to get past this?
This forum won't let me upload the complete crash log because it exceeds the size limit, but here's the first part through the stack trace of the crashed thread:
Process: Xcode [46652]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 16.2 (23507)
Build Info: IDEApplication-23507000000000000~2 (16C5032a)
App Item ID: 497799835
App External ID: 870964517
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
User ID: 503
Date/Time: 2025-02-04 12:58:05.5200 -0800
OS Version: macOS 15.3 (24D60)
Report Version: 12
Anonymous UUID: 144B0B99-8D44-736B-0D9A-1F6FA6DF85F7
Time Awake Since Boot: 48000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process: Xcode [46652]
Application Specific Information:
abort() called
Application Specific Signatures:
((result)) != nil
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x18a3b3720 __pthread_kill + 8
1 libsystem_pthread.dylib 0x18a3ebf70 pthread_kill + 288
2 libsystem_c.dylib 0x18a2f8908 abort + 128
3 IDEKit 0x109e81554 +[IDEAssertionHandler _handleAssertionWithLogString:assertionSignature:assertionReason:extraBacktrace:] + 964
4 IDEKit 0x109e819e4 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] + 876
5 DVTFoundation 0x10600d358 _DVTAssertionHandler + 424
6 DVTFoundation 0x10600d4d8 _DVTAssertionFailureHandler + 196
7 IDEKit 0x10a1f99e4 -[IDEUIRecordingManager _workspaceTabController] + 176
8 IDEKit 0x10a1fa528 __94-[IDEUIRecordingManager _startRecordingWithLaunchSession:alwaysAskForAPIAccess:reservedNames:]_block_invoke_3 + 252
9 DVTFoundation 0x10611fc9c __DVT_CALLING_CLIENT_BLOCK__ + 16
10 DVTFoundation 0x1061206c4 __DVTDispatchAsync_block_invoke + 152
11 libdispatch.dylib 0x18a237854 _dispatch_call_block_and_release + 32
12 libdispatch.dylib 0x18a2395b4 _dispatch_client_callout + 20
13 libdispatch.dylib 0x18a248040 _dispatch_main_queue_drain + 984
14 libdispatch.dylib 0x18a247c58 _dispatch_main_queue_callback_4CF + 44
15 CoreFoundation 0x18a5139d0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
16 CoreFoundation 0x18a4d35bc __CFRunLoopRun + 1996
17 CoreFoundation 0x18a4d2734 CFRunLoopRunSpecific + 588
18 HIToolbox 0x195a41530 RunCurrentEventLoopInMode + 292
19 HIToolbox 0x195a47348 ReceiveNextEventCommon + 676
20 HIToolbox 0x195a47508 _BlockUntilNextEventMatchingListInModeWithFilter + 76
21 AppKit 0x18e04a848 _DPSNextEvent + 660
22 AppKit 0x18e9b0c24 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
23 AppKit 0x18e03d874 -[NSApplication run] + 480
24 IDEKit 0x109e50f14 -[IDEApplication run] + 192
25 AppKit 0x18e014068 NSApplicationMain + 888
26 dyld 0x18a06c274 start + 2840
I discovered a disk space issue with Xcode on my 1TB hard disk. Xcode doesn’t delete old or unused Simulators, causing them to mix and consume valuable space. Deleting them from the Window > Devices & Simulators menu didn’t work, so I used Disk Utility to find and delete them. However, they persisted.
To regain disk space, I completely removed Xcode and the Developer Folder. After reinstalling Xcode, I regained about 80% of my disk space. Despite unmounting the Simulators, they remained.
For those unable or unwilling to do this, the Mac App Store offers DevCleaner, a utility that removes old Xcode Cache and Simulators.
Thanks. I hope I've helped someone else.
Dan Uff
I've got an existing app which is using some 3rd party xcframeworks within its app extensions (for example within a Notification Service Extension).
Within the target for the app extensions there is a Frameworks and Libraries section where the xcframework was dragged and dropped into.
However now I want to create a new project and do a similar thing, within the app's target there is a Frameworks and Libraries section, but when an app extension target is created, Xcode is not adding a Frameworks and Libraries section.
There is a Link Library with Binary section, however this doesn't have an embed section (where you can select to embed, don't embed, embed without signing etc.) and I get build error trying to drag and drop the xcframework in here.
Where id the Framewoks and Libraries section go for app extensions for projects created with Xcode 16? How can this section be added?
Hello everyone, I currently have a M1 Pro MacBook Pro (16gb) and a M1 Mac Mini (8gb), and I was searching a way to use the computing power of the Mac Mini to build my projects, even being a less powered machine, I think it can help since it will be doing just one thing.
I wanted to normally write code on the MacBook, but instead of building it locally (including the previews), it will be done on the Mac Mini via network connection or even Thunderbolt Bridge (if possible).
On a past Apple event (Oct. 30, 2018), was said that it was possible (31:00), but I was not able to find any kind of documentation or guidance on that.
Event Video:
https://youtu.be/bfHEnw6Rm-4?si=6wyoCLnWyyqG3Qm6
Hi all,
I'm facing the issue that cannot build app in Xcode 16
Command PhaseScriptExecution failed with a nonzero exit code
Please help to fix the issue, there is any reference how to resolve the error.
Hi,
I've noticed a warning during export archive phase (xcrun xcodebuild -exportArchive) in our iOS CI/CD pipelines.
Updating the export options info plist file to use
<key>method</key>
<string>app-store-connect</string>
helps, but I am not sure if we should update it or not since I cannot find any references about this change in the docs.
It'd be very helpful to get some guidelines.
Thank you
I was developing my app on Xcode and I saw in requirements it says “your submission must be an app playground (.swiftpm)
I reckon I can develop in Xcode and then copy those files in playgrounds app, make some changes, for it to work.
also I made my project in landscape mode in Xcode, in playgrounds can I lock display orientation through package.swift file or I should continue making me app in landscape mode and ask players to change their viewing orientation via a popup?
Topic:
Community
SubTopic:
Swift Student Challenge
Tags:
Swift Student Challenge
Swift Playground
Xcode
When I try to open Xcode, it tries to open the previous windows and load up the project I was last working on, but I can’t create a new project without opening Xcode, and I can’t do that; it just quits and gives me an Xcode quit unexpectedly, and it still happens when I download earlier versions of Xcode from the Apple developer website and the latest from the App Store, and I even when in Finder and tried to open my project that way, and it just does the same thing. I have tried everything, and I mean everything. I even reinstalled macOS, and it worked for a minute until it tried to open my project and then quit again and is doing the same thing.
Hi, we are experiencing a strange issue with our Web App. Our web app runs entirely on the same domain , and we are making several AJAX requests to the same server. The Error occurs only on Iphones, the app works completely fine on androids and computers.
Most of the requests work fine, but suddenly, one specific request always fails with the following error:
XMLHttpRequest cannot load https://demo2.artios.cz/app37g/v105/php/endpoint.php due to access control checks
What we have checked so far:
✅ CORS headers seem correct. Also we operate entirely on the same domain, client and server.
✅ The same request works fine in computer and android devices.
✅ The issue occurs only on iPhone (tested on Chrome and Safari).
✅ Some requests to the same endpoint pass, but suddenly, this specific request always fails.
✅ There is no OPTIONS preflight request logged in the network tab, but we use only simple requests.
✅ We are making a POST request with multipart/form-data.
What is Your advice, or where I can find more info about this error? We do not think the CORS is the problem. We have tried to inspect with WebInspector but with no relevant answers. Thank You very much!