Posts

Sort by:
Post not yet marked as solved
0 Replies
2 Views
Hello together, I hope someone can answer and can give me maybe a little guidance. Is it possible to access and change a child value from a child class in SwiftData? I tried now different ways but couldn't get it to work although I don't get any errors but I am not able to change or set any values. So the code example below is only a simplified example and I know some minor errors but it is about the principle. Can the Father class access somehow the Children class and for example read the childrenName? @Model class Father { var father: String var child: Child? } @Model class Child { var childName: String var child: Children? var father: Father } @Model class Children { var childrenName: String var parent: Child } I don't need direct access from the Father to the Children class - it has to go via the child class. Thanks for any direction or feedback in advance.
Posted
by
Post not yet marked as solved
0 Replies
6 Views
Hi, When I try to display a UIActivityViewController, I get funky logging in the xcode console. This is my code: @IBAction func shareAction(_ sender: Any) { // text to share let text = "Some very interesting text!" let url = Constants.URL.appStore.absoluteString guard let logo = UIImage(named: "App Logo")? .circle() .resize(333, 333) else { return } // set up activity view controller let itemsToShare: [Any] = [ logo, text, url ] let activityViewController = UIActivityViewController(activityItems: itemsToShare, applicationActivities: nil) activityViewController.popoverPresentationController?.sourceView = self.view // exclude some activity types from the list if #available(iOS 15.4, *) { activityViewController.excludedActivityTypes = [ .airDrop, .sharePlay ] } else { activityViewController.excludedActivityTypes = [ .airDrop ] } // present the Share Sheet self.present(activityViewController, animated: true, completion: nil) } The logging emerges in the console as soon as the code calls: self.present(activityViewController, animated: true, completion: nil) When I set a break point on that line, no logging occurs. If I add a completion block to that call with a break point on the first line, the logging occurs before it hits that break point. so all logging seems to be generated while displaying the UIActivityViewController. This is my logging Cannot issue sandbox extension for URL:https://apps.apple.com/app/id Couldn't read values in CFPrefsPlistSource<0x303b38900> (Domain: com.apple.country.carrier_1, User: kCFPreferencesCurrentUser, ByHost: No, Container: /var/mobile/Library/CountryBundles/, Contents Need Refresh: No): accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "(originator doesn't have entitlement com.apple.runningboard.primitiveattribute AND originator doesn't have entitlement com.apple.runningboard.assertions.frontboard AND target is not running or doesn't have entitlement com.apple.runningboard.trustedtarget AND Target not hosted by originator)" UserInfo={NSLocalizedFailureReason=(originator doesn't have entitlement com.apple.runningboard.primitiveattribute AND originator doesn't have entitlement com.apple.runningboard.assertions.frontboard AND target is not running or doesn't have entitlement com.apple.runningboard.trustedtarget AND Target not hosted by originator)}> (501) personaAttributesForPersonaType for type:0 failed with error Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.mobile.usermanagerd.xpc was invalidated: failed at lookup with error 159 - Sandbox restriction.} Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <(null)> with error:Error Domain=RBSServiceErrorDomain Code=1 "Client not entitled" UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port <0x10640ca30> Gesture: System gesture gate timed out. Line 2, 5, 7, 9 are red the other lines are yellah I have been looking in this forum, but found nothing I have been looking on the internet and found nothing When looking through the logging: 'entitlement com.apple.runningboard.primitiveattribute' Should I add something to my entitlements to be allowed to show a UIActivityViewController? Is that the solution? If so: How do I add that entitlement? (or any of the other entitlements mentioned there) And since when is that required?? Or is there a whole other reason / cause why I suddenly get this? Now running: xcode Version 15.3 (15E204a) iOS 17.4.1
Posted
by
Post not yet marked as solved
0 Replies
11 Views
As per our code, we have the apps to be shielded whenever the threshold is reached. According to this use-case, our code in DeviceActivityExtension looks something like: override func eventDidReachThreshold(_ event: DeviceActivityEvent.Name, activity: DeviceActivityName) { super.eventDidReachThreshold(event, activity: activity) defaults?.setValue(event.rawValue, forKey: "appLimitEventName") defaults?.setValue(true, forKey: "appLimitReached") defaults?.synchronize() // using darwinNotificationCenter to trigger callback in the application let darwinNotificationCenter = DarwinNotificationsManager.sharedInstance() darwinNotificationCenter.postNotification(withName: "nextAppLimitInitiated") // using Notifications to debug since print doesn't work scheduleNotification(with: "interval threshold reached") } And in our application, we have the shielding logic in place, init() { let darwinNotificationCenter = DarwinNotificationsManager.sharedInstance() darwinNotificationCenter.register(forNotificationName: "nextAppLimitInitiated"){ print("callback received") let appLimitReached = self.defaults?.bool(forKey: "appLimitReached") let appLimitEventName = self.defaults?.string(forKey: "appLimitEventName") if appLimitReached ?? false, appLimitEventName != "" { // this sends the notification when callback is received self.scheduleNotification(with: "init start") self.defaults?.setValue(false, forKey: "appLimitReached") guard var dataArray = self.defaults?.array(forKey: "appLimitdataArray"), !dataArray.isEmpty else { return } let appLimitData = dataArray.first as! NSDictionary let appLimitKey = appLimitData["appLimitId"] as! String let data = self.getSchedule(key: appLimitEventName ?? "") if let appTokens = data?.applicationTokens { for token in appTokens { if !self.applicationTokens.contains(appTokens) { self.applicationTokens.insert(token) } } } self.store.shield.applications = self.applicationTokens self.store.shield.applicationCategories = ShieldSettings.ActivityCategoryPolicy.specific(self.categoryTokens, except: Set()) dataArray.removeFirst() //dataArray.append(appLimitData) self.defaults?.set(dataArray, forKey: "appLimitdataArray") self.initiateMonitoring(initiateAgain: true) self.scheduleNotification(with: "init end") } } } This works as expected for multiple App Limits but only when the device is connected to the Xcode. If we disconnect the device from Xcode/ stop application from Xcode/ try in release mode, the callback is not received from extension to the app/init block. When the device is connected to Xcode, if the apps hit the threshold, they are shielded automatically. But if the device is disconnected/ app is in release mode, the apps are not shielded automatically even after the threshold is reached. It is shielded later only after opening our app once. Please let me know if I'm doing anything wrong in receiving callback or in my shielding logic. If I need to place the shielding logic in the extension, please tell me how I can handle multiple appTokens.
Posted
by
Post not yet marked as solved
0 Replies
9 Views
Hi! I've found that when presenting a UIDocumentPickerViewController, if you quickly tap twice on a document, both the picker view controller AND its parent view controller gets dismissed. My guess is that the system simply fires off a dismissal twice, closing both views. It's easier to trigger on a simulator than on a real device. Any way to get around this? I guess it would be possible to monitor dismissals and intercept any undesired ones, but it's not great.
Posted
by
Post not yet marked as solved
1 Replies
16 Views
I created an app using SwiftData to store titles, dates, and images. When creating and deleting data models repeatedly, the app's storage space should remains the same, but for me it steadily accumulate so now its 5GB in the app's settings despite having no data. Why is this happening?
Posted
by
Post not yet marked as solved
0 Replies
15 Views
Is it possible to mock the behavior of NWPathMonitor for a specific app? The scenario I want to support I've created an app called RocketSim, a developer tool for Xcode's Simulator. I've already created Airplane mode, which disables networking calls from URLSession from a specific bundle identifier app installed on the Simulator. Now, I want to support blocking NWPathMonitor as well. I believe the Simulator uses macOS's NWPathMonitor and does not use any specific HTTP request or similar to determine the reachability state. Is there a way I can make NWPathMonitor return unsatisfied when my 'airplane mode' is turned on? Potentially using a Network Extension?
Posted
by
Post not yet marked as solved
0 Replies
7 Views
Hi, I am desperate to get an update through. AppStore connects keeps printing the error "Unable to add for review" There is no issue to fix. I have already contacted Apple but no response so far. Has someone had this issue and been able to resolve it?
Posted
by
Post not yet marked as solved
0 Replies
10 Views
Hello, I have a TabView containing multiple views where one of them contains a list of items. The digital crown on the apple watch does not allow me to scroll the items in the tabview but only scrolls the list of items. Is there any way to disable that the scrolling of the list is done by the wheel or even a way to prioritize the digital crown to scroll the tabView and not the list? Thanks
Posted
by
Post not yet marked as solved
0 Replies
10 Views
**Question 1: ** Will ServerNotificationV2 be able to provide real-time notifications regarding Storekit1 contract renewals, and is receiving Storekit1 notifications in ServerNotificationV2 an expected use? (The documentation does not say that receiving Storekit1 notifications is not recommended, so we would like to confirm Apple's assumption.) **Question 2: ** If ServerNotificationV2 is not able to receive Storekit1 notifications in real time, what is the expected time lag?
Posted
by
Post not yet marked as solved
0 Replies
13 Views
I am about to remove the app from the Apple store. Before App removal, we are planning to have an App update which shows only the pop up saying that "the app is not functional anymore' and it will redirect to the website. Will Apple review team accept this app update? Wil there by any rejection? Kindly let me know your feedback? Anyone experienced before?
Posted
by
Post not yet marked as solved
0 Replies
21 Views
Hello, I've encountered an issue where SwiftData remains in the /Users/(username)/Library/Containers/MyApp directory even after my MacOS app has been deleted. This behavior is not what I expected. Has anyone else faced this issue? Also, I'm wondering if there is a delay in the deletion process that might account for this. is there a known time lag before everything is cleared out? Thanks.
Posted
by
Post not yet marked as solved
0 Replies
9 Views
I'm trying to create an app where the user guesses their location, so I'd love to hide the road name and country in the MKLookAroundView. I have already seen some apps pull this off and I'm wondering how to do it. I tried this, but it's not working: struct LookAroundView: UIViewControllerRepresentable { @Binding var isExpanded: Bool @Binding var initialScene: MKLookAroundScene? func makeUIViewController(context: Context) -> MKLookAroundViewController { let lookAroundViewController = MKLookAroundViewController() lookAroundViewController.isNavigationEnabled = true lookAroundViewController.showsRoadLabels = false // I thought this would hide road labels but it doesn't lookAroundViewController.pointOfInterestFilter = .excludingAll lookAroundViewController.badgePosition = .bottomTrailing if let initialScene = initialScene { lookAroundViewController.scene = initialScene } return lookAroundViewController } func updateUIViewController(_ uiViewController: MKLookAroundViewController, context: Context) { uiViewController.isNavigationEnabled = isExpanded uiViewController.showsRoadLabels = false //This was my last idea } }
Posted
by
Post not yet marked as solved
0 Replies
9 Views
We utilized AVFragmentedAssetMinder to refresh the player data. While notifications for AVAssetDurationDidChange were consistently received whenever the player duration changed. However, following the release of iOS 17, notifications for AVAssetDurationDidChange ceased to be received. Could you please advise anyone why this notification is not being triggered? what we have to change NotificationCenter.default.addObserver(self, selector: #selector(self.onVideoUpdate), name: .AVAssetDurationDidChange, object: nil) #AVPLAyer, #AVMUtableMovie
Posted
by
Post not yet marked as solved
0 Replies
25 Views
Hello . Currently, only the ios version is on sale on the App Store. The application is offering an icloud-linked, auto-renewable subscription. I want to sell to the app store connect with the same identifier, AppID at the same time. I simply added visionos to the existing app project to provide the visionos version early, but the existing UI-related code and the location-related code are not compatible. We used the same identifier with the same name, duplicated and optimized only what could be implemented, and created it without any problems on the actual device. However, when I added the visionos platform to the App Store cennect and tried to upload it through the archive in the app for visionos that I created as an addition, there was an error in the identifier and provisioning, so the upload was blocked. The result of looking up to solve the problem App Group -I found out about the function, but it was judged that a separate app was for an integrated service, so it was not suitable for me. Add an APP to an existing app project via target and manually adjust the platform in Xcode -> Build Phases -> Compile Soures -> Archive upload success?( I haven't been able to implement this stage of information yet.) I explained the current situation. Please give me some advice on how to implement it.visionos has a lot of constraints, so you need to take a lot of features off.
Posted
by
Post not yet marked as solved
0 Replies
9 Views
Hey, everybody! Could you please advise me what the problem might be? I've been waiting 2 weeks for approval to pay for my developer account. Also all requests to Apple support remain unanswered. Maybe someone has encountered this.
Posted
by
Post not yet marked as solved
0 Replies
8 Views
Hi ,
We are using Scanning objects using Object Capture app provided by apple it was working fine but suddenly it started crashing while scanning the object with bounding box settings.
Getting device log but showing different reasons for app crash.
Device : iPad Pro / iPhone 15 Pro
iOS : 17.4
Attaching the device log for crash, waiting for your response. -------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Incident Identifier: 0797ADAF-D653-4C92-8AA0-300AA167002B
CrashReporter Key: 48724a3b30ef15e069f513afff7d1aa2e935a520
Hardware Model: iPhone16,1
Process: GuidedCapture [918]
Path: /private/var/containers/Bundle/Application/ACCE6C58-98F0-4DD7-AA6E-732190E0FD30/GuidedCapture.app/GuidedCapture
Identifier: com.example.apple-samplecode.GuidedCaptureH28X75MLUY
Version: 1.0 (1)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.example.apple-samplecode.GuidedCaptureH28X75MLUY [743]
Date/Time: 2024-03-26 18:23:07.8269 +0530
Launch Time: 2024-03-26 18:20:02.5964 +0530
OS Version: iPhone OS 17.4.1 (21E236)
Release Type: User
Baseband Version: 1.55.04
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000022e6577a4
Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: exc handler [918]
Triggered by Thread: 33
Thread 33 name: Dispatch queue: com.apple.coreoc.queues.serial.session
Thread 33 Crashed:
0 CoreOC 0x22e6577a4 0x22e657400 + 932
1 CoreOC 0x22e657588 0x22e657401 + 391
2 CoreOC 0x22e697628 0x22e697221 + 1031
3 CoreOC 0x22e684864 0x22e684431 + 1075
4 CoreOC 0x22e6831ec 0x22e6828d5 + 2327
5 CoreOC 0x22e6c1fb4 0x22e6c1f5d + 87
6 CoreOC 0x22e5ef128 0x22e5ef105 + 35
7 libdispatch.dylib 0x19291113c _dispatch_call_block_and_release + 31
8 libdispatch.dylib 0x192912dd4 _dispatch_client_callout + 19
9 libdispatch.dylib 0x19291a400 _dispatch_lane_serial_drain + 747
10 libdispatch.dylib 0x19291af30 _dispatch_lane_invoke + 379
11 libdispatch.dylib 0x192925cb4 _dispatch_root_queue_drain_deferred_wlh + 287
12 libdispatch.dylib 0x192925528 _dispatch_workloop_worker_thread + 403
13 libsystem_pthread.dylib 0x1e69f8f20 _pthread_wqthread + 287
14 libsystem_pthread.dylib 0x1e69f8fc0 start_wqthread + 7
Posted
by
Post not yet marked as solved
0 Replies
9 Views
After my project was packaged with Xcode15, the following crash occurred, which had not occurred before. After checking for a long time, the cause was not found, because similar problems did not occur when Xcode14 was used to package, so I think it is the problem caused by Xcode15 packaging Incident Identifier: 3DFEAAAC-DCEE-4C6F-B51D-29BE9448A9C0 CrashReporter Key: KSCrash2 Hardware Model: iPhone15,3 Process: KPlayi4Phone [11803] Path: /private/var/containers/Bundle/Application/FD3F5994-3F75-4477-B629-2343870A4995/KPlayi4Phone.app/KPlayi4Phone Identifier: com.KPlay.KPlay Version: 2035752548 (11.0.73) Code Type: ARM-64 Parent Process: ? [1] Date/Time: 2024-03-28 15:02:18 +0800 Launch Time: 2024-03-28 15:02:10 +0800 OS Version: iOS 16.2 (20C65) Report Version: 104 Exception Type: EXC_BREAKPOINT Exception Codes: KERN_INVALID_ADDRESS at 0x00000001d256402c Exception Subtype: SIGTRAP Triggered by Thread: 0 Thread 0 Crashed: 0 CoreFoundation 0x00000001d256402c __CFRunLoopServiceMachPort.cold.1 :56 (in CoreFoundation) 1 CoreFoundation 0x00000001d242ebd4 __CFBasicHashIncSlotCount :0 (in CoreFoundation) 2 CoreFoundation 0x00000001d242fd18 __CFRunLoopRun :1232 (in CoreFoundation) 3 CoreFoundation 0x00000001d2434ec0 _CFRunLoopRunSpecific :612 (in CoreFoundation) 4 GraphicsServices 0x000000020c48b368 _GSEventRunModal :164 (in GraphicsServices) 5 UIKitCore 0x00000001d492a86c -[UIApplication _run] :888 (in UIKitCore) 6 UIKitCore 0x00000001d492a4d0 _UIApplicationMain :340 (in UIKitCore) 7 KPlayi4Phone 0x0000000100f5608c main main.m:16 (in KPlayi4Phone) 8 ??? 0x00000001f0c56960 0x0000000000000000 + 8334436704 9 ??? 0x0000000000000000 0x0000000000000000 + 0 mycrash.crash
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all