appcode can not load underlying module for snapkit - ios

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.

Related

Build error when using both objective-c and swift libraries with Cocoapods

I have an Objective C project which has a podfile like this:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'Linbik' do
pod 'AFNetworking', '~> 2.6.0'
pod 'DateTools', '~> 1.6.1'
pod 'Sentry', :git => 'https://github.com/getsentry/sentry-swift.git', :tag => '2.1.3'
end
DateTools is an Objective C library, and Sentry is a Swift one.
If I remove Sentry pod and use_frameworks! line, and then run pod install, pods are correctly installed and project builds just fine.
But if I run pod install with the podfile above, pods are correctly installed but I can't build the project. It gives me an error like this:
'NSDate+DateTools.h' file not found with <angled> include; use "quotes" instead
The import is done like this:
#import <NSDate+DateTools.h>
This is just part of the code that gives me an error. There are also some imports like this:
#import <AFNetworking/UIImageView+AFNetworking.h>
That gives the same error.
Xcode suggests me to use double quotes on import, but that doesn't help.
What can I do?
I found the solution by deleting derived data.
Change pod 'AFNetworking', '~> 2.6.0' And use this
pod 'AFNetworking', '~> 3.0
pod 'DateTools', '~> 1.6.1'
pod 'Sentry', :git => 'https://github.com/getsentry/sentry-swift.git', :tag => '2.1.3'

Swift Eureka error inside library after installation

I just did install Eurika library from xmartslab
I already googled this problem, unfortunally found nothing
As usual added it to my Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'Project' do
pod 'Alamofire', '~> 3.0'
pod 'SDWebImage', '~>3.7'
pod 'ObjectMapper', '~> 1.1'
pod 'Eureka', '~> 1.5'
pod 'SDWebImage', '~>3.7'
end
After installation I got a bunch of errors:
What can cause this problem. Could it be any incompatibility with other libraries?
I suppose you are using Xcode 7.2 or older. You will have to upgrade to Xcode 7.3 or change your Podfile to pod 'Eureka', '~> 1.4.1'

WatchKit Can't Import Library From Pods

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

FBSDKs installed via Pods - No such module on Swift

I installed the following pods to my Swift project:
platform :ios, '8.0'
pod 'ParseUI', '~> 1.1.4'
pod 'Parse', '~> 1.7.5'
pod 'FBSDKCoreKit', '4.3.0'
pod 'FBSDKLoginKit', '4.3.0'
pod 'FBSDKShareKit', '4.3.0'
pod 'ParseFacebookUtilsV4', '~>1.7.5'
pod 'AFNetworking', '~> 2.5.4'
I added a Bridging Header for all the pods except the 3 FBSDKs. On https://developers.facebook.com/docs/ios/getting-started , it says...
"Swift
v4.1 of the SDK supports modules natively so no bridging headers are required. Simply import the appropriate kit module in your .swift files"
Problem is when I try to import those 3 frameworks to AppDelegate, I get the error message "No such module 'FBSDKCoreKit'"
Anyone encounter this issue before?
Thanks in advance.
Try adding use_frameworks! to the top of your podfile. It solved my problem. Initialy it is shown as #use_frameworks! in podfile . Remove the # infront of use_frameworks!. This blog explains about it.

Archive build with split pods across app and watchkit extension

I have been unable to get Cocoapods to build a deployable iOS app that requires different pods for the app and the watchkit extension. I have tried a format suggested in another thread: Include pods in main target and not in WatchKit extension
but it has numerous failures, including not finding headers. Here's the closest I can get:
source 'https://github.com/CocoaPods/Specs.git'
link_with 'RailTime-WatchKit-Extension'
pod 'Reachability'
pod 'IGInterfaceDataTable'
target :'RailTime', :exclusive=>true do
pod 'ASIHTTPRequest', '~> 1.8.2'
pod 'BPXLUUIDHandler', '~> 0.0.1'
pod 'MBProgressHUD', '~> 0.9'
pod 'Appirater', '~> 2.0.4'
end
This works fine for the simulator, but fails when trying to install on a device. The first error is:
ld: library not found for -lPods-RailTime-WatchKit-Extension
I'm using the latest Cocoapods right now .37. No errors are generated when performing a pod install.
Any help would be greatly appreciated!
Ken
Here's the general format that I use for my WatchKit app. See if this helps:
source 'https://github.com/CocoaPods/Specs.git'
target 'RailTime-WatchKit-Extension' do
link_with 'RailTime-WatchKit-Extension'
pod 'Reachability'
pod 'IGInterfaceDataTable'
end
target :'RailTime' do
link_with 'RailTime'
pod 'ASIHTTPRequest', '~> 1.8.2'
pod 'BPXLUUIDHandler', '~> 0.0.1'
pod 'MBProgressHUD', '~> 0.9'
pod 'Appirater', '~> 2.0.4'
end
OK, the solution was quite simple, even though I'm not sure why it worked. As suggested in another thread, I did a 'pod init', which now creates a template that is knowledgable about the multiple targets. I then just filled it in! Here's what I have now:
platform :ios, '8.2'
source 'https://github.com/CocoaPods/Specs.git'
target 'RailTime' do
pod 'Reachability'
pod 'ASIHTTPRequest', '~> 1.8.2'
pod 'BPXLUUIDHandler', '~> 0.0.1'
pod 'MBProgressHUD', '~> 0.9'
pod 'Appirater', '~> 2.0.4'
end
target 'RailTime-WatchKit-Extension' do
pod 'Reachability'
pod 'IGInterfaceDataTable'
end
target 'RailTime-WatchKit-App' do
end

Resources