Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 271 Vote(s) - 3.55 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to import a Cocoapod into an App Extension?

#1
[![enter image description here][1]][1]Using Pinterest's iOS SDK via Cocoapods and a bridging header, works fine in my app.

Created new target -> action extension in my project. Have tried linking PDK framework in Linked Frameworks and Libraries, have tried adding a separate bridging header file in the extension, but Xcode crashes not being able to find it.... Any ideas on how to import it?

podfile:

platform :ios, '9.0'

pod "PinterestSDK", :git => "[email protected]:pinterest/ios-pdk.git"

pod "PINRemoteImage"

pod "GBDeviceInfo"

pod 'FBSDKCoreKit'



xcodeproj '/Users/garysabo/Dropbox/Xcode Projects/pinFixer2/pinFixer2.xcodeproj'

bridging header:

#import "PinterestSDK.h"
#import "PDKPin.h"
#import "PDKBoard.h"
#import "PDKImageInfo.h"
#import "PDKResponseObject.h"
#import "PDKClient.h"
#import "PDKModelObject.h"
#import "PDKUser.h"


[1]:
Reply

#2
Check this pod file code as example, this pod file have 2 targets the app and the extension.

platform :ios, '9.0'
use_frameworks!
workspace 'MyWorkSpaceApp'

target 'MyApp' do

pod 'SwiftyUserDefaults'
pod 'Alamofire', '~> 4.0'
pod 'AlamofireImage', '~> 3.1'
#pod 'AlamofireNetworkActivityIndicator', '~> 2.0'
#pod "youtube-ios-player-helper", "~> 0.1.6"
#pod 'Alamofire-SwiftyJSON'
pod 'SwiftyJSON', '~> 3.0.0'
#pod 'SlideMenuControllerSwift'
pod 'UIColor_Hex_Swift', '~> 3.0.2'
#pod 'ALLoadingView', :git => 'https://github.com/ALoginov/ALLoadingView.git', :branch => 'swift3'
pod 'SDWebImage', '~>3.8'
#pod 'SwiftSpinner', :git => 'https://github.com/icanzilb/SwiftSpinner.git', :branch => 'swift3'
#pod 'SideMenu'
#pod 'Fabric'
#pod 'Crashlytics'
#pod 'IQKeyboardManagerSwift', '4.0.6'
#pod 'AELog'
#pod 'TestFairy'
#pod "AwesomeCache", "~> 5.0"
#pod 'Deviice'
#pod 'MKDropdownMenu'
#pod "HanekeSwift", :git => 'https://github.com/Haneke/HanekeSwift.git', :branch => 'feature/swift-3'
pod 'OneSignal', '~> 2.4'

post_install do |installer|
puts("Update debug pod settings to speed up build time")
Dir.glob(File.join("Pods", "**", "Pods*{debug,Private}.xcconfig")).each do |file|
File.open(file, 'a') { |f| f.puts "\nDEBUG_INFORMATION_FORMAT = dwarf" }
end
end

target 'MyAppExtension' do
pod 'OneSignal', '~> 2.4'
end

end

I hope this helps you, best regards
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through