ksa_coder
ksa_coder

Reputation: 1413

Xcode - Podfile not installing properly swiftvalidator

I am trying to install the SwiftValidator library (Accessible here but I am unable to get it to work.

Basically opened Terminal and cd to the directory of the xcode project. In there, I created a Podfile with the following content:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, "8.1"

use_frameworks!
pod 'SwiftValidator', '3.0.1' 

and then after that I typed in terminal:

pod install

This is the output I got in the console:

Updating local specs repositories

Updating spec repo `master`
  $ /usr/bin/git pull --ff-only
  From https://github.com/CocoaPods/Specs
     435c890..1ee4098  master     -> origin/master
  Updating 435c890..1ee4098
  Fast-forward
   Specs/KMCache/0.1.1/KMCache.podspec.json | 20 ++++++++++++++++++++
   1 file changed, 20 insertions(+)
   create mode 100644 Specs/KMCache/0.1.1/KMCache.podspec.json

Analyzing dependencies

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

Finding Podfile changes
  - SwiftValidator

Resolving dependencies of `Podfile`

Comparing resolved specification to the sandbox manifest
  - SwiftValidator

Downloading dependencies

-> Using SwiftValidator (3.0.1)
  - 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 `SwiftValidator` iOS 8.1
      - Generating Info.plist file at `Pods/Target Support
      Files/SwiftValidator/Info.plist`
      - Generating module map file at `Pods/Target Support
      Files/SwiftValidator/SwiftValidator.modulemap`
      - Generating umbrella header at `Pods/Target Support
      Files/SwiftValidator/SwiftValidator-umbrella.h`
    - Installing target `Pods` iOS 8.1
      - Generating Info.plist file at `Pods/Target Support
      Files/Pods/Info.plist`
      - Generating module map file at `Pods/Target Support
      Files/Pods/Pods.modulemap`
      - Generating umbrella header at `Pods/Target Support
      Files/Pods/Pods-umbrella.h`
  - Running post install hooks
  - Writing Xcode project file to `Pods/Pods.xcodeproj`
    - Generating deterministic UUIDs
  - Writing Lockfile in `Podfile.lock`
  - Writing Manifest in `Pods/Manifest.lock`

Integrating client project

Integrating target `Pods` (`Mawq.xcodeproj` project)
  - Running post install hooks
    - cocoapods-stats from
    `/Library/Ruby/Gems/2.0.0/gems/cocoapods-stats-0.6.2/lib/cocoapods_plugin.rb`

Sending stats
      - SwiftValidator, 3.0.1
  Pod installation complete! There is 1 dependency from the Podfile and 1 total
  pod installed.

Things seem great but when I open the project (not the .xcodeproj file but the .xcworkspace) and I type into the view controller class the following, it says it doesn't recognize the underlying module

import SwiftValidator

Any idea why this is happening when things seem to install correctly?

Update: Added image of the directory of the project...

enter image description here

Upvotes: 0

Views: 455

Answers (2)

ksa_coder
ksa_coder

Reputation: 1413

So this is unexpected. I had to actually build the project once and then when I typed the import statement it showed the SwiftValidator library.

This is unexpected because I installed other pods earlier and this was never required. Hope this helps the next person.

Upvotes: 1

Daij-Djan
Daij-Djan

Reputation: 50129

maybe the framework isn't called SwiftValidator - check the Pods project's products and see what it generates in terms of frameworks

JUST AN EXAMPLE showing where to look in Xcode.

enter image description here

Upvotes: 0

Related Questions