Reputation: 115
I am trying to import the DDMathParser framework into my Swift app. I tried following the installation instructions from the DDMathParser wiki, though it did not work:
DDMathParser is packaged as a Swift framework.
Add DDMathParser.xcodeproj to your workspace and link MathParser.framework into your app.
(Link: https://github.com/davedelong/DDMathParser/wiki/Installing)
Here's what I did:
What am I doing wrong, or how do I correctly install this framework?
(Using Xcode 7.2.1)
Upvotes: 1
Views: 3635
Reputation: 1213
Try the following as it helped me a lot of times:
The contents of Podfile :
workspace 'Beacon'
xcodeproj 'BeaconDemo/BeaconDemo.xcodeproj'
platform :ios, '8.0'
use_frameworks!
pod 'NearbyMessages', '~> 0.9'
pod 'EstimoteSDK', '~> 3.8'
pod 'Charts', '~> 2.2'
pod 'GoogleMobileAds', '~> 7.6'
Open terminal and go to your workspace
Upvotes: 0
Reputation: 381
1) $ sudo gem install cocoapods (gem will get installed in Ruby inside System library)
2) create a xcode project
3) Open terminal
4) cd "path to your project root directory"
5) pod init
6) open -e podfile (podfile will get open in text mode. Initially it will be emppty put the follwoing line of code.)
7) pod 'DDMathParser' (Cocoapods Podfile name ) // This is example
8) pod install
CocoaPods 0.36 and above will support for swift
Upvotes: 0
Reputation: 3405
Navigate to your project using the "Terminal app"
once at the root folder type pod init
a Podfile
will be created you can open it with nano Podfile
and add these changes with updated paths to your specific project.
source 'https://github.com/CocoaPods/Specs.git'
xcodeproj 'YOURPROJECT.xcodeproj'
platform :ios, '9.0'
use_frameworks!
pod 'DDMathParser'
Then save your file.
type pod install
and hit enter.
Now open your new .xcworkspace that was created. In any file that you want to use the DDMathParser framework
just add import DDMathParser
to the top of your file.
Upvotes: 0