Giter Club home page Giter Club logo

primer-sdk-ios's People

Contributors

alexandral-tw avatar borisprimer avatar ceriksson avatar d4r1091 avatar dependabot[bot] avatar emirbostan avatar evanspie avatar github-actions[bot] avatar jnewc avatar mayur-ios-dev avatar nquinn27 avatar primer-security-integrations avatar semirp avatar stefanv-primerio avatar tino-primer avatar xevious78 avatar

Stargazers

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

Watchers

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

primer-sdk-ios's Issues

Migrate from PKPaymentAuthorizationViewController to PKPaymentAuthorizationController

Hi guys,

Recently, I've spent lots of time debugging PrimerSDK due to a mysterious case when the native PKPaymentAuthorizationViewController was not shown on the device. The problem was caused by the wrong merchantIdentifier (not the same as in the certificate). But the problem is not apparent, and you have to spend time to detect that the error is inside PKPaymentAuthorizationViewController from PassKit.framework

The investigating process highlighted that you use PKPaymentAuthorizationViewController in ApplePayTokenizationViewModel.swift, but starting iOS10 (as I see from the Package.swift, it's your min deployment target) there is a new recommended way from Apple to use PKPaymentAuthorizationController

Why to use?

  1. Simplify this tricky code of showing the Apple Pay screen

PrimerUIManager.primerRootViewController?.present(paymentVC, animated: true, completion: {
DispatchQueue.main.async {
PrimerDelegateProxy.primerHeadlessUniversalCheckoutUIDidShowPaymentMethod(for: self.config.type)
self.didPresentPaymentMethodUI?()
seal.fulfill()
}
})

  1. Potentially, you may remove the logic of creating a custom UIWindowScene in static func prepareRootViewController() (PrimerUIManager.swift) because the PKPaymentAuthorizationController is shown by Apple's framework inner logic. And it's guaranteed to be at the top of the hierarchy

let paymentVC = PKPaymentAuthorizationController(paymentRequest: request)
paymentVC.present { success in
if success {
print("Presented payment controller")
} else {
print("Failed to present payment controller")
}
}}

  1. Due to the code above, you would be able to return some error saying that the problem is in PassKit.framework but not your own.
  2. This migration will lead you to a UKit independent future (for example, for MacOS or WatchOS or just SwiftUI usage)

Error uploading to appstore

primer sdk: 2.15.0
xcode: 13.2.1 (upgrading to 14 isn't viable right now)

[Transporter Error Output]: ERROR ITMS-90535: Unexpected CFBundleExecutable Key. The bundle at 'Payload/BRICK.app/PrimerResources.bundle' does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue.

Paypal vaulting not working

sdk version: 2.11.1
xcode: 13.2.1
device: simulator, iphone 12, ios 15.2
react native sdk: 2.11.0
react native version: 0.66.4

I'm posting it here since the error seems to be in the ios code. It works fine on android.

I am trying to vault paypal payment method (create billing agrement) using either showPaymentMethod or showVaultManager. The flow seemingly works fine until it reaches the end, where nothing happens once I am returned to the app from the paypal page.

I poked around a bit in your code and it looks like PayPalService is instantly deinitialized, which means that paypalTokenId is nil.

image

Logged what's happening
// showPaymentMethod:
🧨 start startBillingAgreementSession
🧨 deinit
🧨 success startBillingAgreementSession
🧨 config.tokenId: BA-4S778055VB884092R
🧨 self?.paypalTokenId: nil
// after paypal flow finished:
🧨 start confirmBillingAgreement
// nothing seems to happen here with the error for missing value paypalTokenId. No error is logged or event received by my error handler.
🧨 deinit

Failed to import Primer3DS on Release mode

Screenshot 2023-01-16 at 15 47 25

Steps to reproduce

  1. Clone this repo, master branch
  2. Go to Example folders, pod install
  3. Change build configuration to Release
    Screenshot 2023-01-16 at 15 48 54

Environment

  • OS: macOS 13.1
  • Xcode: 14.2
  • KlarnaMobileSDK (2.2.2)
  • Primer3DS (1.0.3)
  • PrimerKlarnaSDK (1.0.4)
  • PrimerSDK (2.16.1)
  • Device: Simulator

Issue with inputElementValueDidChange Method in Primer's PrimerInputElementDelegate

Hello,

I hope this message finds you well. I am writing to report an issue related to the PrimerInputElementDelegate in the Primer repository.

When utilizing the PrimerInputElementDelegate protocol and implementing the method @objc optional func inputElementValueDidChange(_ sender: PrimerHeadlessUniversalCheckoutInputElement), I have observed that this method is never triggered, despite other methods working as expected.

I have thoroughly reviewed my implementation and ensured that I am conforming to the protocol correctly. However, it seems that the inputElementValueDidChange method is not being called when it should be.

I have checked for any relevant documentation or discussions regarding this behavior but haven't found a resolution. If there are any additional steps or considerations specific to this method, please let me know.

I appreciate your assistance in resolving this matter. If further information or code samples are needed, please don't hesitate to ask.

Thank you for your time and support.

Vaulting flow for Paypal not working (1.32.5)

On completion when returning to app, i get this error. I looked a bit at the code and it seems like for the billing agreement session there is no orderId set in "PayPalTokenizationViewModel", but "generatePaypalPaymentInstrument()" is called which uses it.

{ 
     recoverySuggestion: 'Check if value nil is valid for key orderId',
     description: '[invalid-value] Invalid value \'nil\' for key \'orderId\'',
     errorId: 'PrimerSDK.PrimerError' 
} 

Podspec xcconfig overwritting values in consuming project.

In your .podspec file, you have an xcconfig hash - these properties get merged into the consuming project's .xcconfig file and with the values MARKETING_VERSION and CODE_SIGNING_ALLOWED = NO they currently disable code signing through Fastlane's gym and xcodebuild but also override our marketing version.

You should be using https://guides.cocoapods.org/syntax/podspec.html#pod_target_xcconfig to ensure these properties don't make their way into the consuming project.

Unable to load .strings file

Hello, im following this Quick Start.
Im using CocoaPods and PrimerSDK 1.5.2v
also i provided the -PrimerDebugEnabled in the arguments

When i send client token on this place

func clientTokenCallback(_ completion: @escaping (Result<String, Error>) -> Void) {
            // primerToken i getting from another place
            completion(.success(primerToken))
    }

i have an error:
[strings] Unable to load .strings file: CFBundle 0x7fb3b3dd0ee0 </Users/test/Library/Developer/CoreSimulator/Devices/0EC2A93D-8728-4877-9FF0/data/Containers/Bundle/Application/BFA7D448-0161-4DB5-983E/Test Project.app/Frameworks/PrimerSDK.framework/PrimerResources.bundle> (not loaded) / Localizable: Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected character / at line 1" UserInfo={NSDebugDescription=Unexpected character / at line 1, kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain Code=3840 "Missing ';' on line 344" UserInfo={NSDebugDescription=Missing ';' on line 344}}

URL scheme & scheme identifier are missing from the settings.

Unable to install custom schema

Hi 🙂, i have some problem with SDK (pod 'PrimerSDK', '= 2.3.0')
Unable to set custom schema, because schema is injected into dependency container in PrimerSettings, but gets according to the protocol PrimerThemeProtocol. As a result, it always initializes an empty schema and adds dependencies to the package.

I have some fix for this bug

`public func configure(settings: PrimerSettings? = nil, delegate: PrimerDelegate? = nil) {
    DependencyContainer.register((settings ?? PrimerSettings()) as PrimerSettingsProtocol)
    DependencyContainer.register((settings ?? PrimerSettings()).uiOptions.theme as PrimerThemeProtocol)
    self.delegate = delegate
}`

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.