yerpy
yerpy

Reputation: 1446

Xcode does not see framework installed via cocoa pods

I am trying to add the SharkORM framework to my application but somehow after installing pod which looks like :

target 'XXX' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for XXX

pod 'Firebase/Core'
pod 'SharkORM'

  target 'XXXTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'XXXUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

and using command pod install; getting this :

Analyzing dependencies
Downloading dependencies
Using Firebase (3.12.0)
Using FirebaseAnalytics (3.6.0)
Using FirebaseCore (3.4.7)
Using FirebaseInstanceID (1.0.8)
Using GoogleInterchangeUtilities (1.2.2)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleToolboxForMac (2.1.1)
Using SharkORM (2.1.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 8 total pods installed.

Which sounds great because the installation is succeed.

In the AppDelegate.swift getting error :

Use of undeclared type 'SRKDelegate' here :

class AppDelegate: UIResponder, UIApplicationDelegate, SRKDelegate {

I would say that i have to use import SharkORM on the top of my file but it does not shows me this file exist. It should - > Inside Pods file i have these components then what is going on ? As u can see I am using Firebase which is working.

Thanks in advance!

Upvotes: 0

Views: 379

Answers (2)

Toma
Toma

Reputation: 2936

You have to import SharkORM to use the pod. Also, make sure you're working on the .xcworkspace file in the same directory as the project (it's automatically created when you execute pod install.

Upvotes: 0

Lineesh K Mohan
Lineesh K Mohan

Reputation: 1712

  1. Install the framework

    pod install
    
  2. Open your workspace XXX.xcodeproj and create a bridging header. To create bridging header

    //File -> New File -> Header File
    //Save it as a YourApp-Bridging-Header
    
  3. Compile the SharkORM framework target

enter image description here

  1. Then include the framework header within your app, by adding this to the bridging header

    #include <SharkORM/SharkORM.h>
    
  2. import module import SharkORM in AppDelegate class

    import SharkORM››
    
  3. Add SRKDelegate in AppDelegate class

    class AppDelegate: UIResponder, UIApplicationDelegate, SRKDelegate
    

Upvotes: 1

Related Questions