mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-11-01 18:19:43 +00:00
feat: add live draw feature and clean up docs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
520d0a8444
commit
4c18afaeae
63 files changed
+6728
-12854
No files matched your search
@@ -0,0 +1,15 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'WidgetBridge'
|
||||
s.version = '0.0.1'
|
||||
s.summary = 'Bridge for writing widget data to shared storage'
|
||||
s.description = 'Expo module for writing to UserDefaults/SharedPreferences and reloading widgets'
|
||||
s.author = ''
|
||||
s.homepage = 'https://github.com/example'
|
||||
s.platforms = { :ios => '15.1' }
|
||||
s.source = { git: '' }
|
||||
s.static_framework = true
|
||||
|
||||
s.dependency 'ExpoModulesCore'
|
||||
|
||||
s.source_files = '**/*.{h,m,mm,swift,hpp,cpp}'
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
import ExpoModulesCore
|
||||
import WidgetKit
|
||||
|
||||
public class WidgetBridgeModule: Module {
|
||||
public func definition() -> ModuleDefinition {
|
||||
Name("WidgetBridge")
|
||||
|
||||
Function("setWidgetData") { (key: String, value: String) in
|
||||
let suite = UserDefaults(suiteName: "group.com.sauci.app")
|
||||
suite?.set(value, forKey: key)
|
||||
}
|
||||
|
||||
Function("reloadWidgets") {
|
||||
if #available(iOS 14.0, *) {
|
||||
WidgetCenter.shared.reloadAllTimelines()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user