I've recently upgraded to Xcode 16 and noticed a change in how the Tab key functions during autocomplete.
(not-replied-but-closed post: https://discussions.apple.com/thread/255762888)
Previously, pressing Tab would extend the typed text up to the first point of choice.
For example, we have two classes: NSViewController and NSViewCoordinator
BEFORE, typing: "NSV" + Tab used to complete to NSViewCo
Now, in Xcode 16, pressing Tab selects the first suggestion by default, instead of completing up to the choice point.
That is very inconvenient because very often I want just see all possible cases with some prefix...without need of typing all prefix manually.
Seems there is no way to restore the previous behavior and that looks very very sad.
I have reverse engineered Xcode 16...and what I get?
They just install new CodeCompletion handler instead of old one without any chance to configure this behaviour by settings or UserDefaults =\
Hope this thread would raise votes and attract Xcode devs here
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's StoreKit transaction manager (Debug > StoreKit > Manage Transactions), how can I delete old apps that I do not need anymore from the list of apps?
Hi, I currently have an app that connect to an arduno via CoreBluetooth. However, the app no longer discovers the arduino when the operating system was upgraded to iOS 18.3.1, however on iOS version 17.6.1 the ardiuno was discoverable I was able to test this theory on two different phones each with different iOS versions. Why are my peripherals no longer being discovered with this update? and what is the solution?
Neither a google search, nor a search of the Apple forums give me a clue as to how to locate or fix the following message I get from Xcode.
CLIENT: Failure to determine if this machine is in the process of shutting down, err=1/Operation not permitted
This error message came from attempting to build and execute an iOS App which ran just fine the last time I built it. Now, that was actually a little over two years ago. This is an iOS app, which I've run successfully for more than a year on macOS, and that, "My Mac (Designed for iPad)", is what my build target for this run was.
Any ideas? Anyone?
If this is a "known condition", just why doesn't a friendly internet search or a search of the Apple forums NOT tell me what it means, or what causes the message.
Of course, I've upgraded the OS a few times, and updated Xcode as well, but have just not had any time to monkey around with my pet code project. Now that I've gotten some time, and I want to see what's new since March of '23, I finally remember where I stashed my code repository and decided to take it for a spin.
Sure, I expect(ed) to see Xcode tell me that the version of Swift has been updated, and maybe some code constructs need to be fixed. But, NO, the code compiles fine.
The first build attempt told me that I needed to update my provisioning profiles, and sign-in and agree to the updated developer agreements, which I did.
Not so unhelpful was the code window in the debugger:
libswiftCore.dylib`swift_willThrow:
-> 0x1aeb7b2a0 <+0>: pacibsp
0x1aeb7b2a4 <+4>: str x19, [sp, #-0x20]!
0x1aeb7b2a8 <+8>: stp x29, x30, [sp, #0x10]
0x1aeb7b2ac <+12>: add x29, sp, #0x10
0x1aeb7b2b0 <+16>: adrp x8, 365651
0x1aeb7b2b4 <+20>: add x8, x8, #0x88 ; _swift_willThrow
0x1aeb7b2b8 <+24>: ldapr x8, [x8]
0x1aeb7b2bc <+28>: cbnz x8, 0x1aeb7b2cc ; <+44>
0x1aeb7b2c0 <+32>: ldp x29, x30, [sp, #0x10]
0x1aeb7b2c4 <+36>: ldr x19, [sp], #0x20
0x1aeb7b2c8 <+40>: retab
0x1aeb7b2cc <+44>: mov x0, x21
0x1aeb7b2d0 <+48>: mov x19, x21
0x1aeb7b2d4 <+52>: blraaz x8
0x1aeb7b2d8 <+56>: mov x21, x19
0x1aeb7b2dc <+60>: b 0x1aeb7b2c0 ; <+32>
Still not much to go on.
I decide to see if it was a macOS vs. iOS issue, so did a clean build folder and tried running on an iPad simulator, "iPad (10th generation)".
Now, I have a blank white screen on my simulator and not much to go on in the code window.
import SwiftUI
@main
struct JottoApp: App { Thread1: Breakpoint 1.1
var body: some Scene {
WindowGroup {
ContentView()
}
}
init() {
UITableView.appearance().backgroundColor = UIColor.clear
}
}
Any and all help with this error message will be appreciated.
Topic:
Developer Tools & Services
SubTopic:
Xcode
If I install RealmSwift into an ios app using SPM, I have no problems.
However if I install it into an ios framework, then when building there is this error:
error: missing required modules: 'Realm.Private', 'Realm', 'Realm.Swift'
I have discovered that if I change the import statement from:
import RealmSwift
to
private import RealmSwift
then doing that makes this build error goes away (but doing that isn't a feasible workaround as I would like to publicly export classes stored in Realm from the framework).
There's no point in posting issues with Realm on their support board as its being deprecated and its tumble weeds on their forum.
But I would be very interested in hearing from the Apple expects explanation or speculation on:
why is importing the same framework via SPM into a framework xcode project resulting in different behavior then when importing it into an app?
why would changing import to private import make the build error go away?
TIA
When testing Energy Impact on Xcode, it shows zero, and other data is normal
Topic:
Developer Tools & Services
SubTopic:
Xcode
When I use Xcode to develop the apps, the connection to my own Apple Watch is failed. The simulator has been downloaded, but it still displayed"watchOS10.0 Not Installed". The developer options were opened, I click the"trust this computer" but it always display"Connecting to *** Apple Watch". My iPhone can be connected normally.
Since dragImage: is deprecated I am trying to update drag and drop with beginDraggingSessionWithItems:.
Drag work fine but I cannot get drop to work correctly.
In the code below change #ifndef to #ifdef (using dragImage:) make drop work as expected.
draggingEntered, draggingUpdated, draggingExited, draggingEnded are all called but NOT performDragOperation (which do the drop).
Uncommenting the line
[pb_item pasteboard:paste_board provideDataForType:@"LN_PboardType"];
cause an exceptionPreprocess: -[NSPasteboardItem pasteboard:provideDataForType:]: unrecognized selector sent to instance 0x600001e64240.
I also try add NSDraggingDestination, NSItemProviderWriting, NSPasteboardTypeOwner to @interface line without success.
What I am doing wrong ?
Any other method to do Drag and Drop (other than dragImage: and beginDraggingSessionWithItems:) ?
Where can I found an Obj-C project using beginDraggingSessionWithItems: for drag an drop ?
``@interface Enclosure : NSView <NSDraggingSource, NSPasteboardItemDataProvider>
- (id)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
if (self)
{
[super setAutoresizesSubviews:YES];
[self registerForDraggedTypes:[NSArray arrayWithObjects:@"LN_PboardType", NSPasteboardTypeString, nil]];
}
return self;
}
- (BOOL)acceptsFirstMouse:(NSEvent *)event
{
return YES;
}
- (void)mouseDown:(NSEvent *)drag_event
{
NSImage *drag_image;
NSPoint drag_position;
NSRect dragging_rect;
NSPasteboard *paste_board;
NSDraggingItem *drag_item;
NSArray *items_array;
NSPasteboardItem *pb_item;
paste_board = [NSPasteboard pasteboardWithName:@"LN_PboardType"];
[paste_board declareTypes:[NSArray arrayWithObjects:@"LN_PboardType", NSPasteboardTypeString, nil] owner:self];
pb_item = [[NSPasteboardItem alloc] init];
[pb_item setDataProvider:self forTypes:[NSArray arrayWithObjects:@"LN_PboardType", NSPasteboardTypeString, nil]];
// [pb_item pasteboard:paste_board provideDataForType:@"LN_PboardType"];
drag_image = [ [NSImage imageNamed:@"drag.jpg"];
drag_position = [self convertPoint:[drag_event locationInWindow] fromView:nil];
drag_position.x -= drag_image.size.width/2;
drag_position.y -= drag_image.size.height/2;
#ifndef DEPRECATED
[self dragImage:drag_image at:drag_position offset:NSZeroSize event:drag_event pasteboard:paste_board source:self slideBack:YES];
#else
drag_item = [[NSDraggingItem alloc] initWithPasteboardWriter:pb_item];
dragging_rect = NSMakeRect(drag_position.x, drag_position.y, drag_image.size.width, drag_image.size.height);
[drag_item setDraggingFrame:dragging_rect contents:drag_image];
items_array = [NSArray arrayWithObject:drag_item];
[self beginDraggingSessionWithItems:items_array event:drag_event source:(id)self];
#endif
}
- (NSDragOperation)draggingSession:(NSDraggingSession *)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context
{
if (disable_drag_and_drop)
return NSDragOperationNone;
switch (context)
{
case NSDraggingContextWithinApplication:
return NSDragOperationCopy;
case NSDraggingContextOutsideApplication:
return NSDragOperationMove;
}
return NSDragOperationNone;
}
…``
Topic:
Developer Tools & Services
SubTopic:
Xcode
So I will summary an issue one of our clients has asked us on GitHub:
https://github.com/pendo-io/pendo-mobile-sdk/issues/233
Project that is a custom framework that uses different SPM packages (one of them is Binary package), we have our main logic inside that framework and we have different targets that use this framework, everything works on the simulator, but running the app on the actual device provokes a crash saying "Binary framework was not found". We have like 20 other SPM packages that work fine, this is the first one we have an issue with.
Please note I understand that SPM will not copy paste the Binary for the magic framework as it does for the apps so I suggested to embed it manually.
So my question is what the best(easy) way to do it.
Please refer to the following issue for more details:
https://github.com/pendo-io/pendo-mobile-sdk/issues/233
My build succeeded but I immediately got the following pop-up error:
Executable Path is a Directory
Domain: DVTMachOErrorDomain
Code: 5
Recovery Suggestion: /Users/myname/Library/Developer/Xcode/DerivedData/Myapp-dwsmxozkmjfflagroxubgbfvahwq/Build/Products/Debug-iphonesimulator/Myapp.app is not a valid path to an executable file.
User Info: {DVTErrorCreationDateKey = "2025-04-17 11:54:27 +0000"}
Executable Path is a Directory
Domain: DVTMachOErrorDomain
Code: 5
Recovery Suggestion: /Users/myname/Library/Developer/Xcode/DerivedData/Myname-dwsmxozkmjfflagroxubgbfvahwq/Build/Products/Debug-iphonesimulator/Myname.app is not a valid path to an executable file.
System Information
macOS Version 15.5 (Build 24F5053f)
Xcode 16.3 (23785) (Build 16E140)
Applied and Failed Fixes:
Upgrade to MacOS 15.5 Beta
pod deintegrate/podinstall
uninstall and reinstall Xcode
Delete DerivedData folder
Edit info.plist Executable File name
Topic:
Developer Tools & Services
SubTopic:
Xcode
When test support code relies on production code, a diamond can occur. If this occurs across packages, it can lead to duplicated symbols and incorrect behavior at runtime despite no warnings at build time. This only occurs in Xcode and top-level application testing. This doesn't occur when the code being tested is in a separate package.
I'm trying to understand how to correctly manage shared test support code which needs to access production code, or if this is the correct way and it is an Xcode bug.
For a minimized example project, see https://github.com/rnapier/SupportCode.
The setup includes three packages: Dependencies, which manages all the dependencies for the app and tests; Core which contains core logic and test support; and Feature, which relies on Core an contains feature-related logic and test support.
Building this system causes Core.framework to show up three times in DerivedData:
./App.app/PlugIns/AppTests.xctest/Frameworks/Core_59974D35D_PackageProduct.framework
./App.app/Frameworks/Core_59974D35D_PackageProduct.framework
./PackageFrameworks/Core_59974D35D_PackageProduct.framework
When unit tests are run, there is a collision on the symbol for Keychain:
objc[48914]: Class _TtC8Keychain8Keychain is implemented in both /Users/ornapier/Library/Developer/Xcode/DerivedData/App-grdjljgevqofhqgflgtrqvhvbtej/Build/Products/Debug-iphonesimulator/PackageFrameworks/Core_59974D35D_PackageProduct.framework/Core_59974D35D_PackageProduct (0x100a98118) and /Users/ornapier/Library/Developer/CoreSimulator/Devices/216C441E-4AE5-45EC-8E52-FA42D8562365/data/Containers/Bundle/Application/7197F2F2-EB26-42FF-B7DB-67116159897D/App.app/PlugIns/AppTests.xctest/AppTests (0x1011002c0). One of the two will be used. Which one is undefined.
This is not a benign warning. There are two distinct copies of _TtC8Keychain8Keychain and test cases will access one and the app will access a different one. This leads to mismatches when accessing static instances such as .shared.
I believe this dependency graph should work, and it does work as long as the top-level testing system is a Swift module. But if it is the application, it builds successfully, but behaves incorrectly in subtle ways.
Hi, I'm currently facing an issue where my React Native app crashes only on a real iPhone. On the simulator and in Xcode preview, the app runs fine.
Previously, I had an issue with FlatList regarding props.getItem, which I solved by installing some missing Babel dependencies. After that, everything worked correctly in the simulator.
But when I try to open the app on a real device, it shows the splash screen and crashes immediately. I've already done a full clean and reset, including:
npx react-native start --reset-cache
Deleted node_modules and Pods, reinstalled everything
Cleaned build folder via Xcode
Deleted DerivedData
Restarted Metro bundler and simulator/device
The issue only happens on the physical device.
Here’s a portion of the crash log
IDate/Time: 2025-04-14 19:11:28.6796 -0300
Launch Time: 2025-04-14 19:11:28.5292 -0300
OS Version: iPhone OS 18.3.2 (22D82)
Release Type: User
Baseband Version: 4.20.03
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: JazminChebar [1973]
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x19a0865fc __exceptionPreprocess + 164 (NSException.m:249)
1 libobjc.A.dylib 0x197601244 objc_exception_throw + 88 (objc-exception.mm:356)
2 JazminChebar 0x1009b2c04 RCTFatal + 568 (RCTAssert.m:147)
3 JazminChebar 0x1009c81f8 __28-[RCTCxxBridge handleError:]_block_invoke + 532 (RCTCxxBridge.mm:1178)
4 libdispatch.dylib 0x1a1e19248 _dispatch_call_block_and_release + 32 (init.c:1549)
5 libdispatch.dylib 0x1a1e1afa8 _dispatch_client_callout + 20 (object.m:576)
6 libdispatch.dylib 0x1a1e29a34 _dispatch_main_queue_drain + 984 (queue.c:8093)
7 libdispatch.dylib 0x1a1e2964c _dispatch_main_queue_callback_4CF + 44 (queue.c:8253)
8 CoreFoundation 0x19a0d2bcc CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 (CFRunLoop.c:1793)
9 CoreFoundation 0x19a0cf1c0 __CFRunLoopRun + 1996 (CFRunLoop.c:3163)
10 CoreFoundation 0x19a121284 CFRunLoopRunSpecific + 588 (CFRunLoop.c:3434)
11 GraphicsServices 0x1e73914c0 GSEventRunModal + 164 (GSEvent.c:2196)
12 UIKitCore 0x19cc6a674 -[UIApplication _run] + 816 (UIApplication.m:3846)
13 UIKitCore 0x19c890e88 UIApplicationMain + 340 (UIApplication.m:5503)
14 JazminChebar 0x100178708 main + 80 (main.m:7)
15 dyld 0x1c037dde8 start + 2724 (dyldMain.cpp:1338)
I have a VPN installed (Global Protect) on my company computer, which is a MacBook Pro M2, to access the company network, internal URLs, websites, and run the app I work on. However, even with the VPN installed, I am having trouble accessing certain resources. The solution found was to manually configure the proxies for my Wi-Fi network. After configuring the proxies, I was able to access all the company's URLs and everything I needed. However, the Xcode Simulator is not picking up these network configurations, and when I try to run the project, it does not work.
How can I solve this?
Topic:
Developer Tools & Services
SubTopic:
Xcode
When I execute:
geoCoder.reverseGeocodeLocation(location, completionHandler:{[weak self](placemarks, error) in
print("reverse geocoding location after altitude: ",location.altitude)
print("placemark location first", placemarks?.first?.location?.altitude ?? -1)
The input CLLocation has correct altitude 25, instead the location in the output placemarks have altitude 0, when of course they should have the same location. Moreover it is impossible to retrofit any data in the returned placemarks as they are portrayed as a read only property.
Hi.
I have a xcframework that has a dependency on 'RxSwift' and 'RxCocoa'. I deployed it using SPM by embedding it in a Swift Package.
However when I import swift package into another project, I keep getting the following error:
"Missing required module 'RxCocoaRuntime"
How can I fix this?
Below are the steps to reproduce the error.
Steps
Create Xcode proejct, make a dependency on 'RxSwift' and 'RxCocoa' (no matter doing it through tuist or cocoapods)
Create XCFramework from that proejct. (I used commands below)
xcodebuild archive \
-workspace SimpleFramework.xcworkspace \
-scheme "SimpleFramework" \
-destination "generic/platform=iOS" \
-archivePath "./SimpleFramework-iphoneos.xcarchive" \
-sdk iphoneos \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild archive \
-workspace SimpleFramework.xcworkspace \
-scheme "SimpleFramework" \
-archivePath "./SimpleFramework-iphonesimulator.xcarchive" \
-sdk "iphonesimulator" \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild -create-xcframework \
-framework "./SimpleFramework-iphoneos.xcarchive/Products/Library/Frameworks/SimpleFramework.framework" \
-framework "./SimpleFramework-iphonesimulator.xcarchive/Products/Library/Frameworks/SimpleFramework.framework" \
-output "./SimpleFramework.xcframework"
Embed in Swift Package, and deploy.
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "SimplePackage",
platforms: [.iOS(.v16)],
products: [
.library(
name: "SimplePackage",
targets: ["SimplePackage"]),
],
dependencies: [
.package(url: "https://github.com/ReactiveX/RxSwift", from: "6.8.0")
],
targets: [
.binaryTarget(
name: "SimpleFramework",
path: "Sources/SimpleFramework.xcframework"
),
.target(
name: "SimplePackage",
dependencies: [
"SimpleFramework",
"RxSwift",
.product(name: "RxCocoa", package: "RxSwift")
]
)
]
)
Download Swift Package in another project and import module.
I resolved this by removing dependencies from the Swift Package, downloading package in another project, and fetching dependencies by cocoapods.
Thist works, but I don't want to use another dependency manager while using SPM.
Development Environment
CPU : Apple M4 Max
MacOS : Sequoia 15.3
Xcode : 16.2
My app has a Watch app companion, and a Widget.
are this settings correct to distribute these to TestFlight and Apple Store ?
Topic:
Developer Tools & Services
SubTopic:
Xcode
Hi all,
I’m running into an issue with my iOS + Apple Watch app project, and I could really use some advice. My WatchOS app requires an iOS companion for settings and configuration, so both apps need to be distributed together. Here’s how I structured my Xcode project:
Main iOS App target
WatchOS App target
WatchOS Extension target
However, I’m very confused about how these targets interact, and things are not working as expected.
The problem:
I can build and run the WatchOS app and its extension independently in the simulator by selecting their schemes.
When I select the main iOS app scheme, I get an error about ITSWatchOnlyContainer in the Info.plist—even though there’s no Info tab for that target in Xcode.
I’m able to distribute the WatchOS app by itself, and the extension as well. But I can’t distribute them bundled together as a single package, and I haven’t found any clear resources that explain how to fix this.
This is my very first app, and it’s frustrating to get stuck just before the finish line!
Project Structure / steps to reproduce
Let’s say my project is called MyAppProject, with these targets:
MyAppProject
Main iOS App
Embedded target: MyAppProject Watch App
Bundle identifier: com.example.MyAppProject
MyAppProject Watch App
WKCompanionAppBundleIdentifier: com.example.MyAppProject
“Requires iOS App”: YES
MyAppProject Extension
Bundle identifier: com.example.MyAppProject
When running from the MyAppProject scheme, I get this error (even though I can’t see or edit the Info.plist in Xcode for this target):
“Please try again later. This app has the ITSWatchOnlyContainer key set in its Info.plist, which identifies it as a shell app surrounding a Watch-only app; these are not installable.”
As a result, I can’t distribute the app as a bundle.
I’d appreciate help understanding:
How should the Info.plist files be configured for each target?
What do I do if the Info.plist path seems missing in the Xcode UI?
Is there a “correct” way to structure an iOS + WatchOS app for bundled distribution?
Topic:
Developer Tools & Services
SubTopic:
Xcode
I don't know Xcode very well, and had been using it sporadically to test a project exported from Unity.
I recently added a StoreKit Configuration to the project, and since then it gives me ≈10s after launching before the beach ball appears, and it never leaves. Xcode says it is "Indexing" but I don't know if that's an obvious culprit.
I can still build my project via the fastlane tool, on the command line, and the newly-added StoreKit configuration works just fine.
But I cannot use Xcode interactively any more, unless I re-export the project from Unity. The only difference between it working and hanging is the Store Kit configuration.
How do I understand what's going on, and (ideally) fix it? The Activity Monitor gives a bunch of backtraces that don't have an obvious network or I/O culprit in them.
I upgraded IOS to 15.5 yesterday and then my xcode failed to preview today. The error message I got is:
Communication with Apple failed
Your team has no devices from which to generate a provisioning profile. Connect a device to use or manually add device IDs in Certificates, Identifiers & Profiles. https://developer.apple.com/account/
Any one knows how to fix it?
I'm trying to evaluate if we can support AR navigation with MapKit. The feature is supposed to be available for users in US.
I tried to run the sample on my iPhone: https://developer.apple.com/documentation/arkit/tracking-geographic-locations-in-ar?language=objc
But I'm in a location that ARGeoTrackingConfiguration.checkAvailabilityWithCompletionHandler: always return false. I think ARGeoAnchor isn't supported in my location.
I tried to use simulated locations by
Adding a gpx file when launching the app.
Enabling Xcode -> Debug -> Simulate Location -> New York, NY, US
But the availability for ARGeoAnchor is still false.
Is that possible for me to develop the ARGeoAnchor feature outside of the covered areas?