SachK13 / SKActivityIndicatorView

A lightweight And Easy-To-Use ActivityIndicator For Your iOS App.
MIT License
66 stars 21 forks source link

Pod installation issue #12

Open aliwaseem72 opened 4 years ago

aliwaseem72 commented 4 years ago

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:

SachK13 commented 4 years ago

@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 commented 4 years ago

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

SachK13 commented 4 years ago

Can you please send me your pod file ?

aliwaseem72 commented 4 years ago

**# 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 commented 4 years ago

Can U suggest that how I can resolve it?

aliwaseem72 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

aliwaseem72 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

can u send SKActivityIndicator.swift and SKActivityIndicatorStyle.swift

both pod files.

aliwaseem72 commented 4 years ago

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 commented 3 years ago

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!)
}