Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated LibSession to be sourced via Swift Package Manager #1025

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion LibSession-Util
Submodule LibSession-Util deleted from f19df1
408 changes: 230 additions & 178 deletions Scripts/build_libSession_util.sh

Large diffs are not rendered by default.

2,094 changes: 1,864 additions & 230 deletions Session.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "77d5fda90891573a263c0fefeb989f3f1bb56e612a09be32106558b6d5fb4564",
"originHash" : "c137e4682b80f7c6454ed274f01a8cc9748c1cf57f800b91f47000f31ae7a0a7",
"pins" : [
{
"identity" : "cocoalumberjack",
Expand Down Expand Up @@ -46,6 +46,15 @@
"version" : "24.0.0"
}
},
{
"identity" : "libsession-util",
"kind" : "remoteSourceControl",
"location" : "https://github.com/oxen-io/libsession-util",
"state" : {
"branch" : "swift-package-manager",
"revision" : "8f6392610bc9001450c93208da3ad6ccf565b22f"
}
},
{
"identity" : "libwebp-xcode",
"kind" : "remoteSourceControl",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "&#10;">
</ActionContent>
</ExecutionAction>
</PreActions>
<PostActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "&#10;">
</ActionContent>
</ExecutionAction>
</PostActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Session.app"
BlueprintName = "Session"
ReferencedContainer = "container:Session.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug_Compile_LibSession"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug_Compile_LibSession"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Session.app"
BlueprintName = "Session"
ReferencedContainer = "container:Session.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "IDEPreferLogStreaming"
value = "YES"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "App_Store_Release_Compile_LibSession"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D221A088169C9E5E00537ABF"
BuildableName = "Session.app"
BlueprintName = "Session"
ReferencedContainer = "container:Session.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug_Compile_LibSession">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "App_Store_Release_Compile_LibSession"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import Foundation
import GRDB
import SessionUtil
import SessionUtilitiesKit

/// This migration goes through the current state of the database and generates config dumps for the user config types
Expand Down Expand Up @@ -56,7 +55,7 @@ enum _014_GenerateInitialUserConfigDumps: Migration {
in: conf
)

if config_needs_dump(conf) {
if LibSession.needsDump(conf: conf) {
try LibSession
.createDump(
conf: conf,
Expand Down Expand Up @@ -122,7 +121,7 @@ enum _014_GenerateInitialUserConfigDumps: Migration {
in: conf
)

if config_needs_dump(conf) {
if LibSession.needsDump(conf: conf) {
try LibSession
.createDump(
conf: conf,
Expand All @@ -147,7 +146,7 @@ enum _014_GenerateInitialUserConfigDumps: Migration {
in: conf
)

if config_needs_dump(conf) {
if LibSession.needsDump(conf: conf) {
try LibSession
.createDump(
conf: conf,
Expand Down Expand Up @@ -183,7 +182,7 @@ enum _014_GenerateInitialUserConfigDumps: Migration {
in: conf
)

if config_needs_dump(conf) {
if LibSession.needsDump(conf: conf) {
try LibSession
.createDump(
conf: conf,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ public extension LibSession {
return conf
}

internal static func needsDump(conf: UnsafeMutablePointer<config_object>?) -> Bool {
return config_needs_dump(conf)
}

internal static func createDump(
conf: UnsafeMutablePointer<config_object>?,
for variant: ConfigDump.Variant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// stringlint:disable

import Foundation
import SessionUtil

// MARK: - String

Expand Down