1

我用模板制作了新的 Xcode 项目。我有一个 pod 文件,它只要求 'spatialite/core' pod(这取决于 sqlite3 pod。我运行 'pod install --verbose',我得到了这个:

Analyzing dependencies

Updating spec repositories
Updating spec repo `master`
  $ /usr/bin/git pull --ff-only
  Already up-to-date.

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods`: (``)

Finding Podfile changes
  - spatialite/core

Resolving dependencies of `Podfile`
Starting resolution (2015-04-04 23:47:58 -0700)
Creating possibility state for spatialite/core (= 4.1.1) (1 remaining)
  Attempting to activate spatialite/core (4.1.1)
  Activated spatialite/core at spatialite/core (4.1.1)
  Requiring nested dependencies (sqlite3)
  Creating possibility state for sqlite3 (1 remaining)
    Attempting to activate sqlite3 (3.8.8.3)
    Activated sqlite3 at sqlite3 (3.8.8.3)
    Requiring nested dependencies (sqlite3/common (= 3.8.8.3))
    Creating possibility state for sqlite3/common (= 3.8.8.3) (1 remaining)
      Attempting to activate sqlite3/common (3.8.8.3)
      Activated sqlite3/common at sqlite3/common (3.8.8.3)
      Requiring nested dependencies ()
Finished resolution (3 steps) (Took 0.007224 seconds) (2015-04-04 23:47:58 -0700)
Unactivated:
Activated: spatialite/core, sqlite3, sqlite3/common

Comparing resolved specification to the sandbox manifest
  - spatialite
  - sqlite3

Downloading dependencies

-> Using spatialite (4.1.1)

-> Using sqlite3 (3.8.8.3)
  - Running pre install hooks

Generating Pods project
  - Creating Pods project
  - Adding source files to Pods project
  - Adding frameworks to Pods project
  - Adding libraries to Pods project
  - Adding resources to Pods project
  - Linking headers
  - Installing targets
    - Installing target `Pods-sqlite3` iOS 8.0
    - Installing target `Pods` iOS 8.0
  - Running post install hooks
  - Writing Xcode project file to `Pods/Pods.xcodeproj`
  - Writing Lockfile in `Podfile.lock`
  - Writing Manifest in `Pods/Manifest.lock`

Integrating client project

Integrating target `Pods` (`TestProject.xcodeproj` project)

一切处理都没有错误,但问题是它只安装了 Pod-sqlite3 和 Pod,而不是 Pod-spatialite。

我一直在查看 podspec.json 文件,但看不出有什么问题,也找不到进一步调试的方法。如果有人可以向我指出“pod”命令的命令行选项,这将非常有帮助,该选项提供有关它在后台执行的内容以及出错的地方的核心详细信息。

谢谢!

4

1 回答 1

0

我找到了它没有被添加的原因:代码被正确下载,但是 podspec.json 配置不正确导致找不到下载的代码。

解决方法是修改 podspec.json 文件如下:

   "source": {
-    "http": "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.1.1.tar.gz"
+    "http": "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.1.1.tar.gz",
+    "flatten": true
   },

在此之后,事情开始工作。稍后它仍然无法编译,但这是由于另一个已知问题(请参阅https://github.com/andreacremaschi/SpatialDBKithttps://github.com/andreacremaschi/SpatialDBKit/issues/12

于 2015-04-05T08:02:47.357 回答