Skip to content

Commit

Permalink
RUMM-671 import Foundation added to DDObjC sources
Browse files Browse the repository at this point in the history
SPM Dep Manager test now imports DDObjC instead of DD
DDObjC links DD statically so it contains DD inside
  • Loading branch information
buranmert committed Aug 13, 2020
1 parent 0c6a12a commit 896fa0a
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 7 deletions.
1 change: 1 addition & 0 deletions Sources/DatadogObjc/OpenTracing/OTGlobal+objc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright 2019-2020 Datadog, Inc.
*/

import Foundation
import Datadog

@objcMembers
Expand Down
2 changes: 2 additions & 0 deletions Sources/DatadogObjc/OpenTracing/OTNoop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Copyright 2019-2020 Datadog, Inc.
*/

import Foundation

internal let noopTracer: OTTracer = DDNoopTracer()
internal let noopSpan: OTSpan = DDNoopSpan()
internal let noopSpanContext: OTSpanContext = DDNoopSpanContext()
Expand Down
2 changes: 2 additions & 0 deletions Sources/DatadogObjc/OpenTracing/OTSpan+objc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Copyright 2019-2020 Datadog, Inc.
*/

import Foundation

@objc
/// Corresponds to: https://github.com/opentracing/opentracing-objc/blob/master/Pod/Classes/OTSpan.h
public protocol OTSpan {
Expand Down
2 changes: 2 additions & 0 deletions Sources/DatadogObjc/OpenTracing/OTSpanContext+objc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Copyright 2019-2020 Datadog, Inc.
*/

import Foundation

@objc
/// Corresponds to: https://github.com/opentracing/opentracing-objc/blob/master/Pod/Classes/OTSpanContext.h
public protocol OTSpanContext {
Expand Down
1 change: 1 addition & 0 deletions Sources/DatadogObjc/OpenTracing/OTTracer+objc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright 2019-2020 Datadog, Inc.
*/

import Foundation
public let OTFormatHTTPHeaders = "OTFormatHTTPHeaders"

@objc
Expand Down
1 change: 1 addition & 0 deletions Sources/DatadogObjc/Tracer+objc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright 2019-2020 Datadog, Inc.
*/

import Foundation
import class Datadog.Tracer
import protocol Datadog.OTTracer
import struct Datadog.OTReference
Expand Down
1 change: 1 addition & 0 deletions Sources/DatadogObjc/TracerConfiguration+objc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright 2019-2020 Datadog, Inc.
*/

import Foundation
import Datadog

@objcMembers
Expand Down
1 change: 1 addition & 0 deletions Sources/DatadogObjc/Tracing/DDSpan+objc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright 2019-2020 Datadog, Inc.
*/

import Foundation
import protocol Datadog.OTSpan

internal class DDSpanObjc: NSObject, DatadogObjc.OTSpan {
Expand Down
1 change: 1 addition & 0 deletions Sources/DatadogObjc/Tracing/DDSpanContext+objc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright 2019-2020 Datadog, Inc.
*/

import Foundation
import protocol Datadog.OTSpanContext

internal class DDSpanContextObjc: NSObject, OTSpanContext {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright 2019-2020 Datadog, Inc.
*/

import Foundation
import class Datadog.HTTPHeadersWriter

@objcMembers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
61C363E624374D6000C4D4E6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 61C363E424374D6000C4D4E6 /* LaunchScreen.storyboard */; };
61C363F124374D6100C4D4E6 /* SPMProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C363F024374D6100C4D4E6 /* SPMProjectTests.swift */; };
61C363FC24374D6100C4D4E6 /* SPMProjectUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C363FB24374D6100C4D4E6 /* SPMProjectUITests.swift */; };
61C3640B24374DF200C4D4E6 /* Datadog in Frameworks */ = {isa = PBXBuildFile; productRef = 61C3640A24374DF200C4D4E6 /* Datadog */; };
9E1F996A244DDABE00BD10FC /* Datadog in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 61C3640A24374DF200C4D4E6 /* Datadog */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
9EC32C6224E596C20063BCCE /* DatadogObjc in Frameworks */ = {isa = PBXBuildFile; productRef = 9EC32C6124E596C20063BCCE /* DatadogObjc */; };
9EC32C6324E596C20063BCCE /* DatadogObjc in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 9EC32C6124E596C20063BCCE /* DatadogObjc */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -42,7 +42,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
9E1F996A244DDABE00BD10FC /* Datadog in Embed Frameworks */,
9EC32C6324E596C20063BCCE /* DatadogObjc in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -72,7 +72,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
61C3640B24374DF200C4D4E6 /* Datadog in Frameworks */,
9EC32C6224E596C20063BCCE /* DatadogObjc in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -101,6 +101,7 @@
61C363EF24374D6100C4D4E6 /* SPMProjectTests */,
61C363FA24374D6100C4D4E6 /* SPMProjectUITests */,
61C363D724374D5F00C4D4E6 /* Products */,
9EC32C6024E596C20063BCCE /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -155,6 +156,13 @@
path = ../../xcconfigs;
sourceTree = "<group>";
};
9EC32C6024E596C20063BCCE /* Frameworks */ = {
isa = PBXGroup;
children = (
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand All @@ -174,7 +182,7 @@
);
name = SPMProject;
packageProductDependencies = (
61C3640A24374DF200C4D4E6 /* Datadog */,
9EC32C6124E596C20063BCCE /* DatadogObjc */,
);
productName = SPMProject;
productReference = 61C363D624374D5F00C4D4E6 /* SPMProject.app */;
Expand Down Expand Up @@ -653,10 +661,10 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
61C3640A24374DF200C4D4E6 /* Datadog */ = {
9EC32C6124E596C20063BCCE /* DatadogObjc */ = {
isa = XCSwiftPackageProductDependency;
package = 61C3640924374DF200C4D4E6 /* XCRemoteSwiftPackageReference "dd-sdk-ios" */;
productName = Datadog;
productName = DatadogObjc;
};
/* End XCSwiftPackageProductDependency section */
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import UIKit
import Datadog
import DatadogObjc

internal class ViewController: UIViewController {
private var logger: Logger! // swiftlint:disable:this implicitly_unwrapped_optional
Expand Down

0 comments on commit 896fa0a

Please sign in to comment.