Posts

Post not yet marked as solved
1 Replies
336 Views
I cannot figure out how to sort a SwiftData query based on a boolean value. My sort works perfectly well for a string, date, int, etc. But crashes with a boolean.
Posted
by kPas42.
Last updated
.
Post not yet marked as solved
0 Replies
345 Views
I have many apps published on the app store however I have one that is saving it's core data under a different one's app name. I don't know how else to describe the issue. So I have an app called AppB let's say. This app uses CoreData/Cloudkit and works perfect. I also have an app called AppA and it also works very well. However, AppA is saving it's CoreData with the title "AppB". So under iCloud/Manage iCloud Storage on a device it says "AppB" with AppB's icon even, but is actually AppA's storage. Everything is working but it obviously confuses customers and I would love to know how this can even happen.
Posted
by kPas42.
Last updated
.
Post marked as solved
1 Replies
495 Views
The new ShareLink works great and saves a ton of code but I can't seem to get it to work with an attributedstring even though documentation indicates it should as attributedstring conforms to transferrable. So for example: //This works fine. ShareLink(item: "test") //But this doesn't. ShareLink(item: AttributedString("test")) Error instantly pops up "No exact matches in call to initializer".
Posted
by kPas42.
Last updated
.
Post not yet marked as solved
7 Replies
12k Views
I have a ZStack with top leading alignment. The first child put into it aligns as expected (top leading) but the second child aligns to center. Is this a bug or am I missing something here. ZStack { HStack { Text("stack 1") } .frame(width: 150, height: 400, alignment: .topLeading) .background(Color.red) HStack { Text("stack 2") } .frame(width: 100, height: 200, alignment: .topLeading) .background(Color.blue) } .frame(width: 200, height: 500, alignment: .topLeading) .background(Color.yellow)
Posted
by kPas42.
Last updated
.
Post not yet marked as solved
2 Replies
3.1k Views
I'm creating an iOS app with SwiftUI and everything works great on all platforms including OSX except for the UIActivityViewController. The controller works as expected on iOS but just displays a blank window on OSX that I can't even close. I'm passing simple text to the controller to share via email or printer.Here is the controller struct;struct ActivityViewController: UIViewControllerRepresentable { var activityItems: [Any] var applicationActivities: [UIActivity]? = nil func makeUIViewController(context: UIViewControllerRepresentableContext) -> UIActivityViewController { let controller = UIActivityViewController(activityItems: activityItems, applicationActivities: applicationActivities) return controller } func updateUIViewController(_ uiViewController: UIActivityViewController, context: UIViewControllerRepresentableContext) {} }And I present it like this;.sheet(isPresented: $bShare, onDismiss: { print("Dismiss") }, content: { Text("It's Fun to Share") ActivityViewController(activityItems: ["place holder"]) })
Posted
by kPas42.
Last updated
.
Post not yet marked as solved
1 Replies
750 Views
I have had a published universal app for many years that has worked fine. Now since the iOS13 update it simply starts to a solid white screen. The only exception is if I run it on an iPad and change orientation of the device. Than the app finally appears as it always has. I have placed a breakpoint in my delegate file in the Application method and another in my rootviewcontroller in the viewDidLoad method. In iOS 12 both breakpoints get hit and everything runs as it always has. In iOS 13 the rootviewcontroller breakpoint never gets reached. The app is very old and uses plain old XIB files with no Storyboards.The code in my delegate is this;#import "AppDelegate.h"#import "RootViewController.h"@implementation AppDelegate@synthesize window, splitViewController;@synthesize managedObjectContext = _managedObjectContext;@synthesize managedObjectModel = _managedObjectModel;@synthesize persistentStoreCoordinator = _persistentStoreCoordinator;- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self.window setRootViewController:self.splitViewController]; [self.window makeKeyAndVisible]; return YES;}Any help would be greatly appreciated.
Posted
by kPas42.
Last updated
.