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

redirect to the app issue #68

Open
vanijain3108 opened this issue Jul 31, 2024 · 3 comments
Open

redirect to the app issue #68

vanijain3108 opened this issue Jul 31, 2024 · 3 comments

Comments

@vanijain3108
Copy link

I am using truesdk latest version when I request for truecaller profile the true caller app open but after click on continue to share truecaller profile with my app it stuck on the same page
not going back to the app
and not did receive or did fail
any of these function is not called

please help to solve the redirect to the app with response or error issue

//
// ViewController.swift
// truecallerCheck
//
// Created by Fast Media on 30/07/24.
//

import UIKit
import TrueSDK

class ViewController: UIViewController, TCTrueSDKDelegate {
override func viewDidLoad() {
super.viewDidLoad()
TCTrueSDK.sharedManager().delegate = self
print("ViewController loaded and TrueSDK delegate set")
// Do any additional setup after loading the view.
}
@IBAction func buttonAction(_ sender: UIButton) {
TCTrueSDK.sharedManager().requestTrueProfile()

}
func didReceive(_ profile: TCTrueProfile) {
    print("User verified with Truecaller: \(profile.firstName) \(profile.lastName), phone number: \(profile.phoneNumber)")
}

func didFailToReceiveTrueProfileWithError(_ error: TCError) {
    print("Failed to receive Truecaller profile with error: \(error.localizedDescription)")
        
}
func verificationStatusChanged(to verificationState: TCVerificationState) {
        switch verificationState {
        case .verificationComplete:
            print("Verification successful.")
        case .otpInitiated:
            print("OTP initiated")
        case .otpReceived:
            print("OTP received")
        case .verifiedBefore:
            print("Verified before")
        @unknown default:
            print("Unknown state")
        }
    }

}

and in the app delegate I use this

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Setup Truecaller SDK
let appKey = "0000000000000000000000000000000000000"
let appLink = "https://si00000000000000000000000000000000.truecallerdevs.com/"
TCTrueSDK.sharedManager().setup(withAppKey: appKey, appLink: appLink)
print("Truecaller SDK setup complete")
return true
}

@surjeet-probo
Copy link

Same issue with 0.1.8

@surjeet-probo
Copy link

Use this options to check whether everything at your end is fine or not.

  • Turn on Developer Mode in Settings. Read Enabling Developer Mode on a device for more help.
  • In Settings > Developer, scroll to the section labeled Universal Links and turn on Associated Domains Development.
    -Open Diagnostics and type in your full URL. You will receive feedback on whether this link is valid for an installed app.
    If your universal links are invalid, your applinks may be configured incorrectly.

For more: https://developer.apple.com/documentation/technotes/tn3155-debugging-universal-links

@surjeet-probo
Copy link

Hi Tea, Validate universal link using Diagnostics and my App supports the true caller generated link but still its opening the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants