This is a demo project which contains the steps to create App with TunnelRay library

Overview

This is a demo project which contains the steps to create App with TunnelRay library

Environment requirements:

Detail steps

Part 1: Create a new project with the TunnelRay library imported, and add some demo used UI

  1. Open the XCode, create a new App project. like below
    New project

  2. Close the XCode, go to the project folder, create a new file named Podfile with the following content:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '13.0'

## change to your target name
target 'Demo' do
    use_frameworks!
    pod 'TunnelRay', '>= 1.0.6'
end 
  1. Run the following command to install the dependencies.
$ pod install
$ open -a xcode Demo.xcworkspace

Note: please always open your project with {Name}.xcworkspace instead of {Name}.xcodeproj

  1. Drag the following files from this project to your project under the corresponding location, and check the Copy item if needed:
    • Demo/Demo/ContentView.swift
    • Demo/Demo/WebView.swift
    • Demo/Demo/WebViewPage.swft
      Copy resource

Part 2: Create entitlements and Extension:

  1. Add an entitlment via Signing & Capability.
    Add entitlement

  2. Add Network Extension as a new target with name tunnel-extension
    Add Network extension
    Extension properties

  3. After the extension created, set up the entitlement to match the app on the extension like following:
    Extension entitlment

  4. Remove the PacketTunnelProvider,swift and Copy the following items from the this project to your project by dragging.

    • tunnel-extension/PacketTunnelProvider.swift
    • tunnel-extension/libleaf/*
    • tunnel-extension/Subnet.swift
    • tunnel-extension/TunnelRay-Bridging-Header.h
    • tunnel-extension/TunnelRayTunnelStore.swift
  5. Append the following changed to the Podfile, and re-run the pod install command

target 'tunnel-extension' do
    use_frameworks!
    pod 'TunnelRay', '>= 1.0.6'
end 
  1. Add Objective-C Bridging Header
    Add Bridging header

Part 3: Running on the real device.

  1. Connect your device.
  2. Select the App target and run.
    Debug
You might also like...
LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture
LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture

LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture

Intro to iOS Workshop - Demo App

WeArePennStateApp Intro to iOS Workshop - Demo App We Are, Penn State! Requirements: Build an app in Swift that allows you to perform the We Are Penn

Demo of a simple ASP.NET Core web API written in Swift

Welcome! This repo is a demo which shows the use of Llama Swift with ASP.NET Core. Llama is my exploratory project to compile "other languages" for .N

 MeCab Demo for iOS 15 and SPM
MeCab Demo for iOS 15 and SPM

MeCab Demo for iOS 15 and SPM Sample project for MeCab, a Japanese tokenizer/morphological analyzer. Updated for iOS 15 and SPM. Successor to landonep

 emoji-picker demo 🥰
emoji-picker demo 🥰

emoji-picker demo 🥰 External dependencies Dependencies are managed by Swift Package Manager. SnapKit - a DSL to make Auto Layout easy on both iOS and

Demo of using AVPictureInPictureController with an AVSampleBufferDisplayLayer content source not working on tvOS or macOS

PiP Bug Demo I believe there is an Apple-level framework issue when using AVPictureInPictureController with an AVSampleBufferDisplayLayer content sour

MeetingSample iOS demo workspace

MeetingSample iOS demo workspace

Demo For the IOS application development lecture

IOSLectureCIfilterDemo This is a demo for the CIFilter topic of the IOS Application development lecture. The following topics are included: apply a fi

Demo Swift Lint Two Warnings

DemoSwiftLintTwoWarnings Supports: iOS 10.0 and above Branches: master - stable app releases develop - development branch, merge your feature branches

Owner
null
🚀 This demo is very simple project, which designed to understand SwiftUI

?? This demo is very simple project, which designed to understand SwiftUI. It includes Main screen, DayList screen and detail screen.

Necati Evren Yaşar 38 Nov 25, 2022
The demo app demonstrates a real-time application using FindSurface to search point clouds, which ARKit provides, for geometry shapes.

FindSurface-GUIDemo-iOS (Swift) CurvSurf FindSurface™ GUIDemo for iOS (Swift) Overview This demo app demonstrates a real-time application using FindSu

CurvSurf 27 Aug 24, 2022
A demo project using VIPER architecture and building user interface programmatically

ProductDiscovery A demo project that building a UIKit user interface programmatically. Because the UI is made of code very long so I have separated it

Vinh Vo 7 Oct 1, 2021
Demo project for MOPCON2021

Nav This project is a demo for MOPCON 2021. The topic is SwiftUI Navigation Study. There are 3 ways to see how the code works, which demos different v

Ethan Huang 5 Oct 12, 2022
Example project guide you schedules multiple thread for network requests in RxSwift, which is optimize your app's performance better.

RxSwift-Multi-Threading-Example Example project guide you schedules multiple thread for network requests in RxSwift, which is optimize your app's perf

Huy Trinh Duc 6 Nov 4, 2022
GoodAsOldPhones is the demo app of Swift tutorial on code school.

GoodAsOldPhones GoodAsOldPhones is the demo app of Swift tutorial on code school. This app demonstates basic use and implementation of tab bar control

Kushal Shingote 5 May 24, 2022
Demo app for SwiftUI state management

StateObject vs ObservedObject Demo Demo app for SwiftUI state management Run the app and push 3 buttons to increase each counter. Toggle one of the to

Serhii Kyrylenko 0 Oct 13, 2021
Official demo app released by Apple to teach SwiftUI

Landmarks This repository contains a demo application that I developed while following Apple's SwiftUI tutorials. Cloning Clone the repository using c

Yasin Osman 3 Nov 19, 2021
Demo Vapor TIL App

Demo Vapor TIL App

yoki 0 Nov 21, 2021
A simple demo app to showcase streaming HLS with SwiftUI Videoplayer

HLS Streaming with SwiftUI Basic implementation of VideoPlayer for SwiftUI to play remote media files using HTTP Live Streaming (HLS). Multiple views

Create with Swift 15 Oct 22, 2022