From 24be5827cafa23c4e17d2080201a32baaa9e1720 Mon Sep 17 00:00:00 2001 From: Igor Litvinenko Date: Mon, 6 Jan 2025 12:04:07 +0100 Subject: [PATCH] fixed spm build --- example/ios/Runner.xcodeproj/project.pbxproj | 6 ++++++ example/ios/Runner/AirshipPluginExtender.swift | 7 ++++++- example/ios/Runner/AppDelegate.swift | 5 +++++ ios/airship_flutter/Package.swift | 2 +- .../Sources/airship_flutter/AirshipInboxMessageView.swift | 1 + 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index c3727bb2..04e6e99e 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -438,10 +438,16 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Airship/AirshipKit.framework", + "${BUILT_PRODUCTS_DIR}/AirshipFrameworkProxy/AirshipFrameworkProxy.framework", + "${BUILT_PRODUCTS_DIR}/airship_flutter/airship_flutter.framework", "${BUILT_PRODUCTS_DIR}/AirshipServiceExtension/AirshipServiceExtension.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AirshipKit.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AirshipFrameworkProxy.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/airship_flutter.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AirshipServiceExtension.framework", ); runOnlyForDeploymentPostprocessing = 0; diff --git a/example/ios/Runner/AirshipPluginExtender.swift b/example/ios/Runner/AirshipPluginExtender.swift index 00ea2c95..357d4ecc 100644 --- a/example/ios/Runner/AirshipPluginExtender.swift +++ b/example/ios/Runner/AirshipPluginExtender.swift @@ -1,10 +1,15 @@ /* Copyright Airship and Contributors */ import Foundation -import AirshipKit import AirshipFrameworkProxy import ActivityKit +#if canImport(AirshipCore) +import AirshipCore +#else +import AirshipKit +#endif + @objc(AirshipPluginExtender) public class AirshipPluginExtender: NSObject, AirshipPluginExtenderProtocol { diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift index 7039186a..e22c321b 100644 --- a/example/ios/Runner/AppDelegate.swift +++ b/example/ios/Runner/AppDelegate.swift @@ -2,7 +2,12 @@ import UIKit import Flutter + +#if canImport(AirshipCore) +import AirshipCore +#else import AirshipKit +#endif @main @objc class AppDelegate: FlutterAppDelegate { diff --git a/ios/airship_flutter/Package.swift b/ios/airship_flutter/Package.swift index 5743b17b..7771c988 100644 --- a/ios/airship_flutter/Package.swift +++ b/ios/airship_flutter/Package.swift @@ -10,7 +10,7 @@ let package = Package( .library( name: "airship-flutter", targets: ["airship_flutter"]) ], dependencies: [ - .package(url: "https://github.com/urbanairship/airship-mobile-framework-proxy.git", from: "11.2.1") + .package(url: "https://github.com/urbanairship/airship-mobile-framework-proxy.git", from: "11.2.2") ], targets: [ .target( diff --git a/ios/airship_flutter/Sources/airship_flutter/AirshipInboxMessageView.swift b/ios/airship_flutter/Sources/airship_flutter/AirshipInboxMessageView.swift index fec783d8..28cb4f8c 100644 --- a/ios/airship_flutter/Sources/airship_flutter/AirshipInboxMessageView.swift +++ b/ios/airship_flutter/Sources/airship_flutter/AirshipInboxMessageView.swift @@ -4,6 +4,7 @@ import Flutter #if canImport(AirshipCore) import AirshipCore +import AirshipMessageCenter #else import AirshipKit #endif