Swiftyjson: Can't build the framework (Carthage + Xcode 8 b2 / Swift 3)

Created on 14 Jul 2016  路  10Comments  路  Source: SwiftyJSON/SwiftyJSON

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$ 

screenshot 2016-07-14 21 25 36

Any idea how to get a correct compilation?
Thanks,
Axel

Most helpful comment

@thomaspaulmann @aldocyanlabs . I have fixed this issue with carthage, I have used github "acegreen/SwiftyJSON" "swift3" . And its works fine :)

All 10 comments

@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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zxcv740 picture zxcv740  路  6Comments

joernroeder picture joernroeder  路  4Comments

kwstasna picture kwstasna  路  4Comments

donadley picture donadley  路  4Comments

MrLoveQD picture MrLoveQD  路  5Comments