WiFi-No VPN | Cellular-No VPN |
---|---|
WiFi-VPN | Cellular-VPN |
---|---|
No Connection |
---|
Code Style
Swift Style Guide from Google
Code linter and formatter
I use swift-format for this project as I need to use a custom tab indentation and spacing.
Here are some commands I used during testing.
swift-format demo/*.swift --configuration .swift-format.json --in-place
swift-format networkeeng/*.swift --configuration .swift-format.json --in-place
Some good articles
How to start working with swift-format
Swift Code Formatters
💡 Tips
Here's a code snippet when formatting a long String so that swift-format doesn't complain.
let singleLineText =
"""
fames ac turpis egestas sed tempus urna et pharetra pharetra massa massa \
ultricies mi quis hendrerit dolor magna eget est lorem ipsum dolor sit amet\
consectetur adipiscing elit pellentesque habitant morbi tristique senectus \
et netus et malesuada fames ac turpis egestas integer eget aliquet nibh \
praesent tristique magna sit amet
"""
let multilineText =
"""
fames ac turpis egestas sed tempus urna et pharetra pharetra massa massa
ultricies mi quis hendrerit dolor magna eget est lorem ipsum dolor sit amet
consectetur adipiscing elit pellentesque habitant morbi tristique senectus
et netus et malesuada fames ac turpis egestas integer eget aliquet nibh
praesent tristique magna sit amet
"""
ℹ️ Note
This is my first time to try an open-source project and I appreciate your feedback or pointing me to the right direction to make networkeeng
help the iOS open-source community.