customerio / customerio-reactnative

MIT License
25 stars 11 forks source link

No such module 'CioMessagingPushAPN' #335

Open airowe opened 3 weeks ago

airowe commented 3 weeks ago

SDK version:

3.9.0

Environment: Development or Production

Development

Are logs available?

Describe the bug

After upgrading to xCode 16.0, I'm unable to build my application because the packager is unable to find module 'CioMessagingPushAPN'

To Reproduce

Build react native application with xCode 16.0 (to note: I am using nx in a monorepo setup but prior to upgrading to xCode 16.0 the project was building fine).

Expected behavior

App should be able to be built

Screenshots

Image 9-27-24 at 12 47 PM

Additional context

abstract_target '###CommonPods' do
  config = use_native_modules!

  pod 'customerio-reactnative/apn', :path => '../node_modules/customerio-reactnative'

  target '###Staging' do
  end

  target '###' do
  end

  target '###Development' do
  end

  target 'NotificationServiceExtension' do
    # Notice the '-richpush' in the line below. This line of code is different from what you added for your main target. 
    pod 'customerio-reactnative-richpush/apn', :path => '../node_modules/customerio-reactnative'
  end
ami-aman commented 2 weeks ago

Hi @airowe ,

I am sorry to hear that you are facing this issue.

This error typically occurs when CioMessagingPushAPN is not correctly linked to your targets, which can be due to the following reasons:

Here are a few suggestions to help resolve the issue:

  1. Ensure Correct Path: Double-check that the path to node_modules and the dependency is correct, especially considering it’s a monorepo.
  2. Add inherit! :complete to Each Target: Using abstract_target doesn’t automatically inherit dependencies. Including inherit! :complete will ensure all dependencies from the abstract_target are included in each target.
  3. Clear Cache and Reinstall Pods: After clearing cache, run rm -rf Pods/ Podfile.lock and then pod install --repo-update. These will be regenerated when you reinstall the pods.

Following these steps should help ensure that all necessary modules, including CioMessagingPushAPN, are properly linked to your targets. Let us know if you continue to encounter issues after trying this!

ami-aman commented 1 week ago

Closing this issue due to inactivity.

airowe commented 1 week ago

@ami-aman It appears there was a change to the documentation today, is that accurate? Would this help to resolve my issue? @Ahmed-CIO

airowe commented 1 week ago

I'm unfortunately still seeing this issue after trying the above suggestions. @ami-aman

ami-aman commented 1 week ago

Hey there,

There hasn’t been any change to the documentation relevant to this issue, and I’m sorry to hear that the previous suggestions didn’t resolve it.

To assist you further, I would need more details, such as the exact steps to reproduce the issue or any additional information you’d like to share with us. This will help us troubleshoot the problem, as we’ve been unable to reproduce it on our end using Xcode 16 and the podfile snippet you shared above.

airowe commented 1 week ago

Hey there,

There hasn’t been any change to the documentation relevant to this issue, and I’m sorry to hear that the previous suggestions didn’t resolve it.

To assist you further, I would need more details, such as the exact steps to reproduce the issue or any additional information you’d like to share with us. This will help us troubleshoot the problem, as we’ve been unable to reproduce it on our end using Xcode 16 and the podfile snippet you shared above.

Thanks! Would it be possible to communicate privately and/or invite you to our private repo?

ami-aman commented 1 week ago

@airowe Sure! You can share the sample app at win@customer.io.

Please ensure the following:

Looking forward to your update!

airowe commented 3 days ago

@ami-aman I'm still working on getting a reproducible demo for you but as I've been investigating I have noticed that I do not see this issue at all on xCode 15.x versions but it's happening across the board on xCode 16.x

ami-aman commented 3 days ago

Hey there! Thank you for taking the time to and working on a sample app to help us debug the issue. We really appreciate your efforts!

I would like to inform you that our team is already using Xcode 16.0, and so far, we haven’t encountered this issue. Could you please share the exact version of Xcode you’re using? This might help us identify if there’s a version-specific problem causing the issue.

For your convenience, I’ve reopened this issue since we now have an active ongoing conversation.

airowe commented 3 days ago

Hey there! Thank you for taking the time to and working on a sample app to help us debug the issue. We really appreciate your efforts!

I would like to inform you that our team is already using Xcode 16.0, and so far, we haven’t encountered this issue. Could you please share the exact version of Xcode you’re using? This might help us identify if there’s a version-specific problem causing the issue.

For your convenience, I’ve reopened this issue since we now have an active ongoing conversation.

MacOS Sequoia 15.0.1 (24A348) - Apple M1 Pro XCode Version 16.0 (16A242d)

ami-aman commented 2 days ago

Thanks for sharing the detail. I truly appreciate it.
Our team is looking into it and will get back to you with an update soon.