When I add a simple menu to the dock via the NSApplicationDelegate method -applicationDockMenu: and run the app from Xcode it doesn't work.
-(NSMenu*)applicationDockMenu:(NSApplication*)sender
{
NSMenu *dockMenu = [self buildDockMenu];
if (dockMenu != nil)
{
NSLog(@"Returning dock menu.");
return dockMenu;
}
else
{
NSLog(@"Not ready to build dock menu");
return nil;
}
}
When I run the app, my main app window shows up but nothing logs out in -applicationDockMenu: until I click outside my app's window (so if I click the desktop background, or a Finder window, or whatever). Then after I click outside my app's main window this logs out:
Returning dock menu.
The "Not ready to build dock menu" message does not log out.
But...when I right click on the dock icon, the menu doesn't show up.
But if I stop the app from Xcode and just run it not attached to the debugger, the dock menu does show up. But this makes the debugging/testing situation not ideal.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Getting this crash after I do this in PDFKit a lot:
PDFSelection *nextSelect = [self.pdfView.document findString:currentSearchString fromSelection:currentSelction withOptions:NSCaseInsensitiveSearch];
if (nextSelect != nil)
{
self.pdfView.currentSelection = nextSelect;
[self.pdfView scrollSelectionToVisible:nil];
}
Which often leads to:
0 CoreFoundation 0x000000019ced4770 __exceptionPreprocess + 176
1 libobjc.A.dylib 0x000000019c9b2418 objc_exception_throw + 88
2 CoreFoundation 0x000000019cfffe10 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 724
3 CoreFoundation 0x000000019cfa1ae4 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 52
4 PDFKit 0x00000001cb56e0fc -[PDFView _axPostPageChangeNotification:] + 348
5 Foundation 0x000000019e6a25e4 __NSFireDelayedPerform + 372
6 CoreFoundation 0x000000019ce92290 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
7 CoreFoundation 0x000000019ce91f50 __CFRunLoopDoTimer +
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.
I got this email from an app update I submitted yesterday....:To process your delivery, the following issues must be corrected:Invalid Signature - This error occurs when you have signed your app's installer incorrectly. There are two certs required for this process: the "3rd Party Mac Developer Application" cert and the "3rd Party Mac Developer Installer" cert. When signing your package, you need to ensure that you are using the Installer cert to sign your package. Ensure that you are specifying this cert when submitting your app via the Xcode Organizer or when running productbuild from the command line.Once these issues have been corrected, you can then redeliver the corrected binary.Regards,________________The App Store teamWhen I validate the app in organizer for MAS distribution, it passes validation. Also, when I manually switch it to "Installer" in Xcode and try to rearchive the project, I get an error about no provisioning profiles matching the identity. For provisioning profiles, I have it "Automatic". I did try to configure provisioning profiles manually for these app Identifiers in the Member Center, which only has it matching the developer application certicate. Why would the Memeber Center have a provisioning profile not match the installer certificate, if that is the one to be used?BTW, code signing just started acting bonkers on me recently, as it seems to do every now and again, though i haven't made any changes to my certificates nor configurations.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
Signing Certificates
Provisioning Profiles
I have an NSTableView (view based). The cells (views) have a NSImageView to display a thumbnail.Thumbnails come from the web, and I load the thumbnails lazily. My class that handles the thumbnail loading has a delegate that sends back a message like this:-(void)thumbnailCache:(nonnull MyThumbnailCacheObject*)thumbnailCache
loaddedThumbnailsForURLs:(nonnull NSArray<NSURL*>*)imageURLs
{
//Get the row indexes for the urls...and then call....reloadDataForRowIndexes:columnIndexes
//table view doesnt have columns.
[self.tableView reloadDataForRowIndexes:indexes columnIndexes:[NSIndexSet indexSetWithIndex:0]];
}However the cells don't update. At first I thought it was a bug in my thumbnail loading, but a call to reloadData does update the cells properly.Wrapping the reloadDataForRowIndexes:columnIndexes: in between beginUpdates and endUpdates calls makes no difference.Does reloadDataForRowIndexes:columnIndexes: not work with view based table views? I'm tempted to just use reloadData and hope everything works out okay.
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.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags:
Signing Certificates
Provisioning Profiles
I'm having a hard time tracking the cause of this/ coming up with a workaround for this potential bug in UITableView. I have a UITableView, using the default section header view (I implement -tableView:titleForHeaderInSection: and return a string).After deleting some rows using -deleteRowsAtIndexPaths:withRowAnimation: I notice sometimes an extra header view will appear inside my UITableVIew. It has the same title as the sticky header above it, but it appears the table view lost its reference to the header view but didn't clean it up from the view hierarchy (it scrolls with the table view, never sticks to the top anymore). If I manually empty the entire data source and call reload data on the table view, the abandoned header view is still visible. Has anyone run into this before and know of possible cause and/or workaround?
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?
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...
I tried adding StoreKit testing for an existing macOS app. On first launch, there is no App Store receipt on the main bundle and therefore my app calls exit(173) to get a receipt, and I get an App Store sign in sheet. Then when I sign in, I have a receipt that does not validate. I believe I'm simply getting an App Store receipt in the sandbox environment? I was under the impression that using StoreKit testing would allow me to test iAP in a local environment.
Here is my steps to reproduce:
1) Added the Configuration.storekit file to my project.
2) Set this file as the storekit configuration in the scheme editor.
3) Run the app.
4) Local receipt validation fails, macOS gives me a Mac App Store login prompt, which I can use but then I get a sandboxed App Store receipt on the main bundle. Receipt will not verify against StoreKitTestCertificate.cer.
I'm running Xcode 12.3. I'm on Big Sur. My app's deployment target is 10.11.
Any ideas? Thanks
I'm unable to test Subscription renewal via StoreKit Testing in Xcode unless the subscription is a monthly subscription. I'm trying to test a weekly subscription but under the Editor menu there is no entires for anything other than Monthly? (Xcode 13.3). Setting the interval to the fastest ("Monthly Renewal Every 30 Seconds") does nothing if the active subscription is a weekly subscription. Is there no way to test subscriptions unless they are monthly?
I have an iOS app that was rejected and I submitted a revised binary. In my case auto-renewable subscriptions were returned with the initial rejections and I didn't realize I had to add them for review again with my revised submission....so I submitted a revised binary which got rejected because the subscriptions were returned on the initial rejection.
So I go to "Subscriptions" area for my app and the status is "Developer Action Needed." If I click a subscription the "Submit for Review" button is disabled. I tried making an edit to the Subscription to see if that would cause the button to become enabled but it does not. Can't figure out how I can resubmit these subscriptions for review....so my submission is stuck...
Perhaps when an app with attached iAP/Subscriptions is rejected they shouldn't detach iAP/subscriptions from the app? Developers can easily not notice and submit a new build and not realize that their iAP/subscriptions are no longer attached to the build...and if App Review doesn't notice you could have an app get on the Store which potentially shows UI for non-working iAP/subscriptions.
If anyone has ran into this and could help I'd appreciate it. Thanks a lot.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store Connect
StoreKit
Testing on the iPhone 14 Pro simulator I notice if the device is in the landscape orientation, snapshot images my app takes are clipped (the x origin is off).
I take a snapshot of a view like this:
-(UIImage*)getSnapshotForView:(UIView*)snapShotView
{
UIGraphicsBeginImageContextWithOptions(snapShotView.bounds.size, NO, 0.0f);
[snapShotView drawViewHierarchyInRect:snapShotView.bounds afterScreenUpdates:YES];
UIImage *snapShotImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return snapShotImage;
}
So I have an iPhone SE 3rd gen and all is working fine. But I figured I'd test in the iPhone 14 Pro simulator.
When the simulator is in landscape mode the generated image is inset like 100 points on the x origin and the content is clipped off on the right side.
So I looked at the view I was snapshotting and I thought I wasn't accounting for safe area insets properly (right and left) but I was. The subviews of the view I'm snapshotting all have the expected CGRect value for their frames.
Looks like iPhone 14 Pro is rendering snapshots location on the x axis when the device is in landscape mode (at least that appears to be the case in the simulator at least).
Any ideas if I'm doing something wrong?
I'm using UICollectionView with a list style on Mac (looks like NSOutlineView in a sidebar). I have expandable rows.
So this is the behavior I'm after:
-If the user has a row selected, but decides to collapse the selected row's parent, I want to maintain the current selection.
Instead this is what happens by default:
-If a row selected and I collapse the parent the collection, the collection view automatically selects another row (in my case the first row at index path 0-0).
Just because the user collapses the parent doesn't mean the selection should change. For instance in Xcode's Navigator I can have a file selected in a Group and collapse the group without modifying the current selection.
Is there any way to create radio buttons on Mac Catalyst in the Mac idiom (without writing my own from scratch obviously)?
Creating a Settings bundle with PSRadioGroupSpecifier creates a radio button group in the Preference pane but I don't see a way to do this in my own UI?
Is there a way to get native AppKit radio buttons on Mac Catalyst?