1

No matter I edit the version or update cocoapods, I get the below error. I have seen people facing the same error on forums, but is there any workaround for this:

Installing Baidu-Analytics-SDK (3.0)

[!] Error installing Baidu-Analytics-SDK [!] /usr/bin/unzip /var/folders/xy/mt3d95xj4t739cx2pq491gnm0000gn/T/d20170114-1208-jyb88w/file.zip -d /var/folders/xy/mt3d95xj4t739cx2pq491gnm0000gn/T/d20170114-1208-jyb88w

Archive: /var/folders/xy/mt3d95xj4t739cx2pq491gnm0000gn/T/d20170114-1208-jyb88w/file.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of /var/folders/xy/mt3d95xj4t739cx2pq491gnm0000gn/T/d20170114-1208-jyb88w/file.zip or /var/folders/xy/mt3d95xj4t739cx2pq491gnm0000gn/T/d20170114-1208-jyb88w/file.zip.zip, and cannot find /var/folders/xy/mt3d95xj4t739cx2pq491gnm0000gn/T/d20170114-1208-jyb88w/file.zip.ZIP, period.

If there is an alternate way to use this, then please let me know.. Else i have stumbled upon an alternate pod in a private repository. And this issue should be reported to cocoapods so they can remove this not working pod from their directory.

rd_
  • 395
  • 3
  • 13

2 Answers2

0

Here is the solution

just try,

pod install 'BaiduAnalytics'

instead of

pod install 'Baidu-Analytics-SDK'
Community
  • 1
  • 1
Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256
0

If anyone tries to install the Baidu SDK using cocoa pod then follow the following steps :

  1. Open terminal
  2. Go to your project directory
  3. pod init
  4. Open the pod file created in your project directory
  5. Write the following lines in the pod file

platform : ios, '10.0'

target “BaiduAnalyticsTestApp” do
   pod 'BaiduAnalytics'
end
  1. Then save it and run pod install

Hope this will help others too. Download link : https://mtj.baidu.com/web/sdk/index

Rubaiyat Jahan Mumu
  • 3,887
  • 1
  • 33
  • 35