Skip to content

Commit c6c416a

Browse files
committed
Update README.md for iOS app development
1 parent 822d141 commit c6c416a

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ Flycheck extension for Apple's Swift programming language.
1212

1313
Install `flycheck-swift` package from MELPA.
1414

15+
Add the following line to the `~/.emacs.d/init.el` or `~/.emacs`.
16+
17+
```
18+
(eval-after-load 'flycheck '(flycheck-swift-setup))
19+
```
20+
21+
If you compile against iOS SDK, add the following lines:
22+
23+
```
24+
(setq flycheck-swift-sdk-path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk")
25+
;; ↑ Select the appropriate SDK version you use
26+
(setq flycheck-swift-target "arm64-apple-ios10")
27+
```
28+
1529
### Manual installation
1630

1731
Install [Flycheck](http://www.flycheck.org/en/latest/user/installation.html).
@@ -28,6 +42,14 @@ Add the following line to the `~/.emacs.d/init.el` or `~/.emacs`.
2842
(eval-after-load 'flycheck '(flycheck-swift-setup))
2943
```
3044

45+
If you compile against iOS SDK, add the following lines:
46+
47+
```
48+
(setq flycheck-swift-sdk-path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk")
49+
;; ↑ Select the appropriate SDK version you use
50+
(setq flycheck-swift-target "arm64-apple-ios10")
51+
```
52+
3153
### Using cask (for developer)
3254

3355
Install [cask](https://github.com/cask/cask).
@@ -44,6 +66,14 @@ Add the following line to the `~/.emacs.d/init.el` or `~/.emacs`.
4466
(eval-after-load 'flycheck '(flycheck-swift-setup))
4567
```
4668

69+
If you compile against iOS SDK, add the following lines:
70+
71+
```
72+
(setq flycheck-swift-sdk-path "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk")
73+
;; ↑ Select the appropriate SDK version you use
74+
(setq flycheck-swift-target "arm64-apple-ios10")
75+
```
76+
4777
## Customization
4878

4979
### flycheck-swift-executable
@@ -56,7 +86,7 @@ Extra flags prepended to arguments of swiftc.
5686

5787
### flycheck-swift-sdk-path
5888

59-
A path to the targeted SDK.
89+
A name of the targeted SDK or path to the targeted SDK.
6090

6191
### flycheck-swift-linked-sources
6292

flycheck-swift.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
:safe #'flycheck-string-list-p)
4545

4646
(flycheck-def-option-var flycheck-swift-sdk-path nil swift
47-
"A path to the targeted SDK"
47+
"A name of the targeted SDK or path to the targeted SDK"
4848
:type '(choice (const :tag "Don't link against sdk" nil)
49-
(string :tag "Targeted SDK path"))
49+
(string :tag "Targeted SDK path or name"))
5050
:safe #'stringp)
5151

5252
(flycheck-def-option-var flycheck-swift-linked-sources '("*.swift") swift

0 commit comments

Comments
 (0)