Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: BrazeUI not found when trying to import it on an Objective-C class #108

Open
joaosouza-traxretail opened this issue Feb 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@joaosouza-traxretail
Copy link

Platform

iOS

Platform Version

17.2

Braze SDK Version

8.0.1

Xcode Version

15.2

Computer Processor

Intel

Repro Rate

100%

Steps To Reproduce

Example:

  1. Add Braze using SPM
  2. Create an Objective-C file and add @import BrazeKit; and @import BrazeUI;
  3. Try to build the project
  4. Xcode will show the following error: module 'BrazeUI' not found error

Expected Behavior

Import BrazeUI in a Objective-C file.

Actual Incorrect Behavior

Unable to use BrazeUI in a Objective-C file.

Verbose Logs

No response

Additional Information

No response

@joaosouza-traxretail joaosouza-traxretail added the bug Something isn't working label Feb 21, 2024
@joaosouza-traxretail joaosouza-traxretail changed the title [Bug]: BrazeUI not found when trying to import it on a Objective-C class [Bug]: BrazeUI not found when trying to import it on an Objective-C class Feb 21, 2024
@lowip
Copy link
Collaborator

lowip commented Feb 21, 2024

Hi @joaosouza-traxretail,

Thank you for opening this ticket. We've been able to reproduce that error in a Swift project that makes use of Objective-C classes (but not in Objective-C projects — see our ObjC examples).

We're tracking the issue internally and will update here once we finished our investigation and/or have a fix ready.

In the meantime, you can use one of our prebuilt repository to avoid the issue completely:

Best,

@joaosouza-traxretail
Copy link
Author

Hi @lowip thanks for answering so fast! Doing some investigation it seems that the error is thrown only if I added it to the header (.h) file. The problem with that is that I'm unable to use a custom class (that is different from the AppDelegate) as a BrazeInAppMessageUIDelegate (because I can only use the declaration BrazeInAppMessageUIDelegate in the implementation (.m) file).

Screenshot 2024-02-21 at 16 58 38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants