SwiftyJSON supported in Xcode 8 and iOS 10?
Asked Answered
N

5

7

I recently upgraded my Swift iOS application from Xcode7 to Xcode8 and deployment platform from iOS 9.3 to iOS 10. My application started breaking with errors like this:

Module file was created by an older version of the compiler: rebuild 'SwiftyJSON' and try again.

I Googled around and found this link on SO Module file was created by an older version of the compiler. Followed the instructions and removed the derived data and rebuilt using carthage update --no-use-binaries command. But the application still fails to build and complains about the error message mentioned above.

Is SwiftyJSON supported by Xcode 8 and iOS 10?

Neman answered 12/9, 2016 at 15:57 Comment(4)
Have you looked on github? If there is any support there is a note.Chippewa
Yes, i looked into this github.com/SwiftyJSON/SwiftyJSON#requirements and I do not see any mention of Xcode 8 and iOS 10Neman
Right after the summary there is For Swift3 support, take a look at the swift3 beta branchChippewa
Ok, but my application is still using Swift 2 and how would I add this new dependency through carthage ?Neman
F
6

SwiftyJSON now supports Swift 3.

pod 'SwiftyJSON', '3.0.0'

Font answered 1/10, 2016 at 15:43 Comment(0)
D
5

At the time of writing this: no.

But there is a fork of the swift3-branch which is working with the GM seeds.

https://github.com/acegreen/SwiftyJSON

Deadwood answered 12/9, 2016 at 16:8 Comment(3)
Yes, I see it there but not sure how to integrate it with carthage or cocoapod. Can you please guide ?Neman
@user2325154 In Cocoapods, you can import it like this: pod "SwiftyJSON", :git => "https://github.com/acegreen/SwiftyJSON.git", :branch => "swift3"Deadwood
Hello i installed the swift 3 branch but i still have the "Module file was created by an older version of the compiler..." do i have to delete the old dependency first? I use cocoapods. I tried pod update and pod install both later on give me the same error on xcode 8.Sparing
B
0

pod 'SwiftyJSON', git: 'https://github.com/BaiduHiDeviOS/SwiftyJSON.git', branch: 'swift3'

You will get a lot off error after that please delete your derived data folder. And build it. All works fine

Box answered 18/9, 2016 at 19:20 Comment(0)
L
0

pod 'SwiftyJSON', git: 'https://github.com/BaiduHiDeviOS/SwiftyJSON.git', branch: 'swift3'

Landgrave answered 21/9, 2016 at 9:22 Comment(1)
Perhaps you could be a bit more explicity about the proposed solution?Zilvia
T
0

I fixed this by removing the named file, e.g. /Users/me/Library/Developer/Xcode/DerivedData/ProjectName-aprzyqkcjkpzgaedatcseafvznfq/Build/Products/Debug-iphonesimulator/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule

Not positive I'm on the right path, because the file was NOT regenerated, but I appear to be past the problem for now, and on to ordinary Swift3 conversion errors in my own code.

Thalassic answered 4/10, 2016 at 16:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.