Coder Social home page Coder Social logo

branchmetrics / ios-branch-sdk-spm Goto Github PK

View Code? Open in Web Editor NEW
14.0 7.0 10.0 2.07 MB

Branch iOS SDK Swift Package Manager distribution

Home Page: https://help.branch.io/developers-hub/docs/ios-basic-integration#via-swift-package-manager

License: MIT License

Objective-C 85.02% C 0.01% Swift 12.64% Ruby 0.86% Shell 1.47%
swift ios branch metrics deep-linking attribution swift-package-manager xcode

ios-branch-sdk-spm's Introduction

Branch SDK Documentation for iOS

The Branch iOS SDK for deep linking and attribution.

Branch Sandbox Program

As part of this sandbox program, you will be able to partner directly with Branch’s Product and Engineering team for exclusive access to test drive our innovative products before the market and proactively exchange valuable feedback. With your support, we will create the winning measurement and linking solutions of the future together.

If you would like to join, please reach out to us today at [email protected] or by filling out this form.

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.

View Branch's SDK documentation for iOS

ios-branch-sdk-spm's People

Contributors

branch-sdkteam avatar echo-branch avatar jdee avatar kamil-branch avatar nidhidixit09 avatar nsingh-branch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-branch-sdk-spm's Issues

1.44 version doesn't resolve

Hi,
Via SPM, the version 1.44 doesn't resolve correctly and fails with error "Dependencies could not be resolved because no versions of 'ios-branch-sdk-spm' match the requirement 1.44 and root depends on 'ios-branch-sdk-spm' 1.44"
Seems like that is tagged wrong and doesn't contain 3 parts like how normal versions are tagged. I think this should get resolved if it gets tagged correctly to "1.44.0" instead of "1.44".
Could you please address this?

Umbrella header missing internal headers

The issue with the missing headers is still not resolved and pops up from time to time.

The reason this is happening is because Package.swift indicates that the headers to be exposed is inside . of the path argument for Branch's target. This means all headers including the umbrella header which now raises the conflict since those listed in the warnings are not in the umbrella header.
Xcode expects to use the umbrella header when it is present but now both an umbrella header exists along with all the separate headers.

The solution is to either:

  1. Include the missing headers in the umbrella header Branch.h and point directly to that header file from the package manifest, or
  2. Move all headers to a separate folder (could be include) and reference the folder from the manifest instead of using the root .

image

Here is an example of how this can be resolved: PureLayout/PureLayout#256

Deferred link returned only in unspecified condition

Describe the bug

We've just implemented deferred link using Branch SDK.
It worked well when installed from TestFlight or Xcode. But then I just realized that the link is not returned when my phone is on mobile data and is working on my home WiFi.
It works on hot-spot and not via WiFi for my colleague.

We are sometimes getting no branch link [“+is_first_session”: 1, “+clicked_branch_link”: 0]

Steps to reproduce

  1. delete app
  2. click link
  3. install app (AppStore/TestFlight/Xcode)
  4. observe if the link goes through

repeate few times with different network setup

Expected behavior

The app should open deferred link always after fresh installation

SDK Version

3.1.0

XCode Version

15.2

Device

various

OS

various

Additional Information/Context

I would expect that you are getting some kind of fingerprint of the device through the link also based on the network setup. But it is maybe remembered from the first clicking on the link. So I would assume that the fingerprint should renew when user taps on the link.

Is there something we can improve in the integration or branch link setup? Would implementing NativeLink help with that? Or is is a bug in getting the fingerprint?

We are currently not sure if it is working for all users who installs the app using to the Branch link.

Lots of warnings about umbrellla headers not including headers

image

e.g.

Umbrella header for module 'Branch' does not include header 'BNCPasteboard.'

Using 1.44.0

Hadn't noticed this before when we were on 1.43.2, but maybe I just missed it.

Xcode 14.0
macOS 12.6 (21G115)

Here's the full list

ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCTuneUtility.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCKeyChain.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCTelephony.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchCPIDRequest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCAppleReceipt.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCPasteboard.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchContentPathProperties.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCSKAdNetwork.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCJSONUtility.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCAppleAdClient.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCAppGroupsData.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCFieldDefines.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCSpotlightService.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCCallbackMap.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchShortUrlSyncRequest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCQRCodeCache.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchOpenRequest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchShortUrlRequest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchLogoutRequest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCApplication.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'NSMutableDictionary+Branch.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCDeviceSystem.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchPasteControl.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCUserAgentCollector.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCFacebookAppLinks.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCEncodingUtils.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCURLFilter.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCNetworkInterface.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchUserCompletedActionRequest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchRegisterViewRequest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCThreads.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCSystemObserver.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchSetIdentityRequest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'NSString+Branch.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchInstallRequest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'Branch+Validator.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCDeepLinkViewControllerInstance.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCContentDiscoveryManager.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCDeviceInfo.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCAppleSearchAds.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchContentDiscoverer.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCLocale.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchSpotlightUrlRequest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchContentDiscoveryManifest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchCloseRequest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCPartnerParameters.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchJsonConfig.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BranchLATDRequest.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCCrashlyticsWrapper.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCNetworkService.h'
ios-branch-sdk-spm/Branch-SDK/Branch.h:1855:1: warning build: Umbrella header for module 'Branch' does not include header 'BNCReachability.h'

Apple search ads?

Describe the bug

I believe this may be a documentation error / conflicting documentation

I am going through setup documention again while updating from 1.45.2 to 2.2.0 (while also switching from Cocoapods to SPM at the same time for integration)

I am encountering the following issue:
https://help.branch.io/developers-hub/docs/ios-full-reference#apple-search-ads

This document says i need to implement:

  • You must add the iAd.framework to your project to enable Apple Search Ad checking.
  • and Branch.getInstance().delayInitToCheckForSearchAds

Now I had Branch.getInstance().delayInitToCheckForSearchAds this as part of my setup for 1.45.2, however, i am now getting xcode error:

Value of type 'Branch' has no member 'delayInitToCheckForSearchAds'

Finally, in the instructions for SPM integration, there doesn't appear to be any mention of iAd.framework integration like the document above describes.

Steps to reproduce

  1. Be integrated with 1.45.2 via Cocoapods
  2. migrate to SPM integration and update to 2.2.0

Expected behavior

Clearer instructions or sdk notes about the function being deprecated or something

SDK Version

2.20

XCode Version

14.2 (14C18)

Device

NA

OS

NA

Additional Information/Context

No response

Network request failed 1003

Hi!
I set up the SDK and when I follow a deeplink it takes me into the app, but I never get the data in initSession's completion block. I get an error saying network request is invalid and error code 1003.
Tried reinstalling the app, using a test device, resetting the data etc
Also tried Branch.getInstance().enableLogging() but the console is empty, nothing is being written there

I have the latest SDK 1.44

[Privacy Manifest] Implementation

Describe the feature

Hello,

As we approach the upcoming spring and the anticipated implementation of the Privacy Manifest by Apple, it's crucial to ensure that your SDK fully complies with Apple's requirements.

Does your SDK need to include it?
If so, do you have a release date planned?

Thank you in advance for your attention to this matter.

Best regards

tvOS build error BranchPasteControl.h

Describe the bug

'UIPasteConfigurationSupporting' is unavailable: not available on tvOS

image

Steps to reproduce

Integrated the SDK via SPM with a tvOS 13+ target
Unable to build

Expected behavior

Hoping to be able to build

SDK Version

3.3.0

XCode Version

15.3

Device

tvOS sim

OS

17

Additional Information/Context

No response

Not able to test univarsal links when added via SPM

Describe the bug

I have integrated Branch from pod to SPM.

And my unit test case started to fail.. Not sure what is going wrong..

here is my code snippet

fun test{
 let result = appDelegate.application(
            UIApplication.shared,
            continue: NSUserActivity(
                activityType: NSUserActivityTypeBrowsingWeb
            )
        ) { (_) in }
        XCTAssertFalse(result)
}

and method implementation for universal link is

func application(
		_ application: UIApplication,
		continue userActivity: NSUserActivity,
		restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
	) -> Bool {

		// Tab Selection code

		return Branch.getInstance().continue(userActivity)
	}

Steps to reproduce

  1. Add Unit test for Universal Link
  2. Test it
  3. Test case fails

Expected behavior

Test case should not fail

SDK Version

2.1.0 - Next minor

XCode Version

14.1

Device

iPhone 14 Pro

OS

Ventura 13.1

Additional Information/Context

I do not have real device, so couldn't check if universal links are broken due to this or not. I can only check my test cases..

Public headers missing when using Tuist

Describe the bug

When trying to add Branch as a dependency via Tuist (https://tuist.io/) it doesn't recognize the headers.

In order to fix that can you put all the headers on the same folder (ex. Public) and set the "publicHeadersPath" in the Packag.swift to the right path?
For example if we move "BranchSDK.h" to the BranchSDK folder and set the path to "." everything works.
See some example here
https://github.com/getsentry/sentry-cocoa/tree/main/Sources/Sentry/Public

Steps to reproduce

1.Try to add Branch as a dependency via Tuist
2.
3.

Expected behavior

Headers can be found

SDK Version

3.0.0

XCode Version

15.0

Device

All

OS

All

Additional Information/Context

No response

SKAN Coarse-Grained value is always "Low"

Describe the bug

It looks like Branch iOS SDK doesn't pass proper coarse value when calling Apple's updatePostbackConversionValue method.

Steps to reproduce

  1. Here is the "SKAN Conversion Center" setup example:
Screenshot 2023-11-06 at 22 54 56
  1. When user does inApp purchase (in my case is $150), fire the event this way:
let event = BranchEvent.standardEvent(.purchase)
event.logEvent(with: transaction)

(under the hood it used v2 standart event API)

  1. Branch backend responds correctly with Fine-Grained value and keyupdate_conversion_value is set as 2 (as per SKAN Conversion Center setup range), but it misses to include Coarse-Grained value in the response in my case it should be set as "High" under coarse_key key name
Screenshot 2023-11-06 at 19 25 30

(used Charles proxy for sniffing)

  1. Branch iOS SDK is looking for coarse value under coarse_key key in the response. Since it's missing in the response - it uses "low" by default and reports to Apple SKAD: Fine-Grained value as 2 and Coarse-Grained value as Low

Expected behavior

Branch API should return coarse value in the response of fired events which are configured in "SKAN Conversion Center" appropriately

the response should be something like this:
Screenshot 2023-11-06 at 19 25 30

and therefore Apple SKAD updates would be: Fine-Grained value as 2 and Coarse-Grained value as High
(and not Low like it is now)

SDK Version

2.2.2

XCode Version

15.0.1

Device

iPhone 11

OS

16.5.1

Additional Information/Context

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.