Closed hartbit closed 8 years ago
Thanks so much @hartbit 😄
Realized I'm still actually getting errors with this, using XCode 8.0 beta 4 though. 😓 Do you know if there is a way to get the old version 3?
What is the best way to go about addressing compile issues like this? Not very familiar with Carthage yet but would love to fix these issues and contribute rather than just bringing them up.
This is the full error I'm getting with XCode 8 beta 4:
The following build commands failed: CompileSwift normal arm64 CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (2 failures) /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionButton.swift:37:71: error: use of undeclared type 'AttributedString' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionButton.swift:37:17: error: could not infer type for 'attributedTitles' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionButton.swift:157:124: error: use of undeclared type 'AttributedString' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionButton.swift:167:54: error: use of undeclared type 'AttributedString' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionButton.swift:179:45: error: use of undeclared type 'AttributedString' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionButton.swift:195:66: error: use of undeclared type 'AttributedString' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionTypes/Motion.swift:46:36: error: value of type 'Error' has no member 'code' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionTypes/Motion.swift:66:36: error: value of type 'Error' has no member 'code' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionTypes/Notifications.swift:31:44: error: cannot call value of non-function type 'UIApplication' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionTypes/Notifications.swift:44:29: error: cannot call value of non-function type 'UIApplication' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionTypes/LocationWhenInUse.swift:41:46: error: 'objectForInfoDictionaryKey' has been renamed to 'object(forInfoDictionaryKey:)' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionAlert.swift:79:33: error: cannot call value of non-function type 'UIApplication' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionAlert.swift:126:33: error: cannot call value of non-function type 'UIApplication' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/PermissionTypes/LocationAlways.swift:43:46: error: 'objectForInfoDictionaryKey' has been renamed to 'object(forInfoDictionaryKey:)' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/Supporting Files/Utilities.swift:43:16: error: 'objectForInfoDictionaryKey' has been renamed to 'object(forInfoDictionaryKey:)' /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Source/Supporting Files/Utilities.swift:120:14: error: extraneous argument label 'when:' in call A shell task (/usr/bin/xcrun xcodebuild -project /Users/jakeinthesun/Code/somatic/ios-moment/Moment/Carthage/Checkouts/Permission/Permission.xcodeproj -scheme Permission -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 **
Not sure if this is useful at all or just noise @hartbit, really appreciate the help though!
@jakerockland These are not issues with Carthage. Its just that the latest Xcode beta has more Swift compiler changes which require more modifications to Permission.
If you want to have a go at fixing them, here are some hints:
error: use of undeclared type 'AttributedString'
This is because NSAttributedString
was renamed to AttributedString
in a previous beta and is now renamed back to NSAttributedString
.
error: cannot call value of non-function type 'UIApplication'
This is because the static shared()
function of UIApplication
is now a static property, so it should be shared
.
error: 'objectForInfoDictionaryKey' has been renamed to 'object(forInfoDictionaryKey:)'
Pretty self-explanatory.
error: extraneous argument label 'when:' in call
I think the label of the first argument of the DispatchQueue. after
function has been removed.
That makes much more sense @hartbit, thank you! Will make a PR soon if I can work things out.
I believe I worked this out, made a PR #42
Thank you @hartbit !