AutoComplete Google Places in a Textfield in IOS - ios

I have a UITextField and a UITableView under the UITextField.
When user enter anyplace it show the relevant places to the data which user right should be shown in the table view. For this I have search a lot to the third party lib's and follow step by step procedure of google but failed to get the results.
Now again I have tried the Google Developers procedure but not results so far, I have got API key in my AppDelegate.m file and done some coding in my view controller where I want to show.
I'm just messed up how to get my result, can anyone help me?
I'm getting this issue I don't know why because I have only used Objective-c code in my project from Google Developers.
the issue is this:
"Swift Language Version” (SWIFT_VERSION) is required to be configured
correctly for targets which use Swift. Use the [Edit > Convert > To
Current Swift Syntax…] menu to choose a Swift version or use the Build
Settings editor to configure the build setting directly"

Maybe one of the Frameworks you are using was Swift. So check each and every Framework you have dragged to your project.
If you are using CoreData you need to change Code Generation to Objective-C too if it was selected as Swift.
Find out more Here

Related

How to programmatically use the language translation function in iOS? [Swift 5]

I am aware that there is a Translate function in a text menu in UITextView in iOS
(see for example Remove Translate and share options from selection menu on textview in xamarin).
I would like to use this function by myself without using the Translate menu. For example, I would like to translate an entire sentence displayed in a UITextView instead of translating only the selected parts.
Is there a specific func that we can use? How can I call this function?
Apple's translate API is not available to the public.
https://developer.apple.com/forums/thread/650024
You can use Google's GoogleMLKit/Translate instead.
Use ML Kit on iOS.
Add GoogleMLKit/Translate in your podfile by running the following command in the terminal.
pod 'GoogleMLKit/Translate', '3.1.0'
Read the Instal & Getting started sections on https://cocoapods.org/ if you have not set cocoapods or you do not know how to do so.
Google has written a very good sample code. It is straight forward.
Read from the Translate a string of text section onwards.
https://developers.google.com/ml-kit/language/translation/ios
info:
You may find this link helpful.
https://maximbilan.medium.com/googletranslate-api-in-swift-a36489a84508

using Stripes bank example UI in Swift project

I am trying to use stripes UI example in my person swift project. I have tried to drag and drop the desired files inside of my project and update my headers and compile sources but I am still getting hit with errors I will leave screenshots below,
and most importantly, I am getting
I was wondering if someone has previously used Stripes BECS example UI in their own personal project and had any idea on why these issues would be popping up.
You need to install Stripe per the documentation, you can't just drag and drop files in to your project: https://stripe.com/docs/mobile/ios/basic#client-side
I'd recommend you try doing a basic example integration in a new project to figure out how the bits work, and then make use of those learnings to integrate it into your application.

Is there any easiest way to implement all required methods of protocol in iOS?

First of all it's not the duplicate of this question because i couldn't find any discussion about offline documentation, suitable answers and about future release of updates in Xcode there.
Actually I am from android and java background and currently starting to develop iOS apps too. As we all know we use to implement all methods of an Interface easily with the help of suggestions given in IDE by pressing Alt + Enter.
And here in the iOS we have to see the reference each time and search for all required & optional methods, and implement them manually one by one which consumes times It's fine for a moment But
My Questions are :
Is there Any easiest way to view all required method at first lookup in documentation OR implement all required methods of protocol with the help of IDE ?
Is it possible that we will get this feature in future release of Xcode's update ?
I can't be ensure availability of Internet all the time, And How can I see the documentation at that time ?
Just go ahead and declare that your class adopts the protocol in question.
Xcode will point the error if you fail to implement any of the required methods:
From the list under the disclosure triangle (items with gray "!" icons), you can get a hint of the names of the missing methods. You can start to type and autocomplete will do the rest.
Update for Xcode 9:
It looks like now, you can auto-fill the methods with one click:
Refactoring
Rename a symbol in a single file or in a project across Swift, C, Objective-C, C++ files, and Interface Builder files.
View all the possible changes in one editor pane.
Convert method signatures between Swift and Objective-C formats.
Update properties, getters, setters, and synthesized iVars as needed.
Apply a fix-it everywhere with one button.
Automatically fill in missing cases in switch statements, and mandatory methods for protocol conformance with one click.
Extract method functionality for all supported languages, along with other language-specific local refactoring.
(emphasis mine)
And indeed:
Clicking "Fix" adds the necessary method stubs.
Go to Xcode -> preferences(on top-left corner) -> downloads -> here you will see list of items that can be downloaded. Download the documentation for iOS x.x version. So now, whenever you are offline.. you can go to help(top bar in window) -> documentation and search for whole ios documentation.. all the development guides etc

How do I build a Cocoapod framework for swift, while keeping implementation details hidden?

I am trying to build an iOS swift framework to display encrypted photos. Photos are sent by my server (something like a hashed binary file) after calling a specific API with specific details. I will then decrypt the photo, and display it to the user.
Correct and point me in the right direction if I am wrong, but swift only allows frameworks - meaning no static library. And this will expose my implementation details (such as the method to decrypt my photo).
What I would like to achieve is to create a cocoapod distributable framework for paid developers to implement (once they subscribe to me). It is supposed to expose simple public APIs, and hide implementation details.
I have tried various ways to achieve that but to no avail. I would really like to keep the implementation to swift codes only, with minimal Obj-C codes.
Build a swift framework, and build an objective-c static library as a wrapper
But I cannot seem to get it to work. Any idea if this is possible?
Build a swift framework in a swift framework
Stupid idea, i'm able to see the framework's implementation details within the other framework...
Build a swift framework, and build an objective-c framework as a wrapper
I cannot seem to get this to work either...
I have been working on this project for about 2 weeks now, and have been all over Googling for it. Just in case anybody would like to try, you may try to do the following and check if it works.
Cocoapods Friendly Framework
Implementation Details Hidden
Uses Alamofire (or any public framework that connects to internet)
Any help would be appreciated, thanks!

XCode Command Shift O Expose Swift Files

In XCode, you can browse Objective C Header/Documentation Files using Command + Shift + O.
For example, if you type in UISegmentedControl, only the Obj C version comes up.
If you Command click UISegmentedControl anywhere in code, the Swift version exists.
Is there a way to see Swift version through the Search Shortcut?
It seems to work if you open it from within a Swift file you've created. Maybe then it's showing a bridging header or something?
While in the Swift ViewController generated by a test project, I can Cmd-Shift-O and select UISegmentedControl.h, or UITableView.h and the result shows up only in Swift.
But, if I then try to open a different file from within that one, even though the current file is in Swift, it only shows Obj-C. The language of the file doesn't seem to be as important as the .swift extension.
Seems to be the same if you Cmd-click and view the documentation - it'll show whichever language you came from. XCode6 seems to still be a bit screwy w/this though - about 2 steps in I keep getting "Symbol Not Found" even for basic things like UIView :\
Might as well just look at SwiftDoc.org.
Click on the Swift logo bird at the right of the cmd+shift+o window so it turns blue, congrats you've turn on "Swift generated interface" if possible for the searched files

Resources