Hello,
I am not able to build the SwiftyJSON framework using Carthage with Xcode 8 b2 / Swift 3.
I use the "swift3" branch. Find below the error message logged in the terminal.
Axels-MacBook-Pro:Skipper-iOS Axel$ carthage build SwiftyJSON --platform iOS
*** xcodebuild output can be found in /var/folders/3k/2hqq2ywd14zcs076wch4_4rm0000gn/T/carthage-xcodebuild.6m2SfJ.log
*** Building scheme "SwiftyJSON iOS" in SwiftyJSON.xcworkspace
** BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64 /Users/Axel/Developer/Skipper-iOS/Carthage/Checkouts/SwiftyJSON/Source/SwiftyJSON.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
/Users/Axel/Developer/Skipper-iOS/Carthage/Checkouts/SwiftyJSON/Source/SwiftyJSON.swift:739:57: error: cannot call value of non-function type 'NSDecimalNumber'
/Users/Axel/Developer/Skipper-iOS/Carthage/Checkouts/SwiftyJSON/Source/SwiftyJSON.swift:740:48: error: cannot call value of non-function type 'NSDecimalNumber'
A shell task (/usr/bin/xcrun xcodebuild -workspace /Users/Axel/Developer/Skipper-iOS/Carthage/Checkouts/SwiftyJSON/SwiftyJSON.xcworkspace -scheme SwiftyJSON iOS -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
** BUILD FAILED **
The following build commands failed:
CompileSwift normal arm64 /Users/Axel/Developer/Skipper-iOS/Carthage/Checkouts/SwiftyJSON/Source/SwiftyJSON.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(2 failures)
Axels-MacBook-Pro:Skipper-iOS Axel$

Any idea how to get a correct compilation?
Thanks,
Axel
@alpennec I've got same problem to for several day. Turns out we need to change xCode default from xcode 7 to xcode 8beta. Try this in terminal
sudo xcode-select -s ~/Desktop/Xcode-beta-3.app (your xcode beta.app position)
I already changed the xcode version to use. I have the problem with the beta version. Are you able to build the framework using Carthage and the latest beta version?
I could build the framework but I just realise when I run the app I got this error
Referenced from: /Users/cyablabsdesign/Library/Developer/CoreSimulator/Devices/96F280A4-E724-47FE-AF38-BC8AD0C5FAC8/data/Containers/Bundle/Application/2F9AEC5B-332F-4B7A-B2A5-64CCF6A815D7/AldoContact.app/AldoContact
Reason: image not found
So I right now I'm using the latest cocoapods prerelease and it works fine.
@aldocyanlabs I have exactly the same problem. I can build the framework, but get also an error when the app is running and references something from the framework. Is there any fix out there?
@aldocyanlabs I have switched the xcode 8 as default version. Still, I getting the same error as @alpennec mentioned. I used Carthage to set dependency. Is there any fix for this issue ?
@chetandobariya @thomaspaulmann I know its not a solution but I ditched carthage and using cocoapods, it works fine with cocoapods
@aldocyanlabs better than nothing :-) I'll give it a try
@thomaspaulmann @aldocyanlabs . I have fixed this issue with carthage, I have used github "acegreen/SwiftyJSON" "swift3" . And its works fine :)
@chetandobariya that's even better!
There hasn't been much activity on this issue for a while so I'm gonna go ahead and consider it fixed. Let me know if you'd like to reopen it.
Most helpful comment
@thomaspaulmann @aldocyanlabs . I have fixed this issue with carthage, I have used github "acegreen/SwiftyJSON" "swift3" . And its works fine :)