Skip to content

Commit

Permalink
[NativeTarget] Return nil for #platform_name when #sdk is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Jul 26, 2015
1 parent 48acbf1 commit 17f8610
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/xcodeproj/project/object/native_target.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def sdk
# @return [Symbol] the name of the platform of the target.
#
def platform_name
return unless sdk
if sdk.include? 'iphoneos'
:ios
elsif sdk.include? 'macosx'
Expand All @@ -101,9 +102,8 @@ def platform_name
# @return [String] the version of the SDK.
#
def sdk_version
if sdk
sdk.scan(/[0-9.]+/).first
end
return unless sdk
sdk.scan(/[0-9.]+/).first
end

# @return [String] the deployment target of the target according to its
Expand Down

0 comments on commit 17f8610

Please sign in to comment.