Open st4l1nR opened 8 months ago
Hi,
Have you configured
moduleDependencies: [],
in the settings (see readme). If so, please can you provide a minimal reproduction project and I'll reopen the issue. Thanks
Yes , i tried specifying in the moduleDependencies the file, but it didn't work so the solution was when i created my widget on xcode i uncheck the "Include Configuration FIle" box
I guess it's because the plugin only add .swift
files to xcode, to make editable widgets we need .intentdefinition
files to be added to Xcode too. Adding to module dependencies only copy the file to folder. Maybe a config option describe non-swift extensions to be added would solve a part of this @gitn00b1337
addFile(file: string) {
const extension = path.extname(file).substring(1)
if (file === "Module.swift") {
return;
}
else if (this._files.hasOwnProperty(extension)) {
Logging.logger.debug(`Adding file ${file}...`)
Logging.logger.debug(`Extension: ${extension}`)
this._files[extension].push(file)
}
}
I'm also trying make it work and having the same ConfigurationIntent
problems as you @st4l1nR did you solve it by any chance?
I'll take a look when I can. It would be great if someone can create an example project I can pull + fix.
Hello , I'm making my widget and it's running fine in xcode but when i tried to build the ios build whit expo it show the next errors `❌ (ios/flowwyWidgetExtension/RecordThought.swift:17:41)
15 | } 16 |
❌ (ios/flowwyWidgetExtension/RecordThought.swift:22:41)
20 | } 21 |
❌ (ios/flowwyWidgetExtension/RecordThought.swift:12:8)
10 | import Intents 11 |
❌ (ios/flowwyWidgetExtension/RecordThought.swift:40:24)
38 | struct SimpleEntry: TimelineEntry { 39 | let date: Date
❌ (ios/flowwyWidgetExtension/RecordThought.swift:14:50)
12 | struct Provider: IntentTimelineProvider { 13 | func placeholder(in context: Context) -> SimpleEntry {
❌ (ios/flowwyWidgetExtension/RecordThought.swift:70:49)
68 | 69 | var body: some WidgetConfiguration {
❌ (ios/flowwyWidgetExtension/RecordThought.swift:81:80)
79 | struct RecordThought_Previews: PreviewProvider { 80 | static var previews: some View {
I attach my folder structure below and the code of my widget, it appears that the "import Intents" statement it's not importing anything cause the "RecordThought.intentdefinition" it's not being recognizable
` import WidgetKit import SwiftUI import Intents
struct Provider: IntentTimelineProvider { func placeholder(in context: Context) -> SimpleEntry { SimpleEntry(date: Date(), configuration: ConfigurationIntent()) }
}
struct SimpleEntry: TimelineEntry { let date: Date let configuration: ConfigurationIntent }
struct RecordThoughtEntryView : View { var entry: Provider.Entry
struct RecordThought: Widget { let kind: String = "RecordThought"
}
struct RecordThought_Previews: PreviewProvider { static var previews: some View { RecordThoughtEntryView(entry: SimpleEntry(date: Date(), configuration: ConfigurationIntent())) .previewContext(WidgetPreviewContext(family: .accessoryCircular)).previewDisplayName("Circular") } }`