Affirm / affirm-merchant-sdk-ios

Integrate Affirm into your iOS app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo type symbol is not working

AmyBeall opened this issue · comments

@hoyelo @sichx I tried using the AffirmLogoTypeSymbol with the promotional messaging and I'm getting a 400 error.
Prequal failed with error: {
NSLocalizedDescription = "Logo type must be one of the following values: logo, symbol, text";
code = "invalid_field";
field = "logo type";
message = "Logo type must be one of the following values: logo, symbol, text";
statusCode = 400;
type = "invalid_request";
}

@AmyBeall Originally it supported 4 types (logo, text, solid_circle and hollow_circle), but it seems changed to "logo, symbol, text".
Pls check this PR (Updated to the latest logo types): #33
But there is a build issue in the master branch since you have added AffirmReasonCode class, can you pls check it first?

@hoyelo @sichx the master branch does not have any build issues. Please start a new branch for the symbol changes because the font_support branch was merged into master yesterday and now font_support is behind master. Also the solid_circle and hollow_circle logo types should still be supported and are used when the logo is configured with the promotional messaging text option. When making a call to the Affirm API you can only select 'logo, symbol, and text' and is used for the promotional messaging HTML option. Please reference the Android version or reach out if you have more questions. Thanks!

@AmyBeall

  1. I recorded a video on how to reproduce the build error on master branch: http://g.recordit.co/wd6ccB7rpu.gif The cause is most likely the new files were added to the Pod project insead of the SDK project. Due to the changes in AffirmCheckoutDelegate, the example needs to be updated to compile. See screenshot below:

Screen Shot 2019-08-07 at 10 04 02 AM

  1. I have fixed the build error in this PR. Please help me review: #34

  2. I have checked the logic in the previous SDK (https://github.com/Affirm/affirm-ios-sdk) again and copied over the logic on handling this bit. The result is the hollow and solid types are supported again. I can't find detailed documentation on this particular call, so it's difficult for me to know if this is right. Let me know if you know where I should be looking to find the documentation or if this change looks right to you, thanks!

@hoyelo @sichx Thank you very much for including the video, it was very helpful. I also appreciate that you went ahead and fixed those build issues related to the AffirmReason class. However, after I merged the bug_fix changes I began seeing build issues for the Examples workspace:
image
I went ahead and reverted the changes and the Examples workspace is successfully building. Please fix the new build issues so that both the Examples workspace and the AffirmSDK are building successfully.
Thanks

@AmyBeall Maybe you need clean your pod cache, can you try to run 'pod update' in the 'bug_fix' branch and clean the project before you rebuild it?

There is a solution that can help you. (My xcode version: 10.3 (10G8))
https://stackoverflow.com/questions/55505991/xcode-10-2-update-issue-build-system-error-1-unable-to-load-contents-of-file-l

@hoyelo I am still seeing the same issue: I cleaned the build folder, then from the affirm-merchant-sdk-ios/Examples folder I ran sudo gem update cocoapods --pre, then pod update, the rebuilt Please let me know if I'm missing anything. Thanks

@AmyBeall
I'm not sure whether it works, but you can try to remove Pods folder and 'Examples.xcworkspace' file, and then do the above steps again.
Screen Shot 2019-08-08 at 8 11 49 AM

@hoyelo I tried those steps and am still seeing the same errors

@AmyBeall I found the issue. It's caused by project files that are generated under v1.7.5 (latest cocoapod). The generated files have issue with earlier v1.5.x cocoapod executables. To be safe, I regenerated the project files using cocoapods 1.5.x and now so it should work with all versions of cocoapods.

@hoyelo @sichx Everything is working as expected. The symbols are rendering for both text and HTML promotional messaging. Thank you very much for helping to get the build issues sorted.