forked from SAP/cloud-sdk-ios-fiori
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
305 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// swift-tools-version:5.9 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "FioriSwiftUI", | ||
defaultLocalization: "en", | ||
platforms: [.iOS(.v16), .watchOS(.v7), .visionOS(.v1)], | ||
products: [ | ||
.library( | ||
name: "FioriSwiftUI", | ||
type: .dynamic, | ||
targets: ["FioriSwiftUI"] | ||
), | ||
.library( | ||
name: "FioriCharts", | ||
type: .dynamic, | ||
targets: ["FioriCharts"] | ||
), | ||
.library( | ||
name: "FioriThemeManager", | ||
type: .dynamic, | ||
targets: ["FioriThemeManager"] | ||
) | ||
], | ||
dependencies: [ | ||
// Dependencies declare other packages that this package depends on. | ||
], | ||
targets: [ | ||
.target( | ||
name: "FioriSwiftUI", | ||
dependencies: [.target(name: "FioriSwiftUICore", condition: .when(platforms: [.iOS, .visionOS]))] | ||
), | ||
.target( | ||
name: "FioriCharts", | ||
dependencies: ["FioriThemeManager"], | ||
exclude: ["TestCases/SF_EnergyBenchmarking.csv"] | ||
), | ||
.target( | ||
name: "FioriSwiftUICore", | ||
dependencies: [ | ||
.target(name: "FioriThemeManager", condition: .when(platforms: [.iOS, .visionOS])), | ||
.target(name: "FioriCharts", condition: .when(platforms: [.iOS, .visionOS])) | ||
], | ||
resources: [.process("FioriSwiftUICore.strings")] | ||
), | ||
.target( | ||
name: "FioriThemeManager", | ||
dependencies: [], | ||
resources: [ | ||
.process("72-Fonts/Resources"), | ||
.process("FioriIcons/Resources/FioriIcon.xcassets") | ||
] | ||
), | ||
.testTarget( | ||
name: "FioriThemeManagerTests", | ||
dependencies: ["FioriThemeManager"], | ||
path: "Tests/FioriSwiftUITests/FioriThemeManager", | ||
resources: [ | ||
.process("TestResources") | ||
] | ||
), | ||
.testTarget( | ||
name: "FioriChartsTests", | ||
dependencies: ["FioriCharts"], | ||
path: "Tests/FioriSwiftUITests/FioriCharts" | ||
), | ||
.testTarget( | ||
name: "FioriSwiftUICoreTests", | ||
dependencies: ["FioriSwiftUICore"], | ||
path: "Tests/FioriSwiftUITests/FioriSwiftUICore" | ||
) | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Foundation | ||
import UIKit | ||
|
||
struct Screen { | ||
private init() {} | ||
|
||
static var scale: CGFloat { | ||
#if os(visionOS) | ||
1.0 | ||
#else | ||
UIScreen.main.scale | ||
#endif | ||
} | ||
|
||
static var bounds: CGRect { | ||
#if os(visionOS) | ||
CGRect(x: 0, y: 0, width: 1280, height: 720) // default window size for visionOS | ||
#else | ||
UIScreen.main.bounds | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.