Skip to content

Commit f14104a

Browse files
authored
public source (#11)
add source
1 parent bdbd034 commit f14104a

File tree

82 files changed

+7610
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+7610
-2
lines changed

.gitignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,11 @@ Carthage/Build
6464

6565
fastlane/report.xml
6666
fastlane/Preview.html
67-
fastlane/screenshots
67+
fastlane/screenshots/**/*.png
6868
fastlane/test_output
6969

70-
# my
70+
# macOS
7171
.DS_Store
72+
73+
# jetbrains
74+
.idea/

Dynamon.xcodeproj/project.pbxproj

+797
Large diffs are not rendered by default.

Dynamon.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"object": {
3+
"pins": [
4+
{
5+
"package": "Alamofire",
6+
"repositoryURL": "https://github.com/Alamofire/Alamofire.git",
7+
"state": {
8+
"branch": null,
9+
"revision": "747c8db8d57b68d5e35275f10c92d55f982adbd4",
10+
"version": "4.9.1"
11+
}
12+
},
13+
{
14+
"package": "ObjectMapper",
15+
"repositoryURL": "https://github.com/tristanhimmelman/ObjectMapper.git",
16+
"state": {
17+
"branch": null,
18+
"revision": "5804d5446eb68b56c61497656cbc7bb6652f069b",
19+
"version": "3.5.3"
20+
}
21+
},
22+
{
23+
"package": "Realm",
24+
"repositoryURL": "https://github.com/realm/realm-cocoa.git",
25+
"state": {
26+
"branch": null,
27+
"revision": "fa43b8e2909334c79f233ce472332c136ca108da",
28+
"version": "4.4.1"
29+
}
30+
},
31+
{
32+
"package": "RealmCore",
33+
"repositoryURL": "https://github.com/realm/realm-core",
34+
"state": {
35+
"branch": null,
36+
"revision": "35662ff940e340bf630ad1d1d88acfc7af18bee6",
37+
"version": "5.23.8"
38+
}
39+
},
40+
{
41+
"package": "SwiftyJSON",
42+
"repositoryURL": "https://github.com/SwiftyJSON/SwiftyJSON.git",
43+
"state": {
44+
"branch": null,
45+
"revision": "2b6054efa051565954e1d2b9da831680026cd768",
46+
"version": "5.0.0"
47+
}
48+
}
49+
]
50+
},
51+
"version": 1
52+
}

Dynamon/App.swift

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// AppInfo.swift
3+
// Dynamon
4+
//
5+
// Created by Touch Duck on 2017/05/02.
6+
// Copyright © 2017年 Touch Duck. All rights reserved.
7+
//
8+
9+
import Cocoa
10+
import RealmSwift
11+
12+
class App: NSObject {
13+
14+
let infoDictionary = Bundle.main.infoDictionary!
15+
16+
static let shared: App = {
17+
let instance = App()
18+
return instance
19+
}()
20+
21+
// MARK: - Initialization Method
22+
override init() {
23+
super.init()
24+
}
25+
26+
func hostApiV1() -> String {
27+
let hostapi = infoDictionary["TouchDuck-API-V1"]! as! String
28+
return hostapi
29+
}
30+
31+
func document() -> Document? {
32+
let document = NSDocumentController.shared.currentDocument as! Document?
33+
return document;
34+
}
35+
36+
func cDynamo() -> CDynamo? {
37+
return document()?.cDynamo
38+
}
39+
40+
func showAlert(messageText:String?) -> Void {
41+
let alert = NSAlert()
42+
alert.messageText = messageText!
43+
alert.runModal()
44+
}
45+
46+
}

Dynamon/AppDelegate.swift

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//
2+
// AppDelegate.swift
3+
// Dynamon
4+
//
5+
// Created by Touch Duck on 2016/10/02.
6+
// Copyright © 2016年 Touch Duck. All rights reserved.
7+
//
8+
9+
import Cocoa
10+
import RealmSwift
11+
12+
@NSApplicationMain
13+
class AppDelegate: NSObject, NSApplicationDelegate {
14+
15+
override init() {
16+
super.init()
17+
18+
let realmConfig = Realm.Configuration(
19+
schemaVersion: 1,
20+
migrationBlock: { migration, oldSchemaVersion in
21+
if (oldSchemaVersion < 1) {
22+
}
23+
})
24+
25+
print((realmConfig.fileURL?.absoluteString)!)
26+
27+
Realm.Configuration.defaultConfiguration = realmConfig
28+
}
29+
30+
func applicationDidFinishLaunching(_ aNotification: Notification) {
31+
// Insert code here to initialize your application
32+
}
33+
34+
func applicationWillTerminate(_ aNotification: Notification) {
35+
// Insert code here to tear down your application
36+
}
37+
38+
}
39+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"images": [
3+
{
4+
"size": "16x16",
5+
"idiom": "mac",
6+
"filename": "icon_16x16.png",
7+
"scale": "1x"
8+
},
9+
{
10+
"size": "16x16",
11+
"idiom": "mac",
12+
"filename": "[email protected]",
13+
"scale": "2x"
14+
},
15+
{
16+
"size": "32x32",
17+
"idiom": "mac",
18+
"filename": "icon_32x32.png",
19+
"scale": "1x"
20+
},
21+
{
22+
"size": "32x32",
23+
"idiom": "mac",
24+
"filename": "[email protected]",
25+
"scale": "2x"
26+
},
27+
{
28+
"size": "128x128",
29+
"idiom": "mac",
30+
"filename": "icon_128x128.png",
31+
"scale": "1x"
32+
},
33+
{
34+
"size": "128x128",
35+
"idiom": "mac",
36+
"filename": "[email protected]",
37+
"scale": "2x"
38+
},
39+
{
40+
"size": "256x256",
41+
"idiom": "mac",
42+
"filename": "icon_256x256.png",
43+
"scale": "1x"
44+
},
45+
{
46+
"size": "256x256",
47+
"idiom": "mac",
48+
"filename": "[email protected]",
49+
"scale": "2x"
50+
},
51+
{
52+
"size": "512x512",
53+
"idiom": "mac",
54+
"filename": "icon_512x512.png",
55+
"scale": "1x"
56+
},
57+
{
58+
"size": "512x512",
59+
"idiom": "mac",
60+
"filename": "[email protected]",
61+
"scale": "2x"
62+
}
63+
],
64+
"info": {
65+
"version": 1,
66+
"author": "xcode"
67+
}
68+
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

Dynamon/Assets.xcassets/Contents.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info": {
3+
"version": 1,
4+
"author": "xcode"
5+
}
6+
}

0 commit comments

Comments
 (0)