react-native-voip-push-notification icon indicating copy to clipboard operation
react-native-voip-push-notification copied to clipboard

Implemented expo plugin

Open jexodusmercado opened this issue 1 year ago • 8 comments

Added expo plugin to modify AppDelegate with development builds

Note: I haven't included any test to check the generated AppDelegate. Currently works with my setup. Let me know if you have encountered any issues

jexodusmercado avatar May 14 '24 19:05 jexodusmercado

God bless.

ruslanjabari avatar May 23 '24 20:05 ruslanjabari

@jexodusmercado

issue: when updating the callerName via RN, the underlying callerName still retains "Connecting..."

This happens because of this line: NSString *callerName = [NSString stringWithFormat:@"%@ (Connecting...)", payload.dictionaryPayload[@"callerName"]];"

ruslanjabari avatar Jun 03 '24 18:06 ruslanjabari

Hey guys, LOVE this, its badly needed.

Suggestion: the 'video' property (YES or NO) should be based on the payload (like UUID, Handle etc). Otherwise there's no way to initiate a video call (which is important as it opens the app straight away once the call is accepted, and also appears in the call description)

And on that note, I think all properties should be configurable from payload, and have defaults (if not provided in the payload). I spent a lot of time working out why the app was crashing due to hard coded expectation of variables in the payload.

For example, handle could be 'Unknown caller' if no handle property is in the data dictionary. Video could default to YES.

wilkinsonj avatar Jul 04 '24 14:07 wilkinsonj

yes please

ice-cap0 avatar Aug 12 '24 02:08 ice-cap0

@ianlin Can we get this on a track for merging soon?

AlanGreyjoy avatar Aug 17 '24 03:08 AlanGreyjoy

@zxcpoiu can you check and merge this if applicable? Thanks!

jexodusmercado avatar Sep 11 '24 16:09 jexodusmercado

what's the hold up?

southkeys avatar Sep 27 '24 23:09 southkeys

Hi @jexodusmercado thanks for the work, and the late respond.

I'm not using expo, so not familiar the plugin structure and magics.

There is another expo support PR discussion at https://github.com/react-native-webrtc/react-native-webrtc/pull/1013 and https://github.com/react-native-webrtc/react-native-webrtc/pull/1014 which uses Expo Config Plugin.

At a glance I have few points as follow:

  1. I don't have enough knowledge and time to maintain expo version compatibility from time to time
  2. Not every one use expo, and this add unnecessary dependencies for non-expo users
  3. The PR seems to duplicate the whole appDelegate code into the expo plugin file, does it mean we have to change more than one file when modifying appDelegate related code?

Wouldn't it better to create another repo like: react-native-voip-push-notification-expo? The new repo can add this repo as dependency and just add the expo specific customization, like: read and inject/re-generate appDelegate codes, custom gitignore and npm ignore...etc.

And we can add expo user guide in README redirect to the expo repo.

Sound good?

zxcpoiu avatar Nov 22 '24 12:11 zxcpoiu