Home Guides Interfaces Troubleshooting

AppleScript

A general recommendation is to do some research before using AppleScript, there may be other ways to accomplish the same task, which does not involve AppleScript.

If the application uses the "App Sandbox", please follow the guide for  App Store Submission

Website deployment

  1. Open the application in App Wrapper 4
  2. Make sure that "Hardened" is selected in the Code signing section of the sidebar (left hand side of the window).
  3. Make sure that "Uses Entitlements" is selected in the code signing section of the sidebar.
  4. In the "AppleScript" section of the "Capabilities" page of the App Wrapper document, select "Use AppleScript to control other applications".
  5. Enter in a "Privacy" usage message in the field next to "Usage string". There is only one field, no matter how many apps this application communicates with.
  6. Now "Wrap" and run the application and the AppleScript should work.
  7. For extra brownie points and for future proofing, register which apps this app will communicate with. Click on the "+" button next to "Applications that can be scripted" and select the application.

 App Store Submission

The steps for  App Store Submission are almost identical to the above steps, except that step 7 is required and has conditions.

When adding Apps to the document in the AppleScript section, App Wrapper will check to see if they use the new(ish) "Access groups" and if so, it will use the accompanying entitlement. If not it will use the legacy entitlement, which in general Apple do not approve of its usage on the  App Store.

If the only way to script the application is to use the legacy entitlement (this is indicated with a tick mark in the Old column), be prepared for Apple to deny the entire application until this (and the functionality) is removed.

Apple will reject your application if it tries to script "Finder", "System Events", "System Preferences", "Terminal" or anything else they feel make compromise a users computer.

  1. Open the application in App Wrapper 4
  2. Make sure that "App Sandbox" is selected in the Code signing section of the sidebar (left hand side of the window).
  3. In the "AppleScript" section of the "Capabilities" page of the App Wrapper document, select "Use AppleScript to control other applications".
  4. Enter in a "Privacy" usage message in the field next to "Usage string". There is only one field, no matter how many apps this application communicates with.
  5. Click on the "+" button next to "Applications that can be scripted" and select the application.
  6. Repeat step 5 until all the applications are added to the list.
  7. Now "Wrap" and run the application and the AppleScript should work.