Posts

Post not yet marked as solved
1 Replies
143 Views
I am trying to set up a CD pipeline to build my macOS app. I am failing to add a certificate to the keychain with "security import ...", getting the error: PKS Importing signing certificate: build/osx/Release/FD_certificate.p12, build.keychain 1 identity imported. 2023-10-18 23:53:02.056 *** Error: Failed to store the password in the keychain. 2023-10-18 23:53:02.058 *** Error: Failed to store the password in the keychain. You must specify a name for the keychain item. (-1021) { NSLocalizedDescription = "Failed to store the password in the keychain."; NSLocalizedFailureReason = "You must specify a name for the keychain item."; } The line in question is build routine is here: https://github.com/patrickkidd/familydiagram/blob/main-cd/bin/setup_provisioning_profile.sh I have googled for this and tried GPT a number of different ways and there doesn't seem to be any way to add a name for the certificate "item" in the keychain. Thanks!
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.1k Views
I am getting crashes on very simple object access after upgrading to iOS 13. See examples below. I wonder if there is some change to the language or to default settings in Xcode causing these? Or maybe there is something fundamental that I don't understand about how properties are managed? This code has been reliable for a few iOS versions until now.EXAMPLE 1: The following snipped crashes when printing _iCloudRoot: _iCloudRoot = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; if (_iCloudRoot != nil) { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@"iCloud available at: %@", _iCloudRoot); completion(TRUE); }); }Here is the property declaration:@property(nonatomic, strong) NSURL * iCloudRoot;EXAMPLE 2: The following snippet crashes when accessing calling NSURL.path on an object returned through the two member methods- (NSURL *)localRoot { if (_localRoot == nil) { NSArray * paths = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask]; _localRoot = [paths objectAtIndex:0]; } return _localRoot; } - (NSURL *) documentsFolderPath { if(_forcedDocRoot) { return _forcedDocRoot; } else if (self.iCloudAvailable && self.iCloudOn) { return [self.iCloudRoot URLByAppendingPathComponent:@"Documents" isDirectory:YES]; } else { return self.localRoot; } } - (void)loadLocal { // this crashes on [docRoot path] below... NSURL *docRoot = [self documentsFolderPath]; if(!docRoot) { NSLog(@"no doc root!"); return; } // this prevents the crash on [docRoot path] below... // NSArray * paths = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask]; // NSURL *docRoot = [paths objectAtIndex:0]; NSString* filePath = [docRoot path];Here is the property declaration:- (NSURL *) documentsFolderPath; @property(nonatomic, strong) NSURL * localRoot;Thanks!
Posted Last updated
.
Post not yet marked as solved
0 Replies
468 Views
Anyone know how to access the value of this built-in setting in iOS system preferences using objective-c? I am sure that it is there because my app has iCloud storage enabled, but I have no idea how to read it to determine whether to index the local Documents dir or the iCloud container.Thanks!
Posted Last updated
.