├── CatalystAppleScript
├── Assets.xcassets
│ ├── Contents.json
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Preview Content
│ └── Preview Assets.xcassets
│ │ └── Contents.json
├── CatalystAppleScript.entitlements
├── Base App
│ ├── DataModel.swift
│ ├── ContentView.swift
│ ├── AppDelegate.swift
│ └── SceneDelegate.swift
├── ScriptableTasks.sdef
├── Base.lproj
│ └── LaunchScreen.storyboard
├── Info.plist
└── Scripting.swift
├── CatalystAppleScript.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── project.pbxproj
├── NSScriptCommand.h
└── README.md
/CatalystAppleScript/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/CatalystAppleScript/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/CatalystAppleScript.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CatalystAppleScript/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/CatalystAppleScript/CatalystAppleScript.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.network.client
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CatalystAppleScript/Base App/DataModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DataModel.swift
3 | // CatalystAppleScript
4 | //
5 | // Created by Steven Troughton-Smith on 05/06/2021.
6 | //
7 |
8 | import SwiftUI
9 | import UIKit
10 |
11 | class DataModel:ObservableObject {
12 | static let shared = DataModel()
13 |
14 | @Published var testString = "This is a test"
15 | @Published var testNumber = 42
16 | @Published var testBool = true
17 |
18 | @Published var testList = ["One", "Two", "Three"]
19 |
20 | @Published var testState1 = false
21 | @Published var testArgs:[String] = []
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/NSScriptCommand.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSScriptCommand.h
3 | // CatalystAppleScript
4 | //
5 | // Created by Steven Troughton-Smith on 05/06/2021.
6 | //
7 | // NSScriptCommand is not exposed to Catalyst
8 | // which makes it difficult to subclass directly
9 | // in Swift. So let's define it here
10 |
11 | #ifndef NSScriptCommand_h
12 | #define NSScriptCommand_h
13 |
14 | @import Foundation;
15 |
16 | #if __IPHONE_OS_VERSION_MAX_ALLOWED <= 140000
17 | @interface NSScriptCommand : NSObject
18 | -(void)performDefaultImplementation;
19 | @end
20 | #endif
21 |
22 | #endif /* NSScriptCommand_h */
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CatalystAppleScript
2 |
3 | Trivial demonstration showing how to build support for AppleScript into a Catalyst app. Showcases multiple commands and variables that can be set/get, and passed arguments.
4 |
5 | Prerequisites checklist:
6 | - Add NSAppleScriptEnabled to Info.plist
7 | - Add OSAScriptingDefinition to Info.plist and point it to your scripting definitions file
8 | - Craft a scripting definitions file (sdef). Note that scriptable variables have unique codes, types and access control r/rw
9 | - Define NSScriptCommand in your ObjC bridging header so that Swift can see it to subclass it
10 |
11 | ### Screenshot
12 |
13 | 
14 |
--------------------------------------------------------------------------------
/CatalystAppleScript/Base App/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // CatalystAppleScript
4 | //
5 | // Created by Steven Troughton-Smith on 05/06/2021.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ContentView: View {
11 | @ObservedObject var data = DataModel.shared
12 |
13 | var body: some View {
14 |
15 | GroupBox {
16 | VStack {
17 | TextField("Type here", text: $data.testString)
18 | .textFieldStyle(RoundedBorderTextFieldStyle())
19 | .padding()
20 |
21 | Text("The contents of this text field will be exposed to AppleScript. For example:")
22 | .padding()
23 |
24 | Text("tell application \"CatalystAppleScript\"\n\tactivate\n\tget the saved string\nend tell")
25 | .padding()
26 |
27 | Text("Other commands: set saved string, get/set saved number, get saved list, command 1, command 2 [\"one\", \"two\"]]")
28 | .padding()
29 |
30 | HStack {
31 | ForEach(data.testArgs, id: \.self) { argument in
32 |
33 | Button(argument) {
34 |
35 | }
36 | }
37 | .padding()
38 | }
39 | .padding()
40 |
41 | Rectangle()
42 | .fill(data.testState1 ? Color.red : Color(.systemBackground))
43 |
44 | }
45 | .frame(maxWidth:400)
46 | .padding()
47 | }
48 | .padding()
49 |
50 | }
51 | }
52 |
53 | struct ContentView_Previews: PreviewProvider {
54 | static var previews: some View {
55 | ContentView()
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/CatalystAppleScript/Base App/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // CatalystAppleScript
4 | //
5 | // Created by Steven Troughton-Smith on 05/06/2021.
6 | //
7 |
8 | import UIKit
9 |
10 | @main
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 |
13 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | // Override point for customization after application launch.
15 |
16 | #if targetEnvironment(macCatalyst)
17 | Scripting.enableScripting()
18 | #endif
19 |
20 | return true
21 | }
22 |
23 | // MARK: UISceneSession Lifecycle
24 |
25 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
26 | // Called when a new scene session is being created.
27 | // Use this method to select a configuration to create the new scene with.
28 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
29 | }
30 |
31 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
32 | // Called when the user discards a scene session.
33 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
34 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
35 | }
36 |
37 |
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/CatalystAppleScript/ScriptableTasks.sdef:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/CatalystAppleScript/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/CatalystAppleScript/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "scale" : "1x",
46 | "size" : "20x20"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "scale" : "2x",
51 | "size" : "20x20"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "scale" : "1x",
56 | "size" : "29x29"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "scale" : "2x",
61 | "size" : "29x29"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "scale" : "1x",
66 | "size" : "40x40"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "scale" : "2x",
71 | "size" : "40x40"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "scale" : "1x",
76 | "size" : "76x76"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "scale" : "2x",
81 | "size" : "76x76"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "scale" : "2x",
86 | "size" : "83.5x83.5"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "scale" : "1x",
91 | "size" : "1024x1024"
92 | }
93 | ],
94 | "info" : {
95 | "author" : "xcode",
96 | "version" : 1
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/CatalystAppleScript/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | OSAScriptingDefinition
20 | ScriptableTasks.sdef
21 | NSAppleScriptEnabled
22 |
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | UIApplicationSceneManifest
28 |
29 | UIApplicationSupportsMultipleScenes
30 |
31 | UISceneConfigurations
32 |
33 | UIWindowSceneSessionRoleApplication
34 |
35 |
36 | UISceneConfigurationName
37 | Default Configuration
38 | UISceneDelegateClassName
39 | $(PRODUCT_MODULE_NAME).SceneDelegate
40 |
41 |
42 |
43 |
44 | UIApplicationSupportsIndirectInputEvents
45 |
46 | UILaunchStoryboardName
47 | LaunchScreen
48 | UIRequiredDeviceCapabilities
49 |
50 | armv7
51 |
52 | UISupportedInterfaceOrientations
53 |
54 | UIInterfaceOrientationPortrait
55 | UIInterfaceOrientationLandscapeLeft
56 | UIInterfaceOrientationLandscapeRight
57 |
58 | UISupportedInterfaceOrientations~ipad
59 |
60 | UIInterfaceOrientationPortrait
61 | UIInterfaceOrientationPortraitUpsideDown
62 | UIInterfaceOrientationLandscapeLeft
63 | UIInterfaceOrientationLandscapeRight
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/CatalystAppleScript/Base App/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // CatalystAppleScript
4 | //
5 | // Created by Steven Troughton-Smith on 05/06/2021.
6 | //
7 |
8 | import UIKit
9 | import SwiftUI
10 |
11 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
12 |
13 | var window: UIWindow?
14 |
15 |
16 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
17 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
18 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
19 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
20 |
21 | // Create the SwiftUI view that provides the window contents.
22 | let contentView = ContentView()
23 |
24 | // Use a UIHostingController as window root view controller.
25 | if let windowScene = scene as? UIWindowScene {
26 | let window = UIWindow(windowScene: windowScene)
27 | window.backgroundColor = .secondarySystemBackground
28 |
29 | let hostingController = UIHostingController(rootView: contentView)
30 | hostingController.view.backgroundColor = .clear
31 |
32 | window.rootViewController = hostingController
33 | self.window = window
34 | window.makeKeyAndVisible()
35 | }
36 | }
37 |
38 | func sceneDidDisconnect(_ scene: UIScene) {
39 | // Called as the scene is being released by the system.
40 | // This occurs shortly after the scene enters the background, or when its session is discarded.
41 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
42 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
43 | }
44 |
45 | func sceneDidBecomeActive(_ scene: UIScene) {
46 | // Called when the scene has moved from an inactive state to an active state.
47 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
48 | }
49 |
50 | func sceneWillResignActive(_ scene: UIScene) {
51 | // Called when the scene will move from an active state to an inactive state.
52 | // This may occur due to temporary interruptions (ex. an incoming phone call).
53 | }
54 |
55 | func sceneWillEnterForeground(_ scene: UIScene) {
56 | // Called as the scene transitions from the background to the foreground.
57 | // Use this method to undo the changes made on entering the background.
58 | }
59 |
60 | func sceneDidEnterBackground(_ scene: UIScene) {
61 | // Called as the scene transitions from the foreground to the background.
62 | // Use this method to save data, release shared resources, and store enough scene-specific state information
63 | // to restore the scene back to its current state.
64 | }
65 |
66 |
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/CatalystAppleScript/Scripting.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Scripting.swift
3 | // CatalystAppleScript
4 | //
5 | // Created by Steven Troughton-Smith on 05/06/2021.
6 | //
7 |
8 | #if targetEnvironment(macCatalyst)
9 | import Foundation
10 |
11 | class Scripting: NSObject {
12 |
13 | class func enableScripting() {
14 |
15 | /*
16 | Catalyst doesn't have access to the regular NSApplication or AppKit application delegate.
17 | This is just one method to swizzle NSApplication and process scripting events as they happen
18 | */
19 |
20 | do {
21 | let m1 = class_getInstanceMethod(NSClassFromString("NSApplication"), NSSelectorFromString("valueForKey:"))
22 | let m2 = class_getInstanceMethod(NSClassFromString("NSApplication"), NSSelectorFromString("MyAppScriptingValueForKey:"))
23 |
24 | if let m1 = m1, let m2 = m2 {
25 | method_exchangeImplementations(m1, m2)
26 | }
27 | }
28 |
29 | do {
30 | let m1 = class_getInstanceMethod(NSClassFromString("NSApplication"), NSSelectorFromString("setValue:forKey:"))
31 | let m2 = class_getInstanceMethod(NSClassFromString("NSApplication"), NSSelectorFromString("MyAppScriptingSetValue:forKey:"))
32 |
33 | if let m1 = m1, let m2 = m2 {
34 | method_exchangeImplementations(m1, m2)
35 | }
36 | }
37 | }
38 | }
39 |
40 | @objc class MyDoThingCommand: NSScriptCommand {
41 |
42 | @objc public override func performDefaultImplementation() -> Any? {
43 | NSLog("MyDoThingCommand")
44 |
45 | DataModel.shared.testState1.toggle()
46 |
47 | return nil
48 | }
49 | }
50 |
51 | @objc class MyDoThingWithArgumentCommand: NSScriptCommand {
52 | @objc public override func performDefaultImplementation() -> Any? {
53 |
54 | let arguments = evaluatedArguments()
55 |
56 | NSLog("MyDoThingWithArgumentCommand: \(arguments)")
57 |
58 | if arguments.count > 0 {
59 | if let parameters = arguments.value(forKey: "") as? NSArray { // get the direct argument
60 |
61 | var processedArray:[String] = []
62 |
63 | for item in parameters {
64 | if let item = item as? String {
65 | processedArray.append(item)
66 | }
67 | }
68 | DataModel.shared.testArgs = processedArray
69 | }
70 | }
71 |
72 |
73 | return nil
74 | }
75 | }
76 |
77 | extension NSObject {
78 | @objc public func MyAppScriptingValueForKey(_ key:String) -> Any? {
79 |
80 | NSLog("[APPLESCRIPT] Querying value for \(key)")
81 |
82 | if key == "savedString" {
83 | return DataModel.shared.testString
84 | }
85 |
86 | if key == "savedNumber" {
87 | return DataModel.shared.testNumber
88 | }
89 |
90 | if key == "savedList" {
91 | return DataModel.shared.testList
92 | }
93 |
94 | if key == "savedBool" {
95 | return DataModel.shared.testBool
96 | }
97 |
98 | return self.MyAppScriptingValueForKey(key)
99 | }
100 |
101 | @objc public func MyAppScriptingSetValue(_ value:Any, forKey:String) {
102 | NSLog("[APPLESCRIPT] Setting value for \(forKey): \(String(describing:value))")
103 |
104 | if forKey == "savedString" {
105 | DataModel.shared.testString = String(describing:value)
106 | return
107 | }
108 |
109 | if forKey == "savedNumber" {
110 | DataModel.shared.testNumber = value as? Int ?? -1
111 | return
112 | }
113 |
114 | return self.MyAppScriptingSetValue(value, forKey: forKey)
115 | }
116 |
117 | @objc func evaluatedArguments() -> NSDictionary {
118 | return NSDictionary()
119 | }
120 | }
121 | #endif
122 |
--------------------------------------------------------------------------------
/CatalystAppleScript.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | B05F0137266BD6290047C928 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B05F0136266BD6290047C928 /* AppDelegate.swift */; };
11 | B05F0139266BD6290047C928 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B05F0138266BD6290047C928 /* SceneDelegate.swift */; };
12 | B05F013B266BD6290047C928 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B05F013A266BD6290047C928 /* ContentView.swift */; };
13 | B05F013D266BD62A0047C928 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B05F013C266BD62A0047C928 /* Assets.xcassets */; };
14 | B05F0140266BD62A0047C928 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B05F013F266BD62A0047C928 /* Preview Assets.xcassets */; };
15 | B05F0143266BD62A0047C928 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B05F0141266BD62A0047C928 /* LaunchScreen.storyboard */; };
16 | B05F014B266BD6700047C928 /* Scripting.swift in Sources */ = {isa = PBXBuildFile; fileRef = B05F014A266BD6700047C928 /* Scripting.swift */; };
17 | B05F014D266BD79D0047C928 /* ScriptableTasks.sdef in Resources */ = {isa = PBXBuildFile; fileRef = B05F014C266BD79D0047C928 /* ScriptableTasks.sdef */; };
18 | B05F0151266BD86C0047C928 /* DataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B05F0150266BD86C0047C928 /* DataModel.swift */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXFileReference section */
22 | B05F0133266BD6290047C928 /* CatalystAppleScript.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CatalystAppleScript.app; sourceTree = BUILT_PRODUCTS_DIR; };
23 | B05F0136266BD6290047C928 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
24 | B05F0138266BD6290047C928 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; };
25 | B05F013A266BD6290047C928 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; };
26 | B05F013C266BD62A0047C928 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
27 | B05F013F266BD62A0047C928 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; };
28 | B05F0142266BD62A0047C928 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
29 | B05F0144266BD62A0047C928 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
30 | B05F014A266BD6700047C928 /* Scripting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Scripting.swift; sourceTree = ""; };
31 | B05F014C266BD79D0047C928 /* ScriptableTasks.sdef */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = ScriptableTasks.sdef; sourceTree = ""; };
32 | B05F014F266BD8520047C928 /* CatalystAppleScript.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = CatalystAppleScript.entitlements; sourceTree = ""; };
33 | B05F0150266BD86C0047C928 /* DataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataModel.swift; sourceTree = ""; };
34 | B05F0152266BE12A0047C928 /* NSScriptCommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSScriptCommand.h; sourceTree = ""; };
35 | B05F0153266BE7180047C928 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; };
36 | /* End PBXFileReference section */
37 |
38 | /* Begin PBXFrameworksBuildPhase section */
39 | B05F0130266BD6290047C928 /* Frameworks */ = {
40 | isa = PBXFrameworksBuildPhase;
41 | buildActionMask = 2147483647;
42 | files = (
43 | );
44 | runOnlyForDeploymentPostprocessing = 0;
45 | };
46 | /* End PBXFrameworksBuildPhase section */
47 |
48 | /* Begin PBXGroup section */
49 | B05F012A266BD6280047C928 = {
50 | isa = PBXGroup;
51 | children = (
52 | B05F0153266BE7180047C928 /* README.md */,
53 | B05F0152266BE12A0047C928 /* NSScriptCommand.h */,
54 | B05F0135266BD6290047C928 /* CatalystAppleScript */,
55 | B05F0134266BD6290047C928 /* Products */,
56 | );
57 | sourceTree = "";
58 | };
59 | B05F0134266BD6290047C928 /* Products */ = {
60 | isa = PBXGroup;
61 | children = (
62 | B05F0133266BD6290047C928 /* CatalystAppleScript.app */,
63 | );
64 | name = Products;
65 | sourceTree = "";
66 | };
67 | B05F0135266BD6290047C928 /* CatalystAppleScript */ = {
68 | isa = PBXGroup;
69 | children = (
70 | B05F014F266BD8520047C928 /* CatalystAppleScript.entitlements */,
71 | B05F014E266BD7B30047C928 /* Base App */,
72 | B05F014A266BD6700047C928 /* Scripting.swift */,
73 | B05F014C266BD79D0047C928 /* ScriptableTasks.sdef */,
74 | B05F013C266BD62A0047C928 /* Assets.xcassets */,
75 | B05F0141266BD62A0047C928 /* LaunchScreen.storyboard */,
76 | B05F0144266BD62A0047C928 /* Info.plist */,
77 | B05F013E266BD62A0047C928 /* Preview Content */,
78 | );
79 | path = CatalystAppleScript;
80 | sourceTree = "";
81 | };
82 | B05F013E266BD62A0047C928 /* Preview Content */ = {
83 | isa = PBXGroup;
84 | children = (
85 | B05F013F266BD62A0047C928 /* Preview Assets.xcassets */,
86 | );
87 | path = "Preview Content";
88 | sourceTree = "";
89 | };
90 | B05F014E266BD7B30047C928 /* Base App */ = {
91 | isa = PBXGroup;
92 | children = (
93 | B05F0150266BD86C0047C928 /* DataModel.swift */,
94 | B05F0136266BD6290047C928 /* AppDelegate.swift */,
95 | B05F0138266BD6290047C928 /* SceneDelegate.swift */,
96 | B05F013A266BD6290047C928 /* ContentView.swift */,
97 | );
98 | path = "Base App";
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | B05F0132266BD6290047C928 /* CatalystAppleScript */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = B05F0147266BD62A0047C928 /* Build configuration list for PBXNativeTarget "CatalystAppleScript" */;
107 | buildPhases = (
108 | B05F012F266BD6290047C928 /* Sources */,
109 | B05F0130266BD6290047C928 /* Frameworks */,
110 | B05F0131266BD6290047C928 /* Resources */,
111 | );
112 | buildRules = (
113 | );
114 | dependencies = (
115 | );
116 | name = CatalystAppleScript;
117 | productName = CatalystAppleScript;
118 | productReference = B05F0133266BD6290047C928 /* CatalystAppleScript.app */;
119 | productType = "com.apple.product-type.application";
120 | };
121 | /* End PBXNativeTarget section */
122 |
123 | /* Begin PBXProject section */
124 | B05F012B266BD6280047C928 /* Project object */ = {
125 | isa = PBXProject;
126 | attributes = {
127 | LastSwiftUpdateCheck = 1250;
128 | LastUpgradeCheck = 1250;
129 | TargetAttributes = {
130 | B05F0132266BD6290047C928 = {
131 | CreatedOnToolsVersion = 12.5;
132 | };
133 | };
134 | };
135 | buildConfigurationList = B05F012E266BD6280047C928 /* Build configuration list for PBXProject "CatalystAppleScript" */;
136 | compatibilityVersion = "Xcode 9.3";
137 | developmentRegion = en;
138 | hasScannedForEncodings = 0;
139 | knownRegions = (
140 | en,
141 | Base,
142 | );
143 | mainGroup = B05F012A266BD6280047C928;
144 | productRefGroup = B05F0134266BD6290047C928 /* Products */;
145 | projectDirPath = "";
146 | projectRoot = "";
147 | targets = (
148 | B05F0132266BD6290047C928 /* CatalystAppleScript */,
149 | );
150 | };
151 | /* End PBXProject section */
152 |
153 | /* Begin PBXResourcesBuildPhase section */
154 | B05F0131266BD6290047C928 /* Resources */ = {
155 | isa = PBXResourcesBuildPhase;
156 | buildActionMask = 2147483647;
157 | files = (
158 | B05F0143266BD62A0047C928 /* LaunchScreen.storyboard in Resources */,
159 | B05F0140266BD62A0047C928 /* Preview Assets.xcassets in Resources */,
160 | B05F013D266BD62A0047C928 /* Assets.xcassets in Resources */,
161 | B05F014D266BD79D0047C928 /* ScriptableTasks.sdef in Resources */,
162 | );
163 | runOnlyForDeploymentPostprocessing = 0;
164 | };
165 | /* End PBXResourcesBuildPhase section */
166 |
167 | /* Begin PBXSourcesBuildPhase section */
168 | B05F012F266BD6290047C928 /* Sources */ = {
169 | isa = PBXSourcesBuildPhase;
170 | buildActionMask = 2147483647;
171 | files = (
172 | B05F0151266BD86C0047C928 /* DataModel.swift in Sources */,
173 | B05F0137266BD6290047C928 /* AppDelegate.swift in Sources */,
174 | B05F014B266BD6700047C928 /* Scripting.swift in Sources */,
175 | B05F0139266BD6290047C928 /* SceneDelegate.swift in Sources */,
176 | B05F013B266BD6290047C928 /* ContentView.swift in Sources */,
177 | );
178 | runOnlyForDeploymentPostprocessing = 0;
179 | };
180 | /* End PBXSourcesBuildPhase section */
181 |
182 | /* Begin PBXVariantGroup section */
183 | B05F0141266BD62A0047C928 /* LaunchScreen.storyboard */ = {
184 | isa = PBXVariantGroup;
185 | children = (
186 | B05F0142266BD62A0047C928 /* Base */,
187 | );
188 | name = LaunchScreen.storyboard;
189 | sourceTree = "";
190 | };
191 | /* End PBXVariantGroup section */
192 |
193 | /* Begin XCBuildConfiguration section */
194 | B05F0145266BD62A0047C928 /* Debug */ = {
195 | isa = XCBuildConfiguration;
196 | buildSettings = {
197 | ALWAYS_SEARCH_USER_PATHS = NO;
198 | CLANG_ANALYZER_NONNULL = YES;
199 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
200 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
201 | CLANG_CXX_LIBRARY = "libc++";
202 | CLANG_ENABLE_MODULES = YES;
203 | CLANG_ENABLE_OBJC_ARC = YES;
204 | CLANG_ENABLE_OBJC_WEAK = YES;
205 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
206 | CLANG_WARN_BOOL_CONVERSION = YES;
207 | CLANG_WARN_COMMA = YES;
208 | CLANG_WARN_CONSTANT_CONVERSION = YES;
209 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
210 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
211 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
212 | CLANG_WARN_EMPTY_BODY = YES;
213 | CLANG_WARN_ENUM_CONVERSION = YES;
214 | CLANG_WARN_INFINITE_RECURSION = YES;
215 | CLANG_WARN_INT_CONVERSION = YES;
216 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
217 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
218 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
219 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
220 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
221 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
222 | CLANG_WARN_STRICT_PROTOTYPES = YES;
223 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
224 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
225 | CLANG_WARN_UNREACHABLE_CODE = YES;
226 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
227 | COPY_PHASE_STRIP = NO;
228 | DEBUG_INFORMATION_FORMAT = dwarf;
229 | ENABLE_STRICT_OBJC_MSGSEND = YES;
230 | ENABLE_TESTABILITY = YES;
231 | GCC_C_LANGUAGE_STANDARD = gnu11;
232 | GCC_DYNAMIC_NO_PIC = NO;
233 | GCC_NO_COMMON_BLOCKS = YES;
234 | GCC_OPTIMIZATION_LEVEL = 0;
235 | GCC_PREPROCESSOR_DEFINITIONS = (
236 | "DEBUG=1",
237 | "$(inherited)",
238 | );
239 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
240 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
241 | GCC_WARN_UNDECLARED_SELECTOR = YES;
242 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
243 | GCC_WARN_UNUSED_FUNCTION = YES;
244 | GCC_WARN_UNUSED_VARIABLE = YES;
245 | IPHONEOS_DEPLOYMENT_TARGET = 14.5;
246 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
247 | MTL_FAST_MATH = YES;
248 | ONLY_ACTIVE_ARCH = YES;
249 | SDKROOT = iphoneos;
250 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
251 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
252 | };
253 | name = Debug;
254 | };
255 | B05F0146266BD62A0047C928 /* Release */ = {
256 | isa = XCBuildConfiguration;
257 | buildSettings = {
258 | ALWAYS_SEARCH_USER_PATHS = NO;
259 | CLANG_ANALYZER_NONNULL = YES;
260 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
261 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
262 | CLANG_CXX_LIBRARY = "libc++";
263 | CLANG_ENABLE_MODULES = YES;
264 | CLANG_ENABLE_OBJC_ARC = YES;
265 | CLANG_ENABLE_OBJC_WEAK = YES;
266 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
267 | CLANG_WARN_BOOL_CONVERSION = YES;
268 | CLANG_WARN_COMMA = YES;
269 | CLANG_WARN_CONSTANT_CONVERSION = YES;
270 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
271 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
272 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
273 | CLANG_WARN_EMPTY_BODY = YES;
274 | CLANG_WARN_ENUM_CONVERSION = YES;
275 | CLANG_WARN_INFINITE_RECURSION = YES;
276 | CLANG_WARN_INT_CONVERSION = YES;
277 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
278 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
279 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
280 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
281 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
282 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
283 | CLANG_WARN_STRICT_PROTOTYPES = YES;
284 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
285 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
286 | CLANG_WARN_UNREACHABLE_CODE = YES;
287 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
288 | COPY_PHASE_STRIP = NO;
289 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
290 | ENABLE_NS_ASSERTIONS = NO;
291 | ENABLE_STRICT_OBJC_MSGSEND = YES;
292 | GCC_C_LANGUAGE_STANDARD = gnu11;
293 | GCC_NO_COMMON_BLOCKS = YES;
294 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
295 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
296 | GCC_WARN_UNDECLARED_SELECTOR = YES;
297 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
298 | GCC_WARN_UNUSED_FUNCTION = YES;
299 | GCC_WARN_UNUSED_VARIABLE = YES;
300 | IPHONEOS_DEPLOYMENT_TARGET = 14.5;
301 | MTL_ENABLE_DEBUG_INFO = NO;
302 | MTL_FAST_MATH = YES;
303 | SDKROOT = iphoneos;
304 | SWIFT_COMPILATION_MODE = wholemodule;
305 | SWIFT_OPTIMIZATION_LEVEL = "-O";
306 | VALIDATE_PRODUCT = YES;
307 | };
308 | name = Release;
309 | };
310 | B05F0148266BD62A0047C928 /* Debug */ = {
311 | isa = XCBuildConfiguration;
312 | buildSettings = {
313 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
314 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
315 | CODE_SIGN_ENTITLEMENTS = CatalystAppleScript/CatalystAppleScript.entitlements;
316 | CODE_SIGN_STYLE = Automatic;
317 | DEVELOPMENT_ASSET_PATHS = "\"CatalystAppleScript/Preview Content\"";
318 | DEVELOPMENT_TEAM = 2ZDN69KUUV;
319 | ENABLE_PREVIEWS = YES;
320 | INFOPLIST_FILE = CatalystAppleScript/Info.plist;
321 | LD_RUNPATH_SEARCH_PATHS = (
322 | "$(inherited)",
323 | "@executable_path/Frameworks",
324 | );
325 | PRODUCT_BUNDLE_IDENTIFIER = com.highcaffeinecontent.CatalystAppleScript;
326 | PRODUCT_NAME = "$(TARGET_NAME)";
327 | SUPPORTS_MACCATALYST = YES;
328 | SWIFT_OBJC_BRIDGING_HEADER = NSScriptCommand.h;
329 | SWIFT_VERSION = 5.0;
330 | TARGETED_DEVICE_FAMILY = "1,2,6";
331 | };
332 | name = Debug;
333 | };
334 | B05F0149266BD62A0047C928 /* Release */ = {
335 | isa = XCBuildConfiguration;
336 | buildSettings = {
337 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
338 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
339 | CODE_SIGN_ENTITLEMENTS = CatalystAppleScript/CatalystAppleScript.entitlements;
340 | CODE_SIGN_STYLE = Automatic;
341 | DEVELOPMENT_ASSET_PATHS = "\"CatalystAppleScript/Preview Content\"";
342 | DEVELOPMENT_TEAM = 2ZDN69KUUV;
343 | ENABLE_PREVIEWS = YES;
344 | INFOPLIST_FILE = CatalystAppleScript/Info.plist;
345 | LD_RUNPATH_SEARCH_PATHS = (
346 | "$(inherited)",
347 | "@executable_path/Frameworks",
348 | );
349 | PRODUCT_BUNDLE_IDENTIFIER = com.highcaffeinecontent.CatalystAppleScript;
350 | PRODUCT_NAME = "$(TARGET_NAME)";
351 | SUPPORTS_MACCATALYST = YES;
352 | SWIFT_OBJC_BRIDGING_HEADER = NSScriptCommand.h;
353 | SWIFT_VERSION = 5.0;
354 | TARGETED_DEVICE_FAMILY = "1,2,6";
355 | };
356 | name = Release;
357 | };
358 | /* End XCBuildConfiguration section */
359 |
360 | /* Begin XCConfigurationList section */
361 | B05F012E266BD6280047C928 /* Build configuration list for PBXProject "CatalystAppleScript" */ = {
362 | isa = XCConfigurationList;
363 | buildConfigurations = (
364 | B05F0145266BD62A0047C928 /* Debug */,
365 | B05F0146266BD62A0047C928 /* Release */,
366 | );
367 | defaultConfigurationIsVisible = 0;
368 | defaultConfigurationName = Release;
369 | };
370 | B05F0147266BD62A0047C928 /* Build configuration list for PBXNativeTarget "CatalystAppleScript" */ = {
371 | isa = XCConfigurationList;
372 | buildConfigurations = (
373 | B05F0148266BD62A0047C928 /* Debug */,
374 | B05F0149266BD62A0047C928 /* Release */,
375 | );
376 | defaultConfigurationIsVisible = 0;
377 | defaultConfigurationName = Release;
378 | };
379 | /* End XCConfigurationList section */
380 | };
381 | rootObject = B05F012B266BD6280047C928 /* Project object */;
382 | }
383 |
--------------------------------------------------------------------------------