Welcome to the Apple Developer Forums

Post your questions, exchange knowledge, and connect with fellow developers and Apple engineers on a variety of software development topics.

For questions about using Apple hardware and services, visit Apple Support Communities

Posts

Sort by:
Post not yet marked as solved
0 Replies
10 Views
My app has buttons to set mapView.preferredConfiguration = MKStandardMapConfiguration() // and then mapView.preferredConfiguration = MKImageryMapConfiguration() This works fine unless I zoom in with: self.mapView.region = MKCoordinateRegion(MKMapRect(origin: MKMapPoint(self.coordinate), size: MKMapSize(width: 1000.0, height: 1000.0))) Then I switch between configurations and quickly crash. iOS 16.4. Happens in the simulator or on device. Anyone else seen this?
Posted
by
Post not yet marked as solved
0 Replies
13 Views
I want to use AVPlayerViewController to display the video but it should be in auto-play mode. Previously I was using AVPlayer for that and listening to the .AVPlayerItemDidPlayToEndTime notification but I wonder if there is a better way? eg. using AVPlayerLooper for instance so I don't have to use that .AVPlayerItemDidPlayToEndTime anymore I wrote something like this but it is not working - I have a black screen with video controls - probably because AVPlayerViewController does not have any playable content... struct VideoPlayerQueuedView: UIViewControllerRepresentable { let videoUrl: URL func makeUIViewController(context: Context) -> AVPlayerViewController { let queuePlayer = AVQueuePlayer() let playerViewController = AVPlayerViewController() // Create an AVPlayerItem from the videoUrl let playerItem = AVPlayerItem(url: videoUrl) // Create an AVPlayerLooper with the queuePlayer and the playerItem as the template item let playerLooper = AVPlayerLooper(player: queuePlayer, templateItem: playerItem) // Set the player property of AVPlayerViewController playerViewController.player = queuePlayer return playerViewController } func updateUIViewController(_ uiViewController: AVPlayerViewController, context: Context) { // Update the video player if needed } }
Posted
by
Post not yet marked as solved
0 Replies
21 Views
I use the Apple login function, but all of them were treated as new users because the existing Apple login user information and sub-value did not match. I haven't done anything recently except change to a public certificate, but both the app and the web are getting sub-values for jwt tokens that differ from existing user information. How do I fix this problem?
Posted
by
Post not yet marked as solved
0 Replies
14 Views
I see in the docs under Derive a Non-Persistent Value Using a Transient Attribute that transient attributes can be produced with custom getter methods. However, if you use Codegen, a custom getter would raise an invalid redeclaration error in Xcode. In that case, is it possible to still implement transient attributes, even with generated properties? I'm specifically interested in a solution that works with SwiftUI.
Posted
by
Post not yet marked as solved
0 Replies
22 Views
(maybe you meant: _swift_FORCE_LOAD$swiftCompatibility56$_connectivity_plus, _swift_FORCE_LOAD$swiftCompatibility56$_DKPhotoGallery , _swift_FORCE_LOAD$swiftCompatibility56$_SwiftyGif , _swift_FORCE_LOAD$swiftCompatibility56$_Reachability , _swift_FORCE_LOAD$swiftCompatibility56$_image_gallery_saver , _swift_FORCE_LOAD$swiftCompatibility56$_DKImagePickerController ) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Posted
by
Post not yet marked as solved
0 Replies
18 Views
I am trying to read register values from an MFi Authentication Coprocessor 3.0 chip MFI343S0017 by I2C. But all the return values are 0x00 instead of the expected values.What can possibly be going wrong?
Posted
by
Post not yet marked as solved
1 Replies
27 Views
My test MapKit desktop application generates the following issue, which I do not understand, nor for the moment would I know how to address a solution. I found searching the documentation for a possible fit-for-purpose solution to be extremely elusive with my current limited MapKit knowledge … :] I believe the application’s PList file, Sandbox, and the associated entitlement settings to be correctly identified. The PList file contains: Privacy - Location Usage Description. That said, the warning I am concerned about happens to be as follows: 2023-06-01 14:20:37.106631-0600 My_Map[2265:69866] [suggestions] Rejecting connection missing Suggestions entitlement; pid: 0, entitlementKey: com.apple.private.suggestions.contacts Building the application presents the [Authorization Modal], where the application generates a series of issues when the application starts. The [Location Manager] authorization [STATUS] changed to: <=== (As expected) [This comment occurs because I previously initiated the application to test]. The [STATUS] is [NOT DETERMINED]. <=== (As expected) [The application realizes I rebuilt the application, therefore the [MODAL] is presented again]. [The application will ignore the [MODAL] presentation if I did not rebuild the application]. The application displays the following information, listed below, [BEFORE] I acknowledge the connection: 2023-06-01 16:06:28.466642-0600 My_Map[3087:122133] [default] Failed to get state for list identifier com.apple.LSSharedFileList.ApplicationRecentDocuments Error: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" (Access to list denied) UserInfo={NSDebugDescription=Access to list denied} 2023-06-01 16:06:28.702451-0600 My_Map[3087:122133] [VKDefault] Missing MeshRenderables for ground mesh layer for (1/1) of ground tiles. Tile debug info: (Key: 0.0.1.255 t:34 kt:0, Has mesh errors: 0, MeshInstance count: 2, PendingMaterial count: 2, Invisible MeshInstances count: 0) location manager failed with error Error Domain=kCLErrorDomain Code=1 "(null)" 2023-06-01 16:06:30.570014-0600 My_Map[3087:122133] [MKCoreLocationProvider] CLLocationManager(<CLLocationManager: 0x600003df9960>) for <MKCoreLocationProvider: 0x6000013a7900> did fail with error: Error Domain=kCLErrorDomain Code=1 "(null) The application presents the following information, and presents the [LOCATION IDENTIFIER – BLUE PULSING DOT] after I acknowledge access [MODAL] with [OK]. The [Location Manager] authorization [STATUS] changed to: <=== (As expected) The [STATUS] is [AUTHORIZED]. <=== (As expected) I did not set the [REGION] nor the [SPAN], but the application identifies the [DEFAULT LOCATION] information as follows: <=== (As expected) The [LOCATION]: Optional(<+51.04022217,-114.09052392> +/- 35.00m (speed -1.00 mps / course -1.00) @ 2023-06-01, 4:06:33 PM Mountain Daylight Saving Time) As a side note, I discovered I must have my [WIFI] connection to be active too ... !!! GPS is not and never can be an option ... :] A suggestion as to how I might address, and possibly understand this issue would be very welcome … :] I believe my application is missing a required entitlement to which I do not know how to access, and or initiate. I must thank you in advance for your time ... :] Best regards, jim_k // My Code: import Cocoa import MapKit import CoreLocation class ViewController: NSViewController, CLLocationManagerDelegate { **// MARK: - OUTLETS** @IBOutlet weak var theLocalTimeZoneDetailMapViewFrame: NSBox! // Identify the [Local Time Zone Map View] @IBOutlet weak var theLocalTimeZoneDetailMapView: MKMapView! @IBOutlet weak var theLocalTimeZoneDetailMapViewCloseButton: NSButton! **// MARK: - PROPERTIES** let locationManager = CLLocationManager() // View Did Load override func viewDidLoad() { super.viewDidLoad() locationManager.delegate = self print("starting location update requests") locationManager.startUpdatingLocation() } // Location Manager Function func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { print("The [Location Manager] authorization [STATUS] changed to:" ) switch status { case .restricted: print("The [STATUS] is [RESTRICTED].") //showLocationAuthorizationRestrictedAlert() case .denied: print("The [STATUS] is [DENIED].") //showLocationAuthorizationDeniedAlert() case .authorized: print("The [STATUS] is [AUTHORIZED].") let location = locationManager.location print("The [LOCATION]: \(String(describing: location))") case .notDetermined: print("The [STATUS] is [NOT DETERMINED].") default: print("unknown state: \(status)") } } // Location Manager Error Function func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { print("The [LOCATION MANAGER] failed with error \(error)" ) } **// MARK: - DISMISS THE WINDOW** @IBAction func dismissDetailMapViewInformationWindow(_ sender: NSButton) { /// Close the window. NSApplication.shared.keyWindow?.close() } // <=== End of [@IBAction func dismissDetailMapViewInformationWindow(_ sender: NSButton)] } // End of [class ViewController: NSViewController, CLLocationManagerDelegate]
Posted
by
Post not yet marked as solved
0 Replies
25 Views
We want to stop the sale of our auto-renewable subscription for our app. But still allow existing subscribers to continue using the subscription until they decide to cancel. Removing the availability of the subscription seems to stop the additional sign-ups plus renewals. However we're not ready to stop renewals. Is it possible to configure it the way we want it through App Store Connect or do we need to put the restriction on our app? Thanks!
Posted
by
Post not yet marked as solved
0 Replies
24 Views
I am facing an issue while playing pubg on 14 pro max with guided access on or while screen recording. Whenever one of these feature is on, there is a lot of fps drops. It doesn't matter if I just started playing or if phone's temprature is high, but there's no 90 fps. With both these features off, I get 90 fps. Can someone help me with this issue?
Posted
by
Post not yet marked as solved
1 Replies
43 Views
Greetings, We have observed an alarming number of crashes exceeding 1 million across various operating systems and devices. These crashes consistently point to a PAC failure in the specialized PreferenceNode.find<A>(key:) + 16 (PreferenceList.swift:146) function. The stack trace is exclusively a system-level stack, lacking any application-level stacks for us to go on. This makes it rather impossible for us to debug within our own application, since we do not have system-level context. Our analysis suggests that this issue may stem from either a compiler bug or an incorrectly implemented virtual-function in the AttributeGraph framework, resulting in a pointer-authentication failure in the SwiftUI framework. Lastly, if it helps, based on our own logs, we have determined that the problem primarily occurs when users return from being in the background for more than 60 minutes. However, despite numerous attempts, we have been unable to reproduce the issue ourselves. We kindly request your guidance on the most effective approach to address this matter confidently.
Posted
by
Post not yet marked as solved
0 Replies
25 Views
When I go to https://www.frameforge.com in Safari, the address bar doesn't contain the little padlock icon indicating proper SSL. But if I go to the same URL in FireFox, Chrome, or Edge, they do have a lock indicating that all is well. How can I figure out why Safari is not happy with this site's certificates or whatever?
Posted
by
Post not yet marked as solved
0 Replies
25 Views
My app depends on two frameworks that I don't want to check-in to source. Previously, when I was using traditional frameworks, I had a run script phase in the build steps that would compile the frameworks. This worked well as the first time one would try to build the app it would also build the needed frameworks. However, after switching to xcframeworks, this no longer works. Even though the run script phase is before the compile and link steps - the build still fails because the frameworks don't exist yet. Is there a workaround for this, or have I encountered a bug?
Posted
by
Post not yet marked as solved
0 Replies
27 Views
Hi community. I was looking for a way to make word segmentation of a string without delimiters and spaces. Apple's Natural language framework does not provide this (I think is strange). I want to achieve something like this: Input: "makesenseofthis" Output: ["make", "sense", "of", "this"] Any third party to do it? Maybe is there any Apple API? Thanks in advance
Posted
by
Post not yet marked as solved
0 Replies
37 Views
Hello, I have my largely iOS app running using Mac Catalyst, but I need to limit what Macs will be able to install it from the Mac App Store based on the GPU Family like MTLGPUFamily.mac2. Is that possible? Or I could limit it to Apple Silicon using the Designed for iPad target, but I would prefer to use Mac Catalyst instead of Designed for iPad. Is it possible to limit Mac Catalyst installs to Apple Silicon Macs? Side question: what capabilities are supported by MTLGPUFamily.mac2? I can't find it. My main interest is in CoreML inference acceleration. Thank you.
Posted
by
Post not yet marked as solved
0 Replies
22 Views
Hi I was wondering if there was any way that I could either extract depth data from a 3d photogrammetry model or some kind of scan? I am doing a project on measuring skin wounds/extrusions and I am trying to see if I could use an iPhone to accurately enough measure certain parts of wounds to measure their depths. I have also seen openCV stereo vision being used to measure depth, but I was hoping someone had some idea as to how I could accurately extract this data using an apple sdk.
Posted
by
Post not yet marked as solved
0 Replies
31 Views
I have a pretty simple swift code to open Files app and let the user browse to any folder and pick a file. func goToFilesApp() { var documentPicker: UIDocumentPickerViewController if #available(iOS 14, *) { let types: [UTType] = [UTType.text, UTType.vCard, UTType.zip, UTType.gzip] documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: types) } else { let types = [String(kUTTypeText), String(kUTTypeVCard), "com.pkware.zip-archive", "org.gnu.gnu-zip-archive", "org.gnu.gnu-zip-tar-archive"] documentPicker = UIDocumentPickerViewController(documentTypes: types, in: .import) } documentPicker.delegate = self documentPicker.modalPresentationStyle = .formSheet if let view = self.view as? UIViewController { view.present(documentPicker, animated: true, completion: nil) } } and extension AnalyzeFilePresenter : UIDocumentPickerDelegate { func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) { if let firstUrl = urls.first { manageFilePicked(url: firstUrl) } } } This is working well, but users use this feature very often and under some circumstances the Files app is not remembering the last folder and the user has to browse to their last location (which is a bit annoying). With my iPhone X, ios 15.3.1 and iCloud unactive, this code remembers the last folder accessed. With my iPhone 13 Pro, iOS 16.2 and iCloud active, this code doesn't remember the last folder accessed and instead show a default folder. With this iPhone 13, if the user uses Files app (outside of my app) Files app indeed remembers the last folder, so I guess it's a problem of my app. What could I try? Because every SO answer I've read show this little piece of code I'm using.
Posted
by
Post not yet marked as solved
0 Replies
41 Views
The problem I have a MacOS app that hosts a content filtering system extension, like SimpleFirewall. The app has been in production for a couple years. I'm working on a new version, and in testing the release candidate, I'm getting a consistent crash that I believe is related to swift concurrency back deployment. Here are the key details: building using Xcode 14.2, from a machine running Monterrey, Swift 5.7.2 crash does not happen when building and testing from Xcode, locally crash does not happen on test machine running Ventura crash DOES happen always on a test machine running Big Sur only the root-user system extension crashes, not the host application the new version introduced async/await into the system extension crash report shows identical stack trace to well-known issue that had to do with concurrency back deployment Is there a known issue/limitation with concurrency back deployment in the context of a system extension? Is there any reason why async/await shouldn't work in that context when deployed to Big Sur? More details, context The key lines of the crash stack trace are: 0 libswiftCore.dylib 0x00007fff2cdacdc7 swift::ResolveAsSymbolicReference::operator()(swift::Demangle::__runtime::SymbolicReferenceKind, swift::Demangle::__runtime::Directness, int, void const*) + 55 1 libswiftCore.dylib 0x00007fff2cdcf2dd swift::Demangle::__runtime::Demangler::demangleSymbolicReference(unsigned char) + 141 2 libswiftCore.dylib 0x00007fff2cdcc2a8 swift::Demangle::__runtime::Demangler::demangleType(__swift::__runtime::llvm::StringRef, std::__1::function<swift::Demangle::__runtime::Node* (swift::Demangle::__runtime::SymbolicReferenceKind, swift::Demangle::__runtime::Directness, int, void const*)>) + 168 3 libswiftCore.dylib 0x00007fff2cdb25a4 swift_getTypeByMangledNameImpl(swift::MetadataRequest, __swift::__runtime::llvm::StringRef, void const* const*, std::__1::function<swift::TargetMetadata<swift::InProcess> const* (unsigned int, unsigned int)>, std::__1::function<swift::TargetWitnessTable<swift::InProcess> const* (swift::TargetMetadata<swift::InProcess> const*, unsigned int)>) + 516 4 libswiftCore.dylib 0x00007fff2cdafd6d swift::swift_getTypeByMangledName(swift::MetadataRequest, __swift::__runtime::llvm::StringRef, void const* const*, std::__1::function<swift::TargetMetadata<swift::InProcess> const* (unsigned int, unsigned int)>, std::__1::function<swift::TargetWitnessTable<swift::InProcess> const* (swift::TargetMetadata<swift::InProcess> const*, unsigned int)>) + 477 5 libswiftCore.dylib 0x00007fff2cdaff9b swift_getTypeByMangledNameInContext + 171 6 com.myorg.app.filter-extension 0x000000010db2b8b7 0x10db02000 + 170167 7 libdispatch.dylib 0x00007fff20516806 _dispatch_client_callout + 8 8 libdispatch.dylib 0x00007fff2051798c _dispatch_once_callout + 20 9 libswiftCore.dylib 0x00007fff2cdbe16a swift_once + 26 10 com.myorg.app.filter-extension 0x000000010db2c5e3 0x10db02000 + 173539 11 com.myorg.app.filter-extension 0x000000010dbbd708 0x10db02000 + 767752 12 com.myorg.app.filter-extension 0x000000010db073cc 0x10db02000 + 21452 13 com.apple.NetworkExtension 0x00007fff2dfdd4d8 -[NEExtensionProviderContext createWithCompletionHandler:] + 377 14 com.apple.Foundation 0x00007fff215a7c96 __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT_S1__ + 10 15 com.apple.Foundation 0x00007fff21552b98 -[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 2271 16 com.apple.Foundation 0x00007fff2150a049 message_handler + 206 17 libxpc.dylib 0x00007fff20406c24 _xpc_connection_call_event_handler + 56 18 libxpc.dylib 0x00007fff20405a9b _xpc_connection_mach_event + 938 The first five lines are identical to an issue from Xcode 13.2.1, discussed in depth on the swift forums: https://forums.swift.org/t/async-await-crash-on-ios14-with-xcode-13-2-1/54541 ...except I'm using Xcode 14.2. Which makes me think that it's not exactly the same bug, but another manifestation of a failure to link against the back-deployed currency lib, possibly having to do with the fact that the system extension isn't able to access the back-deployed lib. The archived app does have libswift_Concurrency.dylib at MyApp.app/Contents/Frameworks/libswift_Concurrency.dylib. What I've Tried I tested the workaround in the above mentioned thread, using lipo to remove arm64 arch, but it didn't work. I also tested adding -Xllvm -sil-disable-pass=alloc-stack-hoisting to Other Swift settings, as suggested in https://developer.apple.com/forums/thread/697070. I would greatly appreciate any assistance.
Posted
by
Post not yet marked as solved
0 Replies
38 Views
After installing Xcode Command Line Tools, the System Settings App now asks me, to reboot my machine into recoveryOS and change the systems security to allow kernel extensions/ system extensions. It's not prominently mentioned, but just there and I never, ever had this. Must be a new dialog. Well, if you click on it... My Question is: Why? Kernel Extensions have been deprecated long ago (I thought) and the dialog mentions nothing specific.
Post not yet marked as solved
1 Replies
57 Views
Universal Links usual behaviour on iOS: Users can chose to open Universal Links related to a "xyz.com" domain in Safari by force touching the url. iOS remembers this choice and url's related to that domain will only open in Safari going forward. To change it, user has to force touch the url and choose open in "XYZ" app. Question Is there a way for the developers to know how the Universal link will behave on a user's device? Would it open the app or would it open in Safari?
Posted
by

Pinned Posts

Categories

See all