How to put SVGKit in my project - ios

I creat a swift app ,and I want use SVGKit , I follow the steps from GitHub, But I can not
import SVGKit
erro is "no such module SVGKit"
Adition:
so I can not use the kit in my code,
I am new in ios ,maybe something i miss ,please help me ,thanks
so sorry i can not put on my Screenshot,
Kit is from https://github.com/SVGKit/SVGKit
when I type
import SVGKit
in my swift file
I get the erro "no such module SVGKit"

Mainly; you need to download the SVGKit Project from github. After that you must follow the steps in "Build the static library (automatic)" part. The steps are building the svgkit project getting the release output and importing it to your own project, after that you need to make some configuration in own project. And you must import it in your code with #import "SVGKit/SVGKit.h"

thanks a lot ,finally, I follow the steps from github, and I find ,my project is a mix one, I should use a bridge between oc and swift,I run my project well end.

Related

Missing required module 'MLKit' error while using a framework that uses MLKit

Recently I created a iOS Framework called "MLKit Framework" that uses MLKit Face Detection library. In order to achieve that, I just imported the library in Podfile
according to documentation.
As expected, that created a xcworkspace called MLKit Framework. In order to test that new framework, I created an app called MLKitApp and added that app to the same workspace. Then I added the framework MLKitFramework to that app and tried to build it but I get the error statement: "Missing required module 'MLKit'"
as the image below.
Why Am I getting that error? What I'm doing wrong?
Reproducible Example
I created a Reproducible Example here. In order to execute that example execute the following:
Execute pod install for MLKitFramework;
Add MLKitApp to MLKitFramework.xcworkspace;
Add MLKitFramework.framework as a MLKitApp Frameworks, Libraries and Embedded Content;
Try to build MLKitApp.
And voilà
You can't do this because your's "MLKitFramework" have dependency to MLKit.
You should add MLKit framework to MLKitApp additionally.
Have you checked out the ML Kit Vision Quickstart? Please note it contains two apps: one for swift and another for objective-c. You check check out the swift app for your purpose - it contains face detection feature. The Vision Quickstart is similar to your MLKitApp and shows you an example how to integrate with ML Kit cocoapods directly without needing to introduce an "MLKitFramework" or manually manage dependency configuration. Instead, you should let CocoaPods manage that. You can use this Quickstart as a template for implementing your own app.
I don't now if this helps after all this time, but for future references here it goes:
Google hides the header, so you have to manually specify the header you want to add so your test can find it.
If you go to: Project> targets YourProjectTest > Build Settings > Search Paths > Header Search Paths and add:
"${PODS_ROOT}/Path-to-the-Header-in-your-Pods-Folder/Soucers"
In my case it was:
"${PODS_ROOT}/GoogleMLKit/MLKitCore/Sources"
It worked big time for me.
I hope it helps :)

Google Speech To Text Api using Objective C

I am using GoogleSpeechRecongnization api within my project for Speech To Text.
I have copied all required files and installed pod from sample of Google for Speech To Text Api. Also copied these 2 files AudioController, SpeechRecognitionService from the Sample Code to implement the feature.
Now when I compiled my code, I received errors as in attached image.
While same steps and files are working perfectly in demo app with the custom interface, created by me.
Please help me to fix these in my main project. Thanks
The SpeechRecognitionService require google service to be linked which lies in the google folder of the sample Project, please add that too in your project, it should be working..
See where is google folder here
Cheers.
Check demo project supported architectures in build settings...
I think you need to add missing architecture in your build settings
Maybe it's in your project and maybe it's in the Pods project

Cannot import framework file in custom framework in iOS

I am creating a custom framework in iOS. I have a built-in framework as shown in the image. When I try to import a file from an already created framework (Ex,smma) I get the error "smma.h" file not found. Any help will be appreciated.
I also had some issues with creating my own framework and including it in a project. I found Kodmunki had a really useful guide.
https://kodmunki.wordpress.com/2015/09/22/ios-9-universal-cocoa-touch-frameworks/
Pay particular attention to the section on Adding Frameworks to an App. This was where I was making mistakes. Once I followed the steps in this section I found it was working correctly.

Why do I need to 'import 'framework'?

I'm working on a personal project and I've installed Firebase with Cocoapods and imported it in the bridging-header.
My question is why do I get an error if I try to use a Firebase method in my project if I haven't written import Firebase at the top? The same can be said for Google Analytics etc.
The reason I ask is because in this tutorial: Ray Wenderlich Firebase Tutorial
Firebase is configured the same way as mine - but none of the documents contain import Firebase, and the project recognizes any Firebase method universally without errors.
I know I can just use import but I don't understand what I am doing differently and would rather not have to.
I think u have in pod file line:
use_frameworks!
delete it and reinstall pods it should help
In the mentioned project, the import is done from the Grocr-Bridging-Header.h, it's actually an Objective-C import:
#import <Firebase/Firebase.h>
The reason why the import was done from Objective-C is beause the project is quite old and Cocoapods didn't have support for Swift then.

Why am I getting the following error in my Xcode project: No such module 'SwiftyJSON'?

I followed the instructions in the github project which are pretty straightforward, I can't figure out why it won't work:
Instructions
My Xcode Project Navigator
My Swift file
If you're following 1. you must not import the file, just use it.

Resources