Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pod installation issue #12

Open
aliwaseem72 opened this issue Apr 26, 2020 · 15 comments
Open

Pod installation issue #12

aliwaseem72 opened this issue Apr 26, 2020 · 15 comments

Comments

@aliwaseem72
Copy link

I'm facing this issue when I try to update or install pod

**[!] CocoaPods could not find compatible versions for pod "SKActivityIndicatorView":
In Podfile:
SKActivityIndicatorView (~> 1.0.0)

None of your spec sources contain a spec satisfying the dependency: SKActivityIndicatorView (~> 1.0.0).

You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.**
@SachK13
Copy link
Owner

SachK13 commented Apr 26, 2020

@aliwaseem72 first you have to do pod repo update which will update pod spec references in your ~/.cocoapods/repos folder.
then try again install pod.

@aliwaseem72
Copy link
Author

I tried it but issue is still same. I update the class of SKActivityIndicator manually.

@SachK13
Copy link
Owner

SachK13 commented Apr 27, 2020

Can you please send me your pod file ?

@aliwaseem72
Copy link
Author

**# Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target 'iQSRDigital' do

Comment the next line if you don't want to use dynamic frameworks

use_frameworks!

Pods for iQSRDigital

pod 'Alamofire', '> 4.7'
pod 'SKActivityIndicatorView', '
> 1.0.0'
pod 'IQKeyboardManagerSwift'
pod 'SkyFloatingLabelTextField', '~> 3.0'
end**
This the code of my whole pod file. Anything required.
I had been update it manually, to add your code. But need to fix it via pod.

@aliwaseem72
Copy link
Author

Can U suggest that how I can resolve it?

@aliwaseem72
Copy link
Author

Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /Users/usmanshafi/Documents/Projects/RedittApp/Pods/SKActivityIndicatorView/SKActivityIndicatorView/Classes/SKActivityIndicatorView.swift, line 145

this issue appeared at

if activityIndicatorView?.superview == nil && userInteractionStatus == false {
backgroundView = UIView(frame: window!.frame)
backgroundView!.backgroundColor = backgroundViewColor

@SachK13
Copy link
Owner

SachK13 commented May 9, 2020

Could you please send more details:
The version of Xcode you're using.
The version of iOS you're targeting.
The full output of any stack trace or compiler error.
A code snippet that reproduces the described behavior, if possible.

@aliwaseem72
Copy link
Author

Xcode version 11.3.1
iOS targeted version 13.0
this is the error on run time

2020-05-09 15:54:21.695135+0500 RedittApp[1466:68416] Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /Users/usmanshafi/Documents/Projects/RedittApp/Pods/SKActivityIndicatorView/SKActivityIndicatorView/Classes/SKActivityIndicatorView.swift, line 128

Screenshot is attached now.
In my old project I use the ** var window: UIWindow?** in app delegate its work, but now in new project its not working. Now I install this version pod 'SKActivityIndicatorView', '~> 1.0.0' but in previous I was using pod 'SKActivityIndicatorView', '~> 0.1.0'

Screen Shot 2020-05-09 at 3 56 07 PM

@SachK13
Copy link
Owner

SachK13 commented May 9, 2020

I tried with the same information you have provided above, here its working fine. I'm not able to reproduce the error. it would be helpful if you can send me a code demo that can produce the same error.

@aliwaseem72
Copy link
Author

Please share your email I'll send you the demo project.

@aliwaseem72
Copy link
Author

RedittApp.zip

Please use it, I'm using your library in Api Manager class. you can trace it from ViewController. I call the getAuthToken() in viewController, you can trace through it.

@staticVoidMan
Copy link

Fatal error: Unexpectedly found nil while unwrapping an Optional value: file /Users/usmanshafi/Documents/Projects/RedittApp/Pods/SKActivityIndicatorView/SKActivityIndicatorView/Classes/SKActivityIndicatorView.swift, line 145

this issue appeared at

if activityIndicatorView?.superview == nil && userInteractionStatus == false {
backgroundView = UIView(frame: window!.frame)
backgroundView!.backgroundColor = backgroundViewColor

Same issue here.

So to get around this for now, I've limited pod to older working commit:

pod 'SKActivityIndicatorView' , :git => 'https://github.com/SachK13/SKActivityIndicatorView.git', :commit => 'd0357c8'

@pvaghasiya777
Copy link

pvaghasiya777 commented Jun 9, 2020

same error aliwaseem,
Xcode 11.1
target 13.0
how to solve??

can u send SKActivityIndicator.swift
and SKActivityIndicatorStyle.swift

both pod files.

@aliwaseem72
Copy link
Author

same error aliwaseem,
Xcode 11.1
target 13.0
how to solve??

can u send SKActivityIndicator.swift
and SKActivityIndicatorStyle.swift

both pod files.

Still I'm suffering with this issue. Here I upload a demo project. You can replace the class in which you're getting error with the code committed on git. I try it in another project, but its target was iOS 12. But in iOS 13 issue is still here.
SachK13 please can you check this issue in my demo project???

@cloudtenlabs
Copy link

Please update the code like below
SKActivityIndicatorView.swift

if activityIndicatorView?.superview == nil && userInteractionStatus == false {
    if window != nil {
        backgroundView = UIView(frame: window!.frame)
        backgroundView!.backgroundColor = backgroundViewColor
        window!.addSubview(backgroundView!)
        backgroundView?.addSubview(activityIndicatorView!)
    }
} else {
    window?.addSubview(activityIndicatorView!)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants