Cannot import IQKeyboardManager in Objective-C project - objective-c

I installed, IQKeyboardManager with pod. using this line:
pod 'IQKeyboardManager'
Then I wanted to import it in a view controller:
In view controller .m file (I tested both of import lines):
1. #import "IQKeyboardManager.h" ----> clang: error: linker command failed with exit code 1 (use -v to see invocation)
2. #import IQKeyboardManager; ----> Module 'IQKeyboardManager' not found

IQKeyboardManager (Objective-C):- Just drag and drop IQKeyBoardManager directory from demo project to your project. That's it.
it does not require any additional setups in Objective c.
Just Drag and drop.
if you want call any method of IQKeyboardManager then direct call static methods.
[IQKeyboardManager methodName];

I think you need to import like this
#import <IQKeyboardManager/IQKeyboardManager.h>

Related

Use leveldb-library.framework from firebase for iOS with Xcode9

I would like to be able to use the leveldb-library.framework that google is shipping with their firebase iOS SDK. I don't seem to be able to import the framework.
What I did:
1: copy leveldb-library.framework to project dir
2: in Xcode > Target > Linked Frameworks and Libraries [+] add the framework
3: make sure the header search path it set correctly
4: add a Objective-C++ wrapper class and import the leveldb headers
Getting a linker error:
/Users/ronny/projects/clients/internal/TestCD/TestCD/LevelDB.mm:11:9: fatal error: 'leveldb/db.h' file not found
#import "leveldb/db.h"
^~~~~~~~~~~~~~
1 error generated.
The Headers directory in the framework provides all the headers: db.h, options.h but without the "leveldb" parent directory.
Changing the imports to the following throws the same error:
#import <leveldb/db.h>
#import <leveldb/options.h>
Once I change the imports to this:
#import <leveldb-library/db.h>
#import <leveldb-library/options.h>
the linker is able to find the includes but throws another error:
In file included from /Users/ronny/projects/clients/internal/TestCD/TestCD/LevelDB.mm:11:
/Users/ronny/projects/clients/internal/TestCD/leveldb-library.framework/Headers/db.h:10:10: fatal error: 'leveldb/iterator.h' file not found
#include "leveldb/iterator.h"
^~~~~~~~~~~~~~~~~~~~
1 error generated.
At this point I am no longer sure what can be done in order to resolve this. Adding the import path doesn't help either. Xcode completes the import as such:
Any pointers towards solving this would be greatly appreciated. The project can be found here: https://github.com/ronnyf/TestCD
The framework expects to be called leveldb, but your example calls it leveldb-library.
mv leveldb-library.framework leveldb.framework
mv leveldb.framework/leveldb-library leveldb.framework/leveldb
Update the Xcode project with the renamed framework and it successfully builds.

UI Testing xCode 7.3 - Cannot print variables (i.e 'po app') in the console: (could not build Objective-C module 'Bolts')

I have UI testing project set up and was working perfectly in xCode 7.2. Since I upgraded to xCode 7.3 I cannot print any variables in the console. I set breakpoints in both Application (main project) and UI Test, 'po' command works in the main project but as soon as it reaches UI testing the 'po' command stop working. I have tried almost all the solutions I could find on the internet but still no luck. It complains about the Objective-C module 'Bolts' that I am not using at all in UI testing. Below is how the error message looks like:
(lldb) po app
error: Error in auto-import:
failed to get module 'MyUITestProject' from AST context:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/Bolts-umbrella.h"
^
/Users/../Pods/Target Support Files/Bolts/Bolts-umbrella.h:7:9: note: in file included from /Users/../Pods/Target Support Files/Bolts/Bolts- umbrella.h:7:
#import "BFAppLinkReturnToRefererController.h"
^
/Users/../Pods/Bolts/Bolts/iOS/BFAppLinkReturnToRefererController.h:14:9: error: include of non-modular header inside framework module 'Bolts.BFAppLinkReturnToRefererController'
#import <Bolts/BFAppLinkReturnToRefererView.h>
...
...
Is there anyone run into the same issue? Does anyone knows what cause this failure and any advice?
Delete:
/Users/{User}/Library/Developer/Xcode/DerivedData
and then restart your Xcode.

GADBannerViewDelegate.h file not found in TOLAdAdapterAdMobAds.h

I got GADBannerViewDelegate.h file not found error in TOLAdAdapterAdMobAds.h although i have already included that file as shown in image below. I have used
pod 'LARSAdController', '~> 3.0'
to install the pod file for it
Just replace
#import "GADBannerViewDelegate.h"
#import "GADBannerView.h"
with
#import <GoogleMobileAds/GoogleMobileAds.h>
This has to be done as GoogleMobileAds SDK is now a framework instead of static library.
After making this change, you may get an error at request.testing = YES; in TOLAdAdapterGoogleAds.m. To correct that, just replace that line with: request.testDevices = #[kGADSimulatorID]; and everything should work fine.

Sencha Command - #import 'sencha-touch/default/all' not found

When I run the sencha command like so:
sencha app build production
I get an error which points to the following line in app.scss:
#import 'sencha-touch/default/all';
In my app I have the following folder:
\App\touch\resources\themes\stylesheets\sencha-touch\default
But there is no 'all' folder. Is my application structure broken or is there something else I am missing?
The error might be generated because there's no _all.scss inside
touch\resources\themes\stylesheets\sencha-touch\default
Contents of _all.scss are
#import 'core';
#import 'widgets';
Check application structure again or just create _all.scss manually and see if it solves problem.

duplicate error in xcode with sharekit on phonegap (but not with phonegap-plugin)

I have a xcode/phonegap project where I want to use the sharekit - not as phonegap-plugin but from inside the objective-c code, so no need to implement the phonegap plugin version of the sharekit.
I import the sharekit classes and want to compile but there is an error telling me that the reachability class is defined twice: one inside phonegap and one inside sharekit.
ld: duplicate symbol _OBJC_IVAR_$_Reachability.reachabilityRef in
/Users/Shared/PhoneGap/Frameworks/PhoneGap.framework/PhoneGap and
/Users/Username/Library/Developer/Xcode/DerivedData/Appname-cjsfgpsrurmznybczdgqiotrctnm/Build/Intermediates/Appname.build/Debug-iphonesimulator/AppnameID
.build/Objects-normal/i386/Reachability.o for architecture i386
Command
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang
failed with exit code 1
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1
how could I get rid of this?
thnx!
I just deleted the Reachabilty Class Group from the Sharekit Group and added
#ifdef PHONEGAP_FRAMEWORK
#import <PhoneGap/Reachability.h>
#else
#import "Reachability.h"
#endif
to the SHK.m