When I debug in Xcode, there is a launch flag that is normally set to "Automatically", and after building, Xcode installs & runs the app in the simulator or device.
The other setting is "Wait for executable to be launched". I don't use this feature too much, but I thought what it would do in build & install the app, but not launch. So, the idea would be that you could install the app, then take over - as a user - and tap the icon to launch the app. At this point, the Debugger would take over again, and you could debug the app from a very early spot.
When I set that flag now, the app never gets installed, so I can't do this. Xcode just has this in its status bar, and it never changes:
Waiting to attach on
I swore that it used to install the app in the sim for this setting. I don't know how many versions ago it was, but I really thought it did this. Does it not anymore, or should I file a bug?
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
Created
I have a multiplatform app that I've been working on that targets iphones, ipad, and macos. I also have a widgetextension that targets all three devices. On iphones and ipads, the widgets show up in the widget gallery with no problems. But on the mac, the widget center does show my app, but its widgets are "from iPhone" meaning that if my app was not install on an iphone, they just won't show up on the mac at all.
I have not idea of what I'm doing wrong or how to fix it. Do I need to create a widget extension for the mac seperately?
I'm getting hundreds of the message below in Xcode. I've narrowed it down to when I instantiate the following
AVAudioUnitComponentManager.shared()
Message send exceeds rate-limit threshold and will be dropped. { reporterID=231700600717315, rateLimit=32hz }
We are encountering a persistent code signing error with in-app purchase capabilities in our iOS app. Despite having the com.apple.developer.in-app-purchase entitlement properly configured in the app's entitlements file and the In-App Purchase capability enabled in both Xcode and the App ID configuration in the Apple Developer Portal, we continue to receive the error: "The provisioning profile 'iOS Team Provisioning Profile: does not include the com.apple.developer.in-app-purchase entitlement." We have attempted multiple solutions including:
Regenerating provisioning profiles
Cleaning and rebuilding the project
Switching between automatic and manual signing
Removing and re-adding the in-app purchase capability
Verifying all entitlements and capabilities configurations
The error persists despite the entitlement being correctly set in the entitlements file and the capability being enabled in the App ID. This appears to be an issue with how the provisioning profile is being generated or how the entitlement is being recognized by Xcode's code signing system.
when opening Main.storyboard, all screens turn black, XCode freezes, and then closes. I am adding the font according to this guide. I'm trying to add Inter-VariableFont_opsz,wght.ttf of the https://fonts.google.com/specimen/Inter
I am experiencing an issue with Xcode 16.2 (15E204a) where global workspace search does not return results from .xib files.
Topic:
Developer Tools & Services
SubTopic:
Xcode
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
I am trying to test this simulated Error.
The issue is, I can't get this to trigger through the simulatedError function.
Error will always end up as an unknown error
Example code snippet:
@available(iOS 17.0, *)
func testPurchase_InvalidQuantity() async throws {
// Arrange
testSession.clearTransactions()
testSession.resetToDefaultState()
let productID = "consumable_1"
try await testSession.setSimulatedError(.purchase(.invalidQuantity), forAPI: .purchase)
guard let product = await fetchProduct(identifier: productID) else {
XCTFail("Failed to fetch test product")
return
}
let option = Product.PurchaseOption.quantity(4)
let result = await manager.purchase(product: product, options: option)
switch result {
case .success:
XCTFail("Expected failure due to invalid quantity")
case .failure(let error):
print("Received error: \(error.localizedDescription)")
switch error {
case .purchaseError(let purchaseError):
XCTAssertEqual(purchaseError.code, StoreKitPurchaseError.invalidQuantity.code)
default:
XCTFail("Unexpected error: \(error)")
}
}
}
In the above code snippet, I have an Unexpected Error.
But if i remove try await testSession.setSimulatedError(.purchase(.invalidQuantity), forAPI: .purchase) I will receive a XCTFail in the success of my result.
So when I set the quantity to a -1, only then can I correctly receive an invalidQuantity.
Does anyone know why the try await testSession.setSimulatedError(.purchase(.invalidQuantity), forAPI: .purchase) would fail to work as directed? I have tests for all the generic errors for loadProducts API and the simulatedError works great for them
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
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?
I am trying to add complication feature to my watchOS app. I need to add some keys to the Info.plist.
Project Navigator - no Info.plist file (as expected)
Target watchOS > Build Settings > Info.plist values.
I am unable to add a value. Hovering over a row does NOT show small '+' or '-' icons.
How do I edit the Info.plist?
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()
}
}
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!
In developing a new MacOS app in Xcode I set up a Storekit configuration file so I could test 2 non-consumable purchases locally. I've been successfully testing them for the past couple of weeks, but suddenly yesterday I found I was unable to make purchases. I can successfully fetch products, but when I try to purchase either of them, I get the following error:
Error handling payment sheet request: Error
Domain=NSCocoaErrorDomain Code=4099 "The connection to service
created from an endpoint was invalidated from this process." UserInfo=
{NSDebugDescription=The connection to service created from an
endpoint was invalidated from this process.}
Purchase did not return a transaction: Error Domain=ASDErrorDomain
Code=5115 "Received failure in response from Xcode" UserInfo=
{NSDebugDescription=Received failure in response from Xcode,
NSUnderlyingError=0x600002d44ae0 {Error
Domain=NSCocoaErrorDomain Code=4099 "The connection to service
created from an endpoint was invalidated from this process." UserInfo=
{AMSDescription=An unknown error occurred. Please try again.,
AMSURL=http://localhost:51482/WebObjects/MZBuy.woa/wa/inAppBuy,
NSDebugDescription=The connection to service created from an
endpoint was invalidated from this process., AMSStatusCode=200,
AMSServerPayload={
"app-list" = (
);
dialog = {
cancelButtonString = Cancel;
defaultButton = Buy;
explanation = "Do you want to buy one App Registration for $2.99?\n\n[Environment: Xcode]";
initialCheckboxValue = 1;
"m-allowed" = 0;
message = "Confirm Your In-App Purchase";
okButtonAction = {
buyParams = "bid=com.airlinemates.backup&bvrs=1.4&offerName=EIBREG&quantity=1&deviceVerification=5084f98e-ab99-5846-827e-048d00d9fac3";
itemName = EIBREG;
kind = Buy;
};
okButtonString = Buy;
paymentSheetInfo = {
caseControl = true;
confirmationTitle = Pay;
countryCode = US;
currency = USD;
designVersion = 2;
displayPrice = "$2.99";
flexList = (
{
value = (
{
style = priceMain;
value = "$2.99";
},
{
style = priceSub;
value = "One-time charge";
}
);
},
{
header = "$null";
value = "For testing purposes only. You will not be charged for confirming this purchase.";
}
);
price = "2.99";
requestor = AppStore;
salableIcon = "http://localhost:53078/StoreKit/AppIcon?bid=com.airlinemates.backup";
salableIconType = app;
salableInfo = (
"App Registration %%image_0%%",
backup,
"In-App Purchase"
);
styles = (
{
bold = true;
name = priceMain;
size = large;
},
{
color = gray;
name = priceSub;
},
{
bold = true;
name = priceMainSpaceBefore;
size = large;
spacingBefore = medium;
}
);
title = {
type = text;
value = Xcode;
};
};
};
"download-queue-item-count" = 0;
dsid = 17322632127;
failureType = 5115;
jingleAction = inAppBuy;
jingleDocType = inAppSuccess;
pings = (
);
}}}}
I've Googled & can't find any reference to this specific error, or even anything that points me in a direction to find the root cause. It's very strange because I haven't made any changes to the code & I hadn't changed the configuration file prior to this error appearing. I've since deleted the configuration file & created a new one - but it's still not working. If I create a transaction in Storekit transaction manager, the app picks it up as having been purchased - so the issue is only isolated to purchases initiated from the app.
If I stop using the configuration file when I run the app, it works fine through sandbox testing the real items in App Store Connect.
I am at a loss. I have looked at examples, and I have used chat/cursor. I cannot figure out how to target the transform/position of a Reality Composer Pro project when adding it to an ARView in iOS.
I have a test red sphere working perfectly for raycast positioning. When I pass the same variables (tested with print out) to the Entity or Anchor position/transform nothing changes.
It seems that, no matter what, the content of the Reality Composer Pro project is placed where the camera view initialized.
How do I actually interact with its position? I just want to be able to tap the screen and place the RCP wherever I want.
Hi Folks...
I’m 81 and trying to learn Swift. I taught programming 40 years ago but haven’t coded for over 20 years. As you can see in the subject line, I’m running Sequoia 15.3 on a MacBook Air and learning and running code samples from “IOS 18 Programming for Beginners” by Ahmad Sahar.
When I run the code samples, the variable settings show up in the Debug area but none of the output even though Sahar’s book states that it should.
I’m wondering if I’m doing some stupid newbie thing or if it might be a bug?
Anyone seen this one?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Xcode 16.2 crashes when opening .swift or .xib files.
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Xcode [54754]
Path: /Applications/Xcode-16.2.0.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 16.2 (23507)
Build Info: IDEApplication-23507000000000000~2 (16C5032a)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
User ID: 501
Date/Time: 2025-02-10 07:45:46.2320 +0900
OS Version: macOS 15.3 (24D60)
Report Version: 12
Anonymous UUID: C4102718-BC60-1A08-FB0D-3B7AAB19D6D0
Sleep/Wake UUID: 2FE8B1FA-D2A5-4F55-9DF5-2178F3212F84
Time Awake Since Boot: 120000 seconds
Time Since Wake: 33305 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 [54754]
Application Specific Information:
abort() called
Application Specific Signatures:
NSInvalidArgumentException
Application Specific Backtrace 0:
0 CoreFoundation 0x00000001971f6e80 __exceptionPreprocess + 176
1 DVTFoundation 0x000000010643788c DVTFailureHintExceptionPreprocessor + 388
2 libobjc.A.dylib 0x0000000196cdecd8 objc_exception_throw + 88
3 CoreFoundation 0x00000001972ac1d8 -[NSObject(NSObject) __retain_OA] + 0
4 CoreFoundation 0x0000000197163830 ___forwarding___ + 1568
5 CoreFoundation 0x0000000197163150 _CF_forwarding_prep_0 + 96
6 AssetCatalogFoundation 0x000000011c04aa68 -[IBICAbstractCatalogItem(IBICManifestArchivistDelegate) manifestArchivist:applyPropertiesFromChildEntry:toChild:results:] + 1380
7 AssetCatalogFoundation 0x000000011c10b3c8 -[IBICBundleIconSet manifestArchivist:applyPropertiesFromChildEntry:toChild:results:] + 112
8 AssetCatalogFoundation 0x000000011c065e0c -[IBICAppIconSet manifestArchivist:applyPropertiesFromChildEntry:toChild:results:] + 240
9 AssetCatalogFoundation 0x000000011c048704 -[IBICManifestArchivist childFromChildEntry:results:] + 192
10 AssetCatalogFoundation 0x000000011c048890 __73-[IBICManifestArchivist childrenFromContentsJSONChildrenEntries:results:]_block_invoke + 152
11 AssetCatalogFoundation 0x000000011c122668 IBWithObjectBufferResultingInArray + 72
12 AssetCatalogFoundation 0x000000011c0487b4 -[IBICManifestArchivist childrenFromContentsJSONChildrenEntries:results:] + 128
13 AssetCatalogFoundation 0x000000011c0490ec -[IBICManifestArchivist replaceChildrenFromFileSystemSnapshot:results:] + 456
14 AssetCatalogFoundation 0x000000011c0548fc -[IBICSlottedAsset replaceChildrenFromFileSystemSnapshot:results:] + 116
15 AssetCatalogFoundation 0x000000011c04924c -[IBICManifestArchivist replaceChildrenFromFileSystemSnapshot:results:] + 808
16 AssetCatalogFoundation 0x000000011c042e54 -[IBICFolder replaceChildrenFromFileSystemSnapshot:results:] + 116
17 AssetCatalogFoundation 0x000000011c08c8e8 -[IBICAbstractCatalog replaceChildrenWithDiskContent:] + 140
18 AssetCatalogFoundation 0x000000011c0798f0 -[IBICCatalogSynchronizer replaceCatalogWithContentsOfPathWhileItIsKnowThatSyncOperationsAreNotInflightAndAreDisabled:] + 140
19 AssetCatalogFoundation 0x000000011c0796f0 -[IBICCatalogSynchronizer replaceCatalogWithContentsOfPath:] + 104
20 AssetCatalogFoundation 0x000000011c077380 +[IBICCatalogSynchronizer synchronizerTakingOwnershipForCatalog:atPath:] + 92
21 AssetCatalogFoundation 0x000000011c0773e8 +[IBICCatalogSynchronizer synchronizerForCatalogAtPath:] + 68
22 AssetCatalogKit 0x000000011a249b04 __69+[IBICCatalogMediaRepository retainedCatalogSynchronizerForFilePath:]_block_invoke + 52
23 AssetCatalogFoundation 0x000000011c0c2708 -[NSMutableDictionary(IBMutableDictionaryAdditions) ib_objectForKey:creatingIfNecessaryWithBlock:] + 100
24 AssetCatalogKit 0x000000011a249a60 +[IBICCatalogMediaRepository retainedCatalogSynchronizerForFilePath:] + 136
25 AssetCatalogKit 0x000000011a24b660 -[IBICCatalogMediaRepository _addSynchronizerForCatalogAtPath:] + 48
26 AssetCatalogKit 0x000000011a24b12c __104-[IBICCatalogMediaRepository fileReferenceObserverDidReportUpdatedAndAddedResourcesByPath:removedPaths:]_block_invoke + 544
27 AssetCatalogKit 0x000000011a24acd8 -[IBICCatalogMediaRepository notifyObserversAfterPossiblyMutatingWithBlock:] + 88
28 AssetCatalogKit 0x000000011a24aed8 -[IBICCatalogMediaRepository fileReferenceObserverDidReportUpdatedAndAddedResourcesByPath:removedPaths:] + 132
29 IDEKit 0x000000010a4f0e80 __54-[IDEContainerContentsMediaRepository _startObserving]_block_invoke + 596
30 IDEFoundation 0x000000010ea491c8 -[IDEContainerContentProductionCoordinator deliverPendingResults:] + 172
31 DVTFoundation 0x0000000106618994 __48-[DVTDelayedInvocation initWithTarget:selector:]_block_invoke + 24
32 DVTFoundation 0x0000000106619a2c -[DVTDelayedInvocation runBlock:] + 272
33 Foundation 0x00000001984026b4 __NSFirePerformWithOrder + 296
34 CoreFoundation 0x0000000197183be8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
35 CoreFoundation 0x0000000197183ad4 __CFRunLoopDoObservers + 552
36 CoreFoundation 0x0000000197183104 __CFRunLoopRun + 788
37 CoreFoundation 0x0000000197182734 CFRunLoopRunSpecific + 588
38 HIToolbox 0x00000001a26f1530 RunCurrentEventLoopInMode + 292
39 HIToolbox 0x00000001a26f7348 ReceiveNextEventCommon + 676
40 HIToolbox 0x00000001a26f7508 _BlockUntilNextEventMatchingListInModeWithFilter + 76
41 AppKit 0x000000019acfa848 _DPSNextEvent + 660
42 AppKit 0x000000019b660c24 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
43 AppKit 0x000000019aced874 -[NSApplication run] + 480
44 IDEKit 0x000000010a278f14 -[IDEApplication run] + 192
45 AppKit 0x000000019acc4068 NSApplicationMain + 888
46 dyld 0x0000000196d1c274 start + 2840
Hello!
When trying to use MLTensor, I am getting the error that it is not found in scope even though I am using Xcode 15.1 (it says fully up to date) and set my deployment target to iOS 17.2. Is there something else I need to be doing in order to use MLTensor?
Thanks!
Michael
Is it possible to develop the following app? The app will measure heart rate variability five times at 2-minute intervals triggered by an event and output the values.
For a number of years we have managed our iOS projects using Sourcetree and command line Git or Visual Code.
I wanted to use the XCode Source control for a more integrated development experience.
However, depite the fact that the Git repo is in the root of the XCode project tree, XCode cannot see that repo in the Source Control panel.
Source Control IS enabled in settings
I tried to add the repo using.
Integrate >> New Git Repository.
but Xcode then says there is an existing repository and does nothing.
How do I add the existing local repo into the Xcode environment or does it now need to be managed only externally because it was not created using Xcode ?
Thanks
Topic:
Developer Tools & Services
SubTopic:
Xcode