Posts

Sort by:
Post not yet marked as solved
0 Replies
8 Views
I've found a strange leak, that looks like a bug. When we open two sheets, or fullscreenCovers and the last one has a TextField, then after closing both, @StateObject property is not released. If you delete TextField, there will be no memory leak. It works well and memory is releasing on iOS 16 built with Xcode 15 (simulators) Memory is leaking and not releasing on iOS 17 built with Xcode 15 (simulators, device 17.4.1) import SwiftUI struct ContentView: View { @State var isFirstOpen: Bool = false var body: some View { Button("Open first") { isFirstOpen = true } .sheet(isPresented: $isFirstOpen) { FirstView() } } } struct FirstView: View { @StateObject var viewModel = LeakedViewModel() var body: some View { ZStack { Button("Open second") { viewModel.isSecondOpen = true } } .sheet(isPresented: $viewModel.isSecondOpen) { SecondView(onClose: { viewModel.isSecondOpen = false }) } } } final class LeakedViewModel: ObservableObject { @Published var isSecondOpen: Bool = false init() { print("LeakedViewModel init") } deinit { print("LeakedViewModel deinit") } } struct SecondView: View { @State private var text: String = "" private let onClose: () -> Void init(onClose: @escaping () -> Void) { self.onClose = onClose } var body: some View { Button("Close second"){ onClose() } TextField("text: $text", text: $text) // Comment TextField and the leak will disappear, viewModel deinit called } } @main struct LeaksApp: App { var body: some Scene { WindowGroup { ContentView() } } } May be related to https://forums.developer.apple.com/forums/thread/738840
Posted
by
Post not yet marked as solved
0 Replies
4 Views
I recently integrated TipKit's .popoverTip to hint users about key features in my app, but find they are too easily oversaw and dismissible: as soon as they appear if i tap outside or scroll they disappear and many users don't event realise they're here and skip them, without ever seing them again since they have been dismissed. Is there a way to make them more persistent as the TipView is? I tried using TipView but it doesn't fit my use case since the feature I want to tip about is a button in the top right side of a toolbar, TipView's arrow doesn't point to the feature so there isn't a lot of context between the tip and the button itself.
Posted
by
Post not yet marked as solved
0 Replies
31 Views
I have a package stored on iCloud Drive and want to list it as a dependency in another package. This worked fine when the package was stored on the Mac hard drive, but moving it to iCloud seems to cause a problem. dependencies: [ .package(url: "file:///Users/bill/Library/Mobile Documents/com~apple~CloudDocs/Projects/Matrix", from: "0.0.1") ], This results in an Xcode error message: x-xcode-log://812C74F5-B7CA-4E15-A87C-E6C9586B0926 /Users/bill/Library/Mobile%20Documents/com~apple~CloudDocs/Projects/Matrix: The source control operation failed because the specified URL cannot be used. Make sure the URL is valid and try again. Can anyone advise how to make the URL valid, or is storing the package on iCloud Drive not yet possible?
Posted
by
Post not yet marked as solved
0 Replies
7 Views
I referred to the code provided in the article Adding and Editing Persistent Data in Your App in the SwiftData documentation and tested the "/PreviewHelper" approach. I found that if a model class contains a property of a struct, and that struct includes a Set property or an Array property, the Preview would throw an error. Here is an example of the model: @Model class Book { // ... var someStruct: SomeStruct // ... } struct SomeStruct: Codable { // ... var someCollection: Set<Int> // ... } In actuality, this model can run and store data without any issues, but it fails to run in the Preview. Is there a problem with the implementation of this Preview or is there any other reason? Are there better ways to perform Preview in SwiftData?
Posted
by
Post not yet marked as solved
0 Replies
33 Views
Before Apple Silicon was a thing, I published a separate version of my iOS app for macOS. I'm no longer able to maintain this version, so I would like users to be able to use the iPadOS version of my app on Apple Silicon. Unfortunately I can't make it available through Prices & Availablity, because it says: "Once your macOS version has been approved, your iOS app will no longer be available to Mac users." (translated from the German user interface) How do I remove the previous version and publish the iPadOS version to the mac app store?
Posted
by
Post not yet marked as solved
0 Replies
3 Views
I'm encountering a problem on some Iphone models with photo gallery authorization. On some devices, the authorization only displays "add photos" and "None". However, for many devices, most of them have "Full access", "Limited access" and "None" authorizations, which means that you can't access the gallery. Example of device affected by the bug: Iphone 11 IOS 17.3. I tested on an emulator with the same version, but it works with all 3 authorizations. In Info.plist , I have the following information: NSCameraUsageDescription The application wants to have access to your camera to help you add photos to your worksites. NSPhotoLibraryAddUsageDescription The application wants access to your photos to help you add photos to your building sites. NSPhotoLibraryUsageDescription The application wants access to your photos to help you add photos to your worksites.
Posted
by
Post not yet marked as solved
0 Replies
6 Views
hello. I want to set the Products Path to a visible location of my choice, rather than the Derived Data path that Xcode sets by default (a.k.a ~/Library/Developer/Xcode/DerivedData). I specified the 'Build Products Path' in each project target, but Xcode ignores this and creates the Product in the Derived Data path. I found that if I specify Workspace Settings - Advanced - Legacy, it will create a Product in the specified 'Build Products Path'. This works very well for me. But since the Workspace Settings - Advanced - Legacy setting is a per-user setting, I'll have to ask other colleagues to do this as well. I want people who share my project to have the same Product path without any additional settings. (Of course, it is a project-relative path) Workspace Settings - Advanced - Legacy Is there a way to save and share the settings as shared rather than per-user?
Posted
by
Post not yet marked as solved
0 Replies
49 Views
I think it's kind of essential to have eye tracking data available to apps in VR mode (with the user's permission). The biggest problem I've observed is that Unity isn't able to implement dynamic foveated rendering without eye tracking data. Without the eye tracking it's only possible to have fixed foveated rendering. That gives a performance boost to rendering, but it also makes it so it gets blurry for the user if they look to the side without turning their head. I understand why it's a privacy issue to have apps tracking where the user is looking in the real world, but video passthrough is disabled in VR -- so it should be ok to enable eye tracking in VR (with the user's permission). Unity already supports dynamic foveated rendering (with eye tracking) for other VR headsets, and Vision Pro has the best eye tracking -- so Vision Pro should definitely have the best dynamic foveated rendering in VR.
Posted
by
Post not yet marked as solved
1 Replies
13 Views
extension Entity { func addPanoramicImage(for media: WRMedia) { let subscription=TextureResource.loadAsync(named:"image_20240425_201630").sink( receiveCompletion: { switch $0 { case .finished: break case .failure(let error): assertionFailure("(error)") } }, receiveValue: { [weak self] texture in guard let self = self else { return } var material = UnlitMaterial() material.color = .init(texture: .init(texture)) self.components.set(ModelComponent( mesh: .generateSphere(radius: 1E3), materials: [material] )) self.scale *= .init(x: -1, y: 1, z: 1) self.transform.translation += SIMD3(0.0, -1, 0.0) } ) components.set(Entity.WRSubscribeComponent(subscription: subscription)) } problem: case .failure(let error): assertionFailure("(error)") Thread 1: Fatal error: Error Domain=MTKTextureLoaderErrorDomain Code=0 "Image decoding failed" UserInfo={NSLocalizedDescription=Image decoding failed, MTKTextureLoaderErrorKey=Image decoding failed}
Posted
by
Post not yet marked as solved
0 Replies
7 Views
Is it possible to get access to the class SRWristDetection of the SensorKit Framework in a watchOS app? As part of a project, we need to be able to log in to a service and as soon as the watch is taken off, the user must be logged out.
Posted
by
Post not yet marked as solved
0 Replies
4 Views
As part of a university project, we need to be able to display a website on an Apple Watch and log in to a service. Is it possible to get access to the WebKit framework in a watchOS app? We also need to be able to execute JavaScripts in the browser so that the login process works.
Posted
by
Post not yet marked as solved
1 Replies
40 Views
I need user installed app information like first install time (purchase to install) last time use "Bundle.main.appStoreReceiptURL" to request Receipt was successful but when i Reinstall the app by Xcode has ERROR:"Error reading receipt data: Error Domain=NSCocoaErrorDomain Code=260" what wrong with ERROR?
Posted
by
Post not yet marked as solved
1 Replies
63 Views
xtension Entity { func addPanoramicImage(for media: WRMedia) { let subscription = TextureResource.loadAsync(named:"image_20240425_201630").sink( receiveCompletion: { switch $0 { case .finished: break case .failure(let error): assertionFailure("(error)") } }, receiveValue: { [weak self] texture in guard let self = self else { return } var material = UnlitMaterial() material.color = .init(texture: .init(texture)) self.components.set(ModelComponent( mesh: .generateSphere(radius: 1E3), materials: [material] )) self.scale *= .init(x: -1, y: 1, z: 1) self.transform.translation += SIMD3(0.0, -1, 0.0) } ) components.set(Entity.WRSubscribeComponent(subscription: subscription)) } func updateRotation(for media: WRMedia) { let angle = Angle.degrees( 0.0) let rotation = simd_quatf(angle: Float(angle.radians), axis: SIMD3<Float>(0, 0.0, 0)) self.transform.rotation = rotation } struct WRSubscribeComponent: Component { var subscription: AnyCancellable } } case .failure(let error): assertionFailure("(error)") Thread 1: Fatal error: Error Domain=MTKTextureLoaderErrorDomain Code=0 "Image decoding failed" UserInfo={NSLocalizedDescription=Image decoding failed, MTKTextureLoaderErrorKey=Image decoding failed}
Posted
by
Post not yet marked as solved
0 Replies
45 Views
Suppose I received a Privacy Manifest from Apple in the process of reviewing the app. I used "UserDefaults" and "File timestamp APIs" among the APIs, and I didn't add Privacymanifest. And there is nothing in the mail other than "UserDefaults" and "File timestamp APIs". And so is the code. If I remove all the code related to "UserDefaults" and "File timestamp APIs" from the library in this situation, is it okay not to add "Privacy Manifest" from the library as well?? The library can be FrameWork or Static Library.
Posted
by
Post not yet marked as solved
0 Replies
42 Views
Looking for info on the best way to convert a MTLTexture to SKTexture. I am migrating a project where a SpriteKit scene is rendered in an SKView - and relies heavily on SKView.texture(from: SKNode) API I am trying to migrate to an SKRenderer based SpriteKit scene - and wondering the best way to grab an SKTexture from an SKNode when rendered in a MTKView instead of SKView?
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all