gitn00b1337 / expo-widgets

Bringing widget functionality to expo!
145 stars 12 forks source link

Hardcoded expo.modules.widgets.example #27

Closed zheorekhy closed 2 months ago

zheorekhy commented 2 months ago

I'm sorry but I have another issue. I've copied ios widget from example folder. My app.json has such configuration:

[
        "@bittingz/expo-widgets",
        {
          "ios": {
            "src": "./widgets/ios",
            "mode": "development",
            "moduleDependencies": [
              "MyData.swift",
              "LogHandler.swift"
            ],
            "xcode": {
              "configOverrides": {
                "SWIFT_VERSION": "5.0"
              }
            }
          }
        }
      ]

But I press on the button and I my widget doesn't receive a message. I have found in your module hardcoded id: let widgetSuite = UserDefaults(suiteName: "group.expo.modules.widgets.example.expowidgets")

Снимок экрана 2024-09-05 в 16 34 46

What to do?

My skype: oreshkin_life

zheorekhy commented 2 months ago

If I change my bundleIdentifier from "com.app.xxx" to "expo.modules.widgets.example" then it works as expected

gitn00b1337 commented 2 months ago

Please see the readme, you can provide your own module.swift and adjust the id as you wish.

zheorekhy commented 2 months ago

@gitn00b1337 I've reinstalled modules and now it works. It replaces the id in the module (ExpoWidgetsModule.swift) right after ios:prebuild command (I copied it from example). I don't understand what happens and what files actually are used.

Please see the readme, you can provide your own module.swift and adjust the id as you wish.

"src": "./widgets/ios", this?

What is your contact? Maybe I will need to request widget development from you tomorrow)

gitn00b1337 commented 2 months ago

Sure, Mike@ukzeroapp.com