• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

eduvpn/apple: app for iOS and macOS

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

eduvpn/apple

开源软件地址(OpenSource Url):

https://github.com/eduvpn/apple

开源编程语言(OpenSource Language):

Swift 65.8%

开源软件介绍(OpenSource Introduction):

eduVPN iOS and macOS apps

These apps depend on TunnelKit.

The app contains a Network Tunneling Protocol Client and allows its users to create a VPN tunnel if you are able to connect to an eduVPN or Let's Connect enabled server.

License

Copyright (c) 2020-2021 The Commons Conservancy. All rights reserved.

Part I

This project is licensed under the [GPLv3][license-content].

Part II

As seen in [libsignal-protocol-c][license-signal]:

Additional Permissions For Submission to Apple App Store: Provided that you are otherwise in compliance with the GPLv3 for each covered work you convey (including without limitation making the Corresponding Source available in compliance with Section 6 of the GPLv3), the Author also grants you the additional permission to convey through the Apple App Store non-source executable versions of the Program as incorporated into each applicable covered work as Executable Versions only under the Mozilla Public License version 2.0 (https://www.mozilla.org/en-US/MPL/2.0/).

Beware

Due to the usage of Network Extensions, you can not fully test this app on a Simulator.

The infrastructure for Network Extension (NE) providers is simply not present on the simulator because, conceptually, it lives ‘below’ the kernel, and the simulator is layered on the OS X kernel.

More info here.

Versioning

The build proces takes the number of commits on the current branch as the build number with git rev-list HEAD --count. The version string is configured in AppVersion.xcconfig.

The exact behavior is defined in the script set_build_number.sh.

Dependencies

CocoaPods

Most dependencies are managed with CocoaPods. But this repository is set up in such a way that you do not need CocoaPods to build this project, only when updating dependencies. Dependencies are defined in a Podfile, exact versions are 'locked' in Podfile.lock. All dependencies defined in the Podfile are committed to this repository.

Swift Package Manager

WireGuardKit alone is managed with Swift Package Manager, tied to either a specific version or commit.

Building

There are two flavours of apps that are built from the same codebase:

This needs to be configured in two files, which are different for macOS and iOS:

  • For macOS:
    • Config/Mac/config.json
    • Config/Mac/Developer-macOS.xcconfig
  • For iOS:
    • Config/iOS/config.json
    • Config/iOS/Developer.xcconfig

Pre-requisites

  1. SwiftLint and Go need to be installed. The build setup looks for these in the paths that HomeBrew installs into.

    To install, run:

    brew install swiftlint go
    

    Go version 1.16 is required.

  2. An explicit App ID needs to be created at the Apple Developer website for each platform

    To do this, you can:

    1. Go to your Apple Developer account page
    2. Go to Certificates, IDs and Profiles > Identifiers
    3. Create an App ID with an Explicit Bundle ID, with the following Capabilities:
      • App Groups
      • Network Extensions
    4. Specify the Bundle ID in the appropriate Developer*.xcconfig file as described below

Building the eduVPN macOS app

To build the app, run:

$ cp Config/Mac/config-eduvpn_new_discovery.json Config/Mac/config.json
$ cp Config/Mac/privacy_statement-eduvpn.json Config/Mac/privacy_statement.json
$ cp Config/Mac/Developer-macOS.xcconfig.eduvpn-template Config/Mac/Developer-macOS.xcconfig
$ vim Config/Mac/Developer-macOS.xcconfig # Edit as reqd.

Then, open EduVPN.xcworkspace in Xcode and build the 'EduVPN-macOS' target.

Building the Let’s Connect! macOS app

To build the app, run:

$ cp Config/Mac/config-letsconnect_new_discovery.json Config/Mac/config.json
$ cp Config/Mac/privacy_statement-letsconnect.json Config/Mac/privacy_statement.json
$ cp Config/Mac/Developer-macOS.xcconfig.letsconnect-template Config/Mac/Developer-macOS.xcconfig
$ vim Config/Mac/Developer-macOS.xcconfig # Edit as reqd.

Then, open EduVPN.xcworkspace in Xcode and build the 'EduVPN-macOS' target.

Building the eduVPN iOS app

To build the app, run:

$ cp Config/iOS/config-eduvpn_new_discovery.json Config/iOS/config.json
$ cp Config/iOS/privacy_statement-eduvpn.json Config/iOS/privacy_statement.json
$ cp Config/iOS/Developer.xcconfig.eduvpn-template Config/iOS/Developer.xcconfig
$ vim Config/iOS/Developer.xcconfig # Edit as reqd.

Then, open EduVPN.xcworkspace in Xcode and build the 'EduVPN-iOS' target.

Building the Let’s Connect! iOS app

To build the app, run:

$ cp Config/iOS/config-letsconnect_new_discovery.json Config/iOS/config.json
$ cp Config/iOS/privacy_statement-letsconnect.json Config/iOS/privacy_statement.json
$ cp Config/iOS/Developer.xcconfig.letsconnect-template Config/iOS/Developer.xcconfig
$ vim Config/iOS/Developer.xcconfig # Edit as reqd.

Then, open EduVPN.xcworkspace in Xcode and build the 'EduVPN-iOS' target.

Testing

The app can be tested using UI tests written using XCUITest.

The tests can modify the app data, so to avoid losing your added servers, it's recommended that you use a separate app bundle identifier for running the UI tests. The app bundle identifier is configurable in Developer.xcconfig or Developer-macOS.xcconfig as specified above.

Testing the eduVPN iOS app

The iOS UI tests are intended to be run on a physical device (not on the iOS Simulator).

Before running the tests, specify the server credentials:

$ cp EduVPN-UITests-iOS/TestServerCredentialsiOS.swift-template EduVPN-UITests-iOS/TestServerCredentialsiOS.swift
$ vim EduVPN-UITests-iOS/TestServerCredentialsiOS.swift # Enter credentials

Then:

  1. Open EduVPN.xcworkspace in Xcode
  2. Ensure the test targets (EduVPN-Tests-iOS, EduVPN-UITests-iOS) have correct 'Team' set under 'Signing & Capabilities'
  3. In the scheme selector breadcrumb panel, select the 'EduVPN-iOS' scheme and your connected iDevice
  4. Click on Product > Test

Do not use the iDevice when the test is running.

Testing the eduVPN macOS app

Before running the tests, specify the server credentials:

$ cp EduVPN-UITests-macOS/TestServerCredentialsmacOS.swift-template EduVPN-UITests-macOS/TestServerCredentialsmacOS.swift
$ vim EduVPN-UITests-macOS/TestServerCredentialsmacOS.swift # Enter credentials

Then:

  1. Open Safari.app, open a new private window, close all other windows
  2. Open EduVPN.xcworkspace in Xcode
  3. Ensure the test targets (EduVPN-Tests-macOS, EduVPN-UITests-macOS) have correct 'Team' set under 'Signing & Capabilities'
  4. In the scheme selector breadcrumb panel, select the 'EduVPN-iOS' scheme and the macOS machine
  5. Click on Product > Test

Do not use the macOS machine when the test is running.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
electron/osx-sign: Codesign Electron macOS apps发布时间:2022-08-18
下一篇:
eduvpn/macos: Deprecated, please go to https://github.com/eduvpn/apple发布时间:2022-08-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap