Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Podspec s.vendored_frameworks not working

Maybe I misunderstood the way of s.ios.vendored_frameworks work but I'm trying to use/integrate the Sinch.framework in my own SDK (for the voip part) but in my ReplaceMe.swift I'm not able to import or use any stuff from it

My hierarchy after I used s.ios.vendored_frameworks is the following My hierarchy

My podspec (last version of cocoapods is used)

  s.ios.source_files = 'PoCSDK/Classes/**/*','PoCSDK/Frameworks/Sinch.frameworks/Headers/*'
  s.ios.vendored_frameworks = 'PoCSDK/Sinch.framework'
  s.ios.public_header_files = 'PoCSDK/Frameworks/Sinch.frameworks/Headers/*'

  s.resource_bundles = {
     'NoddsSDK' => ['PoCSDK/Assets/*']
  }

  s.frameworks = 'UIKit', 'MapKit', 'AudioToolbox', 'AVFoundation'
  s.ios.dependency 'Alamofire', '~> 4.5'
  s.ios.dependency 'Socket.IO-Client-Swift'
  s.ios.dependency 'ReachabilitySwift'
like image 465
Bryan D Avatar asked Nov 30 '17 14:11

Bryan D


People also ask

What is Podspec?

A Podspec, or Spec, describes a version of a Pod library. One Pod, over the course of time, will have many Specs. It includes details about where the source should be fetched from, what files to use, the build settings to apply, and other general metadata such as its name, version, and description.

Does CocoaPods support XCFramework?

Cocoapods too supports the distribution and consumption of XCFramework.


2 Answers

What I did to add Fabric and Crashlytics to my development pod:

  1. Create Frameworks folder in your Development pod folder

  2. Copy your frameworks to the folder

  3. Update your pod spec

    s.vendored_frameworks = 'podname/Frameworks/Fabric.framework', 'podname/Frameworks/Crashlytics.framework'
    
    s.preserve_path = 'podname/Frameworks/*'
    
like image 100
McDJ Avatar answered Nov 14 '22 21:11

McDJ


Have you checked the real project structure in finder rather than those in Xcode? Because I put my "Finder" path in vendored_frameworks and all worked for me.

like image 22
Mattia Ducci Avatar answered Nov 14 '22 21:11

Mattia Ducci