My app for macOS has two parts: editor and viewer.
Where I should put a child-bundle of viewer in the main bundle?
Main.app/Contents/PlugIns/Viewer.app ?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
My app is cross-platform and I don't use Xcode project.
All localization inside app is performed with an internal code and works fine.
There is a problem with localization in NSOpenPanel and NSSavePanel. They always appear on English and don't use macOS current language (French) of an user.
I added the following code to Info.plist :
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>fr</string>
</array>
But NSOpenPanel still appears on English.
I checked macOS TextEdit app which shows NSOpenPanel correctly with current OS language. Its Info.plist doesn't set any CFBundleLocalizations records. How this app tells macOS what language should be used for NSOpenPanel?
Is it possible to find deprecated functions without Xcode in runtime?
I have a project which doesn't use Xcode to build the code for macOS. It would be great if I could see logs in Terminal when deprecated function is called.
When I notarize two apps the same time I get wrong DMG image for second app.
I use a command for App1 and then for App2:
xcrun altool --notarize-app --primary-bundle-id app1id -u my@email.com -p xxxxxxx --file App1.dmg
xcrun altool --notarize-app --primary-bundle-id app2id -u my@email.com -p xxxxxxx --file App2.dmg
Then I get an email with a successful notarization, I call
xcrun stapler staple App1.dmg
xcrun stapler staple App2.dmg
DMG with App1 is correct. Signed and notarized.
But after stapling DMG with App2 is wrong - it includes App2 and App1 (!) and DMG has increased file size!
Of course, I've sent for a notarization only a single App2 in a DMG.
What I'm doing wrong? This problem doesn't appear if I send App2 for notarization AFTER successful notarization of App1 and stapling DMG image.
macOS 11.1 Big Sur, Apple DTK.
Is it possible to check a code signature of another application bundle on Objective C?
Our app has Auto Update function. We need to check the downloaded APP bundle from a ZIP to make sure that it's our application (valid signature and our name in the signature) before run it.
I compiled a dynamic library for macOS (open source) When I checked with
otool -L abc.dylib
it shows that it links several other libraries from /usr/lib/
Is it OK, or Apple may remove these libraries in future versions of macOS?
/usr/lib/libz.1.dylib
/usr/lib/libiconv.2.dylib
/usr/lib/libSystem.B.dylib
/usr/lib/libbz2.1.0.dylib
/usr/lib/libobjc.A.dylib
When I check notarization on Mac Mini with M1 chip:
bash-3.2$ spctl -a -t exec -vvv '/Applications/My.app'
It shows many useless warnings in output. Regardless the app I check.
macOS 11.2.3 (20D91), Xcode 12.4
objc[19507]: Class SPExecutionPolicy is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[19507]: Class AppWrapper is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[19507]: Class AppWrapperPolicyResult is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[19507]: Class AppWrapperPolicy is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[19507]: Class SPLog is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[19507]: Class MIS is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[19507]: Class SPExecutionHistoryItem is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[19507]: Class SPExecutionPolicyItem is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[19507]: Class SPDeveloperPolicy is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[19507]: Class GKScanResult is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
/Applications/My.app/: accepted
source=Notarized Developer ID
origin=Developer ID Application: MYCOMPANY LLC (RDXXXXXXX)
These warnings don't appears when I do the same on Intel Mac with the same macOS version 11.2.3
Hi,
I suggest Apple to more frequently reply to software developers. My previous replies didn't get any reply or help from Apple. Also many questions from other developers were not answered. I guess that so large company can pay more attention to their sofware developers. We really need more help and replies from Apple to create good software apps for macOS and iOS.
Hi,
I have a question regarding expired codesign certificate.
Will users able to install my old app from a DMG when a codesign certficate gets expired?
I sign the app bundle and then sign the DMG package.
After reading this official information:
https://developer.apple.com/support/certificates/
I don't understand it clearly. Apple declares that installed app continues to work, but "users can no longer launch installer packages for your Mac applications". Does it mean that app from a DMG also cannot be mounted and copied to Applications by users?
Quote: "Developer ID Installer Certificate (Mac applications)
If your certificate expires, users can no longer launch installer packages for your Mac applications that were signed with this certificate. Previously installed apps will continue to run however new installations won't be possible until you have re-signed your installer package with a valid Developer ID Installer certificate. If your certificate is revoked, users will no longer be able to install applications that have been signed with this certificate."
There is a big mess and lack of information about adapting macOS apps for the notch in new MacBook Pro 14" and 16".
I simply want to keep the notch in a normal window size. And hide the notch when user switches the main window to a fullscreen mode.
I thought that I should add NSPrefersDisplaySafeAreaCompatibilityMode key to a Info.plist.
But now I don't know HOW my app will look with this key.
Does NSPrefersDisplaySafeAreaCompatibilityMode key gives the same visual result as "Scale to fit below built-in camera" in Finder for a certain app? Or not?
When I watched a video where it was shown how "Scale to fit below built-in camera" works, I'm now in a panic, because this option reduced the app window proportionally increasing black borders on the left, right and top sides. It's the most terrible solution which could be chosen.
My app should look correctly with a normal window size. And I need the solution only for a fullscreen mode, keeping the same screen width and reducing only top area. Not reducing the entire window!
UPD. I think that we will recommend our customers to contact with Apple regarding the notch problem on their new Macbook Pro in a fullscreen mode. I don't see any good solution on our side. We'll remove NSPrefersDisplaySafeAreaCompatibilityMode key and keep things "as is".
How to correctly install codesign certificates on second Mac?
I have first Mac where I successfully sign and notarize my apps for macOS outside AppStore.
On second Mac I downloaded existing "Developer ID Installer" and "Developer ID Application" certificates and installed in KeyChain. Also I downloaded and installed Intermediate Certificate.
When I try to sign anything on second Mac I see the error:
"error: The specified item could not be found in the keychain."
Also I have a file "CertificateSigningRequest.certSigningRequest" saved from first Mac. No idea how to use it.
What I missed in this nightmare to get it work? And keep codesigning on first Mac, too.
Hi,I have serious difficulties with offscreen rendering in Metal or macOS. I can't find any example/demo project with solely offscreen rendering without any MTKView on 2nd pass. Just rendering to a texture with copying to a bitmap in system memory.My code works strange, it returns a black picture on first run and starts to render frames only if I call rendering on timer event or on a button click. If I call rendering in a loop, it always returns a black picture.I have no problem with usual rendering with MTKView.
We simulate Gaussian blur as a Box Blur with complex shader (several passes on two axises) using Metal on Mac.
I noticed slight fast pulsation of picture brightness when we reach radius more than 16 pixels in a fragment shader (we read 32+ pixels from a source texture to calculate 1 output pixel). We use float4 calculations.
This issue appears only on M1 Mac and only after sleep. The problem dissappears after restarting macOS. And no problem on Intel iMac with AMD graphics.
These artefacts appear in macOS Monterey 12.4 and also in macOS 13 Ventura Beta 1 on M1 Mac mini. We don't have any problem with other more simple shaders.
After restarting macOS opens Terminal app (which was opened before a restart). And Terminal ignores all custom global environments.
This bug exists in Big Sur and Catalina.
If close Terminal app and launch manually everything is OK.
I write custom global environments to environment.plist file which is placed in user's home folde > Library > LaunchAgents
and then loaded:
launchctl load /Users/myprofilename/Library/LaunchAgents/environment.plist
launchctl start /Users/myprofilename/Library/LaunchAgents/environment.plist
I need custom global environments to set a variable to my working directory which is used in compilation scripts.
Hi,
I think that a visual quality of hardware video encoder (VideoToolBox H.264) in M1 Macs is not great.
I compared a software libx264 encoder (Mac) and NVIDIA Geforce (NVENC) on Windows 10 with the same bitrate or constant quality mode producing almost identical file size.
I see many visual artefacts on a video encoded with VideoToolBox H.264 (1080p 60 fps) 3300K or CQ56. It's especially noticeable on video with animated photo slideshows and blur effect. Too many artefacts. NVENC and libx264 produce much better visual results with the same file size.
I tested in my app and in Handbrake Beta for M1 which supports VideoToolBox H.264 encoding.
Apple engineers can contact me for more details.