DioxusLabs / DioxusLabs/dioxus

Current `[[ios.widget_extensions]]` in Dioxus.toml only supports WidgetKit/SwiftUI extensions. Allow different extensions.

Open
#5,478 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

## Feature Request

Currently we have a feature to add custom widget extensions on iOS with the `ios.widget_extensions` setting in Dioxus.toml however this would be better if it had general support for all iOS extensions. So we could use things such as `BADownloaderExtension` or other extensions.

## Implement Suggestion

We could update the schema so that you can specify the `frameworks` and `extension_point` so that you can customize the extensions compilation. We can rename the schema to be `ios.app_extensions`. Then just update the framework linking to loop over the requested frameworks and update the plist to be set by the extension point.

Most of the code to do all this is already there it's just allowing this to be customized. We can make it backwards compatible to where it defaults to widget extension if you don't specify the frameworks and extension_point if we want?

```toml
# Dioxus.toml
[[ios.app_extensions]]
source = "extensions/BackgroundAssetDownloader"
display_name = "Background Downloader"
bundle_id_suffix = "background-downloader"
extension_point = "com.apple.background-asset-download"
frameworks = ["BackgroundAssets", "Foundation"]
```

I can also create a pull request for this as I have modified and updated the code for this to work correctly. What are your thoughts on this? I have a commit for this code you can view: [`d7cbff1`](https://github.com/voxelbee/dioxus/commit/d7cbff1ca59111569d8b7c70665aaecb0af5c013)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.