mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-02-16 12:52:11 +00:00
Create Passepartout-Core framework target
Move all sources to this target, out of Passepartout-iOS. FIXME: TrustedNetworks uses ServiceViewController.RowType FIXME: make iOS target depend on Core.
This commit is contained in:
parent
8adc125f9b
commit
c7f522f55e
22
Passepartout-Core/Info.plist
Normal file
22
Passepartout-Core/Info.plist
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>FMWK</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
36
Passepartout-Core/Passepartout_Core.h
Normal file
36
Passepartout-Core/Passepartout_Core.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
//
|
||||||
|
// Passepartout_Core.h
|
||||||
|
// Passepartout-Core
|
||||||
|
//
|
||||||
|
// Created by Davide De Rosa on 3/18/19.
|
||||||
|
// Copyright (c) 2019 Davide De Rosa. All rights reserved.
|
||||||
|
//
|
||||||
|
// https://github.com/passepartoutvpn
|
||||||
|
//
|
||||||
|
// This file is part of Passepartout.
|
||||||
|
//
|
||||||
|
// Passepartout is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Passepartout is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Passepartout. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
//! Project version number for Passepartout_Core.
|
||||||
|
FOUNDATION_EXPORT double Passepartout_CoreVersionNumber;
|
||||||
|
|
||||||
|
//! Project version string for Passepartout_Core.
|
||||||
|
FOUNDATION_EXPORT const unsigned char Passepartout_CoreVersionString[];
|
||||||
|
|
||||||
|
// In this header, you should import all the public headers of your framework using statements like #import <Passepartout_Core/PublicHeader.h>
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// ConnectionServiceTests.swift
|
// ConnectionServiceTests.swift
|
||||||
// PassepartoutTests-iOS
|
// Passepartout-CoreTests
|
||||||
//
|
//
|
||||||
// Created by Davide De Rosa on 10/25/18.
|
// Created by Davide De Rosa on 10/25/18.
|
||||||
// Copyright (c) 2019 Davide De Rosa. All rights reserved.
|
// Copyright (c) 2019 Davide De Rosa. All rights reserved.
|
||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
import XCTest
|
import XCTest
|
||||||
import TunnelKit
|
import TunnelKit
|
||||||
@testable import Passepartout
|
@testable import Passepartout_Core
|
||||||
|
|
||||||
class ConnectionServiceTests: XCTestCase {
|
class ConnectionServiceTests: XCTestCase {
|
||||||
let url = Bundle(for: ConnectionServiceTests.self).url(forResource: "ConnectionService", withExtension: "json")!
|
let url = Bundle(for: ConnectionServiceTests.self).url(forResource: "ConnectionService", withExtension: "json")!
|
@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>BNDL</string>
|
<string>BNDL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.1.0</string>
|
<string>1.0</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
</dict>
|
</dict>
|
@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// InfrastructureTests.swift
|
// InfrastructureTests.swift
|
||||||
// PassepartoutTests-iOS
|
// Passepartout-CoreTests
|
||||||
//
|
//
|
||||||
// Created by Davide De Rosa on 6/11/18.
|
// Created by Davide De Rosa on 6/11/18.
|
||||||
// Copyright (c) 2019 Davide De Rosa. All rights reserved.
|
// Copyright (c) 2019 Davide De Rosa. All rights reserved.
|
||||||
@ -24,7 +24,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import XCTest
|
import XCTest
|
||||||
@testable import Passepartout
|
@testable import Passepartout_Core
|
||||||
import TunnelKit
|
import TunnelKit
|
||||||
|
|
||||||
class InfrastructureTests: XCTestCase {
|
class InfrastructureTests: XCTestCase {
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,99 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1010"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "0E31529A223F9EF400F61841"
|
||||||
|
BuildableName = "Passepartout_Core.framework"
|
||||||
|
BlueprintName = "Passepartout-Core"
|
||||||
|
ReferencedContainer = "container:Passepartout.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<Testables>
|
||||||
|
<TestableReference
|
||||||
|
skipped = "NO">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "0E3152A2223F9EF500F61841"
|
||||||
|
BuildableName = "Passepartout-CoreTests.xctest"
|
||||||
|
BlueprintName = "Passepartout-CoreTests"
|
||||||
|
ReferencedContainer = "container:Passepartout.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</TestableReference>
|
||||||
|
</Testables>
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "0E31529A223F9EF400F61841"
|
||||||
|
BuildableName = "Passepartout_Core.framework"
|
||||||
|
BlueprintName = "Passepartout-Core"
|
||||||
|
ReferencedContainer = "container:Passepartout.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "0E31529A223F9EF400F61841"
|
||||||
|
BuildableName = "Passepartout_Core.framework"
|
||||||
|
BlueprintName = "Passepartout-Core"
|
||||||
|
ReferencedContainer = "container:Passepartout.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "0E31529A223F9EF400F61841"
|
||||||
|
BuildableName = "Passepartout_Core.framework"
|
||||||
|
BlueprintName = "Passepartout-Core"
|
||||||
|
ReferencedContainer = "container:Passepartout.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
@ -52,6 +52,16 @@
|
|||||||
ReferencedContainer = "container:Passepartout.xcodeproj">
|
ReferencedContainer = "container:Passepartout.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</TestableReference>
|
</TestableReference>
|
||||||
|
<TestableReference
|
||||||
|
skipped = "NO">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "0E3152A2223F9EF500F61841"
|
||||||
|
BuildableName = "Passepartout-CoreTests.xctest"
|
||||||
|
BlueprintName = "Passepartout-CoreTests"
|
||||||
|
ReferencedContainer = "container:Passepartout.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</TestableReference>
|
||||||
</Testables>
|
</Testables>
|
||||||
<MacroExpansion>
|
<MacroExpansion>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
|
@ -49,7 +49,9 @@ class TrustedNetworksModel {
|
|||||||
|
|
||||||
private(set) var trustsMobileNetwork: Bool
|
private(set) var trustsMobileNetwork: Bool
|
||||||
|
|
||||||
private(set) var rows: [ServiceViewController.RowType]
|
// FIXME
|
||||||
|
// private(set) var rows: [ServiceViewController.RowType]
|
||||||
|
private(set) var rows: [Int]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
weak var delegate: TrustedNetworksModelDelegate?
|
weak var delegate: TrustedNetworksModelDelegate?
|
||||||
@ -71,14 +73,15 @@ class TrustedNetworksModel {
|
|||||||
|
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
trustsMobileNetwork = preferences.trustsMobileNetwork
|
trustsMobileNetwork = preferences.trustsMobileNetwork
|
||||||
rows.removeAll()
|
// FIXME
|
||||||
if hasMobileNetwork {
|
// rows.removeAll()
|
||||||
rows.append(.trustedMobile)
|
// if hasMobileNetwork {
|
||||||
}
|
// rows.append(.trustedMobile)
|
||||||
for _ in sortedWifis {
|
// }
|
||||||
rows.append(.trustedWiFi)
|
// for _ in sortedWifis {
|
||||||
}
|
// rows.append(.trustedWiFi)
|
||||||
rows.append(.trustedAddCurrentWiFi)
|
// }
|
||||||
|
// rows.append(.trustedAddCurrentWiFi)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +139,8 @@ class TrustedNetworksModel {
|
|||||||
if !isDuplicate {
|
if !isDuplicate {
|
||||||
sortedWifis.insert(wifiToAdd, at: index)
|
sortedWifis.insert(wifiToAdd, at: index)
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
rows.insert(.trustedWiFi, at: rowIndex)
|
// FIXME
|
||||||
|
// rows.insert(.trustedWiFi, at: rowIndex)
|
||||||
#endif
|
#endif
|
||||||
delegate?.trustedNetworks(self, shouldInsertWifiAt: rowIndex)
|
delegate?.trustedNetworks(self, shouldInsertWifiAt: rowIndex)
|
||||||
} else {
|
} else {
|
||||||
|
13
Podfile
13
Podfile
@ -7,6 +7,15 @@ def shared_pods
|
|||||||
#pod 'TunnelKit', :path => '../../personal/tunnelkit'
|
#pod 'TunnelKit', :path => '../../personal/tunnelkit'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
target 'Passepartout-Core' do
|
||||||
|
platform :ios, '11.0'
|
||||||
|
shared_pods
|
||||||
|
end
|
||||||
|
target 'Passepartout-CoreTests' do
|
||||||
|
platform :ios, '11.0'
|
||||||
|
shared_pods
|
||||||
|
end
|
||||||
|
|
||||||
target 'Passepartout-iOS' do
|
target 'Passepartout-iOS' do
|
||||||
platform :ios, '11.0'
|
platform :ios, '11.0'
|
||||||
shared_pods
|
shared_pods
|
||||||
@ -16,7 +25,3 @@ target 'Passepartout-iOS-Tunnel' do
|
|||||||
platform :ios, '11.0'
|
platform :ios, '11.0'
|
||||||
shared_pods
|
shared_pods
|
||||||
end
|
end
|
||||||
target 'PassepartoutTests-iOS' do
|
|
||||||
platform :ios, '11.0'
|
|
||||||
shared_pods
|
|
||||||
end
|
|
||||||
|
@ -38,6 +38,6 @@ SPEC CHECKSUMS:
|
|||||||
SwiftyBeaver: 8e67ab3cd94389cbbb7a9c7cc02748d98bfee68e
|
SwiftyBeaver: 8e67ab3cd94389cbbb7a9c7cc02748d98bfee68e
|
||||||
TunnelKit: 194e6f60cf5cbddfee1a24be6c7c540f70bdeb5f
|
TunnelKit: 194e6f60cf5cbddfee1a24be6c7c540f70bdeb5f
|
||||||
|
|
||||||
PODFILE CHECKSUM: f04a8e2af82ae2ca7466dc8a0972f249a3f9686b
|
PODFILE CHECKSUM: 64da54acbd606b0276608ce8645845fd78836149
|
||||||
|
|
||||||
COCOAPODS: 1.6.1
|
COCOAPODS: 1.6.1
|
||||||
|
Loading…
Reference in New Issue
Block a user