Posts

Post not yet marked as solved
0 Replies
757 Views
Asking with the WWDC-10220 tag because Fruta is the sample code for this presentation. When launching Fruta on a landscape iPad Pro 11", the "State" of the application is completely empty until the user taps the back button. After tapping back everything appears to pop into place. Is this expected behavior in SwiftUI when using split screens? NavigationLinks are finicky and I'm expecting the programmatic setting of the primary column "selection" to be resolved on launch, not when the user taps back.
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
1 Replies
708 Views
So, I've got a SwiftUI app with a triple column splitView. When the app starts on an 11 inch iPad, the "primary" column is offscreen. The primaryColumn has a List full of navigationLinks. Like so: List { ForEach(items, id: \.itemID) { item in NavigationLink(tag: item, selection: $selectedItem) {               ItemDetailsView(item: item) ... Now, the selection of the first Column in the split view cascades through the rest of the app, so populating it is pretty important. I've tried having the selectedItem be set from an EnvironmentObject. I've also tried having it set in onAppear. Everything I try only causes a selection the "pop into place" whenever I expose the primary column of the sidebar. Am I going about this the wrong way? Is it because the sidebar is hidden by default?
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
2 Replies
3.4k Views
Hey All,Been digging around the internet looking for this one, and while stackoverflow has some relevant solutions, none are working for me.My View Hierarchy is the followingView--->UISplitViewController.view ( set as a child viewController )--------> rootViewController.view (set as the mainViewController of the splitView)--------> detailViewController.view (set as the detailViewController of the splitview)Via the iPhone 6 simulator(split view is always collapsed) I present a modal viewcontroller with the following code: UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; [navigationController.navigationBar setBarStyle:UIBarStyleBlack]; [navigationController setModalPresentationStyle:UIModalPresentationPopover]; navigationController.popoverPresentationController.sourceView = view; navigationController.popoverPresentationController.barButtonItem = barButtonItem; navigationController.popoverPresentationController.delegate = self; [self presentViewController:nav animated:YES completion:nil];I dissmiss the presented controller from that viewController by calling:[self dismissViewControllerAnimated:true completion:nil];If I set animated to "false" I dont have any problems, but it looks bad and doesnt make sense.I see some posts regarding this and custom presenatation methods, but Im not using anything custom here.Any Help is appreciated!EDIT:On iPhone the ModalPresentationStyle should default to UIModalPresentationOverFullScreen, so I tried setting the presentationStyle directly to that, and it worked!If I set the presentationStyle to "FullScreen" I get the same behavior, a black screen after dismissing.
Posted
by J0hn.
Last updated
.
Post marked as solved
3 Replies
1.6k Views
I've tried a few things to get dropdown menus working on my Catalyst toolbar. let barButton = UIBarButtonItem(systemItem: .add, primaryAction: UIAction(title: "Add", handler: { [weak self] _ in ... }), menu: menu) let addItem = NSToolbarItem(itemIdentifier: .addItem, barButtonItem: barButton) Even tried adding an itemMenuFormRepresentation, but no dice. addItem.itemMenuFormRepresentation = AppDelegate.newMenu Has anyone got this working on Big Sur?
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
3 Replies
889 Views
I'm giving my users a way to configure the dark mode style of an application. I achieve this by setting the overrideUserInterfaceStyle property of the windows on every WindowScene of the application. This works on iPad and iPhone, but on Catalyst the toolbar area of the window does not change style. It's always the same as the system. Is there a different technique required to change the interface style of a Catalyst application?
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
21 Replies
3.4k Views
What I've done: Configured a local experience to point to "https:/example.com" (removed a slash to allow post) Configured the local experience with the App Clip's bundle ID Installed my App Clip via test flight, and see it visible in settings. Created a QR Code with the url mentioned in bullet #1. What I encounter: When I scan the QR code, I see that the camera app present a notification to open the URL in safari. What I expect: This should instead show the AppClip or AppClip card, correct? Anyone else get this working? I've seen some blog posts but they're all mentioning beta5. I don't know if there's been a regression or just a behavior change.
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
0 Replies
518 Views
I register a file representation on my dragItem's Itemprovider like the following:  provider.registerFileRepresentation(forTypeIdentifier: itemTuple.uti, fileOptions: .openInPlace, visibility: .all, loadHandler: { (completion: ((URL?, Bool, Error?) -> Void)) -> Progress? in                 let fileCoord = NSFileCoordinator(filePresenter: nil)                 var fileError: NSError?                 let progress = Progress(totalUnitCount: 1)                 progress.completedUnitCount = 1                 fileCoord.coordinate(writingItemAt: url, options: [.forMoving], error: &fileError, byAccessor: { [fileError] fileURL in                     if let error = fileError {                         completion(nil, false, error)                         progress.completedUnitCount = 1                     }                     completion(fileURL, true, nil)                     progress.completedUnitCount = 1                 })                 return progress             }) When I drop the thumbnail onto the desktop a breakpoint on line 14 is called, but finder creates a Copy. I've created the fileCoordinator with .forMoving. I've registered the file representation with fileOptions: .openInPlace I'm also responding with true in public func collectionView(_ collectionView: UICollectionView, dragSessionAllowsMoveOperation session: UIDragSession) -> Bool Is there something else I'm missing for finder to consider this a moveable file URL?
Posted
by J0hn.
Last updated
.
Post marked as solved
2 Replies
1.2k Views
I'd like to continue catalyst development, but I've added an AppClip target to my project. It appears that Xcode is complaining that the framework being embedded into the AppClip is getting built for Catalyst, when it would prefer "iOS". error: Building for iOS, but the embedded framework 'ViewKit.framework' is building for Mac Catalyst. You may need to configure 'ViewKit.framework' to build for iOS. (in target 'Clip' from project 'overview') Since AppClips can not run on Catalyst is there a configuration spot in Xcode build settings to conditionally remove a target? The clip is already "unchecked" for mac on the general page's deployment info checkboxes.
Posted
by J0hn.
Last updated
.
Post marked as solved
3 Replies
581 Views
Can anyone explain more about what this App Store Connect Upload error could be? As far as I can tell this intent is only in a single intent extension, but I'm willing to learn how to better investigate. ERROR ITMS-90674: "Intents Extension Issue. The intent "CopyToGalleryIntent" is in multiple intents extensions, but it can only be in one."
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
0 Replies
454 Views
After several TestFlight / Xcode deploys to my device to debug memory pressure issues I got into a state where my app's WidgetExtension would not launch at all. (It did not appear in the "Attach to process" debug list.) Uninstalling and reinstalling did not fix it. Only rebooting the device was able to shake out the gunk. I'm concerned that there may be a bug here, either in my widget extension or in the framework but I'm not sure what's expected and what's not. Anyone else run into restart-required states when testing on hardware?
Posted
by J0hn.
Last updated
.
Post not yet marked as solved
3 Replies
604 Views
I would like like to update my live application, so I need to create a new version (1.0.4), but I currently have a pending version (2.0) for the iOS14 work I'm doing. Is it possible to add a new version while 1.0.3 is "For Sale", and 2.0 is "pending submission"? I do not have the + button next to the "iOS Apps" header.
Posted
by J0hn.
Last updated
.
Post marked as solved
3 Replies
2.5k Views
I am trying to use a drag delegate and drop delegate to rearrange rows in a UITableView. This is instead of using the edit-mode and move-handles that invoke the the moveRowAt of UITableViewDataSource. The use of the drag delegate and drop delegate to accomplish this works great when running on iOS, but not on mac running via Catalyst. What I see: tableView(_ tableView: UITableView, itemsForBeginning session: UIDragSession, at indexPath: IndexPath) is called. tableView(_ tableView: UITableView, canHandle session: UIDropSession) -> Bool is not called. I'm not sure what else I can do to make the UITableView happy if this functionality already works on iOS. The tableview is configured like:             tableView.dragDelegate = self             tableView.dropDelegate = self             tableView.dragInteractionEnabled = true This is my final blocker before releasing a catalyst app for 10.15, and I would like to get it resolved before 10.16. FB7737498 is filed to capture this behavior and has a sample project attached. If there is an acceptable project host for the new forum, I can attach it here as well.
Posted
by J0hn.
Last updated
.
Post marked as solved
2 Replies
1.4k Views
Can a single domain direct the user to different app clips depending on what page the user is on? Scenario: portfolio.com/OrrangesApp portfolio.com/BananasApp Each of these pages can have separate <meta> tags for displaying different banners for different Apps/AppClips. That part makes sense to me. I'm curious how this would look in the AASA file. The file must state: "appclips": { &#9;&#9;&#9;&#9;"apps": ["ABCED12345.com.example.OrangesApp", "ABCED12345.com.example.BananasApp"] &#9;&#9;} How do I direct the OS to a different clip based on a different URL path? Is that fulfilled through the the AppStoreConnect configuration? I was under the impression we had to match the URL with the AASA, but I'm suspecting that only applies to the domain? Am I on the right track, here?
Posted
by J0hn.
Last updated
.
Post marked as solved
3 Replies
1.3k Views
After updating to iOS14, I notice that security scope bookmarks that I persisted on iOS13 no longer resolve. These bookmarks were pointing to directories in my iCloud Drive. These directories still exist after updating. An example URL on iOS 14 is: file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/Pictures/Archive/Digital/ I create bookmarks via: try bookmarkData(options: [], includingResourceValuesForKeys: nil, relativeTo: nil) I resolve these bookmarks via: try URL(resolvingBookmarkData: data, options: [], relativeTo: nil, bookmarkDataIsStale: &bookmarkDataIsStale) Is there a specific technique required to create and resolve bookmarks after an OS upgrade?
Posted
by J0hn.
Last updated
.