MaxAst / expo-share-extension

Expo config plugin for creating iOS share extensions with a custom view.
MIT License
161 stars 4 forks source link

Custom Background Color Not Working #35

Closed acopetkovic closed 3 weeks ago

acopetkovic commented 3 weeks ago

I can't get the custom background color set. Testing on iOS simulator with iOS 17. Also other custom settings are not working for me. Am I missing something?

"plugins": [ [ "expo-share-extension", { "backgroundColor": { "red": 255, "green": 255, "blue": 255, "alpha": 0 } } ] ]

MaxAst commented 3 weeks ago

alpha needs to be greater than 0 if you don't want it to be transparent

acopetkovic commented 3 weeks ago

I want the transparent background, that is the issue

MaxAst commented 3 weeks ago

I'd need more context to help you debug this, could you pls create a repro? Also, have you tried running the basic example in this repo? It uses a custom background and it's working there

acopetkovic commented 3 weeks ago

So basically I followed installation guide until this point:

I created ShareExtension.js and it's working fine, I can see my app in share options and ulr is being shared as it should. But when I try to edit my app.json to have transparent background of share extension screen, it fails to do so.

MaxAst commented 3 weeks ago

did you re-run prebuild after doing the change?

dtorras commented 3 weeks ago

@MaxAst I'm not able to reproduce the issue right now but that also happened to me. Rebuilding was not updating the native file (plist I think) with the background color property. When I manually updated that file matching the JS config, it worked correctly.

MaxAst commented 3 weeks ago

did you add the --clean flag to your prebuild command, like so expo prebuild --clean? I think if you don't add it, it could be that prebuild doesn't update Info.plist.

acopetkovic commented 3 weeks ago

@MaxAst expo prebuild --clean was the solution

MaxAst commented 3 weeks ago

perfect, will close the issue, let me know if you run into any other issues