Skip to content

Commit

Permalink
Xcodegen for Widget target (#1728)
Browse files Browse the repository at this point in the history
* Xcodegen for Widget target
Implements xcodeproj gen for Widget

* fixes for widget

* attempt to fix widgets

* add i18n to widget
  • Loading branch information
rinat-enikeev authored Nov 25, 2023
1 parent 4a04a8a commit 287ab8d
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 2 deletions.
14 changes: 13 additions & 1 deletion project_frameworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,19 @@ include:
- Modules/RuuviDiscover/target.yml
- Modules/RuuviLocationPicker/target.yml
- Modules/RuuviOnboard/target.yml
- widget_frameworks.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: GRDB
Expand All @@ -201,6 +206,7 @@ targets:
product: FirebaseMessaging
- package: Firebase
product: FirebaseRemoteConfig
- package: KeychainAccess
- package: Humidity
- package: Future
- package: Realm
Expand Down Expand Up @@ -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
CODE_SIGN_ENTITLEMENTS: station/station.entitlements

schemes:
station:
build:
targets:
station: all
38 changes: 37 additions & 1 deletion project_spm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -237,4 +267,10 @@ targets:
base:
TARGETED_DEVICE_FAMILY: 1,2
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD: true
CODE_SIGN_ENTITLEMENTS: station/station.entitlements
CODE_SIGN_ENTITLEMENTS: station/station.entitlements

schemes:
station:
build:
targets:
station: all
7 changes: 7 additions & 0 deletions ruuvi-widgets/Assembly/WidgetAssembly.swift
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
20 changes: 20 additions & 0 deletions ruuvi-widgets/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,31 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Ruuvi Station</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.widgetkit-extension</string>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2023 Ruuvi Innovations Oy. All rights reserved.</string>
<key>UIAppFonts</key>
<array>
<string>Oswald-Bold.ttf</string>
Expand Down
45 changes: 45 additions & 0 deletions widget_frameworks.yml
Original file line number Diff line number Diff line change
@@ -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
44 changes: 44 additions & 0 deletions widget_spm.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 287ab8d

Please sign in to comment.