This article introduces the development environment that needs to be prepared before using the Whiteboard SDK.
If you haven’t been in contact with Cocoapods, we recommend you to read [Tang Qiao’s Blog-Use CocoaPods for Dependency Management of iOS Programs] (https://blog.devtang.com/2014/05/25/use-cocoapod-to-manage -ios-lib-dependency/ "Use CocoaPods for dependency management of iOS applications"), learn why we use Cocoapods. In addition, the Taobao source mentioned in the article is no longer maintained and needs to be replaced with Ruby-China RubyGems Mirror.
If you think the above two articles are cumbersome, you can directly install them according to the brief steps we provide.
-Brief steps: Open the terminal that comes with the mac, and then enter and execute the following commands in sequence.
## Note: Ruby-China recommends 2.6.x, the ruby that comes with mac can also be used
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
gem sources -l
## Note: The above command should output the following content, >>> represents the output here
>>> https://gems.ruby-china.com
## Note: Make sure only gems.ruby-china.com
sudo gem install cocoapods
## Note: Since we don't need to use the official library, we don't need to execute pod setup.
pod init
platform :ios, '9.0'
target'Your App' do
# Pay attention to capitalization
pod'Whiteboard'
end
If the pod repository has not been pulled for a long time, we may not be able to find our repo. At this time, it is recommended to use
pod repo update
to update the pod repository.
pod install
If the Terminal displays Pod installation complete!, it means that the automatic library addition has been completed. Click to open the YourApp.xcworkspace file of the project, or enter the following command line to open it, and note that "Your App" is your Target name.
open YourApp.xcworkspace
Example
folder, execute pod install
, and then build the project. Under Pod Project, find the Products
folder, copy the Whiteboard.framework
file, and copy it to the corresponding file.Build Phases
tab, find the Link Binary with Libraries
item, and click the + icon to start adding WebKit.framework
.If you use this method, you need to handle the dependency of
Whiteboard
in thepodspec
file by yourself. Currently there areYYMolde
anddsbridge
, which may be added in the future.
This integration method requires a certain amount of project integration experience. We do not recommend using this method and will not provide too much technical support for this integration method.