diff --git a/project_frameworks.yml b/project_frameworks.yml index d4c52eec8..497d63c94 100644 --- a/project_frameworks.yml +++ b/project_frameworks.yml @@ -181,6 +181,7 @@ include: - Modules/RuuviDiscover/target.yml - Modules/RuuviLocationPicker/target.yml - Modules/RuuviOnboard/target.yml +- widget_frameworks.yml targets: station: @@ -188,7 +189,11 @@ targets: platform: iOS sources: - path: station + - path: ruuvi_widgets.entitlements + - path: station_intents.entitlements + - path: pnservice.entitlements dependencies: + - target: "station.widgets" - package: BTKit - package: Charts - package: GRDB @@ -201,6 +206,7 @@ targets: product: FirebaseMessaging - package: Firebase product: FirebaseRemoteConfig + - package: KeychainAccess - package: Humidity - package: Future - package: Realm @@ -266,4 +272,10 @@ targets: MERGED_BINARY_TYPE: "manual" TARGETED_DEVICE_FAMILY: 1,2 SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD: true - CODE_SIGN_ENTITLEMENTS: station/station.entitlements \ No newline at end of file + CODE_SIGN_ENTITLEMENTS: station/station.entitlements + +schemes: + station: + build: + targets: + station: all \ No newline at end of file diff --git a/project_spm.yml b/project_spm.yml index f3a2cb3b3..220fad1a0 100644 --- a/project_spm.yml +++ b/project_spm.yml @@ -41,6 +41,24 @@ packages: GestureInstructions: url: https://github.com/rinat-enikeev/GestureInstructions from: 0.0.2 + KeychainAccess: + url: https://github.com/kishikawakatsumi/KeychainAccess + from: 4.2.1 + Realm: + url: https://github.com/realm/realm-cocoa + from: 10.8.0 + GRDB: + url: https://github.com/groue/GRDB.swift + from: 4.14.0 + Humidity: + url: https://github.com/rinat-enikeev/Humidity + from: 0.1.5 + Future: + url: https://github.com/kean/Future + from: 1.3.0 + NordicDFU: + url: https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library + from: 4.10.3 RuuviAnalytics: path: Packages/RuuviAnalytics RuuviCloud: @@ -90,13 +108,20 @@ packages: RuuviOnboard: path: Modules/RuuviOnboard +include: +- widget_spm.yml + targets: station: type: application platform: iOS sources: - path: station + - path: ruuvi_widgets.entitlements + - path: station_intents.entitlements + - path: pnservice.entitlements dependencies: + - target: "station.widgets" - package: BTKit - package: Charts - package: LightRoute @@ -107,6 +132,11 @@ targets: product: FirebaseMessaging - package: Firebase product: FirebaseRemoteConfig + - package: KeychainAccess + - package: Realm + - package: Realm + product: RealmSwift + - package: NordicDFU - package: RuuviAnalytics - package: RuuviAnalytics product: RuuviAnalyticsImpl @@ -237,4 +267,10 @@ targets: base: TARGETED_DEVICE_FAMILY: 1,2 SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD: true - CODE_SIGN_ENTITLEMENTS: station/station.entitlements \ No newline at end of file + CODE_SIGN_ENTITLEMENTS: station/station.entitlements + +schemes: + station: + build: + targets: + station: all \ No newline at end of file diff --git a/ruuvi-widgets/Assembly/WidgetAssembly.swift b/ruuvi-widgets/Assembly/WidgetAssembly.swift index e12908f1f..036fec8d1 100644 --- a/ruuvi-widgets/Assembly/WidgetAssembly.swift +++ b/ruuvi-widgets/Assembly/WidgetAssembly.swift @@ -1,6 +1,13 @@ +import Foundation import Swinject import RuuviCloud import RuuviUser +#if canImport(RuuviCloudPure) +import RuuviCloudPure +#endif +#if canImport(RuuviUserCoordinator) +import RuuviUserCoordinator +#endif final class WidgetAssembly { static let shared = WidgetAssembly() diff --git a/ruuvi-widgets/Info.plist b/ruuvi-widgets/Info.plist index ae0a6e076..df44555c2 100644 --- a/ruuvi-widgets/Info.plist +++ b/ruuvi-widgets/Info.plist @@ -2,11 +2,31 @@ + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Ruuvi Station + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleVersion + $(CURRENT_PROJECT_VERSION) NSExtension NSExtensionPointIdentifier com.apple.widgetkit-extension + NSHumanReadableCopyright + Copyright © 2023 Ruuvi Innovations Oy. All rights reserved. UIAppFonts Oswald-Bold.ttf diff --git a/widget_frameworks.yml b/widget_frameworks.yml new file mode 100644 index 000000000..11d0db815 --- /dev/null +++ b/widget_frameworks.yml @@ -0,0 +1,45 @@ +targets: + station.widgets: + type: app-extension + platform: iOS + info: + path: ruuvi-widgets/Info.plist + properties: + NSExtension: + NSExtensionPointIdentifier: com.apple.widgetkit-extension + UIAppFonts: [Oswald-Bold.ttf,Oswald-ExtraLight.ttf,Muli-Regular.ttf,Muli-Bold.ttf,Montserrat-Bold.ttf,Montserrat-Regular.ttf] + CFBundleDisplayName: Ruuvi Station + CFBundlePackageType: $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString: $(MARKETING_VERSION) + CFBundleVersion: $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright: Copyright © 2023 Ruuvi Innovations Oy. All rights reserved. + settings: + base: + CODE_SIGN_ENTITLEMENTS: ruuvi_widgets.entitlements + sources: + - path: ruuvi-widgets + - path: station/Resources/Strings/ + dependencies: + - package: Swinject + - package: BTKit + - package: Future + - package: GRDB + - package: Humidity + - package: Realm + - package: KeychainAccess + - package: Realm + product: RealmSwift + - target: RuuviUser + embed: true + - target: RuuviCloud + embed: true + - target: RuuviOntology + embed: true + - target: RuuviPool + embed: true + - target: RuuviLocal + embed: true + - target: RuuviPersistence + embed: true + - target: RuuviContext + embed: true \ No newline at end of file diff --git a/widget_spm.yml b/widget_spm.yml new file mode 100644 index 000000000..da11337dc --- /dev/null +++ b/widget_spm.yml @@ -0,0 +1,44 @@ +targets: + station.widgets: + type: app-extension + platform: iOS + info: + path: ruuvi-widgets/Info.plist + properties: + NSExtension: + NSExtensionPointIdentifier: com.apple.widgetkit-extension + UIAppFonts: [Oswald-Bold.ttf,Oswald-ExtraLight.ttf,Muli-Regular.ttf,Muli-Bold.ttf,Montserrat-Bold.ttf,Montserrat-Regular.ttf] + CFBundleDisplayName: Ruuvi Station + CFBundlePackageType: $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString: $(MARKETING_VERSION) + CFBundleVersion: $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright: Copyright © 2023 Ruuvi Innovations Oy. All rights reserved. + settings: + base: + CODE_SIGN_ENTITLEMENTS: ruuvi_widgets.entitlements + sources: + - path: ruuvi-widgets + - path: station/Resources/Strings/ + dependencies: + - package: Swinject + - package: BTKit + - package: Future + - package: GRDB + - package: Humidity + - package: Realm + - package: KeychainAccess + - package: Realm + product: RealmSwift + - package: RuuviUser + - package: RuuviUser + product: RuuviUserCoordinator + - package: RuuviCloud + - package: RuuviCloud + product: RuuviCloudPure + - package: RuuviCloud + product: RuuviCloudApi + - package: RuuviOntology + - package: RuuviPool + - package: RuuviLocal + - package: RuuviPersistence + - package: RuuviContext \ No newline at end of file