Skip to content

Commit

Permalink
AirshipWrapper -> AirshipObjectiveC (#3338)
Browse files Browse the repository at this point in the history
* AirshipWrapper -> AirshipObjectiveC

* Updates
  • Loading branch information
rlepinski authored Jan 9, 2025
1 parent 1eb0c12 commit eb9e175
Show file tree
Hide file tree
Showing 45 changed files with 820 additions and 573 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
6E0031862D03C5890004F53E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6E524D072C25FA51002CA094 /* Airship.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = A641E1472BDBBDB400DE6FAA;
remoteInfo = AirshipWrapper;
};
6E524D1D2C25FA51002CA094 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6E524D072C25FA51002CA094 /* Airship.xcodeproj */;
Expand Down Expand Up @@ -219,7 +212,6 @@
6E524D3A2C25FA51002CA094 /* AirshipFeatureFlags.framework */,
6E524D2E2C25FA51002CA094 /* AirshipMessageCenter.framework */,
6E524D302C25FA51002CA094 /* AirshipPreferenceCenter.framework */,
6E0031872D03C5890004F53E /* AirshipWrapper.framework */,
6E524D2C2C25FA51002CA094 /* AirshipDebug.framework */,
6E524D2A2C25FA51002CA094 /* AirshipTests.xctest */,
6E524D382C25FA51002CA094 /* AirshipAutomationTests.xctest */,
Expand Down Expand Up @@ -351,13 +343,6 @@
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
6E0031872D03C5890004F53E /* AirshipWrapper.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = AirshipWrapper.framework;
remoteRef = 6E0031862D03C5890004F53E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
6E524D1E2C25FA51002CA094 /* AirshipBasement.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
Expand Down
13 changes: 3 additions & 10 deletions Airship Sample/Airship Sample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,6 @@
remoteGlobalIDString = 6E0B8731294A9C130064B7BD;
remoteInfo = AirshipAutomationSwiftTests;
};
A63380802C6622CE00343F69 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6E65D56A2396E99D00AF2D1A /* Airship.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = A641E1472BDBBDB400DE6FAA;
remoteInfo = AirshipWrapper;
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -448,7 +441,7 @@
6E2F5AA82A67330900CABD3D /* AirshipFeatureFlags.framework */,
6E65D5882396E99D00AF2D1A /* AirshipMessageCenter.framework */,
6EAD7CDF26B2003700B88EA7 /* AirshipPreferenceCenter.framework */,
A63380812C6622CE00343F69 /* AirshipWrapper.framework */,
A63380812C6622CE00343F69 /* AirshipObjectiveC.framework */,
6E65D5842396E99D00AF2D1A /* AirshipDebug.framework */,
6E65D5802396E99D00AF2D1A /* AirshipTests.xctest */,
84A565732A3D01A100F3A345 /* AirshipAutomationTests.xctest */,
Expand Down Expand Up @@ -831,10 +824,10 @@
remoteRef = 84A565722A3D01A100F3A345 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
A63380812C6622CE00343F69 /* AirshipWrapper.framework */ = {
A63380812C6622CE00343F69 /* AirshipObjectiveC.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = AirshipWrapper.framework;
path = AirshipObjectiveC.framework;
remoteRef = A63380802C6622CE00343F69 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
Expand Down
10 changes: 10 additions & 0 deletions Airship.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,14 @@ Pod::Spec.new do |s|
airshipFeatureFlags.ios.exclude_files = "Airship/AirshipFeatureFlags/Source/AirshipFeatureFlags.h"
airshipFeatureFlags.dependency "Airship/Core"
end

s.subspec "ObjectiveC" do |objectiveC|
objectiveC.ios.source_files = "Airship/AirshipObjectiveC/Source/**/*.{h,m,swift}"
objectiveC.ios.exclude_files = "Airship/AirshipObjectiveC/Source/AirshipObjectiveC.h"
objectiveC.dependency "Airship/Core"
objectiveC.dependency "Airship/Automation"
objectiveC.dependency "Airship/MessageCenter"
objectiveC.dependency "Airship/PreferenceCenter"
objectiveC.dependency "Airship/FeatureFlags"
end
end
286 changes: 49 additions & 237 deletions Airship/Airship.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A641E1462BDBBDB400DE6FAA"
BuildableName = "AirshipObjectiveC.framework"
BlueprintName = "AirshipObjectiveC"
ReferencedContainer = "container:Airship.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</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">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A641E1462BDBBDB400DE6FAA"
BuildableName = "AirshipObjectiveC.framework"
BlueprintName = "AirshipObjectiveC"
ReferencedContainer = "container:Airship.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
9 changes: 9 additions & 0 deletions Airship/AirshipObjectiveC/Source/AirshipObjectiveC.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* Copyright Airship and Contributors */

#import <Foundation/Foundation.h>

//! Project version number for AirshipObjectiveC.
FOUNDATION_EXPORT double AirshipObjectiveCVersionNumber;

//! Project version string for AirshipObjCBindings.
FOUNDATION_EXPORT const unsigned char AirshipObjectiveCVersionString[];
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipCore
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipCore
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipCore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipCore
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipCore
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipCore
#endif

@objc
public class UAAnalytics: NSObject {
public final class UAAnalytics: NSObject, Sendable {

/// The current session ID.
@objc
Expand All @@ -28,11 +29,4 @@ public class UAAnalytics: NSObject {
public func recordCustomEvent(_ event: UACustomEvent) {
Airship.analytics.recordCustomEvent(event.customEvent)
}

@objc
public func recordRegionEvent(_ event: UARegionEvent) {
if let regionEvent = event.regionEvent {
Airship.analytics.recordRegionEvent(regionEvent)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation
#if canImport(AirshipCore)
import AirshipCore

#endif

@objc
public class UAAttributesEditor: NSObject {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* Copyright Airship and Contributors */

import Foundation
public import AirshipCore

public import Foundation
#if canImport(AirshipCore)
import AirshipCore
#endif

@objc
public class UAChannel: NSObject {
public final class UAChannel: NSObject, Sendable {

@objc
public func editTags() -> UATagEditor? {
let tagEditor = UATagEditor()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/* Copyright Airship and Contributors */

import Foundation
import AirshipCore
public import Foundation

#if canImport(AirshipCore)
import AirshipCore
#endif

@objc
public class UATagEditor: NSObject {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipCore
#endif


@objc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipCore
#endif

@objc
public class UAAirshipContact: NSObject {
public final class UAContact: NSObject, Sendable {

/// Identifies the contact.
/// - Parameter namedUserID: The named user ID.
@objc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipMessageCenter
import AirshipCore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipMessageCenter
import AirshipCore
#endif
import Combine

/// Message center inbox.
@objc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipMessageCenter
import AirshipCore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipMessageCenter
import AirshipCore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation

#if canImport(AirshipCore)
import AirshipCore
import AirshipPreferenceCenter
Expand Down Expand Up @@ -33,12 +34,11 @@ final class UAPreferenceCenterOpenDelegateWrapper: NSObject, PreferenceCenterOpe
}

@objc
public class UAPreferenceCenter: NSObject {
public final class UAPreferenceCenter: NSObject, Sendable {

@MainActor
private let storage = Storage()


/**
* Open delegate.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/* Copyright Airship and Contributors */

import Foundation
public import Foundation
#if canImport(AirshipCore)
import AirshipCore
#endif

// Bindings for `AirshipPrivacyManager`
@objc
public final class UAPrivacyManager: NSObject, Sendable {

Expand Down Expand Up @@ -39,7 +38,7 @@ public final class UAPrivacyManager: NSObject, Sendable {
/**
* Checks if a given feature is enabled.
*
* - Parameter feature: The features to check.
* - Parameter features: The features to check.
* - Returns: True if the provided features are enabled, otherwise false.
*/
@objc(isEnabled:)
Expand Down
Loading

0 comments on commit eb9e175

Please sign in to comment.