I am trying to run AudioKit.start() in my viewDidAppear method but I get the following error:
Module 'AudioKit' has no member named 'start'
My pod file includes:
pod 'AudioKit', '~> 4.0'
pod 'AudioKit/Core', '~> 4.0'
pod 'AudioKit/UI', '~> 4.0'
And I'm importing:
import AudioKit
import AudioKitUI
I'm on Xcode 12.0.1. Thanks!
You didn't mention which version of AudioKit actually got installed, but if its the latest pod, use AKManager instead of AudioKit. If I were you I'd leave the Cocoapods world and use Swift Package manager with AudioKit v5.
Related
When I run the project I got the error like ‘'Crashlytics/Crashlytics.h' file not found’.I am using Xcode10.1 with iOS12.
I installed crashlytics using the following lines in my pod file.
pod 'Fabric', '~> 1.7'
pod 'Crashlytics', '~> 3.10.7'
How can I solve this error?
Add the following to your project's Framework Search Paths
$(SRCROOT)/Pods/Crashlytics/iOS
I have a pod in which I want to include a static framework. When I add a framework .dependency in .podspec:
s.dependency 'Static_Framework', '~> 1.0.0'
I get an error:
- ERROR | [iOS] unknown: Encountered an unknown error (The 'App' target has transitive dependencies that include static binaries: (/private/var/folders/bc/T/CocoaPods-Lint-20171010-28205/Pods/Static_Framework/Frameworks/Static_Framework.framework)) during validation.
Is it possible to add a static framework to a pod? If yes, what is the proper way to do it?
Or could I add that framework to the project together with my pod to make my pod working?
pod 'Static_Framework', '~> 1.0.0'
pod 'My_Pod', '~> 0.1.0'
Because now when I add my pod to the project without describing a Static_Framework in s.dependency I get a build error No such module 'Static Framework' in my pod files.
In a .podspec file, above the line:
s.dependency 'Static_Framework', '~> 1.0.0'
Add:
s.static_framework = true
when using CocoaPods version 1.4.0 and above everything should work fine!
if you use pod "Google/SignIn", it install GoogleSignIn 3.0.0
if you use pod "GoogleSignIn", it install the last version 4.0.2
However if you run the app with pod "GoogleSignIn", then the app crash with the message:
You have enabled the SignIn service in Developer Console, but it appears as though your Podfile is missing the line: 'pod "Google/SignIn" or you may need to run `pod update` in your project directory.
So GoogleSignIn 3.0.0 is atm the last version to use?
I could make it work with:
pod 'Google/SignIn'
pod 'GoogleSignIn', '~> 4.0'
pod 'Google', '~> 3.0'
The pod 'Google/SignIn' is just to pass the check, since it is an older version then GoogleSignIn then it will be ignored by pod.
You'll need pod 'Google', '~> 3.0' also.
With this you can use Google Sign 4.0+ with no errors.
Firstly ,Sorry#Marckaroujo I am not able to add comment so m asking qstn on ur post.
I have added following after reading your post
pod 'Google/SignIn'
pod 'GoogleSignIn', '~> 4.0'
pod 'Google', '~> 3.0'
But now m getting the warning after I press pod install.
[!] Google has been deprecated
Would the warning above creates some error later in my app when it will be live to public m concerned .
I have added AFNetworking through cocoa-pod and it's working fine now i need to add one more library . so can i use the existing pod file or i should create new one
please help me here how to do that.
You can add your pod like this. And after you done that you should run a pod install.
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
# use_frameworks!
target 'myproject' do
pod 'AFNetworking', '~> 3.0'
pod 'GoogleAnalytics', '~> 3.14'
pod 'Mantle', '~> 2.0'
pod 'PureLayout', '~> 3.0'
end
Yes, you only need one pod file per project. I recommend that you look into the guides about using cocoapods on their website.
https://guides.cocoapods.org/using/index.html
I would recommend that you use the cocoapods OS X application as it will help you create pod files and update them.
https://cocoapods.org/app
Use Existing Pod file -> Open -> Add the library name.
If you add your library then open Terminal window, set your project path, then install, its finally installed the Library.
Terminal window -> cd path -> pod install
hope its helpful
I followed the instruction from Cocoapods.
Below is my Podfile:
platform :ios, '8.2'
pod 'SwiftyJSON', '~> 2.1'
pod 'SwiftSpinner', '~> 0.6'
pod 'Alamofire', '~> 1.1'
pod 'SuperRecord', '~> 1.2'
pod 'Toucan
When I did pod install I got the following error:
Pods written in Swift can only be integrated as frameworks; this feature is still in beta. Add use_frameworks! to your Podfile or target to opt into using it.
Updated:
Below is my console log:
$ pod install
Analyzing dependencies
Downloading dependencies
Installing Alamofire (1.1.4)
Installing SuperRecord (1.2)
Installing SwiftSpinner (0.6.0)
Installing SwiftyJSON (2.1.3)
Installing Toucan (0.2.0)
[!] Pods written in Swift can only be integrated as frameworks; this feature is still in beta. Add `use_frameworks!` to your Podfile or target to opt into using it.
Add "use_frameworks!" to your Podfile:
Please see below sample Podfile
target 'MySample' do
pod 'AFNetworking', '~> 2.5'
pod 'Net', '~> 0.2' #This is a sample in Swift
use_frameworks! # <--Use this line
end
Add "use_frameworks!" to your Podfile because:
Because Apple doesn't let you build static libraries that contain
Swift. Unlike Objective-C, Apple doesn't ship the Swift standard
runtime libraries with iOS. This decouples the language version from
the platform version. When you build an app with Swift, you're
responsible yourself to ship them. By default, Xcode uses
swift-stdlib-tool to handle copying the Swift runtime dylibs, but the
tooling falls short when attempting to ship frameworks that use Swift
with an app that is Objective-C only. Your app executable and the
frameworks you ship will all use the same set of dylibs, which are
embedded into the Frameworks subdirectory of the application bundle.
First, that's because you can't link against different versions of the
standard libraries. Furthermore it is desirable to embed them only
once and not multiple times, because of constraints to memory size and
network speed, which are relevant for distribution.
You can make CocoaPods integrate to your project via frameworks
instead of static libraries by specifying use_frameworks!. If that's
not present, you won't be able to integrate dependencies, if you
depend on a pod which includes Swift source code.
Reference: http://blog.cocoapods.org/CocoaPods-0.36/
as it written in Podfile it says uncomment use_frameworks! is your are using Swift so all you have to do uncomment this line and all works just fine
# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'YourProjectName' do
pod 'SwiftyJSON', '~> 2.1'
pod 'SwiftSpinner', '~> 0.6'
pod 'Alamofire', '~> 1.1'
pod 'SuperRecord', '~> 1.2'
pod 'Toucan'
# all other pods goes here
end
target 'YourProjectName' do
end
target 'YourProjectName' do
end
the solution is very simple. You only have to add these lines to your pod file:
target 'PassDTAFirebase' do
inherit! :complete
# Here your pods
use_frameworks!
end
I my case i used to upgrade cocoapods by command sudo gem install cocoapods and my issue got resolved. I used objective - c as well as swift libraries in my project.