I can check if my Safari app extension is enabled using the SFSafariExtensionManager getStateOfSafariExtensionWithIdentifier API for default.
But in case the user disables the extension for his own profile, I want to know if my safari app extension is enabled in that particular safari profile programatically using API. I'm trying this with Safari 17 on macOS 14 Beta. It's possible? If so, what API can do this for me?
Post
Replies
Boosts
Views
Activity
I can check if my Safari app extension is enabled using the SFSafariExtensionManager getStateOfSafariExtensionWithIdentifier API.
I can also check if the URL was opened in private mode using the SFSafariPageProperties usesPrivateBrowsing API.
But this doesn't solve my problem. I want to know if my Safari app extension is enabled in private mode and I also want to know if the extension allows tracking all websites.
I am trying this with Safari 17 on macOS 14 Beta.
In macOS 13 Ventura, as soon as mac apps gets installed from packages, it shows two alerts (Login Items Added) one as "Unknown Developer" and other as with proper developer name. On click of alerts, it opens System Preferences and navigates to General -> Login Items. It lists our apps under "Allow in the Background", one with "unidentified developer" and other with proper developer name. We followed all steps required with all apps. So why one app showing as "unidentified developer" and other with proper developer name?
Also app with correct developer name, missing with its app icon.
I need to check if the webpage loaded successfully or if there was any error while loading the webpage in WebView on OS X 10.9. How can I verify this? I can use the delegate method for the same on macOS 10.10 and higher using WKWebView(decidePolicyForNavigationResponse). Is there such a delegate method for WebView in OS X 10.9?
Web page contents are at centre if we open web page in WKWebView on macOS 10.10 and above or in web browser. But if we open in WebView on macOS 10.9, contents are getting aligned to top left instead of centre. Any things am I missing?
NSURL *url = [[NSBundle mainBundle] URLForResource:@"COMPUTER & MOBILE PANEL" withExtension:@"html"];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
WebView *aWebView = [[WebView alloc] initWithFrame:webViewContainer.bounds];
[aWebView setFrameLoadDelegate:self];
[webViewContainer addSubview:aWebView];
[[aWebView mainFrame] loadRequest:request];
Sample code here...
https://drive.google.com/file/d/1QZkPy9dusBZbG274dOsru9gmK8pYZII-/view?usp=sharing
I am currently working on project where I need to check browser user agent. I was trying to differentiate Intel and ARM based machines. When I tried to check default user agent for Safari, it is saying Intel only on both machines "Intel Macbook pro" and "ARM Developer Transition Kit mac mini".
Safari user agent on Developer Transition Kit mac mini with macOS 11 beta 6:
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15
Is this still safari beta issue?
My app has some features that required to use System Extension and Network Extension. So for this, I was trying to check Apple Sample here - https://developer.apple.com/documentation/networkextension/filtering_network_traffic, where it is filtering TCP and UDP data.
When I checked with different browsers, I found an issue where I was getting call backs for protocol TCP with browsers Chrome and Firefox but same was not working with Safari.
Am I missing anything here? Or Safari requires something specific configurations which are not mentioned in Apple documentation?
kmutil not returning error status to indicate that user has not approved the kext. When trying to load our Audio kext, on OSes lower than Big Sur kextutil or kextload used to return error 27 ( https://developer.apple.com/library/content/technotes/tn2459/_index.html , sudo kextutil /Library/Extensions/***.kext Password: Kext rejected due to system policy: <OSKext 0x7f8f27c10880 [0x7fff8dacb690]> { URL = "file:///Library/StagedExtensions/Library/Extensions/XXXkext/", ID = "com.XX.driver.***” }) On Mac OS Big Sur these calls are in turn calling kmutil which is not returning any error to indicate that kexts are yet to approved by the User.( Here is output on terminal on Mac OS Big Sur when trying to load the kext sudo kextload /Library/Extensions/***.kext Password: Executing: /usr/bin/kmutil load -p /Library/Extensions/***.kext or using kmutil sudo /usr/bin/kmutil load -p /Library/Extensions/***.kext ***@***-Mac ~ %
When we build and run source code of “SampleNetworkMonitor" with developer provisioning profile it works fine.
But when we try to build and run with the distribution provisioning profile, we get the following error. The results will not change even if we notarize the application.
Both provisioning profiles created with the same bundle identifier that have capabilities enabled: System Extension, Network Extension, and App Group
How can we solve this crash?
Error:
Exception Type: EXCCRASH (Code Signature Invalid)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXCCORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x1
Environment:
Xcode: 11.5
MacOS: 10.15.5
Entitlement:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.networking.networkextension</key>
<array>
<string>content-filter-provider</string>
</array>
<key>com.apple.developer.system-extension.install</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>XXXXX.group.XXXXX.netextension</string>
</array>
</dict>
</plist>
Code Sign result:
~ % codesign -v -vvv /Users/ravi-kb/Desktop/notarize/Sample\ Network\ Listener.app
/Users/***/Desktop/notarize/Sample Network Listener.app: valid on disk
/Users/***/Desktop/notarize/Sample Network Listener.app: satisfies its Designated Requirement
~ % codesign -d -vvv --entitlements :- /Users/***/Desktop/notarize/Sample\ Network\ Listener.app
Executable=/Users/***/Desktop/notarize/Sample Network Listener.app/Contents/MacOS/Sample Network Listener
Identifier=com.***.networkextensionapp
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20500 size=1483 flags=0x10000(runtime) hashes=37+5 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha256=56eaec49fcba92ca74fbfadf292494b0770fed67
CandidateCDHashFull sha256=56eaec49fcba92ca74fbfadf292494b0770fed67d3c6264a9e42239a2077c6dd
Hash choices=sha256
CMSDigest=56eaec49fcba92ca74fbfadf292494b0770fed67d3c6264a9e42239a2077c6dd
CMSDigestType=2
CDHash=56eaec49fcba92ca74fbfadf292494b0770fed67
Signature size=8976
Authority=Developer ID Application: The *** Company (***)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=20-Jul-2020 at 4:59:23 PM
Info.plist entries=23
TeamIdentifier=***
Runtime Version=10.15.6
Sealed Resources version=2 rules=13 files=9
Internal requirements count=1 size=224
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
<string>{Team ID}.{Bundle ID}</string>
<key>com.apple.developer.networking.networkextension</key>
<array>
<string>content-filter-provider</string>
</array>
<key>com.apple.developer.system-extension.install</key>
<true/>
<key>com.apple.developer.team-identifier</key>
<string>{Team ID}</string>
<key>com.apple.security.application-groups</key>
<array>
<string>{Team ID}.{Bundle ID}</string>
</array>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
</dict>
</plist>
We have an installer package (.pkg) file which has an installer plugin. The package is signed and notarized. But pane for this plugin not getting loaded when the package is run on MacOS11 Big Sur. This step is not shown on the left pane where installer steps are listed. Same is working in 10.15 Catalina.
We are getting error log in console:
/var/folders/jr/c33ck8t95hb98tyhss4n7c980000gn/T/com.apple.install.GoVVGzNX/{pluginname}.bundle/Contents/MacOS/{pluginname}: dlopen(/var/folders/jr/c33ck8t95hb98tyhss4n7c980000gn/T/com.apple.install.GoVVGzNX/{pluginname}.bundle/Contents/MacOS/{pluginname}, 0x0109): code signature in (/private/var/folders/jr/c33ck8t95hb98tyhss4n7c980000gn/T/com.apple.install.GoVVGzNX/{pluginname}.bundle/Contents/MacOS/{pluginname}) not valid for use in process: mapping process is a platform binary, but mapped file is not
Is there any specific way of signing the plugin using signing certificate like using Mac Developer, Apple Developer, Developer ID Application, Developer ID Installer, etc ?
We have a macOS app in which we integrated the Safari app extension. When we install the app in macOS 10.15.3 (Safari version 13.0.5), the extension gets installed in safari but having disabled by default. When we try to enable it, its checkbox doesn't respond.- Tried to install another safari app extension (from AppStore) the same behavior is seen.- Tries on macOS 10.14.6 with safari version 13.0.5 there was no issue found.