'XCDYouTubeKit/XCDYouTubeKit.h' file not found - ios

I am trying to import a new dependency. I successfully used XCDYouTubeKit before but now after I run the command "pod install" I get this error:
'XCDYouTubeKit/XCDYouTubeKit.h' file not found
Here is my podfile:
pod "XCDYouTubeKit", "~> 2.5.3"
platform :ios, '7.0'
pod 'CocoaLumberjack'
pod 'XCDLumberjackNSLogger', '~> 1.0.0'
target 'MyApp' do
pod 'MBProgressHUD', '~> 1.0.0'
pod 'QRCodeReaderViewController', '~> 4.0.2'
end
Output of "pod install" on terminal:
Analyzing dependencies
Downloading dependencies
Using CocoaLumberjack (2.2.0)
Using MBProgressHUD (1.0.0)
Using NSLogger (1.5.1)
Using QRCodeReaderViewController (4.0.2)
Using XCDLumberjackNSLogger (1.0.2)
Using XCDYouTubeKit (2.5.3)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 5 dependencies from the Podfile
and 6 total pods installed.

in Edit Scheme - build uncheck "Projectname"Tests's analyze and run , then OK.

Related

Unable to find a specification for `ARCore (~> 1.2.1)

I'm trying to compile and build the ARCore example provided here :
https://github.com/google-ar/arcore-ios-sdk
My Podfile looks as follows
`=> cat Podfile
target 'MyTarget'
platform :ios, '11.0'
pod 'ARCore', '~> 1.2.1'
pod 'Firebase/Core', '~> 4.11'
pod 'Firebase/Database', '~> 4.11'`
When I run pod install, I get the folllowing error :
==> pod install
Analyzing dependencies
[!] Unable to find a specification forARCore (~> 1.2.1)``
Run pod update or pod install --repo-update.
Your podspec repo is probably does not include 1.2.1 yet.

Alamofire swift library version 4.4 is not installing in swift 3.0.2 project

I am trying to install Alamofire 4.4 in my swift project with pod i am following the step from the given link (https://github.com/Alamofire/Alamofire)
but i am facing this issue:-
[!] Unable to satisfy the following requirements:
- `Alamofire (~> 4.4)` required by `Podfile`
None of your spec sources contain a spec satisfying the dependency: `Alamofire (~> 4.4)`.
You have either:
* out-of-date source repos which you can update with `pod repo update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
I have in in my System :
Mac os : 10.12.2
x_code version : 8.2.1
swift version : 3.0.2
pod File configuration :
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'testAlarmofireAndswiftyJson' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for testAlarmofireAndswiftyJson
pod 'Alamofire', '~> 4.4'
end
I am stucking here please help.
Execute the follwoing on your terminal
sudo gem install cocoapods --pre
Then change pod file configuration to '9.0' to '10.0'
platform :ios, '10.0'
target 'project_name' do
pod 'Alamofire', '~> 4.4'
end
After changing the podfile configuration open terminal and go to project path.
Then execute following
'pod install'
You need to add a source statement to your Podfile so CocoaPods knows where to search for the pods you're referencing. You likely want this at the top of your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
CocoaPods 1.1.0+ is required to build Alamofire 4.0.0+.
To update CocoaPods you simply install the gem again
$ [sudo] gem install cocoapods
Or for a pre-release version
$ [sudo] gem install cocoapods --pre
And then try again
Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target '02-Weibo' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for 02-Weibo
pod 'Alamofire', '~> 4.4'
pod 'SnapKit', '~> 3.2.0'
end
bash command:
appledeMacBook-Pro:Weibo apple$ pod install
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (3.1.0)
Installing Alamofire (4.4.0)
Installing SDWebImage (4.0.0)
Installing SVProgressHUD (2.1.2)
Installing SnapKit (3.2.0)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `Weibo.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There are 6 dependencies from the Podfile and 5 total pods installed.
[!] There are duplicate dependencies on `SnapKit` in `Podfile`:
- SnapKit (~> 3.2.0)
- SnapKit
you can try bash command :
appledeMacBook-Pro:Weibo apple$ pod update
Update all pods
Updating local specs repositories
CocoaPods 1.2.1 is available.
To update use: `sudo gem install cocoapods`
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.1
Analyzing dependencies
Downloading dependencies
Using AFNetworking (3.1.0)
Using Alamofire (4.4.0)
Using SDWebImage (4.0.0)
Using SVProgressHUD (2.1.2)
Using SnapKit (3.2.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 5 dependencies from the Podfile and 5 total pods installed.
appledeMacBook-Pro:Weibo apple$

How to solve Xcode build error "No such module RxCocoa"?

I'm very new on Mac / iOS development with Xcode and I have trouble on building my App. I work since 4 days on that issue, but I have no more ideas to find the reason.
The App has 6 projects, bundled in a xcworkspace. I added via cocoapods and via terminal with command pod install RxSwift, RxCocoa, OMGHTTPURLRQ, PromiseKit and SVWebViewController successfully. The projects without dependencies could build successfully. Two projects (libraries) with command "import RxCocoa" and "import RxSwift" in *.swift files are failed with error "No such module 'RxCocoa'".
I read some Stackoverflow posts and the RxSwift Git documentation to solve the issue, without success.
Screenshot of build error and added reference
Podfile definition:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.1'
use_frameworks!
target 'CheckMyBus' do
pod "OMGHTTPURLRQ", "~> 3.1.2“
pod "RxSwift", "~> 2.3.0"
pod 'RxCocoa', '~> 2.3.0'
pod 'PromiseKit', '~> 3.2.1'
pod 'SVWebViewController', '~> 0.2‘
end
Pods installation via terminal:
MacMinis-Mac-mini:CheckMyBus MacMini$ pod install
Analyzing dependencies
Downloading dependencies
Using OMGHTTPURLRQ (3.1.3)
Using PromiseKit (3.2.1)
Using RxCocoa (2.3.1)
Using RxSwift (2.3.1)
Using SVWebViewController (0.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 5 dependencies from the Podfile and 5 total pods installed.
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
[!] The `CheckMyBus [Debug]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `Pods/Target Support Files/Pods-CheckMyBus/Pods-CheckMyBus.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `CheckMyBus [Release]` target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `Pods/Target Support Files/Pods-CheckMyBus/Pods-CheckMyBus.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
MacMinis-Mac-mini:CheckMyBus MacMini$
Can anybody help me?
I solved the issue. The solution was so simple, but I had previously found no documentation to use pods with several libraries.
I forgot to add pods definitions in the Podfile for the libraries.
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.1'
workspace 'MyWorkspace'
use_frameworks!
target 'MainProj' do
pod "OMGHTTPURLRQ", "~> 3.1.2“
pod "RxSwift", "~> 2.3.0"
pod 'RxCocoa', '~> 2.3.0'
pod 'PromiseKit', '~> 3.2.1'
pod 'SVWebViewController', '~> 0.2‘
project 'MainProj'
end
target 'Lib1' do
pod "RxSwift", "~> 2.3.0"
pod 'RxCocoa', '~> 2.3.0'
project 'Lib1/Lib1.xcodeproj'
end
target 'Lib2' do
pod "OMGHTTPURLRQ", "~> 3.1.2“
pod "RxSwift", "~> 2.3.0"
pod 'RxCocoa', '~> 2.3.0'
project 'Lib2/Lib2.xcodeproj'
end
Note: Build works, but not Test! Explanation: CocoaPods Podfile config issue. The given pod/framework is specified for the non test main target, maybe even for the (unit) Test target, but not for the UI Test target! E.g.: platform :ios, '9.0' use_frameworks! target 'Xyz' do pod 'MessageK…

Installing Firebase 2.4.3 cocoapods

I am trying to install Firebase to my project with cocoapods. I modified pod file by adding line
pod 'Firebase', '>= 2.4.3'
And when I type pod install to terminal it gives me an error:
[!] Unable to satisfy the following requirements:
Firebase (>= 2.4.3) required by Podfile
I tried to uncomment and change global "platform" directive to "platform :ios, '9.0'", but it didn't help me, error still there.
try this line:
pod 'Firebase', '~> 2.4'

Google Analytics v3 Pod with other Swift Pods

I'm developing an swift iOS app and at this "final" stage I'll add Google Analytics.
I'm following their Guide
But it failed at pod install command...
Error Log
Downloading dependencies
Using Alamofire (1.2.2)
Using Bolts (1.2.0)
Using CryptoSwift (0.0.10)
Using FBSDKCoreKit (4.2.0)
Using FBSDKLoginKit (4.2.0)
Using FBSDKShareKit (4.2.0)
Installing Google (1.0.7)
Installing GoogleAnalytics (3.13.0)
Using GoogleMaps (1.10.1)
Installing GoogleNetworkingUtilities (1.0.0)
Installing GoogleSymbolUtilities (1.0.0)
Installing GoogleUtilities (1.0.1)
Using ImageLoader (0.3.2)
Using SQLite.swift (0.1.0.pre)
Using SwiftyJSON (2.2.0)
[!] The 'Pods-<My-Project>' target has transitive dependencies that include static binaries: (<path-to-project-dir>/Pods/Google/Libraries/libGGLAnalytics.a, <path-to-project-dir>/iOS/Pods/Google/Libraries/libGGLCore.a, <path-to-project-dir>/iOS/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a, (...)
As stated in this tutorial, "pods written in Swift must be created as dynamic frameworks" (and that's why the use_frameworks! in the Podfile).
As it seems, this new Google Analytics pod is a static binary.
I tried to change the pod the same as this answer but the pod install command warned me that (obviously) [!] GoogleAnalytics-iOS-SDK has been deprecated in favor of GoogleAnalytics. And I'm not sure it's a good idea to add an already deprecated library to a new project instead of getting the right one to work.
My project has a target dependecy to iOS 8.0+ and the podfile is:
```
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'MyProject' do
pod 'Alamofire', '~> 1.2'
pod 'SwiftyJSON', '~> 2.2.0'
pod 'GoogleMaps'
pod 'ImageLoader', '~> 0.3.0'
pod 'SQLite.swift', git: 'https://github.com/stephencelis/SQLite.swift.git'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'CryptoSwift'
pod 'GoogleAnalytics', '~> 3.13'
end
target 'MyProjectTests' do
end
```
Is anyone having the same problem or know how to solve this using the v3 GA pod?
Replace the line
pod 'GoogleAnalytics-iOS-SDK', '~> 3.10'
in your Podfile with
pod 'GoogleAnalytics', '~> 3.13'
Clean project and run pod install again. The pod you're currently using is the one that is deprecated.

Resources