Posts

Post not yet marked as solved
3 Replies
3.3k Views
How can I hide the Title Bar in the new SwiftUI App Protocol? Since the AppDelegate.swift and SceneDelegate.swift protocols are gone, I cant follow this documentation anymore: https://developer.apple.com/documentation/uikit/mac_catalyst/removing_the_title_bar_in_your_mac_app_built_with_mac_catalyst I can't implement this code: class SceneDelegate: UIResponder, UIWindowSceneDelegate {     var window: UIWindow?         func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {         guard let windowScene = (scene as? UIWindowScene) else { return }         #if targetEnvironment(macCatalyst)         if let titlebar = windowScene.titlebar {             titlebar.titleVisibility = .hidden             titlebar.toolbar = nil         }         #endif     } } Hope it's still possible with the new AppProtocol.. Thank in advance
Posted
by vdkdamian.
Last updated
.
Post marked as solved
2 Replies
383 Views
I want to create a configurable widget with dynamic options. So I followed the Apple documentation and everything went fine until I needed to reach the .intentdefinition file. This is a part of my widget code wich also shows the error. I did add the .intentdefinition file to the correct targets as mentioned by Apple. For a dynamic widget, you also need to create a Intent Extension. Which I did. If you look to at the screenshot, you'll see that it can reach the .intentdefinition file and doesn't give any errors. I tried to delete the .intentdefinition file and recreate it, but this didn't make a difference. I also made sure to build the project first when the .intentdefinition file was created. On the screenshot below, you can see that I added the .intentdefinition file to the corresponding targets. I hope someone can help me out on this. Here is a post with the corresponding images. https://stackoverflow.com/questions/64185405/intentdefinition-file-cant-be-found-by-a-swift-file-from-my-widget-extension
Posted
by vdkdamian.
Last updated
.
Post not yet marked as solved
5 Replies
760 Views
NSData *theInformationData = //some information data; NSData *encryptedData = //some encrypted data; NSMutableData *theMainFile = [NSMutableData dataWithBytes:&theInformationData length:sizeof(theInformationData)]; [theMainFile appendData:encryptedData];Now if write theMainFile to a file and want to read it from some other code. How can I exctract theInformationData without knowing the length of it? Is the length of theInformationData store in someway in theMainFile?NSData *theExtractedInformation = [NSData data]; [theMainFile getBytes:&theExtractedInformation length:<#(NSUInteger)#>];It think I should use this function getBytes: length: but I dont know the length?Can someone point me in a direction? I hope I dont need to save the length of the theInformationData somewhere seperated from the file. This would seem inconvenient. Thanks in advance.
Posted
by vdkdamian.
Last updated
.
Post not yet marked as solved
3 Replies
640 Views
I have an app that autofills the password on iOS 12. Now I want to implement this function:But I cant get it to work like it should.AutoFill is enabled in settings and also enabled for my app.I've read the documentation but this doens't help me. https://developer.apple.com/documentation/authenticationservices/ascredentialproviderviewcontroller/2977554-providecredentialwithoutuserinte?language=objcI've tried calling this function from viewDidLoad, prepareCredentialListForServiceIdentifiers,.. but this is stupid and definitely won't work.- (void)provideCredentialWithoutUserInteractionForIdentity:(ASPasswordCredentialIdentity *)credentialIdentity { ASPasswordCredential *credential = [[ASPasswordCredential alloc] initWithUser:@"theUsername" password:@"thePassword"]; [self.extensionContext completeRequestWithSelectedCredential:credential completionHandler:nil]; }The function should show the credentials above the keyboard, but this doesn't happen. It just shows the default "Passwords" button.
Posted
by vdkdamian.
Last updated
.