Skip to content

Commit 9141351

Browse files
adminadmin
authored andcommitted
devop: setup macos build and fastlane
1 parent 4be6131 commit 9141351

36 files changed

Lines changed: 1541 additions & 0 deletions

macos/Enkrypt/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Mac OS X
2+
*.DS_Store
3+
4+
# Xcode
5+
*.pbxuser
6+
*.mode1v3
7+
*.mode2v3
8+
*.perspectivev3
9+
*.xcuserstate
10+
project.xcworkspace/
11+
xcuserdata/
12+
13+
# Generated files
14+
*.o
15+
*.pyc
16+
17+
18+
#Python modules
19+
MANIFEST
20+
dist/
21+
build/
22+
23+
# Backup files
24+
*~.nib
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.app-sandbox</key>
6+
<true/>
7+
<key>com.apple.security.files.user-selected.read-only</key>
8+
<true/>
9+
</dict>
10+
</plist>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>NSExtension</key>
6+
<dict>
7+
<key>NSExtensionPointIdentifier</key>
8+
<string>com.apple.Safari.web-extension</string>
9+
<key>NSExtensionPrincipalClass</key>
10+
<string>$(PRODUCT_MODULE_NAME).SafariWebExtensionHandler</string>
11+
</dict>
12+
</dict>
13+
</plist>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// SafariWebExtensionHandler.swift
3+
// Enkrypt Extension
4+
//
5+
// Created by admin on 8/16/22.
6+
//
7+
8+
import SafariServices
9+
import os.log
10+
11+
let SFExtensionMessageKey = "message"
12+
13+
class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
14+
15+
func beginRequest(with context: NSExtensionContext) {
16+
let item = context.inputItems[0] as! NSExtensionItem
17+
let message = item.userInfo?[SFExtensionMessageKey]
18+
os_log(.default, "Received message from browser.runtime.sendNativeMessage: %@", message as! CVarArg)
19+
20+
let response = NSExtensionItem()
21+
response.userInfo = [ SFExtensionMessageKey: [ "Response to": message ] ]
22+
23+
context.completeRequest(returningItems: [response], completionHandler: nil)
24+
}
25+
26+
}

macos/Enkrypt/Enkrypt.xcodeproj/project.pbxproj

Lines changed: 635 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1340"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "849394F828AC474C009F7287"
18+
BuildableName = "Enkrypt.app"
19+
BlueprintName = "Enkrypt"
20+
ReferencedContainer = "container:Enkrypt.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "849394F828AC474C009F7287"
48+
BuildableName = "Enkrypt.app"
49+
BlueprintName = "Enkrypt"
50+
ReferencedContainer = "container:Enkrypt.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "849394F828AC474C009F7287"
65+
BuildableName = "Enkrypt.app"
66+
BlueprintName = "Enkrypt"
67+
ReferencedContainer = "container:Enkrypt.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// AppDelegate.swift
3+
// Enkrypt
4+
//
5+
// Created by admin on 8/16/22.
6+
//
7+
8+
import Cocoa
9+
10+
@main
11+
class AppDelegate: NSObject, NSApplicationDelegate {
12+
13+
func applicationDidFinishLaunching(_ notification: Notification) {
14+
// Override point for customization after application launch.
15+
}
16+
17+
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
18+
return true
19+
}
20+
21+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"images" : [
3+
{
4+
"size" : "16x16",
5+
"idiom" : "mac",
6+
"filename" : "mac-icon-16@1x.png",
7+
"scale" : "1x"
8+
},
9+
{
10+
"size" : "16x16",
11+
"idiom" : "mac",
12+
"filename" : "mac-icon-16@2x.png",
13+
"scale" : "2x"
14+
},
15+
{
16+
"size" : "32x32",
17+
"idiom" : "mac",
18+
"filename" : "mac-icon-32@1x.png",
19+
"scale" : "1x"
20+
},
21+
{
22+
"size" : "32x32",
23+
"idiom" : "mac",
24+
"filename" : "mac-icon-32@2x.png",
25+
"scale" : "2x"
26+
},
27+
{
28+
"size" : "128x128",
29+
"idiom" : "mac",
30+
"filename" : "mac-icon-128@1x.png",
31+
"scale" : "1x"
32+
},
33+
{
34+
"size" : "128x128",
35+
"idiom" : "mac",
36+
"filename" : "mac-icon-128@2x.png",
37+
"scale" : "2x"
38+
},
39+
{
40+
"size" : "256x256",
41+
"idiom" : "mac",
42+
"filename" : "mac-icon-256@1x.png",
43+
"scale" : "1x"
44+
},
45+
{
46+
"size" : "256x256",
47+
"idiom" : "mac",
48+
"filename" : "mac-icon-256@2x.png",
49+
"scale" : "2x"
50+
},
51+
{
52+
"size" : "512x512",
53+
"idiom" : "mac",
54+
"filename" : "mac-icon-512@1x.png",
55+
"scale" : "1x"
56+
},
57+
{
58+
"size" : "512x512",
59+
"idiom" : "mac",
60+
"filename" : "mac-icon-512@2x.png",
61+
"scale" : "2x"
62+
}
63+
],
64+
"info" : {
65+
"version" : 1,
66+
"author" : "xcode"
67+
}
68+
}
11.1 KB
Loading

0 commit comments

Comments
 (0)