Post

Replies

Boosts

Views

Activity

-startDownloadingUbiquitousItemAtURL:error: and NSURLUbiquitousItemDownloadRequestedKey
I'm trying to update the iCloud data handling in our app, and I'm running into an issue with a particular file on one particular device. This file never downloads & I haven't been able to pinpoint what's off about it. Right now we just have 2 iCloud accounts & a handful of devices, so I haven't been able to narrow it down yet, but in most cases, all the cloud files download as expected. However, whether or not the file eventually downloads, the NSURLUbiquitousItemDownloadRequestedKey key seems to be completely useless. For the following code: NSError *error = nil; BOOL success = [[NSFileManager defaultManager] startDownloadingUbiquitousItemAtURL:self.fileURL error:&error]; if (!success) { NSLog(@"error downloading %@ : %@", self.fileURL, error); } else { NSDictionary *resourceValues = [self.fileURL resourceValuesForKeys:@[NSURLUbiquitousItemDownloadRequestedKey, NSURLUbiquitousItemIsDownloadingKey, NSURLUbiquitousItemDownloadingErrorKey, NSURLUbiquitousItemDownloadingStatusKey] error:&error]; if (!error) { NSString *downloadStatus = resourceValues[NSURLUbiquitousItemDownloadingStatusKey]; bool downloadRequested = [resourceValues[NSURLUbiquitousItemDownloadRequestedKey] boolValue]; NSLog(@"download requested: %d", downloadRequested); } // ... } downloadRequested is always false, regardless of whether or not the cloud file eventually downloads. I have 2 questions: is there a way to actually check if a download has been requested for a file? what could be preventing this file from downloading? -startDownloadingUbiquitousItemAtURL:error: doesn't report an error, NSURLUbiquitousItemDownloadingErrorKey is always nil, and no error is reported in the NSMetadataQuery observer.
4
0
545
May ’26
Saving a file to ubiquitous storage overwrites iCloud version without conflict
Our app saves its data to iCloud by default. In most cases, this is working as intended & the data can be synced across devices with no problems. But recently, in testing, we discovered a situation where it's possible to save data before the NSMetadataQuery finishes & starts downloading the cloud files. When this happens, the query will then finish, and return the NEW file (with no other versions or conflicts). Is there a way to ensure that writing a file (version A) to ubiquitous storage when another version (version B) exists in the cloud is treated as a conflict, rather than just stomping all over the other version? I've tried querying the file metadata for the file URL (NSURLIsUbiquitousItemKey, NSMetadataUbiquitousItemDownloadingStatusKey, NSURLUbiquitousItemDownloadRequestedKey, NSURLUbiquitousItemHasUnresolvedConflictsKey) before saving, but it just returns nil.
0
0
169
Nov ’25
SwiftUI binding dynamic array problem
I have an editor view that's broken up into several subviews. The model is a relatively small struct, but it does have a couple properties that can be variable-length arrays.The problem I'm having is after I add one entry to any one of these arrays, the view stops updating:struct ChecksView: View { @Binding var checks: [Check] var body: some View { HStack(alignment: .top, spacing: 0) { Button("add prereq", action: { self.checks.append(Check()) }) VStack { ForEach(self.checks.indices, id: \.self) { i in CheckView(check: self.$checks[i]) } } } } }In this subview, the first time you tap "add prereq", it will add to the array & update the UI. But every subsquent time, nothing updates until you navigate away & return. What am I doing wrong?
6
0
8.8k
Jul ’23
App rejected because of invalid LSMinimumSystemVersion
The rejection states:The key LSMinimumSystemVersion in the Info.plist file has the value '$minimumSystemVersion', which is invalid. This string indicates the minimum version of macOS required for this application to run and must be of the form n.n.n where n is a number. For more information, see the Information Property List Key Reference.But the key's not even present in my Info.plist, nor is the string '$minimumSystemVersion'
5
0
4k
Aug ’22
Can't add localized info to our app
When we try to add localized info (what's new, description, etc.) we get a whole bunch of errors: Japanese The app name you entered is already being used for another app in your account. If you would like to use the name for this app you will need to submit an update to your other app to change the name, or remove it from App Store Connect. Japanese Description couldn’t be saved because another field in this localization is invalid. Japanese Keywords couldn’t be saved because another field in this localization is invalid. Japanese Marketing URL couldn’t be saved because another field in this localization is invalid. Japanese Promotional Text couldn’t be saved because another field in this localization is invalid. Japanese Support URL couldn’t be saved because another field in this localization is invalid. Japanese What's New in This Version couldn’t be saved because another field in this localization is invalid. We have 2 versions of the app on the store, iOS & macOS. Both have the same name, because they're the same app. They predate the ability to add Universal versions of iOS/macOS apps. Could this be the cause of the error? We really don't want to have to change the name of either of them.
3
0
4.7k
Jun ’22
"an error occurred trying to capture leaks data"
When I try to run my iOS app through the Leaks instrument in the simulator, very shortly after launch, without fail, it will stop with the error "An error occurred trying to capture Leaks data"All the disclosure says is "Error retrieving leak information." I can't find any other information. Checking the console view, it just shows a normal run up until "<End of Run>"I've tried doing a clean build, deleting my derived data, uninstalling the app from the simulator, restarting Xcode, rebooting. I have no idea what to do.
30
0
22k
Dec ’21
-startDownloadingUbiquitousItemAtURL:error: and NSURLUbiquitousItemDownloadRequestedKey
I'm trying to update the iCloud data handling in our app, and I'm running into an issue with a particular file on one particular device. This file never downloads & I haven't been able to pinpoint what's off about it. Right now we just have 2 iCloud accounts & a handful of devices, so I haven't been able to narrow it down yet, but in most cases, all the cloud files download as expected. However, whether or not the file eventually downloads, the NSURLUbiquitousItemDownloadRequestedKey key seems to be completely useless. For the following code: NSError *error = nil; BOOL success = [[NSFileManager defaultManager] startDownloadingUbiquitousItemAtURL:self.fileURL error:&error]; if (!success) { NSLog(@"error downloading %@ : %@", self.fileURL, error); } else { NSDictionary *resourceValues = [self.fileURL resourceValuesForKeys:@[NSURLUbiquitousItemDownloadRequestedKey, NSURLUbiquitousItemIsDownloadingKey, NSURLUbiquitousItemDownloadingErrorKey, NSURLUbiquitousItemDownloadingStatusKey] error:&error]; if (!error) { NSString *downloadStatus = resourceValues[NSURLUbiquitousItemDownloadingStatusKey]; bool downloadRequested = [resourceValues[NSURLUbiquitousItemDownloadRequestedKey] boolValue]; NSLog(@"download requested: %d", downloadRequested); } // ... } downloadRequested is always false, regardless of whether or not the cloud file eventually downloads. I have 2 questions: is there a way to actually check if a download has been requested for a file? what could be preventing this file from downloading? -startDownloadingUbiquitousItemAtURL:error: doesn't report an error, NSURLUbiquitousItemDownloadingErrorKey is always nil, and no error is reported in the NSMetadataQuery observer.
Replies
4
Boosts
0
Views
545
Activity
May ’26
Saving a file to ubiquitous storage overwrites iCloud version without conflict
Our app saves its data to iCloud by default. In most cases, this is working as intended & the data can be synced across devices with no problems. But recently, in testing, we discovered a situation where it's possible to save data before the NSMetadataQuery finishes & starts downloading the cloud files. When this happens, the query will then finish, and return the NEW file (with no other versions or conflicts). Is there a way to ensure that writing a file (version A) to ubiquitous storage when another version (version B) exists in the cloud is treated as a conflict, rather than just stomping all over the other version? I've tried querying the file metadata for the file URL (NSURLIsUbiquitousItemKey, NSMetadataUbiquitousItemDownloadingStatusKey, NSURLUbiquitousItemDownloadRequestedKey, NSURLUbiquitousItemHasUnresolvedConflictsKey) before saving, but it just returns nil.
Replies
0
Boosts
0
Views
169
Activity
Nov ’25
SwiftUI binding dynamic array problem
I have an editor view that's broken up into several subviews. The model is a relatively small struct, but it does have a couple properties that can be variable-length arrays.The problem I'm having is after I add one entry to any one of these arrays, the view stops updating:struct ChecksView: View { @Binding var checks: [Check] var body: some View { HStack(alignment: .top, spacing: 0) { Button("add prereq", action: { self.checks.append(Check()) }) VStack { ForEach(self.checks.indices, id: \.self) { i in CheckView(check: self.$checks[i]) } } } } }In this subview, the first time you tap "add prereq", it will add to the array & update the UI. But every subsquent time, nothing updates until you navigate away & return. What am I doing wrong?
Replies
6
Boosts
0
Views
8.8k
Activity
Jul ’23
App rejected because of invalid LSMinimumSystemVersion
The rejection states:The key LSMinimumSystemVersion in the Info.plist file has the value '$minimumSystemVersion', which is invalid. This string indicates the minimum version of macOS required for this application to run and must be of the form n.n.n where n is a number. For more information, see the Information Property List Key Reference.But the key's not even present in my Info.plist, nor is the string '$minimumSystemVersion'
Replies
5
Boosts
0
Views
4k
Activity
Aug ’22
Can't add localized info to our app
When we try to add localized info (what's new, description, etc.) we get a whole bunch of errors: Japanese The app name you entered is already being used for another app in your account. If you would like to use the name for this app you will need to submit an update to your other app to change the name, or remove it from App Store Connect. Japanese Description couldn’t be saved because another field in this localization is invalid. Japanese Keywords couldn’t be saved because another field in this localization is invalid. Japanese Marketing URL couldn’t be saved because another field in this localization is invalid. Japanese Promotional Text couldn’t be saved because another field in this localization is invalid. Japanese Support URL couldn’t be saved because another field in this localization is invalid. Japanese What's New in This Version couldn’t be saved because another field in this localization is invalid. We have 2 versions of the app on the store, iOS & macOS. Both have the same name, because they're the same app. They predate the ability to add Universal versions of iOS/macOS apps. Could this be the cause of the error? We really don't want to have to change the name of either of them.
Replies
3
Boosts
0
Views
4.7k
Activity
Jun ’22
"an error occurred trying to capture leaks data"
When I try to run my iOS app through the Leaks instrument in the simulator, very shortly after launch, without fail, it will stop with the error "An error occurred trying to capture Leaks data"All the disclosure says is "Error retrieving leak information." I can't find any other information. Checking the console view, it just shows a normal run up until "<End of Run>"I've tried doing a clean build, deleting my derived data, uninstalling the app from the simulator, restarting Xcode, rebooting. I have no idea what to do.
Replies
30
Boosts
0
Views
22k
Activity
Dec ’21