I'm in the process of add some swift code that is all objective-c. I have trouble with my actual app so I have worked on a prototype. There is what I have done Created a new Xcode project, selecting App and Objc Added a blank Swift file and accepted the generation of the -Bridging-Header. In project build setting, Yes for Defines Modules, Yes for Always Embed Swift Libraries Add appropriate .h file to Bridging header In Build Settings, in Swift Compiler - General, Bridging Header has correct path to the bridging header file Setup the single swift file in this was using @objc like this: @objcmembers class MySwiftClass: NSObject { func myMethod() { let output = ... } } When the project runs I execute in the objc ViewController: MySwiftClass *swiftObject = [[MySwiftClass alloc] init]; and get Use of undeclared identifier 'MySwiftClass'
Search results for
file uri scheme
78,497 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I’ve been working on this for the past two days, but in a UIKit Mac Catalyst context. I managed to get it working, though I believe this might actually be a bug in Mac Catalyst. I was about to file a report when I came across your post. Did you already submit one? The workaround I found is to assign an instance of NSToolbar to the windowScene's titlebar like this: // Inside SceneDelegate.swift #if targetEnvironment(macCatalyst) let toolbar = NSToolbar() toolbar.displayMode = .iconOnly // reduces toolbar height self.window?.windowScene?.titlebar?.toolbar = toolbar #endif This setup gives you the unified sidebar and toolbar, but there’s still quite a bit of empty space at the top, even with displayMode set to .iconOnly. Since I didn’t actually need a toolbar in my case, I fixed it by applying a negative top safe area inset. That gave me the look I wanted: let splitViewController = UISplitViewController(style: .doubleColumn) let sidebarNavigationController = KNavigationController(rootViewController: Sid
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
In-App Subscriptions Not Fetching in Sandbox or Production (expo-iap / React Native / Bare Workflow)
Hi everyone, I’m encountering an issue with my in-app subscriptions setup. When I test using the StoreKit configuration file in Xcode, everything works correctly — the subscriptions are fetched and I can simulate purchases without any issues. However, when I switch to the Sandbox or Production environment, my app fails to fetch the available products from Apple’s servers. The call to fetchProducts (from the expo-iap library) returns an empty array. Here’s some context about my setup: Framework: React Native (Expo Bare Workflow) Library: expo-iap Products: Auto-renewable subscriptions StoreKit Configuration: Synced with App Store Connect Status: Subscription Plans are approved in App Store Connect I’ve verified the following: The product identifiers in code match exactly with those in App Store Connect. The app is signed with the correct bundle ID. I’m testing with a Sandbox account (logged in via Settings -> Developer -> Sandbox Tester Account). Despite this, the response from Apple’s servers s
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
StoreKit
App Store Connect
In-App Purchase
We are creating a Replicated FileProvider based application, where we want to handle different types of errors. As per doc: https://developer.apple.com/documentation/fileprovider/synchronizing-files-using-file-provider-extensions?language=objc#Handle-errors-elegantly NSFileProviderErrorNotAuthenticated is a resolvable error, and once we report it, the system throttles the sync operation until something (most likely the app or extension) calls signalErrorResolved(:completionHandler:) to signal that the user or the server resolves the error. But this is not happening in our app, see below the sample code snippet (showing just error related code to keep it concise): NSProgress* MacFileProvider::modifyItem(....) { NSProgress *nsProgress = [[NSProgress alloc] init]; nsProgress.totalUnitCount = NSURLSessionTransferSizeUnknown; NSError *error = [NSError errorWithDomain:NSFileProviderErrorDomain code:NSFileProviderErrorNotAuthenticated userInfo:nil]; completionHandler(nil, 0, false, error); return n
Subject: iOS 26 WKWebView: Remote Pages Become Unresponsive After Loading Local HTML Files Description We're experiencing a critical issue with WKWebView in a React Native 0.64.3 application where remote web pages become completely unresponsive after loading local HTML files in iOS 26. It works well before iOS26. Environment: React Native 0.64.3 iOS 26.0 Xcode 26.0.1 Using custom WKWebView implementations in Native modules Problem Details App loads local HTML files using loadFileURL:allowingReadAccessToURL: Later, when loading remote pages via loadRequest:, the remote pages load successfully but become unresponsive to user interactions This occurs even when using different WKWebView instances The issue is reproducible 100% of the time once a local file has been loaded Restarting the app and loading remote pages directly works fine Code Example: // Loading local file (works fine) [self.webView loadFileURL:localFileURL allowingReadAccessToURL:accessURL]; // Later, lo
My implementation of LockedCameraCapture does not launch my app when tapped from locked screen. But when the same widget is in the Control Center, it launches the app successfully. Standard Xcode target template: Lock_Screen_Capture.swift @main struct Lock_Screen_Capture: LockedCameraCaptureExtension { var body: some LockedCameraCaptureExtensionScene { LockedCameraCaptureUIScene { session in Lock_Screen_CaptureViewFinder(session: session) } } } Lock_Screen_CaptureViewFinder.swift: import SwiftUI import UIKit import UniformTypeIdentifiers import LockedCameraCapture struct Lock_Screen_CaptureViewFinder: UIViewControllerRepresentable { let session: LockedCameraCaptureSession var sourceType: UIImagePickerController.SourceType = .camera init(session: LockedCameraCaptureSession) { self.session = session } func makeUIViewController(context: Self.Context) -> UIImagePickerController { let imagePicker = UIImagePickerController() imagePicker.sourceType = sourceType imagePicker.mediaTypes = [UTType.image.identifier, U
Thanks for the post. I see you filed a bug, you have provided some code in the bug, thanks for that, but may I ask to upload a focused project showing the issue? If so, please share a link to your test project or better upload it into the FB issue That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project. There, you can track if the report is still being investigated, has a potential identifiable fix, or has been resolved in another way. The status appears beside the label Resolution. We're unable to share any updates on specific reports on the forums. For more details on when you'll see updates to your report, please see What to expect after submission. Albert Pascual
Worldwide Developer Relations.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
I was able to reproduce this on the iOS Simulator by enabling Reduce Transparency. In addition, this behavior occurs not only in the sample project but also in iOS 26 system apps such as Files and others, so I believe it is an iOS 26 issue. iOS 26 File app
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Yeah, I see the following error when trying to prompt the on-device foundation model from within a device activity report extension (DeviceActivityReportExtension), which I believe is the same as what you mentioned: establishment of session failed with Unrecognized underlying error: Underlying connection was invalidated. Reason: failed at lookup with error 159 - Sandbox restriction ModelManagerError: got unrecognized error Underlying connection was invalidated. Reason: failed at lookup with error 159 - Sandbox restriction I am pretty sure that is as-designed. To give you more context, when responding your prompt, the model needs to communicate with the model manager, which is a system daemon that manages the inference requests. To protect the user’s privacy, however, the system doesn't allow a device activity report extension to move data outside the extension’s address space, and that prevents the model from creating a connection to the model manager. Having said that, if you have a compelling case that need
Topic:
Machine Learning & AI
SubTopic:
Foundation Models
Tags:
Beta two keeps hanging during the download process and says connect to wifi (which I am) or after hours it may download the beta 1.4gb file only to have to freeze in next processing step. I have tried all the resets, reinstalling both the watch and the phone running OS26.1 Beta 2 etc. The impact is the watch and the current software implementation is only getting a couple hours of battery usages before going dead
Could you share your understanding of the crash and give any hints on how we can fix it? So, let me actually start by commenting on this: At first, we assumed that the issue is with hardware. The first thing to understand here is that DEXTs are FULLY capable of panicking the kernel and probably always will be, particularly PCI DEXTs. The main benefit DEXTs provide is that they DRAMATICALLY improve overall system security and risk by constraining the range of what it's POSSIBLE for a component to do. Your DEXT only has access to a very limited set of kernel data, so that's the ONLY kernel data your DEXT interacts with. It's possible for a network DEXT to disrupt the network stack, but it's very difficult to see how it would disrupt the file system. However, your DEXT is still being given access to many of the same resources it would have access to as a KEXT, and many of those resources are inherently dangerous. In the case of the PCI family, that issue is quite direct— I don't know of any way to build
Topic:
App & System Services
SubTopic:
Drivers
Thanks for following up, and apologies for the delay-- this slipped past me. Here’s a repro asset I wrote that you can test directly: https://github.com/alexchuber/Assets/raw/refs/heads/main/Repros/triangleNegScale.usdz For additional reference, here's the USDA content of the asset (material omitted for clarity): #usda 1.0 ( defaultPrim = Root metersPerUnit = 1 upAxis = Y ) def Xform Root { def Mesh Triangle { matrix4d xformOp:transform = ( (-1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ) uniform token[] xformOpOrder = [xformOp:transform] int[] faceVertexCounts = [3] int[] faceVertexIndices = [0, 1, 2] normal3f[] normals = [(0, 0, 1), (0, 0, 1), (0, 0, 1)] ( interpolation = vertex ) point3f[] points = [(0, 0, 0), (1, 0, 0), (0, 1, 0)] uniform token subdivisionScheme = none } } The steps to reproduce are just: Add the asset to a new Reality Composer Pro scene. Open the same asset in QuickLook on iOS/macOS. Compare the facing direction in both views. You should see that the triangles appear to have opp
Topic:
Graphics & Games
SubTopic:
RealityKit
Tags:
Same here. Anything in SwiftUI with a Slider will crash on macOS 26. Following this thread… FB20614181 also filed.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Also submitted as feedback (ID: FB20612561). Tensorflow-metal fails on tensorflow versions above 2.18.1, but works fine on tensorflow 2.18.1 In a new python 3.12 virtual environment: pip install tensorflow pip install tensor flow-metal python -c import tensorflow as tf Prints error: Traceback (most recent call last): File , line 1, in File /Users//pt/venv/lib/python3.12/site-packages/tensorflow/init.py, line 438, in _ll.load_library(_plugin_dir) File /Users//pt/venv/lib/python3.12/site-packages/tensorflow/python/framework/load_library.py, line 151, in load_library py_tf.TF_LoadLibrary(lib) tensorflow.python.framework.errors_impl.NotFoundError: dlopen(/Users//pt/venv/lib/python3.12/site-packages/tensorflow-plugins/libmetal_plugin.dylib, 0x0006): Library not loaded: @rpath/_pywrap_tensorflow_internal.so Referenced from: <8B62586B-B082-3113-93AB-FD766A9960AE> /Users//pt/venv/lib/python3.12/site-packages/tensorflow-plugins/libmetal_plugin.dylib Reason: tried: '/Users//pt/venv/lib/
Topic:
Machine Learning & AI
SubTopic:
General
Tags:
Developer Tools
Metal
Machine Learning
tensorflow-metal
Hello Apple Team, We’re building a CloudKit-enabled Core Data app and would like clarification on the behavior and performance characteristics of Binary Data attributes with “Allows External Storage” enabled when used with NSPersistentCloudKitContainer. Initially, we tried storing image files manually on disk and only saving the metadata (file URLs, dimensions, etc.) in Core Data. While this approach reduced the size of the Core Data store, it introduced instability after app updates and broke sync between devices. We would prefer to use the official Apple-recommended method and have Core Data manage image storage and CloudKit syncing natively. Specifically, we’d appreciate guidance on the following: When a Binary Data attribute is marked as “Allows External Storage”, large image files are stored as separate files on device rather than inline in the SQLite store. How effective is this mechanism in keeping the Core Data store size small on device? Are there any recommended s