Skip to content

Commit 67daf24

Browse files
Copilotdustturtle
andcommitted
Add -framework Security to fix linker error for sec_protocol_options_set_verify_block
The TLS verify block in connectToHost:onPort:withTimeout:error: uses sec_protocol_options_set_verify_block from the Security framework, which was not linked in the CI build command. Also updated build instructions in main.m comment and README.md to include the required -fobjc-arc, -framework Network, and -framework Security flags. Co-authored-by: dustturtle <2305214+dustturtle@users.noreply.github.com>
1 parent ef15a7e commit 67daf24

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/demo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- name: Build ObjC Demo
3434
run: |
35-
clang -fobjc-arc -framework Foundation -framework Network \
35+
clang -fobjc-arc -framework Foundation -framework Network -framework Security \
3636
-I ObjC/NWAsyncSocketObjC/include \
3737
ObjC/NWAsyncSocketObjC/NWStreamBuffer.m \
3838
ObjC/NWAsyncSocketObjC/NWSSEParser.m \

ObjC/ObjCDemo/main.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// 6. GCDAsyncSocket — Server socket API (accept/listen)
1414
//
1515
// Build (from repository root):
16-
// clang -framework Foundation \
16+
// clang -framework Foundation -framework Network -framework Security \
1717
// -I ObjC/NWAsyncSocketObjC/include \
1818
// ObjC/NWAsyncSocketObjC/NWStreamBuffer.m \
1919
// ObjC/NWAsyncSocketObjC/NWSSEParser.m \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ The demo menu lets you test each component individually or run all at once:
321321
Build the ObjC CLI demo on macOS:
322322

323323
```bash
324-
clang -framework Foundation \
324+
clang -fobjc-arc -framework Foundation -framework Network -framework Security \
325325
-I ObjC/NWAsyncSocketObjC/include \
326326
ObjC/NWAsyncSocketObjC/NWStreamBuffer.m \
327327
ObjC/NWAsyncSocketObjC/NWSSEParser.m \

0 commit comments

Comments
 (0)