Skip to content

Commit ebbb68a

Browse files
balaganesh-juspayJamesGeorg
authored andcommitted
Bug fix in package.swift
1 parent ab007be commit ebbb68a

File tree

6 files changed

+29
-1
lines changed

6 files changed

+29
-1
lines changed

Package.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ let package = Package(
1818
.package(name: "HyperCore", url: "https://github.com/juspay/hypercore-ios.git", .exact("0.1.3"))
1919
],
2020
targets: [
21+
// Single target that works with existing structure
2122
.target(
2223
name: "Airborne",
2324
dependencies: [
2425
"HyperCore"
2526
],
2627
path: "iOS/hyper-ota/Airborne/Classes",
27-
publicHeadersPath: ".",
28+
publicHeadersPath: ".", // Use current directory as public headers path
2829
cSettings: [
2930
.headerSearchPath("."),
3031
.headerSearchPath("ApplicationManager"),
@@ -35,6 +36,7 @@ let package = Package(
3536
.headerSearchPath("ApplicationManager/Constants"),
3637
.headerSearchPath("ApplicationManager/Resource"),
3738
.headerSearchPath("ApplicationManager/Tracker"),
39+
.define("SPM_BUILD", to: "1")
3840
]
3941
),
4042
]

iOS/hyper-ota/Airborne/Classes/ApplicationManager/AppManifest/HPJPApplicationManifest.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@
1010

1111
#import <Foundation/Foundation.h>
1212
#import <HyperCore/HPJPFileUtil.h>
13+
#ifdef SPM_BUILD
14+
#import "HPJPApplicationConfig.h"
15+
#import "HPJPApplicationPackage.h"
16+
#import "HPJPApplicationResources.h"
17+
#else
1318
#import <Airborne/HPJPApplicationConfig.h>
1419
#import <Airborne/HPJPApplicationPackage.h>
1520
#import <Airborne/HPJPApplicationResources.h>
21+
#endif
1622

1723
NS_ASSUME_NONNULL_BEGIN
1824

iOS/hyper-ota/Airborne/Classes/ApplicationManager/AppPackage/HPJPApplicationPackage.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77

88
#import <Foundation/Foundation.h>
99
#import <HyperCore/HPJPFileUtil.h>
10+
#ifdef SPM_BUILD
11+
#import "HPJPResource.h"
12+
#else
1013
#import <Airborne/HPJPResource.h>
14+
#endif
15+
1116

1217
NS_ASSUME_NONNULL_BEGIN
1318

iOS/hyper-ota/Airborne/Classes/ApplicationManager/AppResources/HPJPApplicationResources.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77

88
#import <Foundation/Foundation.h>
99
#import <HyperCore/HPJPFileUtil.h>
10+
#ifdef SPM_BUILD
11+
#import "HPJPResource.h"
12+
#else
1013
#import <Airborne/HPJPResource.h>
14+
#endif
1115

1216
NS_ASSUME_NONNULL_BEGIN
1317

iOS/hyper-ota/Airborne/Classes/ApplicationManager/HPJPApplicationManager.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@
1010

1111
#import <WebKit/WKWebView.h>
1212
#import <HyperCore/HPJPLoggerDelegate.h>
13+
14+
#ifdef SPM_BUILD
15+
#import "HPJPApplicationManifest.h"
16+
#import "HPJPApplicationManagerDelegate.h"
17+
#else
1318
#import <Airborne/HPJPApplicationManifest.h>
1419
#import <Airborne/HPJPApplicationManagerDelegate.h>
20+
#endif
21+
1522

1623
@class HPJPSessionManager;
1724

iOS/hyper-ota/Airborne/Classes/ApplicationManager/HPJPApplicationManagerDelegate.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
#ifndef HPJPApplicationManagerDelegate_h
99
#define HPJPApplicationManagerDelegate_h
1010

11+
#ifdef SPM_BUILD
12+
#import "HPJPApplicationManifest.h"
13+
#else
1114
#import <Airborne/HPJPApplicationManifest.h>
15+
#endif
1216

1317
/**
1418
* Protocol defining the interface for application manager delegates responsible for

0 commit comments

Comments
 (0)