how to use SPGooglePlacesAutocomplete in ios - ios

i am using this objective-c wrapper to get the Google Places Autocomplete API result in search bar. i am able to use this sample .but when i copied all file in my project and want to use it i am getting lots of error. how to use it in iOS 8.to make to get Google Places Autocomplete . i am missing something here or what is this error .how to solve this.

import uikit.h into your header file.
#import <UIKit/UIKit.h>
and remove all autorelease statement. they are not allowed in to arc.
that will rectify your general issues.

I'm the one who created that CocoaPods repo you mentioned. It's out of maintenance, as you can find a better solution in Google Places SDK for iOS

Related

iOS: #import AnyModule not found after editing class using cocoapods

I have an Obj-C/Swift project setup that imports modules using cocoapods. In any class where I am importing a framework using the #import function I get the error message SomeModule not found. However, when I build/run it compiles fine, and the framework works and functions as expected.
The problem here is that it messes me up when I'm trying to write code below the error (i.e., objects appear as ints because the error above messes up the compiler; function auto complete doesn't work, etc). What's weird, if I cmd+s to save the class, the error messages go away. Then the second I start typing again, they reappear.
I've gone as far as removing all of my cocoapods and reinstalling them, but to no avail. This has only been an issue since installing xcode 8.
Anyone have any insight into this?
Thanks in advance.
Sorry for super late response - the only way I found to get around this was to use the "old" style of framework import; i.e., ... it seems like some Frameworks just don't play nicely with the #import declaration. #pablo-martinez
If someone has a better solution please feel free to share.

iOS panoramic app: PanoramaView porting on swift

I need to show some 360 degree spherical photos and was trying to use the RobbyCraft's Panorama repository on Github. I'm able to get the Obj-C project running well, but I don't understand on how use the swift example described by Fabien here.
(By the way I know that I can also use the Google Maps API to render panoramic photos, but I'm afraid that it's a more complicated approach for my needs...)
I made a swift app with a GLKitViewController. Obviously I get "Use of unresolved identifier 'panoramaView'...
Must I use the "Bridging-Header.h" declaration ? (I mean #import "PanoramaView.h")?
I tried to do so, but then I'll get many errors on PanoramaView.h itself.
(PS. I added the needed frameworks to my project, too)
In the Bridging-Header.h file add the following line on top
#import "PanoramaView.m"
In PanoramaView.h, at the top add
#import <GLKit/GLKit.h>
I had same problem and this solved it

Integrate Stripe SDK in iOS (Swift)

I added Stripe SDK to my iOS app (added PassKit.framework alongside the StripePublishableKey in AppDelegate) via manual installation, but I came across one of two issues when the import statement (tried both #import <Stripe/Stripe.h> and #import "Stripe.h") was added to the bridging header file:
1) With #import <Stripe/Stripe.h>, the bridging header no longer imports, despite having worked before. (I checked Swift Compiler under Build Settings and the file is correct. Plus once I removed elements of Stripe, the problems went away).
2) With #import "Stripe.h", I get errors that indicate that the SDK isn't picked up at all.
(I've checked the SO archive for relevant threads, which pointed to the aforementioned import statements as possible solutions. And, as a Swift learner, I'm not as familiar with implementing Obj-C solutions. I cobbled what I could from Stripe's documentation.)
Is this a Stripe problem? What am I missing in implementation?
This worked for me and hopefully this will be helpful for anyone who finds himself/herself in the same predicament. First, it's #import <Stripe/Stripe.h>. Next, adding turning on Passbook under Capabilities allowed Passkit.framework to be linked to the app (or recognized in the library).

TBXML in an iOS 8 extension fails to build

In my iOS app I use TBXML for xml processing, it's not officially updated but it still working fine for me.
I'm trying to create a Today extension for iOS 8 and when I add TBXML as a Compile Source I get the following:
TBXML.h
Before adding the extension, I didn't have any build issue with TBXML.
Any ideas of how can I resolve this?
Thanks
Fixed by adding #import <Foundation/Foundation.h> at the beggining of TBXML.h.
Seems that when working with extension, this file is not imported or is imported later
I always want to know WHY. Why would it work before without the include of foundation and not now? What changed? So I dug a little deeper and found the answer: Prefix headers. Xcode 5 must had automatically added a prefix header as a convenience or something. And the new one doesn't. That old prefix header automatically included Foundation, Availability, and UIKit.
Who knows why they changed it. Maybe it has something to do with swift.
A more detailed answer is at: Unknown type name 'NSError' and others

MobFox iOS integration "Cannot find protocol declaration"

I have been trying to integrate MobFox in one of my iOS apps and I'm stuck with a problem.
I have added the framework to the project, and all the other necessary files as well but when I try to add MobFoxVideoInterstitialViewControllerDelegate under #interface MainViewController : UIViewController<UIAlertViewDelegate, MobFoxVideoInterstitialViewControllerDelegate>{ /*...*/ } in my MainViewController.h file, it says Cannot find protocol declaration for MobFoxVideoInterstitialViewControllerDelegate. All the files are there. What might be the problem?
It's old, but I want to answer it. The problem was that someone tried to integrate MobFox already without video and didn't remove the files. So the library used those files instead of new ones. Removing old files has resolved my problem

Resources