BranchMetrics / cordova-ionic-phonegap-branch-deep-linking-attribution

The Branch Cordova Ionic Phonegap SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/apps/cordova-phonegap-ionic/
MIT License
234 stars 144 forks source link

Latest SDK Updates fail to compile on IOS #725

Closed itbeyond closed 3 months ago

itbeyond commented 5 months ago

Describe the bug

Once installed with the latest version downloaded directly from github not npm so using the latest 3.0.1 for IOS I am not able to compile my app. Using Cordova 12.0.0, Cordova-IOS 7.0.1 it comes up with the first error

Use of undeclared identifier 'BranchEvent' this then causes another 9 errors with the code trying to reference BranchEvent - the error is in BranchSDK.m and starts on line 235.

As a side note this is not a new issue and I have been unable to upgrade Branch since 5.2.0 was initially released.

Steps to reproduce

  1. create basic hello world app
  2. cordova plugin add https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking-attribution
  3. cordova platform add ios@7.0.1
  4. compile in Xcode and get the errors as above

Expected behavior

It should compile correctly

SDK Version

ios SDK 3.0.1

Make and Model

iPhone 14

OS

IOS 17.1.2

Additional Information/Context

No response

itbeyond commented 5 months ago

I have done some debugging and found a number of issues: BranchSDK.h should have import BranchEvent.h & BranchQRCode.h to get past the undeclared identifier I also needed to comment out lines 305-315 & 574-603 in the BranchSDK.m file. 305-315 is refernecing something that has not been in Branch since V1.45.X so it is clear the package has not been adjusted to support the updated SDK. Once I did this the app compiled correctly and seems to be running however I am not 100% sure if the commented code will cause problems - hence I am reluctant to submit a PR as I am not in a position to fully test however it would be good if this could all be rectified.

nsingh-branch commented 5 months ago

@itbeyond Hi, we'll be releasing the official 6.0.0 release this week which will fix these issues. Please try to use our official release versions instead of the master branch in the future since it may contain PRs that aren't ready for release.

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale due to inactivity for 60 days. If this issue is still relevant, please respond with any updates or this issue will be closed in 7 days. If you believe this is a mistake, please comment to let us know. Thank you for your contributions.

github-actions[bot] commented 3 months ago

This issue has been closed due to inactivity. If this issue is still relevant, please reopen it or create a new one. Thank you for your contributions.