Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Cleanup and repair repo for 2023 #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

BritneyS
Copy link

This is currently a work in progress to address tech debt and update the project.

@BritneyS BritneyS requested review from a team, ptere and bradbroge and removed request for a team April 17, 2023 15:35
… localization exporting

Unit tests pass, integration tests fail
@BritneyS BritneyS force-pushed the cleanup-and-repair branch from 8044897 to 1c3ba01 Compare April 17, 2023 19:34
@BritneyS BritneyS marked this pull request as ready for review April 18, 2023 20:51
Copy link
Author

@BritneyS BritneyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just added some notes about some non-obvious things I did to cleanup the repo. Most were around addressed warnings specifically from XCode, and changing Build Settings were done through the GUI in XCode.

@@ -166,7 +166,7 @@ class SpreedlyClientImpl: NSObject, SpreedlyClient {
"platform": "apple",
"locale": Locale.current.languageCode ?? "unknown",
"os": [
"name": proc.operatingSystemName(),
"name": proc.operatingSystemVersionString,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was replaced since operatingSystemName() is now deprecated, and Apple recommends using -operatingSystemVersionString instead. But this also means that both fields name and version have the same value, so this might need addressing later on.

Src: https://developer.apple.com/documentation/foundation/processinfo/1407388-operatingsystemname

<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"$(inherited)",
"$(PROJECT_DIR)/Frameworks",
);
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleting outdated framework search paths was recommended as a fix for the ld: warning: directory not found for option '-F... warning.

Src: https://stackoverflow.com/questions/9458739/ld-warning-directory-not-found-for-option

@@ -801,7 +800,6 @@
F076C6D90DB36BC555C246AC /* BankAccountInfo.swift in Sources */,
A60A0240278796000044BD69 /* SpreedlyVersion.swift in Sources */,
F076CD7FF9E8D8C63D808B1A /* CreditCardInfo.swift in Sources */,
442A2D2E48133A09DBBD9299 /* Package.swift.template in Sources */,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this non-Swift file from the list of Compile Sources to fix the no rule to process file... warning for this file.

Src: https://stackoverflow.com/questions/22778021/xcode-warning-no-rule-to-process-file-when-build-phases-has-this-file

@BritneyS
Copy link
Author

BritneyS commented Apr 19, 2023

Wanted to note that I suspect that the Apple Pay integration tests fail because of outdated Apple Pay payment method data, where the year is behind, since the response from Spreedly is:

{"errors":[{"attribute":"year","key":"errors.invalid","message":"Year is invalid"}]}

This causes the Optional transaction.applePay to be nil when forcibly unwrapped by the ! "bang" operator. In Swift, Optionals are values that aren't guaranteed to be truth-y, so are usually unwrapped with ? operators. I think using ! in tests where you want failures to reveal themselves is fine, though. But in the SDK, maybe the exception for a bad payment method should be caught sooner, before using it as an Apply Pay PM.

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

Successfully merging this pull request may close these issues.

1 participant