I'm adding a watch application, and I'm attempting to import a library within my WatchKit Extension that my iOS app uses (SwiftyJSON). I have updated my podfile as such:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'Alamofire', '~> 3.0'
pod 'AlamofireImage', '~> 2.0'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod "PubNub", "~> 4.1"
pod 'Siren'
end
target 'MyAppWatch Extension' do
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
end
When I run the pod install, everything seems to behave like it should. The problem is when I'm using the import SwiftyJSON inside an WKInterfaceController, I get the error No such module SwiftyJSON. Is there another setting that I haven't set properly?
The way I use to add pods to the watchOS framework with the following podfile:
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
platform :ios, '8.0'
link_with 'AppName'
target 'WatchName Extension' do
platform :watchos, '2.0'
pod 'NameOfYourPOd', '~> x.0.0'
end
But there is a very important point about the include of some libraries in the Watch Extension, there are libraries that do not support watchos as a platform yet. There are some good articles about how to add it manually to its podspec to support it.
I hope this help you
Related
swift project is build and run ok in Xcode also AppCode,
but AppCode IDE report bellow error,I can not fix this .
I found UIProgressView can use progressView.snp but WKWebView can't ,
may be this is problem.
any one can help me ? Now I have to give up appcode .
see:
PodFile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, "8.0"
use_frameworks!
target 'fruit-shop-ios' do
# pod '**', :git => 'http://**.git'
pod 'IQKeyboardManagerSwift' #,'4.0.10'
pod 'SnapKit', '~> 3.2.0'
# pod 'AFNetworking', '~> 3.0'
pod 'Alamofire', '~> 4.4'
end
the way is ignore the error.
Appcode to format and edit code, Xcode to run.
I have a podfile as follows:
platform :ios, '9.0'
#use_frameworks!
inhibit_all_warnings!
workspace 'MyWorkspace.xcworkspace'
project 'MyServices/MyServices.xcodeproj'
target 'MyServices' do
pod 'AFNetworking', '~> 3.0'
pod 'Mantle', '~> 2.0'
end
where MyServices is a framework project. Everything works fine when I compile the MyServices target. However, when MyServices framework is imported in my iOS project, I get the error:
<Mantle/Mantle.h> file not found.
<AFNetworking/AFNetworking.h> file not found.
This happens ONLY when I include the above files in my framework's public header files.
However, if I change my pod file to do use_frameworks!, it works perfectly fine even in MyServices public headers.
Any ideas?
target 'MyServices' do
platform :ios, '9.0'
pod 'AFNetworking', '~> 3.0'
pod 'Mantle', '~> 2.0'
end
try this
podfile content
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'Quickblox-WebRTC', '~> 2.2'
pod 'QuickBlox'
The dependency Quickblox-WebRTC (~> 2.2) is not used in any concrete target.
The dependency QuickBlox is not used in any concrete target.
With CocoaPods 1.0.1 the pod file format has changed somewhat, so you need to explicitly define the targets that the pods apply to:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
target 'XXX' do
pod 'Quickblox-WebRTC', '~> 2.2'
pod 'QuickBlox'
end
I updated the gem pod and I am now getting an error while compiline Signal-iOS. Here is the error I am getting:
[!] Invalid Podfile file: [!] The specification of link_with in
the Podfile is now unsupported, please use target blocks instead..
Here is the content of the Podfile:
platform :ios, '8.0'
source 'https://github.com/CocoaPods/Specs.git'
link_with ["Signal", "SignalTests"]
I have absolutely no familiarity with CocosPod so this is gibberish to me. I spent time reading online docs, but there is a bit of conflicting information due to the recent changes and deprecation of commands. What is the recommended way to change the file so the project can build again?
In this case, it would be like this:
platform :ios, '8.0'
target 'Signal' do
pod 'SignalServiceKit', :git => 'https://github.com/WhisperSystems/SignalServiceKit.git'
pod 'OpenSSL', '~> 1.0.208'
pod 'PastelogKit', '~> 1.3'
pod 'FFCircularProgressView', '~> 0.5'
pod 'SCWaveformView', '~> 1.0'
pod 'DJWActionSheet'
pod 'JSQMessagesViewController', :git => 'https://github.com/WhisperSystems/JSQMessagesViewController', :commit => 'e5582fef8a6b3e35f8070361ef37237222da712b'
target 'SignalTests' do
inherit! :search_paths
end
end
I've recommended it on this PR: https://github.com/WhisperSystems/Signal-iOS/pull/1180
I am using various Swift and Objective-C libraries in my (Swift) project. My Podfile looks as follows:
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 3.0'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
pod 'FBSDKLoginKit'
pod 'Fabric'
pod 'TwitterKit'
pod 'SimpleAuth/Instagram'
pod 'AFNetworking', '~> 3.0'
pod 'Parse'
To have support for using both (Swift and Objective-C) libraries, I use use_framework! directive in Podfile to install and use them. If we use directive use_framework! for Objective-C libraries, we are not required to create any kind of bridging-header.h and we can use it directly by import ModuleName. I am having no issues with any of the above mentioned pods/frameworks while installing or using them.
But there is this one framework which is written in Objective-C and I install it by adding its entry in Podfile as pod 'CleverTap-iOS-SDK'. The installations goes well but when I try to import CleverTapSDK or import CleverTap to use the library, it is giving me no such module error.
Just in case: My Xcode version is - 7.3 (7D175)