customerio / customerio-expo-plugin

MIT License
11 stars 9 forks source link

Installation improvement for use_frameworks #7

Closed MatiasLjubica closed 1 year ago

MatiasLjubica commented 2 years ago

Hi ! I try to use this plugin to my Expo projet but I having some trouble to install pod dependency because my project also use Analytics and it's require to use the use_framework! tag but it's break the build with this error:

_- Runner (true) and NotificationService (false) do not both set useframeworks!.

So i add this:

target 'NotificationService' do
  use_frameworks!
  pod 'CustomerIO/MessagingPushAPN', '~> 1.2.0-alpha.3'
end

but it fail because he need to be static, so i use this:

target 'NotificationService' do
  use_frameworks! :linkage => :static
  pod 'CustomerIO/MessagingPushAPN', '~> 1.2.0-alpha.3'
end

and it work !

Can you add an option into the plugin to add this line if the project use use_framework ?

Thank you

ami-aman commented 2 years ago

Hi @MatiasLjubica

I appreciate you asking this feature request in our config plugin. Just to make sure we understand it right, would it be justified to say that the request is to make the plugin configurable such that even static libraries could be linked in iOS using :linkage => :static ? Feel free to correct me if I am wrong !

MatiasLjubica commented 2 years ago

Hi @ami-aman Yes is the request to be clear we can have some properties in app.config like:

    [
      'customerio-expo-plugin',
      {
        android: {
          googleServicesFilePath: 'PATH',
        },
        ios: {
          useFrameworks: 'static', // can be 'none' | 'static' | 'dynamic'
          pushNotification: {
            useRichPush: true,
          },
        },
      },
    ]

It will help for project that use some other packages. I think it can be reproduce with a blank Expo project with @react-native-firebase/analytics and try to install the plugin.

They have the same issue on OneSignal Flutter SDK that i found how to resolve it.

xtreem88 commented 1 year ago

This feature has been added and released. See https://github.com/customerio/customerio-expo-plugin/pull/9