So, I'm getting this error when trying to run the app. "Build succeeds" but the app won't run and Xcode spits out an error:Could not install at this time.Failed to load Info.plist from bundle at pathAnd the path points to a 3rd party framework I use, pointing to its Info.plist: Extra info about plist: ACL=<not found>.If I choose "Do Not Embed" in the "Frameworks, Libraries, and Embedded Content" section of Xcode, the app build & runs. But if I choose "Link and Embed" the app, I get this error and the app won't run.Obviously, if I'm shipping the app to the App Store I need to embed the 3rd party framework in the application...Upon further inspection, if I look inside the .framework of the third party library it does not include an Info.plist file. Never had an issue related to this third party framework before. It's the GoogleMobileAds.framework...
Post not yet marked as solved
So my app creates user notifications. Sometimes when I tap one of these notification to open the app, it crashes. It happens seemingly randomly and is not easy to reproduce. My app's UNUserNotificationCenterDelegate does something like this (shortened to keep the post concise):
-(void)userNotificationCenter:(UNUserNotificationCenter*)center
didReceiveNotificationResponse:(UNNotificationResponse*)response
withCompletionHandler:(void(^)(void))completionHandler
{
if (![response.actionIdentifier isEqualToString:UNNotificationDefaultActionIdentifier])
{
//only care about the default action...return out otherwise.
completionHandler();
return;
}
completionHandler();
UNNotificationRequest *request = response.notification.request;
NSString *requestIdentifier = request.identifier;
if (requestIdentifier == nil)
{
return;
}
[database selectModelFromId:requestIdentifier withCompletionHandler:^(MyModel *modelObj,
NSError *errorOrNil)
{
if (modelObj != nil)
{
[self makeWebViewControllerForModeAndPutOnScreen:modelObj];
}
else
{
NSLog(@"error loading data for notification...");
}
}];
}
Okay so the view controller loaded uses WKWebView to load web content. Again every once in awhile the app crashes when I tap a notification. No crash report is ever generated for my app. I don't know why this is happening. Anybody experience anything similar and know what the issue could be? Thanks in advance.
Post not yet marked as solved
I can no longer run my app from Xcode with code signing for my Mac app. I've configured a debug provisioning profile manually and tried that but it fails, saying the embedded framework is not code signed at all.I tried "Automatic" code signing but it fails with the same error:code object is not signed at allIn subcomponent: PATH_HERECommand /usr/bin/codesign failed with exit code 1The only way I'm able to get the app to run is to turn off code signing alltogether in Debug mode. I've noticed in that case though, testing is pretty useless because my app can't event write a security scoped bookmark to disk.
Post not yet marked as solved
So I tried installing this update three times. Each time all 7.6 GB "downloads" and begins the "Installing..." shortly after Xcode starts "Installing" I get a notification in the Notification Center "Unable to Download App" "Xcode could not be installed please try again later."...Anyone else?
Post not yet marked as solved
So to support Apple Silicon in my app I need a fat version OpenSSL for Intel/Arm.
However, I cannot get OpenSSL to build for ARM if I lower the deployment target to an earlier version of macOS before Big Sur.
I was able to make a fat version of OpenSSL by making the ARM half have a deployment target of 10.15, but when added to my project, Xcode spits out warnings about Object files built for a newer macOS version than being linked.
Anyone know the proper procedure to make a backward compatible version (pre-macOS 10.15) of OpenSSL static library and still support M1 natively?
I don't think I'm currently willing to raise the deployment target of my app to 10.15 just to link the OpenSSL library.
My developer account uses a different AppleId from the AppleID I use on my devices. Therefore, when I test on my device, I can't look at any of the data in the CloudKit dashboard. It would be a real pain in the neck to have to sign out of icloud and use my developer apple id on my devices just to test. Is there no way to use a different AppleID for CloudKit in the "sandbox" environment like we can for IAP?
Post not yet marked as solved
Have an app I'm working on that stores an item in the keychain. Everything was was working fine. I have a button in the UI that allows the user to clear out the keychain item:NSDictionary *query = @{(__bridge id)kSecClass: (__bridge id)kSecClassGenericPassword,
(__bridge id)kSecAttrService: service,
(__bridge id)kSecAttrAccount: accountKey};
OSStatus status = SecItemDelete((__bridge CFDictionaryRef)(query));Status is -25244 which is errSecInvalidOwnerEdit. This app created the keychain item to begin with. What would be the appropriate way to handle this type of error?
Post not yet marked as solved
I wrote a little something that uses WKWebView. It seems that print: does not work though (macOS app).I'm kind of regretting using WKWebView over the old school WebView...anyone have a workaround?
Post not yet marked as solved
Where's the link for the "Guides and Sample Code" page (located here: https://developer.apple.com/library/content/navigation/I kow the URL because I know it, but why isn't there a link to it on the main developer page (since release notes and other important tidbits get published there)? Why's it so hard to find?Or is it right in front of my face and I'm not seeing it?
Post not yet marked as solved
I'm looking to release an update to a Mac application. I've updated this app many times and had no issues. I haven't change any code signing related settings in the project.Now when I try to export a dev ID signed app in Organizer, I'm an error presented as a sheet:An error occurred during exportCodesign failedThe sheet has two buttons: Show Logs and & Cancel. I've filed a bug and sent the logs to Apple. If you cancel the sheet out and hit "Previous" Xcode wll crash on you.Anyone experience this and know of a solution? This is preventing me from pushing an update out to the folks.
Post not yet marked as solved
So I'm trying to migrate some code out of the deprecated method:
(void)application:(UIApplication *)application performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler API_DEPRECATED("Use a BGAppRefreshTask in the BackgroundTasks framework instead", ios(7.0, 13.0), tvos(11.0, 13.0));
And into a BGAppRefreshTask. Basically what's done here is the app downloads some content and displays notification in the the Notification Center.
When I run the app on the device fire off the task via the debugger like so:
e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"com.refreshidhere"];
The task fires. But any NSURLSessionTask instances I create fail and I get an error:
finished with error [-997] Error Domain=NSURLErrorDomain Code=-997 "Lost connection to background transfer service"
So I just made a small sample project here and still getting the error. Here is how it's configured:
(void)handleAppRefreshWithTask:(BGAppRefreshTask*)task
{
// Fetch the latest feed entries from server.
[self scheduleAppRefresh];
if (self.runningAppRefreshTask != nil)
{
NSLog(@"already running app refresh task...");
[task setTaskCompletedWithSuccess:YES];
return;
}
self.runningAppRefreshTask = task;
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.apple.com"]];
NSURLSessionDataTask *dataTask = [self.backgroundURLSessionForTest dataTaskWithRequest:request];
[task setExpirationHandler:^{
NSLog(@"Expiration handler called...");
[dataTask cancel];
}];
[dataTask resume];
}
#pragma mark - NSURLSessionDataDelegate
(void)URLSession:(NSURLSession*)session
dataTask:(nonnull NSURLSessionDataTask*)dataTask
didReceiveData:(nonnull NSData*)data
{
[self.backgroundDownloadData appendData:data];
}
(void)URLSession:(NSURLSession*)session
task:(NSURLSessionDataTask*)task
didCompleteWithError:(nullable NSError*)error
{
NSData *theData = [self.backgroundDownloadData copy];
dispatch_async(dispatch_get_main_queue(), ^{
if (error == nil)
{
NSLog(@"got %@",theData);
[self.runningAppRefreshTask setTaskCompletedWithSuccess:YES];
}
else
{
NSLog(@"error: %@",error);
[self.runningAppRefreshTask setTaskCompletedWithSuccess:NO];
}
self.runningAppRefreshTask = nil;
[self.backgroundDownloadData setData:[[NSData alloc]init]];
});
}
Post not yet marked as solved
So working on an app that uses CloudKit (private database). Now, the app is allowed to run in "local mode" if the user is not using iCloud or has disabled iCloud for my app.Now imaging this case:1) iCloud is not enabled for my app and the user starts creating data.2) The user subsequently enables iCloud for my app.3) My app gets a CKAccountChangedNotification.4) My app starts uploading local data the user created before iCloud was enabled to CloudKit.5) My app gets a CKErrorQuotaExceeded when uploading data.6) My app displays an alert, telling the user he has run out of iCloud storage and he can either Buy More in iCloud Settings or turn off iCloud for the app to run in "Local mode."So now my app is in this state where iCloud is enabled but the user has no iCloud storage left. I don't see any API to tell if iCloud storage changed. If the user goes to Settings, buys more storage, and goes back to my app, I'd like to retry sending the local data back to Cloudkit for initial sync. I guess I just have to retry the operation every time the app is launched and show the error over and over again until the user does something about it (disable iCloud in Settings or buy more storage)?Ideally, I'd like to give the user an option to turn off iCloud (for my app only) in app when the error is hit, because telling them to navigate to Settings to turn off iCloud is hard for a lot of people. Or present a system provided view controller offerring them to upgrade their iCloud storage plan. CKStoragePurchaserViewController?#pragma mark - CKStoragePurchaserViewControllerDelegate
-(void)storagePurchaserViewControllerDidPurchaseAdditionalStorage:(CKStoragePurchaserViewController*)vc
{
//retry sync.
}
-(void)storagePurchaserViewControllerDidDisableICloudFunctionality:(CKStoragePurchaserViewController*)vc
{
//iCloud is now off, run the app in local mode.
}
Post not yet marked as solved
So yesterday, I was having a problem getting push notifications for my CloudKit app I'm working on in my development environment.
Then for some reason, this morning, I started receiving push notifications again. Now during testing, pushes have suddenly stopped. I have an iPhone and an iPad here and I'm testing on both devices.
I see there are lots of threads similar to this when I searched but was unable to find one that had a suitable answer. Here's my configuration:
1) My app only uses the private database and is using a custom zone.
2) I'm using a CKRecordZoneSubscription for silent pushes.
shouldSendContentAvailable is set to YES.
After making changes on one device, the other device gets the push. Then suddenly pushes stop working. Both apps are connected on the same wifi.
As I'm typing this, I finally just got a push for a small change on one record probably 10 minutes after it happened on the other device. The delay seems very poor.
I'd expect syncing to work a little better than this, not sure if this is just in the development environment?
Post not yet marked as solved
Sales & Trends link in iTunes Connect isn't working for me. Just redirects me back to the main page. Anyone else having this issue today?
Is there still no way to use SF symbols in an appkit app (with NSImage)?