The AVCam sample code by Apple fails to build in Swift 6 language settings due to failed concurrency checks ((the only modification to make in that code is to append @preconcurrency to import AVFoundation).
Here is a minimally reproducible sample code for one of the errors:
import Foundation
final class Recorder {
var writer = Writer()
var isRecording = false
func startRecording() {
Task { [writer] in
await writer.startRecording()
print("started recording")
}
}
func stopRecording() {
Task { [writer] in
await writer.stopRecording()
print("stopped recording")
}
}
func observeValues() {
Task {
for await value in await writer.$isRecording.values {
isRecording = value
}
}
}
}
actor Writer {
@Published private(set) public var isRecording = false
func startRecording() {
isRecording = true
}
func stopRecording() {
isRecording = false
}
}
The function observeValues gives an error:
Non-sendable type 'Published<Bool>.Publisher' in implicitly asynchronous access to actor-isolated property '$isRecording' cannot cross actor boundary
I tried everything to fix it but all in vain. Can someone please point out if the architecture of AVCam sample code is flawed or there is an easy fix?
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
I'm testing a video stream (HLS) with AVPlayer. On XCode 14.3 and simulators running iOS 16.4, there is no video image, only black screen. The audio is playing normally, also progress/duration of the video is showing as expected. The problem does not occur on same XCode version with earlier versions of the simulator. Is this a simulator bug? I've also tested it on real device with iOS 16.4 - no problem there.
Hi everyone,
I'm getting this error when I try to test my app on my iPhone.
If any other developers who have gotten the same error could help, that would be great.
Thanks, Oliver
Recently my Mac OS is updated to 15.2 and Xcode and it's tools are updated.I'm working on my react native project to create build using Xcode but I'm getting this error.
Anyone please help
Topic:
Developer Tools & Services
SubTopic:
Xcode
Could not launch “App Name”
Domain: IDELaunchErrorDomain
Code: 20
Recovery Suggestion: LaunchServices has returned error -54. Please check the system logs for the underlying cause of the error.
User Info: {
DVTErrorCreationDateKey = "2024-12-27 12:16:34 +0000";
DVTRadarComponentKey = 113722;
IDERunOperationFailingWorker = IDELaunchServicesLauncher;
}
The operation couldn’t be completed. (OSStatus error -54.)
Domain: NSOSStatusErrorDomain
Code: -54
User Info: {
"_LSFunction" = "_LSOpenStuffCallLocal";
"_LSLine" = 4224;
}
I'm trying to build a Multiplatform app for Mac but get this incomprehensible error. Anyone any idea what this means and how to fix it?
"Driver threw Swift requires a minimum deployment target of iOS 7.0.0 without emitting errors."
I'm using the PhotosPicker in my SwiftUI project, like it is provided in the sample code (https://developer.apple.com/documentation/photokit/bringing-photos-picker-to-your-swiftui-app).
Currently it is set up like that:
the app loads the images and stores them in CoreData to MyEntity as binary data. However, when a user wants to update the photos there seems to be no possibility to check if the already stored image is already part of the current MyEntity. This means, there seems to be no possibility to preselect already existing images that were selected in a previous session.
Trying to use localIdentifier didn't work either, as it is always nil.
Now I'm wondering, if anyone has an idea on how to solve the given issue, or if there is no option to do so. Any information is appreciated. Thanks!
Hello, I need help I desire to select/filter the contours on an image. Not sure best way to do that. Idea select/filter for bottom left most contour? see image attached please. also will need end points or court corners. and need contour to be fine line, smooth, ie accurate of the court end line and side lines only is desired. thank you :) or also glad for other ideas or api to determine the lines/corners I need.
glad to email to discuss if that is better/easier actually prefer that. thanks.
I am creating an imessage sticker pack and I am having an issue with an update of my app. It publishes to test flight but I can't download it to test. My app has an extension of imessage.
I have tried:
Checking the size of the animated stickers. All are below 500kb
My version number is 4.1.1. so no 0
I am really no sure what to do. Any suggestions would be appreciated.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Just this error is coming again and again I just updated the Xcode today.
Thanks
Zipzy Games
For normal testing I build an application using Xcode and selecting "Build for Profiling" from the Product menu.
For production I do
"xcodebuild clean build -configuration Release ......."
I notice a big performance difference.
In my case the XCode profiling build runs in under a minute, the xcodebuild version takes over 4 minutes.
The XCode profiling build uses the Release configuration, the xcodebuild is also using the Release configuration.
What additional configuration options are being set/used when "Building for Profiling"?
I'm having a hard time finding an answer to this question.
I'm a noobie but doing a tutorial where it requires me to add these capabilities to my project.
Access Wi-Fi Information
Network Extentions
Bonjour Services
I have the Access Wi-Fi and Network Extentions installed but I could not find Bonjour Services
Any help would be much appreciated!
Thanks
Topic:
Developer Tools & Services
SubTopic:
Xcode
Hello,
I am working on updating my system for Xcode but it has hanged here from last 4 hours I checked my internet.
Thanks
Zippy Games
The BUNDLE_DISPLAY_NAME of my app changes (between Testing, Staging, Production) so that it's obvious to testers etc. which varian they are using.
The name contains unicode space to ensure the OS doesn't apply kerning to the spacing within the app name.
If this is put directly into the info.plist then on the iPhone desktop it's displayed as desired i.e. if the info.plist contains
My Application Name
Then on the iPhone desktop it displays as:
My Application Name
However if the name is defined in an .xcconfig file as
BUNDLE_DISPLAY_NAME = Xfinity Call Guard
And the info.plist contains $(BUNDLE_DISPLAY_NAME)
Then the name is displayed on the iPhone desktop as
My Application N....
Is there a way to specify the name with the unicode characters within an .xcconfig and get that to appear as spaces on the desktop?
I have a dummy project that is set up in the following way:
one Xcode project
two frameworks, UI and Feature, Feature embeds UI-framework
three app targets, two that are SwiftUI lifecycle and one UIKit lifecycle
all app targets import the Feature framework
all app targets have same setup for asset catalogue
The point of this setup is to be able to switch between app target scheme and see preview changes accordingly. That works 100% with anything coming from the asset catalogue and even localization catalogues.
The dummy project exists as a proof of concept for the main project (8 years old, all Swift) I am working on. However, the same setup does not work in the main project.
I am suspecting it has to do with how the project is initialised and bundles. I print out the bundles to see which bundles are registered.
Dummy project will print out the bundle based on app target, the main bundle being based on the selected scheme.
The main project will have the previews.com.apple.PreviewAgent.iOS as main bundle.
How to collaborate project between Unity Dev and Xcode SwiftUI Dev, is it possible..?
and how is the workflow for that if possible..?
I'm working with CBConnectPeripheralOptionNotifyOnConnectionKey, and my understanding is that it should trigger an alert when a reconnection occurs while the central app is in the background. To test this, I've set up two separate iPhone devices—one acting as the peripheral and the other as the central.
The process I'm using is as follows:
The central app connects to the peripheral app.
I then switch to a different app on the central device, which causes the central app to go into the background.
I manually disconnect and reconnect Bluetooth on the central device, which should trigger the peripheral app to reestablish the connection.
However, despite the central app being in the background, I don't see the expected alert on the central side. The connection reestablishes correctly, but no alert appears.
I would appreciate any insights on what might be causing this issue or if I'm misunderstanding the behavior of CBConnectPeripheralOptionNotifyOnConnectionKey. I'd be happy to provide more specific code or logs if needed.
Thanks in advance! I’m relatively new to Core Bluetooth and feel like I’ve explored most of the options, but I’m still encountering this issue.
A new app I submitted to review was rejected due to a crash.
I cannot reproduce the crash, even running it on exact the same device model used by App Review.
So I need to symbolicate the ips crash log they provided me.
Using MacSymbolicate and the archive located using Xcode Organizer I was able to partially symbolicate the crash log.
To fully symbolicate the crash log, however, according to MacSymbolicate, I would need two more symbol files, which can't be located, because they relate to system frameworks (SwiftData and _SwiftData_SwiftUI).
I have tried to follow the instructions provided on
https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report
but I had no success.
It seems to me that the instructions contained there for symbolicating using Xcode do not apply for crash logs downloaded from appstoreconnect after an App Review rejection. Also, the instructions seem to be out of date, e.g. "To symbolicate in Xcode, click the Device Logs button in the Devices and Simulators window.": This button was replaced by "Open Recent Logs", which opens what seems to be a different window (according to some online research).
Is it possible to fully symbolicate such an ips file downloaded from App Review team?
If so, how can this be achieved?
Thanks
This is how the partially symbolicated crash log looks like:
Hardware Model: iPad13,16
...
AppStoreTools: 16C5031b
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
...
OS Version: iPhone OS 18.2.1 (22C161)
Release Type: User
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000018c100e2c
Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: exc handler [6226]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libswiftCore.dylib 0x18c100e2c _assertionFailure(_:_:file:line:flags:) + 264
1 SwiftData 0x24fa6f3b4 0x24fa4a000 + 152500
...
14 SwiftData 0x24fa89700 0x24fa4a000 + 259840
15 _SwiftData_SwiftUI 0x250cd34e4 0x250cce000 + 21732
16 _SwiftData_SwiftUI 0x250cd1364 0x250cce000 + 13156
17 XXX 0x10451f7ac closure #1 in closure #2 in closure #1 in PaymentsMonthView.body.getter (in XXX) (PaymentsMonthView.swift:119) + 1324972
18 XXX 0x10451ea14 closure #1 in PaymentsMonthView.body.getter (in XXX) (PaymentsMonthView.swift:99) + 1321492
19 SwiftUICore 0x24fd5d304 specialized ViewBodyAccessor.updateBody(of:changed:) + 1240
20 SwiftUICore 0x24fd5cd4c closure #1 in DynamicBody.updateValue() + 600
21 SwiftUICore 0x24fd5c008 DynamicBody.updateValue() + 928
...
...
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x000000011128b208 x1: 0x0000000200000003 x2: 0x0000000000000001 x3: 0x00000001130be744
x4: 0xfffffffffe1cd413 x5: 0x0000000000000013 x6: 0x0000000000000020 x7: 0x00000000000007fc
x8: 0xfffffffe00000000 x9: 0x0000000200000003 x10: 0x0000000000000003 x11: 0x0000000000000000
x12: 0x00180080004019e0 x13: 0x00100000004017fc x14: 0x00000001046d23e0 x15: 0x00000000000001e0
x16: 0x952d0001130bde00 x17: 0x00000000020007fc x18: 0x0000000000000000 x19: 0x000000024fb661e0
x20: 0x000000011128b200 x21: 0x0000000000000000 x22: 0x000000000000000b x23: 0x000000000000001d
x24: 0x0000000000000040 x25: 0x000000024fb64790 x26: 0xf000000000000977 x27: 0x0000000000000000
x28: 0x000000024fb64750 fp: 0x000000016ba188f0 lr: 0x000000018c100e2c
sp: 0x000000016ba18820 pc: 0x000000018c100e2c cpsr: 0x60001000
far: 0x0000000000000000 esr: 0xf2000001 (Breakpoint) brk 1
Binary Images:
0x1043dc000 - 0x104633fff Locador arm64 <78fc8961d731321ba0c8f9bb051109c5> /private/var/containers/Bundle/Application/FE1C10C5-49C1-4022-860A-6C3515E2F8BB/Locador.app/Locador
0x1047fc000 - 0x104807fff libobjc-trampolines.dylib arm64e <be05652226b13a508ad193ac99fcdc9c> /private/preboot/Cryptexes/OS/usr/lib/libobjc-trampolines.dylib
0x18c0c9000 - 0x18c66afff libswiftCore.dylib arm64e <e9b1dc6b7fef3bbbb083f4e8faaa53df> /usr/lib/swift/libswiftCore.dylib
0x24fa4a000 - 0x24fb88ff7 SwiftData arm64e <90275b26954b349996ff44ada39f0358> /System/Library/Frameworks/SwiftData.framework/SwiftData
0x250cce000 - 0x250cebff8 _SwiftData_SwiftUI arm64e <d250fe30854c3f1c85fc8a89dec5d484> /System/Library/Frameworks/_SwiftData_SwiftUI.framework/_SwiftData_SwiftUI
0x24fcf8000 - 0x2508d4fff SwiftUICore arm64e <647b91f1620d3741bd708f9f26b5674b> /System/Library/Frameworks/SwiftUICore.framework/SwiftUICore
0x1ba831000 - 0x1ba874fff AttributeGraph arm64e <5eeff865ac123665a9dba9d612eb0e9f> /System/Library/PrivateFrameworks/AttributeGraph.framework/AttributeGraph
0x19220e000 - 0x1934d0fff SwiftUI arm64e <0b283f5831ae385f9c8ff128fd0e30b8> /System/Library/Frameworks/SwiftUI.framework/SwiftUI
0x1902f8000 - 0x19220dfff UIKitCore arm64e <f80c6ee450ca346f90ebbb3da9817503> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x18dadc000 - 0x18e01ffff CoreFoundation arm64e <6a60be13e6573beca9acba239ae29862> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x1dacec000 - 0x1dacf4fff GraphicsServices arm64e <f4e7a885f4913721862dc57403f4d821> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1b3d31000 - 0x1b3db413f dyld arm64e <4eb7459fe23738ce82403f3e2e1ce5ab> /usr/lib/dyld
0x0 - 0xffffffffffffffff ??? unknown-arch <00000000000000000000000000000000> ???
0x1df105000 - 0x1df13efe3 libsystem_kernel.dylib arm64e <e3965df1a3a3374a94eaf86739c5cc8e> /usr/lib/system/libsystem_kernel.dylib
0x18c6e1000 - 0x18d411fff Foundation arm64e <7274dde368d634a08e677726e1265e80> /System/Library/Frameworks/Foundation.framework/Foundation
0x2185fc000 - 0x218608ff3 libsystem_pthread.dylib arm64e <b2fe0dfa67de3d7282676c42073e0e8d> /usr/lib/system/libsystem_pthread.dylib
0x1958ce000 - 0x19594dffb libsystem_c.dylib arm64e <8d425c7257c93e54a1e1e243cbdfc446> /usr/lib/system/libsystem_c.dylib
EOF
I am unable to download file from iCloud Documents from my swift project. I was able to successfully upload the file to iCloud Documents but now when I try to download same file at the uploaded path. It is giving me error that I don't have permission to view the file.
Please find exact error below.
[ERROR] couldn't fetch remote operation IDs: NSError: Cocoa 257 "The file couldn’t be opened because you don’t have permission to view it."
"Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)""
This is using Xcode 16.2 (16C5032a), MacOS 15.2, on MacbookPro 16 M1 Pro.
I have two repositories, one for an application and another one for a framework. The repository framework is integrated into the application one as git submodule.
I was going to push the submodule to Github using Xcode git integration. It detects some conflicts and ask to pull. I pull. A window appears with some conflicting files (5 or 6). Review them. While reviewing something in Xcode crashed, but as Xcode was still up and running, ignored the crash. Decided to cancel the conflicts window and inspect my local files. Pull again but this time I decided to pull both repos. Review the conflicting changes and decided to cancel again to continue by hand in a terminal.
Then, I notice that the project for the submodule is in red and that the "Changes" tab shows a bunch of files with and admiration mark. I go to the submodule folder in Finder and... everything inside the submodule folder was gone, disappeared, lost... everything, even the ".git" folder (only remained a binary folder for a component I use for the framework but is empty).
I decided to run a recovery tool. It finds nothing to recover inside that folder, nothing. A lot of files even from years ago but nothing inside that folder? how is that possible?
I filled a Feedback assistant issue: FB16307182
Could it be possible that Xcode "moved" everything to another place (I'm desperate so I'm starting to think in absurd explanations)
Thanks