customerio / customerio-reactnative

MIT License
25 stars 13 forks source link

Versions mismatch do not allow installation of 2.1.0-beta.2 from your docs #95

Closed rivaros closed 1 year ago

rivaros commented 1 year ago

Podfile:

pod 'CustomerIO/MessagingPushFCM', '~> 2.1.0-beta.2'
pod 'FirebaseCore', :modular_headers => true  
pod 'FirebaseMessaging', :modular_headers => true  
pod 'GoogleUtilities', :modular_headers => true  

package.json

    "customerio-reactnative": "^2.0.1",

Result of pod install:

[!] CocoaPods could not find compatible versions for pod "CustomerIOTracking":
  In snapshot (Podfile.lock):
    CustomerIOTracking (= 2.0.4, ~> 2.0.0)

  In Podfile:
    CustomerIO/MessagingPushFCM (~> 2.1.0-beta.2) was resolved to 2.1.0-beta.2, which depends on
      CustomerIOMessagingPushFCM (= 2.1.0-beta.2) was resolved to 2.1.0-beta.2, which depends on
        CustomerIOMessagingPush (= 2.1.0-beta.2) was resolved to 2.1.0-beta.2, which depends on
          CustomerIOTracking (= 2.1.0-beta.2)

    customerio-reactnative (from `../node_modules/customerio-reactnative`) was resolved to 2.0.1, which depends on
      CustomerIOTracking (~> 2.0.0)

You have either:
 * changed the constraints of dependency `CustomerIOTracking` inside your development pod `customerio-reactnative`.
   You should run `pod update CustomerIOTracking` to apply changes you've made.
ami-aman commented 1 year ago

Hi @rivaros

Sorry that you are facing this issue. Use pod install --repo-update command to update pods.

Let me know if this works for you.

rivaros commented 1 year ago

No, it does not.

rivaros commented 1 year ago

also pod update CustomerIOTracking

causes:

[!] CocoaPods could not find compatible versions for pod "CustomerIOTracking":
  In Podfile:
    CustomerIO/MessagingPushFCM (~> 2.1.0-beta.2) was resolved to 2.1.0-beta.2, which depends on
      CustomerIOMessagingPushFCM (= 2.1.0-beta.2) was resolved to 2.1.0-beta.2, which depends on
        CustomerIOMessagingPush (= 2.1.0-beta.2) was resolved to 2.1.0-beta.2, which depends on
          CustomerIOTracking (= 2.1.0-beta.2)

    customerio-reactnative (from `../node_modules/customerio-reactnative`) was resolved to 2.0.1, which depends on
      CustomerIOTracking (~> 2.0.0)
rivaros commented 1 year ago

customerio-reactnative version 2.0.1 (latest released) depends on

  s.dependency "CustomerIOTracking", '~> 2.0.0'
  s.dependency "CustomerIOMessagingInApp", '~> 2.0.0'

but it does not inlcude beta versions

ami-aman commented 1 year ago

Version 2.0.1 of customerio-reactnative depends on iOS SDK version 2.0.0. Since we are using ~ (optimistic operator) before the version, so on doing pod install --repo-update it will automatically pull down the latest version upto latest next major/minor/patch release.

rivaros commented 1 year ago

@ami-aman this won't include beta versions, what you wanted to achieve can be done with this:

  s.dependency "CustomerIOTracking", '>= 2.0.0', '~> 2.1.0-beta'
  s.dependency "CustomerIOMessagingInApp", '>= 2.0.0', '~> 2.1.0-beta'
rivaros commented 1 year ago

so major issue is that ~> 2.0.0 will only allow versions up to 2.1 (not including it) but even if you make it ~> 2.1.0 it would still not include 2.1.0-beta.x versions

ami-aman commented 1 year ago

Hi @rivaros I am sorry that you are still facing the error. I want to be sure that we both are on the same page, do you want to install 2.1.0-beta.x version ?

rivaros commented 1 year ago

@ami-aman beta version was specified in your docs. can see you are updating them now. pls update what is the latest correct version of

pod 'CustomerIO/MessagingPushFCM', '~> '
ami-aman commented 1 year ago

Thank you @rivaros for bringing this to our attention. We are updating our docs as we talk.

Again, apologies that you had to face the issue.

ami-aman commented 1 year ago

@rivaros The docs have been updated. Please feel free to let us know if you are still facing any issues.

rivaros commented 1 year ago

@ami-aman thx for updating the docs!

One last minor thing:

Here https://www.customer.io/docs/sdk/react-native/push/#metrics-userNotifications

If you’re using objective C, the example above already contains the code required to handle push metrics—substituting AppDelegate for your push notification class.

Example Above leads to nowhere.

Still using Objective-C to handle notification am not able to track opened metric when app is closed. Searching more info on that.

ami-aman commented 1 year ago

Thank you @rivaros for your patience. I truly appreciate you bringing these points to our notice. We have fixed the link in our docs. Again, thank you for highlighting !

To the question you asked regarding not able to track open metrics when the app is closed. Our team could reproduce it on our end and would like to let you know that we have logged a ticket internally so that someone from our team can take a look at it. I apologise that you had to face this issue.

Shahroz16 commented 1 year ago

Closing this due to inactivity, please feel free to re-open if the issue still persists.

rivaros commented 1 year ago

Hi @ami-aman !

Do you have any issue/refrence about capturing metrics when app is closed?

About the minor link issue above - I think it's still wrong. It should point to a specific piece of Objective-C code:

Screen Shot 2023-03-07 at 2 59 04 PM
rivaros commented 1 year ago

Your docs also contain empty pod version all over

pod 'CustomerIO/MessagingPushFCM', '~> '

this wont compile...

ami-aman commented 1 year ago

@rivaros Apologies for late response.

Would you like to check our sample app as a point of reference for your first query ? Let us know if it helps.

About the minor link issue above - I think it's still wrong. It should point to a specific piece of Objective-C code.

I understand your concern; I'll notify our documentation team. Our team is in Mexico for our annual retreat, so there may be a delay in updating the links. Meanwhile, I'll go ahead and add a detail about a specific point to check, in the hopes that it clarifies things.

I sincerely appreciate your feedback; it greatly assists us in improving our documentation.

Your docs also contain empty pod version all over

I am so sorry for the confusion. Could you please point me in the right direction, as I don't see a missing version in the docs right now?

ami-aman commented 1 year ago

Closing this due to inactivity, please feel free to re-open if the issue still persists.

Allanbcruz commented 1 year ago

I'm using the respective versions: In Package.json: "react": "18.2.0", "react-native": "0.71.7", "customerio-reactnative": "^2.3.2".

In Podfile:

Captura de Tela 2023-04-26 às 14 46 16

and I'm having this problem when I try to run arch -arm64 pod install --repo-update.

Captura de Tela 2023-04-26 às 14 43 47

Shahroz16 commented 1 year ago

Hey @Allanbcruz

Thank you for reporting this issue to us. Sorry to hear that you are experiencing an issue with the SDK.

We have a issue currently going through testing to fix this problem that you are experiencing.

Until that bug fix gets shipped in a future version of the React Native SDK, a temporary workaround is to use this in your Podfile:

pod 'CustomerIO/MessagingPushFCM', '~> 2.1.0'
or 
pod 'CustomerIO/MessagingPushAPN', '~> 2.1.0'

whichever you use.