I am developing an app on Xcode 8.2.1 utilizing swift 3. I have a few asynchronous task that I need lined in an appropriate order and so I have decided to use PromiseKit for this purpose. I added a podfile to my project directory and modified then installed it using pod install
(via cocoapods). The install worked appropriately as my command line gave me this success message:
(This by the way is the podfile text):
I added the framework to my linked frameworks and libraries for the project as shown below:
With all of this done, I expected that I would be able to utilize import PromiseKit
at the top of my viewControllers in order to access the functions in the framework's library. However, typing import PromiseKit
gave me the following error:
Does anybody know what the issue might be?
So it turns out this particular issues stems from using the wrong version of the PromiseKit
. I was running the pod install
without defining what version of PromiseKit
should be, hoping that this ambiguity would allow the install to pick the most up to date version. (Also, initially specifying the version, as is suggested on the website:
swift_version = "3.0"
pod "PromiseKit", "~> 4.0"
would return an error that I couldn't access the 4.0). This error was:
` 'PromiseKit (~>4.0)' required by 'Podfile'
None of your spec sources contain a spec satisfying the dependency:...
This turned out to be the overall issue (that I needed to use the 4.0 specification). To get rid of this error I ran the following commands:
pod repo remove master
pod setup
pod install #in the project directory... after modifying the podfile to the code
#written above... ie. including the '"~> 4.0"'
The repo and setup take some time, though.