-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ Pod::Spec.new do |s| | |
s.author = { "iOSDevZone" => "[email protected]" } | ||
s.social_media_url = "http://twitter.com/iOSDevZone" | ||
|
||
s.osx.deployment_target = '10.10' | ||
s.ios.deployment_target = '8.0' | ||
s.osx.deployment_target = '10.11' | ||
s.ios.deployment_target = '9.3' | ||
s.tvos.deployment_target = '9.0' | ||
s.watchos.deployment_target = '2.0' | ||
|
||
|
@@ -24,13 +24,15 @@ Pod::Spec.new do |s| | |
echo 'Running prepare_command' | ||
pwd | ||
echo Running GenerateCommonCryptoModule | ||
swift ./GenerateCommonCryptoModule.swift macosx . | ||
swift ./GenerateCommonCryptoModule.swift iphonesimulator . | ||
swift ./GenerateCommonCryptoModule.swift iphoneos . | ||
swift ./GenerateCommonCryptoModule.swift appletvsimulator . | ||
swift ./GenerateCommonCryptoModule.swift appletvos . | ||
swift ./GenerateCommonCryptoModule.swift watchsimulator . | ||
swift ./GenerateCommonCryptoModule.swift watchos . | ||
TC="--toolchain com.apple.dt.toolchain.Swift_2_3" | ||
SWIFT="xcrun $TC swift" | ||
$SWIFT ./GenerateCommonCryptoModule.swift macosx . | ||
$SWIFT ./GenerateCommonCryptoModule.swift iphonesimulator . | ||
$SWIFT ./GenerateCommonCryptoModule.swift iphoneos . | ||
$SWIFT ./GenerateCommonCryptoModule.swift appletvsimulator . | ||
$SWIFT ./GenerateCommonCryptoModule.swift appletvos . | ||
$SWIFT ./GenerateCommonCryptoModule.swift watchsimulator . | ||
$SWIFT ./GenerateCommonCryptoModule.swift watchos . | ||
CMD | ||
|
||
|
3970f9f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the significance of specifying the toolchain here? line 27
3970f9f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's there to make sure that Xcode uses the correct toolchain to run the
GenerateCommonCryptoModule.swift
script. It was needed prior in 0.8.x because theGenerateCommonCryptoModule.swift
script was in Swift 2.3 syntax (so Xcode 8.x would fail). Since this script has been updated it should be changed to Swift 3.0. You could argue that it could be removed completely, but it is safer to leave it there in case Swift 4.0 changes anything.3970f9f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I see what happened here. The podspec checked in with CocoaPods has line 27 commented out (so there is an inconsistency between what's in the repo and the CocoaPods trunk). There is no reliable way of specifying Swift 3.0 explicitly (the options are
com.apple.dt.toolchain.Swift_2_3
for Swift 2.3 orcom.apple.dt.toolchain.XcodeDefault
). Specifying default is the same as omitting it and neither approach will protect against Swift 4.0 breaking things. I'll update the podspec in the repo and it should match what's checked in with CocoaPods from now on.Thanks for spotting this. In a few months time, when this has all faded from my memory a bit, it might have been tricky to find that error!
3970f9f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to help! The script and .podspec are super helpful for dealing with the CommonCrypto trickery!