Browse Source

APPLEMAIL-24 XPC service with static libraries. Few modifications in order to pep-notifications app to work. XPC service loads and works as expected

APPLEMAIL-28
David Alarcon 2 years ago
parent
commit
922c164899
5 changed files with 60 additions and 15 deletions
  1. +32
    -10
      pEpMacOSAdapter.xcodeproj/project.pbxproj
  2. +12
    -0
      pEpMacOSAdapter/local.conf
  3. +2
    -1
      pEpMacOSAdapter/main.m
  4. +12
    -2
      pEpNotifications/pEpNotifications.xcodeproj/project.pbxproj
  5. +2
    -2
      pEpNotifications/pEpNotifications/AppDelegate.swift

+ 32
- 10
pEpMacOSAdapter.xcodeproj/project.pbxproj View File

@ -82,8 +82,15 @@
35F06979247DC95A00543884 /* pEpUpdater_Test.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = pEpUpdater_Test.m; sourceTree = "<group>"; };
35F0697B247DC95A00543884 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
35F06990247F00E500543884 /* test.der */ = {isa = PBXFileReference; lastKnownFileType = file; path = test.der; sourceTree = "<group>"; };
4E57C39D24E19C9F0004D420 /* libboost_regex.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libboost_regex.a; path = ../../boost_1_72_0/lib/libboost_regex.a; sourceTree = "<group>"; };
4E57C39F24E19CAC0004D420 /* libboost_iostreams.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libboost_iostreams.a; path = ../../boost_1_72_0/lib/libboost_iostreams.a; sourceTree = "<group>"; };
4E57C3A124E19CBC0004D420 /* libboost_system.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libboost_system.a; path = ../../boost_1_72_0/lib/libboost_system.a; sourceTree = "<group>"; };
4E57C3A324E19D140004D420 /* libcryptopp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcryptopp.a; path = ../../../../../usr/local/lib/libcryptopp.a; sourceTree = "<group>"; };
4E57C3A624E19D8B0004D420 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = ../../GitHub/openssl/libcrypto.a; sourceTree = "<group>"; };
4E59689124E14FE400559192 /* libssl.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libssl.3.dylib; path = ../../GitHub/openssl/libssl.3.dylib; sourceTree = "<group>"; };
4E59689824E14FEA00559192 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = ../../GitHub/openssl/libssl.a; sourceTree = "<group>"; };
4E5968A224E18DFB00559192 /* libcrypto.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.3.dylib; path = ../../GitHub/openssl/libcrypto.3.dylib; sourceTree = "<group>"; };
4E5968A524E18FC000559192 /* libboost_regex.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libboost_regex.dylib; path = ../../boost_1_72_0/lib/libboost_regex.dylib; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -164,6 +171,13 @@
35F06969247D58C800543884 /* Frameworks */ = {
isa = PBXGroup;
children = (
4E57C3A624E19D8B0004D420 /* libcrypto.a */,
4E57C3A324E19D140004D420 /* libcryptopp.a */,
4E57C3A124E19CBC0004D420 /* libboost_system.a */,
4E57C39F24E19CAC0004D420 /* libboost_iostreams.a */,
4E57C39D24E19C9F0004D420 /* libboost_regex.a */,
4E5968A524E18FC000559192 /* libboost_regex.dylib */,
4E5968A224E18DFB00559192 /* libcrypto.3.dylib */,
4E59689824E14FEA00559192 /* libssl.a */,
4E59689124E14FE400559192 /* libssl.3.dylib */,
);
@ -471,10 +485,12 @@
buildSettings = {
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_LINK_OBJC_RUNTIME = NO;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = NQLYU6MGPN;
GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Users/davidalarcon/Development/boost_1_72_0/include,
@ -483,19 +499,21 @@
);
INFOPLIST_FILE = pEpMacOSAdapter/Info.plist;
INSTALL_PATH = "/Library/Application Support/pEp";
LD_RUNPATH_SEARCH_PATHS = (
"$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST)_$(_BOOL_$(SKIP_INSTALL)))",
/Users/davidalarcon/Development/boost_1_72_0/lib,
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
/Users/davidalarcon/Development/GitHub/openssl,
/Users/davidalarcon/Development/boost_1_72_0/lib,
/usr/local/lib,
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
OTHER_LDFLAGS = (
"-lssl",
"-lcrypto",
"-lboost_regex",
"-lcryptopp",
"-lobjc",
/Users/davidalarcon/Development/GitHub/openssl/libssl.a,
);
PRELINK_LIBS = "-lssl";
PRODUCT_BUNDLE_IDENTIFIER = pEp.foundation.pEpMacOSAdapter;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
@ -510,10 +528,12 @@
buildSettings = {
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_LINK_OBJC_RUNTIME = NO;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = NQLYU6MGPN;
GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Users/davidalarcon/Development/boost_1_72_0/include,
@ -522,19 +542,21 @@
);
INFOPLIST_FILE = pEpMacOSAdapter/Info.plist;
INSTALL_PATH = "/Library/Application Support/pEp";
LD_RUNPATH_SEARCH_PATHS = (
"$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST)_$(_BOOL_$(SKIP_INSTALL)))",
/Users/davidalarcon/Development/boost_1_72_0/lib,
);
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
/Users/davidalarcon/Development/GitHub/openssl,
/Users/davidalarcon/Development/boost_1_72_0/lib,
/usr/local/lib,
);
MACOSX_DEPLOYMENT_TARGET = 10.10;
OTHER_LDFLAGS = (
"-lssl",
"-lcrypto",
"-lboost_regex",
"-lcryptopp",
"-lobjc",
/Users/davidalarcon/Development/GitHub/openssl/libssl.a,
);
PRELINK_LIBS = "-lssl";
PRODUCT_BUNDLE_IDENTIFIER = pEp.foundation.pEpMacOSAdapter;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;


+ 12
- 0
pEpMacOSAdapter/local.conf View File

@ -0,0 +1,12 @@
DOWNLOADCLIENT=../../downloadclient
BOOST_INCLUDE=/Users/davidalarcon/Development/boost_1_72_0/include
BOOST_LIB=/Users/davidalarcon/Development/boost_1_72_0/lib
CRYPTOPP_INCLUDE=/usr/local/include
CRYPTOPP_LIB=/usr/local/lib
OPENSSL_INCLUDE=/Users/davidalarcon/Development/GitHub/openssl/include
OPENSSL_LIB=/Users/davidalarcon/Development/GitHub/openssl
SIGNING_IDENTITY=68AD28395D8090C2A8ACDD3A31FA6735C8DAE2F4

+ 2
- 1
pEpMacOSAdapter/main.m View File

@ -84,7 +84,8 @@ int main(int argc, const char *argv[])
// start the GUI helper app
BOOL opened = start_helper();
assert(opened);
/* FIXME: Modification to be reverted */
//assert(opened);
NSLog(@"going into main runLoop");
NSRunLoop* runLoop = [NSRunLoop currentRunLoop];


+ 12
- 2
pEpNotifications/pEpNotifications.xcodeproj/project.pbxproj View File

@ -495,7 +495,12 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
LIBRARY_SEARCH_PATHS = "";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
/Users/davidalarcon/Development/GitHub/openssl,
/Users/davidalarcon/Development/boost_1_72_0/lib,
/usr/local/lib,
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_BUNDLE_IDENTIFIER = pEp.foundation.Notifications;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -519,7 +524,12 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
LIBRARY_SEARCH_PATHS = "";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
/Users/davidalarcon/Development/GitHub/openssl,
/Users/davidalarcon/Development/boost_1_72_0/lib,
/usr/local/lib,
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
PRODUCT_BUNDLE_IDENTIFIER = pEp.foundation.Notifications;
PRODUCT_NAME = "$(TARGET_NAME)";


+ 2
- 2
pEpNotifications/pEpNotifications/AppDelegate.swift View File

@ -184,7 +184,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
func applicationDidFinishLaunching(_ aNotification: Notification) {
// preference defaults
let appDefaults = ["ScheduleUpdates": true, "AlwaysShowThisMenu": false]
let appDefaults = ["ScheduleUpdates": true, "AlwaysShowThisMenu": true]
UserDefaults.standard.register(defaults: appDefaults)
if UserDefaults.standard.bool(forKey: "AlwaysShowThisMenu") {
_alwaysShowThisMenu.state = NSControl.StateValue.on
@ -198,7 +198,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
// connect to XPC service
connection = NSXPCConnection.init(machServiceName: "foundation.pEp.adapter.macOS")
connection = NSXPCConnection.init(machServiceName: /*"foundation.pEp.adapter.macOS"*/"pEp.foundation.pEpMacOSAdapter")
if connection != nil {
connection.remoteObjectInterface = NSXPCInterface.init(with: pEpMacOSAdapterProtocol.self)
connection.resume()


Loading…
Cancel
Save