Browse Source

Fixes: Undefined Symbols caused by ObjC Foundation stuff not bridged to Swift.

APPLEMAIL-42
Andreas Buff 6 months ago
parent
commit
61a331820c
3 changed files with 39 additions and 0 deletions
  1. +24
    -0
      pEpMacOSAdapter.xcodeproj/project.pbxproj
  2. +11
    -0
      pEpMacOSAdapter/DummyToBrigeFoundationToSwift.swift
  3. +4
    -0
      pEpMacOSAdapter/foundation.pEp.adapter.macOS-Bridging-Header.h

+ 24
- 0
pEpMacOSAdapter.xcodeproj/project.pbxproj View File

@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
15921F41261DC6FA003346B7 /* DummyToBrigeFoundationToSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15921F40261DC6FA003346B7 /* DummyToBrigeFoundationToSwift.swift */; };
35380AE7247BD13A004A08A6 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 35380AE6247BD13A004A08A6 /* README.md */; };
35DC18DA244DA19100FB2002 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 35DC18D9244DA19100FB2002 /* main.m */; };
4E5FC0F225B9D2E0000DF12C /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E5FC0F025B9D2CF000DF12C /* libz.tbd */; };
@ -17,6 +18,8 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
15921EF3261DC63B003346B7 /* foundation.pEp.adapter.macOS-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "foundation.pEp.adapter.macOS-Bridging-Header.h"; sourceTree = "<group>"; };
15921F40261DC6FA003346B7 /* DummyToBrigeFoundationToSwift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DummyToBrigeFoundationToSwift.swift; sourceTree = "<group>"; };
35380AE6247BD13A004A08A6 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; };
35DC18D2244DA19100FB2002 /* foundation.pEp.adapter.macOS.xpc */ = {isa = PBXFileReference; explicitFileType = "wrapper.xpc-service"; includeInIndex = 0; path = foundation.pEp.adapter.macOS.xpc; sourceTree = BUILT_PRODUCTS_DIR; };
35DC18D9244DA19100FB2002 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@ -67,6 +70,8 @@
35380AE6247BD13A004A08A6 /* README.md */,
35DC18D9244DA19100FB2002 /* main.m */,
35DC18DB244DA19100FB2002 /* Info.plist */,
15921EF3261DC63B003346B7 /* foundation.pEp.adapter.macOS-Bridging-Header.h */,
15921F40261DC6FA003346B7 /* DummyToBrigeFoundationToSwift.swift */,
);
path = pEpMacOSAdapter;
sourceTree = "<group>";
@ -115,6 +120,7 @@
TargetAttributes = {
35DC18D1244DA19100FB2002 = {
CreatedOnToolsVersion = 11.4.1;
LastSwiftMigration = 1240;
};
};
};
@ -174,6 +180,7 @@
buildActionMask = 2147483647;
files = (
35DC18DA244DA19100FB2002 /* main.m in Sources */,
15921F41261DC6FA003346B7 /* DummyToBrigeFoundationToSwift.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -315,6 +322,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
@ -324,6 +332,11 @@
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = pEpMacOSAdapter/Info.plist;
INSTALL_PATH = "/Library/Application Support/pEp";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
MACOSX_DEPLOYMENT_TARGET = 10.10;
OTHER_LDFLAGS = "${inherited}";
@ -332,6 +345,9 @@
SDKROOT = macosx;
SKIP_INSTALL = NO;
SUPPORTED_PLATFORMS = macosx;
SWIFT_OBJC_BRIDGING_HEADER = "pEpMacOSAdapter/foundation.pEp.adapter.macOS-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VALID_ARCHS = x86_64;
};
name = Debug;
@ -340,6 +356,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
@ -349,6 +366,11 @@
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = pEpMacOSAdapter/Info.plist;
INSTALL_PATH = "/Library/Application Support/pEp";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/../Frameworks",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
MACOSX_DEPLOYMENT_TARGET = 10.10;
OTHER_LDFLAGS = "${inherited}";
@ -357,6 +379,8 @@
SDKROOT = macosx;
SKIP_INSTALL = NO;
SUPPORTED_PLATFORMS = macosx;
SWIFT_OBJC_BRIDGING_HEADER = "pEpMacOSAdapter/foundation.pEp.adapter.macOS-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VALID_ARCHS = x86_64;
};
name = Release;


+ 11
- 0
pEpMacOSAdapter/DummyToBrigeFoundationToSwift.swift View File

@ -0,0 +1,11 @@
//
// DummyToBrigeFoundationToSwift.swift
// foundation.pEp.adapter.macOS
//
// Created by Andreas Buff on 07.04.21.
// Copyright © 2021 pp foundation. All rights reserved.
//
/// We need this import to be able to bridge ObjC stuff of Foundation to Swift (e.g. to fix
/// "Undefined symbol: Foundation._convertNSErrorToError(__C.NSError?) -> Swift.Error")
import Foundation

+ 4
- 0
pEpMacOSAdapter/foundation.pEp.adapter.macOS-Bridging-Header.h View File

@ -0,0 +1,4 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//

Loading…
Cancel
Save