Posts

Post not yet marked as solved
1 Replies
227 Views
I've got a doubleColumn UISplitViewController and I'd like to retain the automatic behavior of the Collapse/Expand Primary Column button. To this end, I'm not specifying my own UINavigationController for the .secondary column position. There are moments in my app's run time that I would like to replace all of the view controllers in the .secondary column. setViewController appears to push an additional controller onto the nav stack. Is there an API available to replace the controllers with a new set?
Posted
by J0hn.
Last updated
.
Post marked as solved
2 Replies
227 Views
I've got a collectionList section that has some items that can be expanded, but they need to be done so lazily when the user taps them. (The children of these objects can only be retrieved asynchronously.) I've given these expandable rows an "outline" disclosure indicator but when the row is tapped neither shouldExpandItem nor snapshotForExpandingParent is being invoked on the sectionSnapshotHandlers of the DataSource. I notice there's no sample code for this and I'm curious if there's a particular way I need to configure the items in the original section snapshot to enable their expansion.
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
0 Replies
225 Views
I'm trying to implement row reordering with the new reorderingHandlers. Some of the items in my CollectionView-OutlineView can only be dropped to certain destinations. I'm attempting to implement targetIndexPathForMoveFromItemAt to provide correct destination IndexPaths. I'm observing that the originalIndexPath for an item that's being reordered appears to change during the life of the drag in an outline view. It almost seems that originalIndexPath follows the value of the proposedIndexPath during the life of the drag. This makes it difficult to determine valid drop locations for different types of items in the outline view. Example output of originalIndexPath and proposedIndexPath (without letting go and letting the move proceed) PROPOSE MOVING SOURCE AT: [3, 1] TO [[3, 1]] PROPOSE MOVING SOURCE AT: [3, 1] TO [[3, 0]] PROPOSE MOVING SOURCE AT: [3, 0] TO [[3, 1]] PROPOSE MOVING SOURCE AT: [3, 1] TO [[3, 0]] PROPOSE MOVING SOURCE AT: [3, 0] TO [[3, 0]] I expect the proposedIndexPath to change as I move through the list, but the originalIndexpath changing surprised me.
Posted
by J0hn.
Last updated
.
Post marked as solved
1 Replies
323 Views
When quitting my catalyst application via the dock icon (right click -> quit) my SceneDelegate's stateRestorationActivity(for scene: UIScene) method is called and I return a non-nil NSUserActivity. However, when restarting my application there is no user activity in the connectionOptions of scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) Does this function correctly for anyone else? Do I need to build my UserActivity in a specific way for this to work in Catalyst? It functions correctly when running on iOS.
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
0 Replies
140 Views
I have a parent view that conditionally contains a subview that contains a grid of buttons. I'd like the buttons to each transition in a unique way when the grid appears. I'm able to get the grid container to transition in from the side, but any transition I use on the grand-child buttons is not respected.
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
1 Replies
318 Views
I've got a few quetsions about designing an acceptable user experience involving migrating from legacy Core Data store to a CloudKit+CoreData store.Given the user can have a legacy data store on all of their devices and only one of those sets of data will be considered supreme, I need a means to effectively merge all this data in a non-destructive way.1) Does NSPersistentCloudKitContainer provide a means of opting into or out of CLoudKit storage for the user? Is it fully reliant on the user going into settings and flipping the iCloud-Data switch? Or can I maintain a local app settings flag? Can I tell a NSPersistentCloudKitContainer to no longer sync during it's lifecycle? 2)
Posted
by J0hn.
Last updated
.
Post marked as solved
2 Replies
412 Views
Trying to add an `NSSharingServicePickerToolbarItem` to the NStoolbar of my scene's window, but when I set the `NSSharingServicePickerToolbarItem`'s activityItemsConfiguration to a class that implements `UIActivityItemsConfigurationReading` I get -[MYAPP.MYCLASS _uinsApplicationActivityProxies]: unrecognized selector sent to instance 0x6000026331e0I'm not exactly sure how I can satisfy this unrecognized selector given it appears to be for a private method. Thoughts?
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
0 Replies
303 Views
In order to display PHAsset photos in a QLPreviewController, I need to provide a url for each item. Is this possible? Maybe there's another way to achieve this?
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
3 Replies
1.7k Views
When running my app on an iPad pro running beta 3, it appears unable to resolve the "Future" type and SIGAborts on startup. It launches fine in simulator. dyld: Symbol not found: _$s7Combine6FutureCyxq_GAA9PublisherAAMc Referenced from: <blah>Expected in: /System/Library/Frameworks/Combine.framework/CombineI tried adding combine to my list of linked frameworks, but it's not there...Any thoughts?
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
1 Replies
803 Views
I've got pre-existing coordinators that spin up my app's main window, and I would like to re-use them for creating scene windows. Is it possible to achieve multi-window support through code-only?I notice in Xcode 11 if I go file -> New Project -> Single View Project I get a project that features programmatic scene creation, where the window is created in the SceneDelegate. If I go into the info plist and switch "Enable Multiple Windows" from NO to YES, the app then launches with a black screen. I notice my own app has the same behavior. Is this intentional? Is there another way coming?
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
10 Replies
4.1k Views
I'm unable to find any sample code for the new iOS13 context menus features or UICommand features. I'm curious about how to make all this stuff work together correctly.Im within UITableView's `contextMenuConfigurationForRowAt` method, and trying to return a UIContextMenuConfiguration with a `UIContextMenuActionProviderI've tried the following that was taken from a WWDC slide @ 44:33 Modernizing your app for iOS 13. let actionProvider: UIContextMenuActionProvider = { suggestedActions in return UIMenu(children: [UIAction(title: "Open in new Window"){ action in }, UIAction(title: "Delete", options:.destructive){ action in}]) } let config = UIContextMenuConfiguration(identifier: "SO.UNIQUE" as NSCopying, previewProvider: nil, actionProvider: actionProvider) return config }This says that UIMenu doesnt support being init'd with children elements, and only has init(coder:) available. Is this stuff ready for adoption this beta? There's no mention in the release notes.
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
0 Replies
685 Views
I'm working on an iOS app that allows the user to open an iCloud Drive or other directory from the Files app "in place" to display that folders contents. Since NSMetaDataQuery does not work on these directories, what's the recommended way to detect when child files are added, removed, or updated by other applications?Is it still kqueue?
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
0 Replies
365 Views
I'm new to working with URL resourceValues and curious if there's some trick to retrieve thumbnails from a URL in iCloud Drive. do { let values = try fileUrl.promisedItemResourceValues(forKeys: [.thumbnailDictionaryKey]) if let dictionary = values.thumbnailDictionary { print(dictionary) } else { print("UNABLE TO GET THE THUMBS") } } catch { print(error) }On first run, despite using "promisedItemResourceValues", the thumbnails are not retrieved the first time this code is executed. The second time this code is triggered by the user it will successfuly return thumbnails. It appears that the thumbnails are loaded in the background after executing "promisedItemResourceValues", but I don't know when to try again. Should I resort to polling for the thumbnails? It introduces problems like: how long should I poll before assuming the network timed-out?I feel like I'm following the documentation, but getting wrong results. Am I approaching this wrong?
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
1 Replies
1.5k Views
I'd like to enumerate the files in a directory chosen by the user within a UIDocumentPickerViewController.I get the directory URL returned from the document picker.I call startAccessingSecurityScopedResourceI create an NSFileCoordinator instance and begin coordinated read of the directory. Inside my read handler I attempt to get the contents of the directory using FileManager. I see that there are a bunch of blah.png.icloud files in the directory.This makes sense because I'm picking a directory within my iCloud drive, but what's the right way to enumerate the contents of this directory? I don;t think I should make read-coordinators for each item. That seems kind of heavy...I only need to enumerate these files for two things:image meta dataimage dataI feel like NSMetaDataQuerys would be my best bet to accomplish this, but they don't seem to like using the URL provided to me by the document picker as the "query scope". (The queries begin, but never update or finish)Anyone know of any good resources for this? I see a lot of stuff about reading the ubiquitous directories using NSMetaDataQueries, but not the directory locations chosen by a user via the document picker.Bonus Question: Will I need to initiate full file downloads of the ".icloud" files in order to read their image meta data? (image width and height)
Posted
by J0hn.
Last updated
.