Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got this error when I try to install. #81

Closed
Abhishek2611 opened this issue Feb 1, 2018 · 9 comments
Closed

Got this error when I try to install. #81

Abhishek2611 opened this issue Feb 1, 2018 · 9 comments

Comments

@Abhishek2611
Copy link

Abhishek2611 commented Feb 1, 2018

[!] /bin/bash -c
set -e
touch prepare_command.txt
echo 'Running prepare_command'
pwd
echo Running GenerateCommonCryptoModule

This was needed to ensure the correct Swift interpreter was

used in Xcode 8. Leaving it here, commented out, in case similar

issues occur when migrating to Swift 4.0.

#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 .

Running prepare_command
/Users/abhishek/Library/Caches/CocoaPods/Pods/Release/IDZSwiftCommonCrypto/0.10.0-4eef2
Running GenerateCommonCryptoModule
SDK: macosx
SDK Version: 10.13
SDK Path: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
Successfully created module ./Frameworks/macosx/CommonCrypto.framework/module.map
ERROR: ERROR: Failed to determine SDK version for iphonesimulator
./GenerateCommonCryptoModule.swift:15:34: warning: 'characters' is deprecated: Please use String or Substring directly
let args: [String] = command.characters.split { $0 == " " }.map(String.init)
^
./GenerateCommonCryptoModule.swift:15:34: warning: 'characters' is deprecated: Please use String or Substring directly
let args: [String] = command.characters.split { $0 == " " }.map(String.init)
^
xcrun: error: SDK "iphonesimulator" cannot be located
xcrun: error: SDK "iphonesimulator" cannot be located
xcrun: error: unable to lookup item 'SDKVersion' in SDK 'iphonesimulator'

@iosdevzone
Copy link
Owner

To figure the correct path to the SDKs this script runs the command:

xcrun --sdk iphonesimulator --show-sdk-path

It looks like this is failing on your system. To test this, open a terminal window and copy and paste the above command into it.
Please also let me know which version of Xcode you are using, which version of macOS.
You should also make sure that xcode-select -p is pointing to your current Xcode.

@Abhishek2611
Copy link
Author

=>I run that command & i got this
xcrun: error: SDK "iphonesimulator" cannot be located
xcrun: error: SDK "iphonesimulator" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphonesimulator'

=>currently I am using Xcode version "9.2" & macOS version is "10.13.2"

@iosdevzone
Copy link
Owner

That's strange. OK, maybe xcode-select is pointing to the wrong location or maybe you don't have the command line tools installed.
What happens when you type xcode-select -p

@iOSKida
Copy link

iOSKida commented Feb 5, 2018

I got the same error .. I found that my Xcode command line tool is not linked with the latest Xcode installed. I linked them and my script started working .
For linking command line tool with Xcode , open xcode -> preferences -> locations -> command line tools -> select the tool compatible to the Xcode version . I have Xcode v 9.2 , so I selected same command line tool version.

@iosdevzone
Copy link
Owner

@iOSKida once you selected the correct version of command line tools were you able to compile?
@Abhishek2611 any update on your situation?

@iOSKida
Copy link

iOSKida commented Feb 6, 2018

@iosdevzone Yes.. I was able to compile

@iosdevzone
Copy link
Owner

@iOSKida -- good! Thanks for offering more information of this!

@iosdevzone
Copy link
Owner

Looks like the issue here was xcode-select not pointing to the version of Xcode being used. Closing this for the moment.

@KhairulRijl
Copy link

same issue on XCode 10.2 & swift 5 and i use 0.10.0 version (swift 4 on read me documentation), i 've done what you suggested but is not solve the issue, please help

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

No branches or pull requests

4 participants