Reachability.swift: No such module 'ReachabilitySwift

Created on 14 Nov 2017  路  17Comments  路  Source: ashleymills/Reachability.swift

Hello,

i am using xcode 9.1 and swift 3.2 always getting an error:

No such module 'ReachabilitySwift

in podfile:
pod 'ReachabilitySwift'

kindly let me know what can i do ... always getting an error

Most helpful comment

I think @eoinzy is possibly installing the wrong library. It should definitely be pod 'ReachabilitySwift' in your Podfile. However, the import statement, should indeed be import Reachability.

Reference the CocoaPods installation steps in the documentation: https://github.com/ashleymills/Reachability.swift#cocoapods-1

If you're still getting errors after doing the above. I think this is a bug in xCode. I was getting a similar error running xCode 9.1 and Swift 4.0.2.

What I did to resolve:

  1. Clean project
  2. Close xCode
  3. Open xCode
  4. Rebuild project

After these steps, in xCode 9.1 the No such module error would still appear, but my build would succeed, and the references to ReachabilitySwift classes resolved fine.

I also tested on xCode 9.0 and the error was not reproducible there, it only appeared in xCode 9.1.

All 17 comments

Its been renamed to just "Reachability".
Change the name in your Podfile and try again.

I think @eoinzy is possibly installing the wrong library. It should definitely be pod 'ReachabilitySwift' in your Podfile. However, the import statement, should indeed be import Reachability.

Reference the CocoaPods installation steps in the documentation: https://github.com/ashleymills/Reachability.swift#cocoapods-1

If you're still getting errors after doing the above. I think this is a bug in xCode. I was getting a similar error running xCode 9.1 and Swift 4.0.2.

What I did to resolve:

  1. Clean project
  2. Close xCode
  3. Open xCode
  4. Rebuild project

After these steps, in xCode 9.1 the No such module error would still appear, but my build would succeed, and the references to ReachabilitySwift classes resolved fine.

I also tested on xCode 9.0 and the error was not reproducible there, it only appeared in xCode 9.1.

You just get into this directory: targets -> build settings -> linking -> other linker flags. Then, you can just replace the ReachabilitySwift with the Reachability.

@NiltiakSivad The issue is still happening after following your steps also.

@NiltiakSivad @547 @jobinsjohn The issue is resolved with " import ReachabilitySwift "

I'm having the same issue with FirebaseMessaging and Locksmith. Can someone please help?

I ran into the same problem as described above. Turns out there were different deployment targets across the various targets. I set them all to the same version and the problem was solved.

I believe this issue is caused by CocoaPods inserting an Other Linker Flag of -framework ReachabilitySwift due to the CocoaPod name of the module. Isn't that expected behavior and therefore the CocoaPod spec name is wrong, since the framework module is now called Reachability? i.e. even if we modified Other Linker Flags to "Reachability" to get it compiling, it's not a fix; CocoaPods will just generate the same thing again.

Just a little more info on this. Carthage instructions cite a "ReachabilitySwift.framework" but CocoaPods is most definitely producing a "Reachability.framework"

@NiltiakSivad , I use your steps but I still have the same error:

schermata 2018-02-08 alle 08 22 29
schermata 2018-02-08 alle 08 22 42

schermata 2018-02-08 alle 08 23 00

Issue still exists for me. I decided to use the other option which is just to drop the Realibility.swift file into my project.

i solve with import Reachability
not import ReachabilitySwift

As many have stated you should be using import Reachability 馃憤

I'm getting the same error, I can test on device but can't archive.

It's still giving No such module 'Reachability'

I'm getting the same error as @mirkin. Able to test fine in the simulators, although when trying to archive the error is displayed.

The only way that I found to fix this was changing the deployment target from iOS 10, to iOS 11. Not ideal, although it's the only thing that worked for me.

I am having a similar issue with an app crash (symbol not found)
The app has both objective C Reachability and the Swift ReachabilitySwift.
Now that the ReachabilitySwift was renamed ,will I have an issue with both included ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rjt3662 picture rjt3662  路  3Comments

dave212 picture dave212  路  3Comments

couchdeveloper picture couchdeveloper  路  4Comments

stefanengel picture stefanengel  路  7Comments

cannyboy picture cannyboy  路  9Comments