mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[PR #369] [MERGED] Fix a crash when encoding credentials in a test target #611
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#611
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/OAuthSwift/OAuthSwift/pull/369
Author: @eunikolsky
Created: 5/3/2017
Status: ✅ Merged
Merged: 5/4/2017
Merged by: @phimage
Base:
master← Head:bugfix/crash_nil_bundleid📝 Commits (1)
65cfa7fFix a crash when encoding credentials in a test target📊 Changes
3 files changed (+35 additions, -1 deletions)
View changed files
📝
OAuthSwift.xcodeproj/project.pbxproj(+4 -0)➕
OAuthSwiftTests/OAuthSwiftCredentialTests.swift(+27 -0)📝
Sources/OAuthSwiftCredential.swift(+4 -1)📄 Description
When
NSCodinganOAuthSwiftCredentialinstance, the test would crashon
CodingKeysinitialization because thebundleIdentifierof theBundle.mainin the tests isnil(the main bundle is not app'sbundle). This patch fixes that by trying to get one of the bundle
identifiers: the
mainone, the bundle for theOAuthSwiftCredentialclass, or an empty string otherwise; a test is added to verify the fix.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.