I am crating files of Microsoft office word, excel and powerpoint using apple script in Mac OS app. I need an AppleScript in my app with enabled sandbox. I found example code on apple developer side but How can use same code for Microsoft office.
<key>com.apple.security.scripting-targets</key>
<dict>
<key>com.apple.mail</key>
<array>
<string>com.apple.mail.compose</string>
</array>
</dict>
Is anybody know the correct entitlements record in XCode for Microsoft office?
What should i set in <array> </array> tags?
<key>com.apple.security.scripting-targets</key>
<dict>
<key>com.microsoft.Word</key>
<array></array>
<key>com.microsoft.Excel</key>
<array></array>
<key>com.microsoft.Powerpoint</key>
<array></array>
</dict>
For me it only works with
com.apple.security.temporary-exception.apple-events
even if "scripting-target" should be the preferred way according to apple docs
The values in your example are correct.
Related
I am writing a driverkit extension whose goal is to block USB devices, such as flash drives. As a starting point, I chose example project at https://developer.apple.com/documentation/driverkit/communicating_between_a_driverkit_extension_and_a_client_app?language=objc
In effort not to disable a keyboard or a mouse, firstly I am trying to match my dext with a single concrete USB drive, whose vendorId I found in the registry (being aware of hexa to decimal conversions). The problem is that when the flash drive is plugged in, the system doesn't match my dext and continues with the system one.
What's wrong? Is a provisioning profile required for this? Is it even possible to match any device this way?
Driver's entitlement file:
<?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.security.app-sandbox</key>
<true/>
<key>com.apple.developer.driverkit</key>
<true/>
<key>com.apple.developer.driverkit.transport.usb</key>
<array>
<dict>
<key>idVendor</key>
<integer>9128</integer>
</dict>
</array>
</dict>
</plist>
Info.plist:
<?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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>IOKitPersonalities</key>
<dict>
<key>DeviceControlDriver</key>
<dict>
<key>idVendor</key>
<integer>9128</integer>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleIdentifierKernel</key>
<string>com.apple.kpi.iokit</string>
<key>IOClass</key>
<string>IOUserService</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>IOUserClass</key>
<string>DeviceControlDriver</string>
<key>IOUserServerName</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>UserClientProperties</key>
<dict>
<key>IOClass</key>
<string>IOUserUserClient</string>
<key>IOUserClass</key>
<string>DeviceControlDriver</string>
</dict>
</dict>
</dict>
<key>OSBundleUsageDescription</key>
<string></string>
</dict>
</plist>
There are a few sub-questions here, and I'll try to address them individually:
In effort not to disable a keyboard or a mouse, firstly I am trying to match my dext with a single concrete USB drive, whose vendorId I found in the registry (being aware of hexa to decimal conversions). The problem is that when the flash drive is plugged in, the system doesn't match my dext and continues with the system one.
[…]
<key>idVendor</key>
<integer>9128</integer>
…
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
Matching USB devices on macOS follows very specific rules. If you do not follow one of the matching patterns outlined in this documentation from Apple, matching will generally fail.
You're attempting to match on idVendor alone; this will not work, you will need to match on either idVendor + idProduct or one of the other patterns listed.
What's wrong? Is a provisioning profile required for this?
Is it even possible to match any device this way?
If you wish to distribute your driver, or even run it locally with SIP enabled, you will require a provisioning profile. Note that Apple generally issues entitlements for specific requested vendor IDs only; if your needs go beyond that you'll need to get in touch with Apple directly.
For local testing without valid code signing, you can disable SIP; you will still require valid embedded entitlements in the signature, but you can use a provisioning profile which doesn't match the entitlements.
I am writing a driverkit extension whose goal is to block USB devices, such as flash drives.
Note that this will be of somewhat limited effectiveness, as 3rd party kexts and DriverKit extensions are not considered for matching during early system boot. This means that any devices which can be claimed by Apple's drivers and which are already connected at the time macOS starts up will always match Apple's own drivers, not yours.
For USB, you can to some extent work around this by forcing re-enumeration using the USBDeviceReEnumerate function. Note that this simulates a hard unplug, so for mounted storage devices, you should unmount cleanly first, for example.
I' ve developed a Flutter app based in Firebase Auth with the additional sign in method of Sign in With Google.
I implemented it using the package google_sign_in: ^4.5.6 .
It works easily for iOS, Android and Web. For MacOS I used the same Certificate and added this code in the info.plist file:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.*****/Private key/*</string>
</array>
</dict>
</array>
But it still doesn't work.
The macOS app works perfectly using Firebase Auth and is also connected to the network. So:
Is there a more action to do or code to add (like WEB support)?
If I press the google sign in button nothing is shown it doesn't open the page with google log in and Also in the console it returns nothing.
google_sign_in: ^5.0.2 is not currently supported, only android iOS and web
I have an app which shares a link. When someone taps on that link, it is opening Safari mobile app, then automatically opens app (lets say : AppName) if is installed on his device.
let url = "appname://listener?mid=560aa7"
This is working perfect on iOS 8+, but on iOS 9 stopped to work.
Please note that I have FB added also, on URL Scheme.
My URLType is like this:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>com.appname.mobile</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb705.....</string>
<string>appname</string>
</array>
</dict>
</array>
And starting with iOS9, I added:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>appname</string>
</array>
And no success. Can anyone help me?
I tried with appname: or appname:// and no success.
Also I aded new mothod for openURL:
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool
I don't see a problem on your side, seems like everything is set correctly.
However, regarding iOS 9, other users reported this problem with iframe. Make sure the things are setup correctly on server side. Check these 2 links:
iOS 9 iFrame Problem 1
iOS 9 iFrame Problem 2
In my OSX app I have a WebView that goes to a page with Silverlight content. Everything works well in non-sandboxed mode, but as soon as I "sandbox" it the Silverlight content does not load... just a blank WebView. Has anyone else noticed this?
I have played around with the entitlement file and have enabled everything possible. Regular web content works fine, but not Silverlight content. Here are my settings, perhaps someone can offer any suggestions.
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<!-- Here I tried using the temporary-exception entitlement to point to the Silverlight plugin, but it did not work :( -->
<key>com.apple.security.temporary-exception.files.absolute-path.read-write</key>
<array>
<string>/Library/Internet Plug-Ins/Silverlight.plugin/Contents/</string>
<string>/Library/Internet Plug-Ins/Silverlight.plugin/Contents/MacOS/agcore</string>
<string>/Library/Internet Plug-Ins/Silverlight.plugin/</string>
<string>/Library/Internet Plug-Ins/Silverlight.plugin</string>
<string>/Library/Internet Plug-Ins/</string>
<string>/Library/Internet Plug-Ins</string>
</array>
<key>com.apple.security.temporary-exception.files.home-relative-path.read-write</key>
<array>
<string>/Library/Internet Plug-Ins/</string>
</array>
<!-- I read somewhere online to try this but it did not work :( -->
<key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
<array>
<string>com.apple.WebKit.PluginAgent</string>
</array>
Do I need to do anything with my code so the Webview sees (and loads) the Silverlight content? I'm puzzled because it works just fine without sandboxing, but I can't Submit to the Mac App Store unless it works in a sandbox. Any help would be greatly appreciated... thanks!!!
I have done it in windows, how do i register a protocol on mac osx. I want to click links in firefox (a href="somename://mylinkAndData") and launch a binary?
Have a look at Apple's Launch Services Programming Guide. You have to add CFBundleURLTypes to your apps Info.plist and register your app with LSRegisterURL().
Excerpt from Firefox.app/Contents/Info.plist:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLIconFile</key>
<string>document.icns</string>
<key>CFBundleURLName</key>
<string>http URL</string>
<key>CFBundleURLSchemes</key>
<array>
<string>http</string>
</array>
</dict>
....
EDIT: See Handling URL schemes in Cocoa for a how-to article