Skip to content

Commit

Permalink
fix issue where there is not a "default" targetedOSVersionsRule
Browse files Browse the repository at this point in the history
  • Loading branch information
erikng committed Jan 16, 2024
1 parent bfc2c07 commit 4cb1bc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Example Assets/com.github.macadmins.Nudge.tester.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
{
"aboutUpdateURL": "https://apple.com",
"requiredInstallationDate": "2025-01-01T00:00:00Z",
"requiredMinimumOSVersion": "14.99.99",
"targetedOSVersionsRule": "default"
"requiredMinimumOSVersion": "14.99.99"
}
],
"userExperience": {
Expand Down
3 changes: 2 additions & 1 deletion Nudge/Utilities/Preferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ private func getOSVersionRequirements(from requirements: [OSVersionRequirement]?
fullMatch = requirement
break
} else if requirement.targetedOSVersionsRule == currentMajorVersion {

partialMatch = requirement
} else if requirement.targetedOSVersionsRule == "default" {
defaultMatch = requirement
} else if requirement.targetedOSVersionsRule == nil {
defaultMatch = requirement
}
}

Expand Down

0 comments on commit 4cb1bc3

Please sign in to comment.