Overview

Post

Replies

Boosts

Views

Activity

onChange stops working after triggering navigationDestination(isPresented:destination:) within NavigationLink
In the code below, changes to the destination value aren't captured by ViewA if: ViewB is navigated to by changing the destination property of ViewModel. ViewA is embedded in a NavigationLink or another navigationDestination. For example, the return button in ViewB doesn't work when accessed from ContentWithinNavigationLink, but it works from ContentDirect. I've also noticed that the code works if I move the presentingViewB property to the ViewModel class. However, in real code, that significantly increases the complexity of ViewModel, as I have more than ten destinations to handle. Each bound with different shapes of data. I'd prefer to store an enum value in ViewModel, listen to it in ViewA, and then convert it to boolean flags and properties in ViewA—just for iOS 16 compatibility. For iOS 17 and above, the enum works perfectly with navigationDestination(item:destination:). class ViewModel: ObservableObject { @Published var destination = "" func gotoB() { destination = "ViewB" } func reset() { destination = "" } } struct ContentWithinNavigationLink: View { var body: some View { NavigationStack { NavigationLink { ViewA() } label: { Text("Goto A") } } } } struct ContentDirect: View { var body: some View { NavigationStack { ViewA() } } } struct ViewA: View { @State private var presentingViewB = false @StateObject private var viewModel = ViewModel() var body: some View { Button { viewModel.gotoB() } label: { Text("goto ViewB") } .navigationDestination(isPresented: $presentingViewB) { ViewB().environmentObject(viewModel) } .onChange(of: viewModel.destination) { newValue in if newValue == "ViewB" { presentingViewB = true } else { presentingViewB = false } } } } struct ViewB: View { @EnvironmentObject var viewModel: ViewModel var body: some View { Button { viewModel.reset() } label: { Text("Return") } .navigationBarBackButtonHidden() } } The reason of using code like Button { viewModel.gotoB() } label: { Text("goto ViewB") } in ViewA is because in real code the Button is actually several subviews where the navigation-triggering code is deeply nested.
2
0
79
2d
Resolving 2nd Repeated "Guideline 4.3(a) - Design - Spam" Rejection Within Six Months
We are reaching out for guidance after encountering 2nd repeated "Guideline 4.3(a) - Design - Spam" rejections for our WeNote app. Here’s a brief timeline of our journey: 2018: We launched the WeNote Android app on Google Play Store. 2019: We started promoting WeNote on YouTube and began development of the WeNote iOS app. Our progress was publicly visible on our Trello board and discussed on the Apple Developer forum. August 17, 2021: We filed an official complaint with Apple regarding a *** company infringing on our app logo, title, and description. The issue was resolved when *** agreed to update their app’s branding. 2022 Year: *** company is terminated from App Store. June 2022: WeNote for iOS was officially released on the Apple App Store. June 17, 2024: We received a rejection from the Apple Review team citing Guideline 4.3(a) - Design - Spam: “We noticed your app shares a similar binary, metadata, and/or concept as apps previously submitted by a terminated Apple Developer Program account. Submitting similar or repackaged apps is a form of spam that creates clutter and makes it difficult for users to discover new apps.” We successfully resolved this issue by providing documentation about the previous incident on August 17, 2021. November 22, 2024: Unfortunately, we received the same rejection message again, despite having already informed Apple of the previous case. Request for Assistance: We are now seeking guidance from the community or anyone with experience in navigating similar issues. We’ve provided Apple with all the necessary evidence and explanations regarding the previous incident, but our appeal was rejected. How can we resolve this issue, and prevent future rejections? Some Background on WeNote: To help provide context, I’d like to highlight what makes WeNote stand out compared to other apps in the same category: WeNote is an all-in-one solution: While most apps in the market focus on one function—whether it’s note-taking, to-do lists, or calendar management—WeNote uniquely combines all three into a single app. This integration offers users a seamless experience to manage tasks, notes, and schedules in one place. Proven user satisfaction: We are proud to have over 7,000 user reviews, with an average rating of 4.8 stars. This high rating reflects our users' satisfaction with the app’s features and functionality, as well as its ability to meet their needs in a way that other apps do not. We believe these features make WeNote a valuable and unique tool for users, and we continue to prioritize quality and user experience in our development.
1
0
145
2d
CA certificate is not trusted on iOS 18 and iPadOS 18
Hi everyone, I have an iPad with iOS 18 and used my old device to sync data. There is a trusted CA certificate on my old device. After device data synchronization, the certificate was not synchronized on the iPad. When I tried to manually install the CA certificate on my iPad, it was not in the device's certificate trust settings. Environment • iOS Version: iOS 18 • Device: iPad mini 5 Thank you
1
3
387
Sep ’24
AV1 Hardware Decoding
Recently I've been trying to play some AV1-encoded streams on my iPhone 15 Pro Max. First, I check for hardware support: VTIsHardwareDecodeSupported(kCMVideoCodecType_AV1); // YES Then I need to create a CMFormatDescription in order to pass it into a VTDecompressionSession. I've tried the following: { mediaType:'vide' mediaSubType:'av01' mediaSpecific: { codecType: 'av01' dimensions: 394 x 852 } extensions: {{ CVFieldCount = 1; CVImageBufferChromaLocationBottomField = Left; CVImageBufferChromaLocationTopField = Left; CVPixelAspectRatio = { HorizontalSpacing = 1; VerticalSpacing = 1; }; FullRangeVideo = 0; }} } but VTDecompressionSessionCreate gives me error -8971 (codecExtensionNotFoundErr, I assume). So it has something to do with the extensions dictionary? I can't find anywhere which set of extensions is necessary for it to work 😿. VideoToolbox has convenient functions for creating descriptions of AVC and HEVC streams (CMVideoFormatDescriptionCreateFromH264ParameterSets and CMVideoFormatDescriptionCreateFromHEVCParameterSets), but not for AV1. As of today I am using XCode 15.0 with iOS 17.0.0 SDK.
8
3
5.7k
Oct ’23
Notarization Failure. HTTP status code: 401
Iam trying to notarize with notarytool command with app-specific password. xcrun notarytool submit <Path> --apple-id <APPLE_ID> --password <APP_SPECIFIC_PASSWORD> --team-id <Team-ID> But it fails with error Error: HTTP status code: 401. Unable to authenticate. Invalid session. Ensure that all authentication arguments are correct. Tried generating new app-specific password, still failing. Tried storing password in keychain with store-credentials option, again failing. --verbose option with store-credentials showing below error This process stores your credentials securely in the Keychain. You reference these credentials later using a profile name. Validating your credentials... [06:05:28.854Z] Info [API] Initialized Notary API with base URL: https://appstoreconnect.apple.com/notary/v2/\ [06:05:28.854Z] Info [API] Preparing GET request to URL: https://appstoreconnect.apple.com/notary/v2/test?, Parameters: [:], Custom Headers: private<Dictionary<String, String>> [06:05:28.855Z] Debug [AUTHENTICATION] Delaying current request to refresh app-specific password token. [06:05:28.855Z] Info [API] Preparing GET request to URL: https://appstoreconnect.apple.com/notary/v2/asp?, Parameters: [:], Custom Headers: private<Dictionary<String, String>> [06:05:28.855Z] Debug [AUTHENTICATION] Authenticating request to '/notary/v2/asp' with Basic Auth. Username: , Password: private, Team ID: [06:05:28.856Z] Debug [TASKMANAGER] Starting Task Manager loop to wait for asynchronous HTTP calls. [06:05:30.194Z] Debug [API] Received response status code: 401, message: unauthorized, URL: https://appstoreconnect.apple.com/notary/v2/asp?, Correlation Key: [06:05:30.195Z] Error [TASKMANAGER] Completed Task with ID 2 has encountered an error. [06:05:30.195Z] Debug [TASKMANAGER]Ending Task Manager loop. Error: HTTP status code: 401. Unable to authenticate. Invalid session. Ensure that all authentication arguments are correct.
2
0
140
6d
IOS 18.2 Beta Issues
i was update my iPhone 15 pro max on IOS 18.2 beta versio. I am fasing the issu. When i am playing Pubg Game, the notification always Come down and game stop. And when i try to On “Guided Access” the Guided access also not workin. Plzzz fix it. And i have another issue with iPhone when i open any app or any documents its very difficult to Go Back. i have to use left hand to go back or always Use Both hands. If it’s possible the “Go Back” option is available on both left and right side. right hander also easily use iPhone on One hand. give us a option “Go Back” option on Right also. Its very easy for us. Thank u soo much🩷🩷
1
0
82
1d
Failure of AudioUnitSetProperty when using MacCatalyst (works on macOS)
I was trying to set custom audio output device for a generated audio on macCatalyst. While using let status = AudioUnitSetProperty(outputUnit, kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, 0, &outputDeviceID, UInt32(MemoryLayout.size)) kAudioOutputUnitProperty_CurrentDevice is invalid, and status = -10879, indicating an error. STEPS TO REPRODUCE Set Run Destination to MacOS and run the program. "AudioUnitSetProperty: 0" should be printed, indicating it works fine. Set Run Destination to Mac Catalyst and run the program. "Error setting output device: -10879" should be printed, indicating an error.
0
0
54
1d
Unable to change TabView's background color
Hello, I seem to be unable to change TabView's background color (not the bar, but the background of the entire TabView), no matter what I try. What I am looking for: To make the TabView's background clear. My code: TabView(selection: $activeScreen) { Screen1() .tabItem { Label("Menu", systemImage: "list.dash") } } Screen1 is defined as: struct Screen1: View { var body: some View { VStack { Text("Hello") } .frame(maxWidth: .infinity, maxHeight: .infinity) } } What I have tried, based on suggestions online: Changing UITabBarAppearance in init(), and .onAppear() TabView().background(.clear) In all cases, the TabView's background remains either white or black, depending on the device's theme. I can change the background behind it by placing it in a ZStack, but that is not what I am looking for, I want the background itself to be clear. The only way that TabView will honor .background(.clear) is if I add the following: .tabViewStyle(.page) .indexViewStyle(.page(backgroundDisplayMode: .always)) But this changes the style of the TabView, which is not the desired behavior. Any help would be greatly appreciated, thank you!
2
0
72
2d
iOS Secure WebSocket Connection Timing Out & Map Sync Issues with Custom SSL Server
Hello, all, I'm new to iOS development and working on a project with the following setup: Architecture: Windows PC running Ubuntu (WSL) hosting a WebSocket Server with self-signed SSL Python GUI application as a client to control iOS app iOS app as another client on physical iPhone Server running on wss://***.***.***.1:8001 (this is the mobile hotspot IP from Windows PC which the iPhone is needed to connect to as well) Current Status: ✓ Server successfully created and running ✓ Python GUI connects and functions properly ✓ iOS app initially connects and communicates for 30 seconds ✗ iOS connection times out after 30 seconds ✗ Map updates from GUI don't sync to iOS app Error Message in Xcode terminal: WebSocket: Received text message 2024-11-25 15:49:03.678384-0800 iVEERS[1465:454666] Task <CD21B8AD-86D9-4984-8C48-8665CD069CC6>.<1> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2103, _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <CD21B8AD-86D9-4984-8C48-8665CD069CC6>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalWebSocketTask <CD21B8AD-86D9-4984-8C48-8665CD069CC6>.<1>" ), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=wss://***.***.***.1:8001/, NSErrorFailingURLKey=wss://***.***.***.1:8001/, _kCFStreamErrorDomainKey=4} Technical Details: Using iOS built-in URLSessionWebSocketTask for WebSocket connection Self-signed SSL certificate Transport security settings configured in Info.plist Map updates use base64 encoded PNG data Questions: What's causing the timeout after 30 seconds? How can I maintain a persistent WebSocket connection? Why aren't map updates propagating to the iOS client? Any guidance/suggestions would be greatly appreciated. Please let me know if additional code snippets would help on what I currently have.
0
0
68
1d
I'm receiving an Error while trying to modify records created by another appleID in CloudKit Public DataBase.
Both appleIDs(create and modify/save) sign in iCloud. I use the following code to modify and save records: self.containerIdentifier).publicCloudDatabase database.fetch(withRecordID: CKRecord.ID(recordName:groupID), completionHandler: { record, error in if error == nil && record != nil { if let iDs : [String] = record!.object(forKey: "memberIDs") as? Array { if iDs.count < self.maxMemberCount { if let mems: [String] = record!.object(forKey: "memberNames") as? Array { if !(mems as NSArray).contains(name) { var members = mems members.append(name) record!.setObject(members as CKRecordValue, forKey: "memberNames") var iDs : [String] = record!.object(forKey: "memberIDs") as! Array iDs.append(self.myMemberID) record!.setObject(iDs as CKRecordValue, forKey:"memberIDs") database.save(record!, completionHandler: { record, error in if error == nil { } else { completion(error as NSError?) dPrint("Error : \(String(describing: error))") } }) }else{ let DBError : NSError = NSError(domain: "DBError", code: 89, userInfo: ["localizedDescription": NSLocalizedString("Your nickname already used.", comment:"")]) completion(DBError) print("change your nickname") } }else{ print("group DB error") let DBError : NSError = NSError(domain: "DBError", code: 88, userInfo: ["localizedDescription": NSLocalizedString("Please try later.", comment:"")]) completion(DBError) } } }else{ print("Error : \(String(describing: error))") } }) I received the following error message: ?Error saving records: <CKError 0x600000bbe970: "Service Unavailable" (6/NSCocoaErrorDomain:4099); "Error connecting to CloudKit daemon. This could happen for many reasons, for example a daemon exit, a device reboot, a race with the connection inactivity monitor, invalid entitlements, and more. Check the logs around this time to investigate the cause of this error."; Retry after 5.0 seconds> baseNSError@0 NSError domain: "CKErrorDomain" - code: 6 _userInfo __NSDictionaryI * 4 key/value pairs 0x000060000349e300 [0] (null) "NSLocalizedDescription" : "Error connecting to CloudKit daemon. This could happen for many reasons, for example a daemon exit, a device reboot, a race with the connection inactivity monitor, invalid entitlements, and more. Check the logs around this time to investigate the cause of this error." key __NSCFConstantString * "NSLocalizedDescription" 0x00000001117155a0 value __NSCFConstantString * "Error connecting to CloudKit daemon. This could happen for many reasons, for example a daemon exit, a device reboot, a race with the connection inactivity monitor, invalid entitlements, and more. Check the logs around this time to investigate the cause of this error." 0x000000011057e700 [1] (null) "CKRetryAfter" : Int32(5) key __NSCFConstantString * "CKRetryAfter" 0x000000011057c680 value NSConstantIntegerNumber? Int32(5) 0x00000001105c2ed0 [2] (null) "CKErrorDescription" : "Error connecting to CloudKit daemon. This could happen for many reasons, for example a daemon exit, a device reboot, a race with the connection inactivity monitor, invalid entitlements, and more. Check the logs around this time to investigate the cause of this error." key __NSCFConstantString * "CKErrorDescription" 0x0000000110568d00 value __NSCFConstantString * "Error connecting to CloudKit daemon. This could happen for many reasons, for example a daemon exit, a device reboot, a race with the connection inactivity monitor, invalid entitlements, and more. Check the logs around this time to investigate the cause of this error." 0x000000011057e700 [3] (null) "NSUnderlyingError" : domain: "NSCocoaErrorDomain" - code: 4099 key __NSCFConstantString * "NSUnderlyingError" 0x0000000111715540 value NSError? domain: "NSCocoaErrorDomain" - code: 4099 0x00006000016cc300
0
0
93
1d
APN's not delivering to macOS devices
Hello, I am building a swift macOS app and have noticed issues today with delivering APN's to both development and production devices. Similar to this thread the only way I can get them to deliver temporarily is to do one of: Change the bundle ID of my app to a new bundle ID, then start it up. I will usually get the first notification. Reset my network (either wired ethernet or wifi, typically both) Using the push notifications console for development sends, I see the message "discarded as device was offline" in the delivery log even though the device is still online and was just registered when I got back the deviceToken. If I set an expiration on development notifications then the delivery log says "stored for device power considerations" and the notification will then send once I do one of the above steps (new bundle or reset network). Previous to today the notifications were sending immediately and I had no issues getting them. Is there something I can do to fix this problem, is it a problem with the APN provider, or is it something else I haven't thought of? A unique ID for an expiration-based notification is 1755def8-1a44-cbcf-c64b-64e435c30f81, and a non-expiry is d7a72b46-0c64-4500-0abc-3734f9efbd90.
3
0
155
2w
Missing libclang_rt.osx.a library on OSX
I tried to install the flang-new compiler from Homebrew on Sequoia OSX. Complex division is broken because file divdc3 is missing. This file comes from libclang_rt.osx.a, a standard LLVM library. This library is missing on OSX. program test integer, parameter :: n=2 complex(kind=8), dimension(n,n) :: V complex(kind=8) :: PER V(1,1)=cmplx(4.0,2.0) V(2,2)=cmplx(5.0,3.0) V(1,2)=0.0 V(2,1)=0.5 PER=cmplx(1.2,1.2) V(:,:)=V(:,:)/PER end program test alainhebert@Alains-MacBook-Air-2 test_complex % flang-new test.f90 Undefined symbols for architecture arm64: “___divdc3”, referenced from: __QQmain in test-fc2bb3.o ld: symbol(s) not found for architecture arm64 flang-new: error: linker command failed with exit code 1 (use -v to see invocation)
0
0
85
1d
Disable Scribble in UITextView
There are use cases where someone who's using an Apple Pencil may not want to enter text via Scribble. A simple example is writing "UIViewController" in a text view is unlikely to be successful. I'd like to disable Scribble in this case and let the keyboard become the input mechanism. (Disabling Scribble system-wide in Settings is both cumbersome and overkill.) The closest I can come to making this happen is by adding a UIScribbleInteraction on a UITextView and returning false when scribbleInteraction(shouldBeginAt:) is called. This disables Scribble on the text view, and prevents writing from being converted into text, but the input widget still appears on screen and isn't very useful. Here is a sample project that demonstrates the problem: http://files.iconfactory.net/craig/bugs/Scribbler.zip Hopefully, I'm doing something wrong here. If not, I'm happy to submit this as a FB. -ch
3
0
2.7k
Jun ’21
How to run Catalyst xctest bundle with xcrun
I'm trying to run an xctest bundle, built for catalyst, with xcrun. i.e. xcrun xctest path_to_my_test.xctest It fails, complaining that: The bundle "MyBundle" couldn't be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.....but incompatible platform (have 'MacCatalyst', need 'macOS') So it seems like because I'm not executing it in a sim it wants the bundle to be a macOS bundle. But I would have thought it would be possible to run a Mac Catalyst target directly on a macOS host the same as a native macOS test target. Is this not possible?
0
0
45
1d
Find My
My husband and I have the same iPhones. We both have location sharing on. When he uses Find My, he can see my location. He has shared his location with me, but my phone always says “No location found,” We have the exact same settings on our phones and have followed the instructions to use Find My. Is there something wrong with my phone since I cannot see his location? I have no trouble seeing the location of another family member. Or is something wrong with my husbands phone? This is so frustrating.
1
0
107
1d
EXIF creation date of ICCameraFile always nil?
I am using ImageCaptureCore to access and (sometimes) download media files from a digital camera connected via USB (either to a Mac oder to an iOS device with Apple lightning to USB3 camera adapter). This works very well in general, but what puzzles me is that for the ICCameraFile's EXIF creation/modification date, it always returns nil. I can access the ICCameraItem's creation/modification date instead, which, as it says in the documentation "usually [is] the same as its EXIF creation date", but, well not always. Generally the EXIF tags are more reliable than the file dates, especially the modification date is easily messed up when copying files. As for my cameras, they show the stable EXIF date on their display, so for consistency I would prefer to use the same in my app. Is there a way to get it without downloading the image from the camera and reading it from the file? Does it possibly depend on the brand of camera (I mostly have Canon) whether ICCameraFile.exifCreationDate is ever populated or always nil? For a thumb drive with DCIM folder, which is treated just like a camera, it is also nil.
3
0
198
1w