Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not build in Xcode 10 #123

Closed
lexuanquynh opened this issue Sep 18, 2018 · 4 comments
Closed

can not build in Xcode 10 #123

lexuanquynh opened this issue Sep 18, 2018 · 4 comments

Comments

@lexuanquynh
Copy link

lexuanquynh commented Sep 18, 2018

I try install in xcode 10 and get the issue:
Ambiguous type name 'State' in 'TripleButton'
Please fix it.
p/s:
I rename 'State' to other name (ex: State1), the project will run success.
I think admin should change it for someone.

@GesanTung
Copy link

can not build in Xcode 10
'State' is ambiguous for type lookup in this context
Ambiguous type name 'State' in 'TripleButton'

@lexuanquynh
Copy link
Author

lexuanquynh commented Sep 18, 2018

can not build in Xcode 10
'State' is ambiguous for type lookup in this context
Ambiguous type name 'State' in 'TripleButton'

change:
State -> State1
It will build success.

-----TripleButton.swift-------
struct State1 {
let title: String
let image: UIImage
}

let states: [State1]
var selectedIndex: Int = 0

init(states: [State1]) {
self.states = states
super.init(frame: .zero)
setup()
}
-------CameraView.swift----------
func makeFlashButton() -> TripleButton {
let states: [TripleButton.State1] = [
TripleButton.State1(title: "Gallery.Camera.Flash.Off".g_localize(fallback: "OFF"), image: GalleryBundle.image("gallery_camera_flash_off")!),
TripleButton.State1(title: "Gallery.Camera.Flash.On".g_localize(fallback: "ON"), image: GalleryBundle.image("gallery_camera_flash_on")!),
TripleButton.State1(title: "Gallery.Camera.Flash.Auto".g_localize(fallback: "AUTO"), image: GalleryBundle.image("gallery_camera_flash_auto")!)
]

@ls-simon-he
Copy link

The master branch already has the fix.
Just need

  1. Change the Podfile with:
    pod 'Gallery', :git => 'https://github.com/hyperoslo/Gallery.git', :branch => 'master'
  2. Update Swift Language Version with 4.2
    Go to Xcode -> Choose Pods project -> Choose the Gallery Target -> Choose Buiding Setting tab -> Find the option: Swift Language Version and select 4.2.
    Then the project should be able to compile.
    This works for me.

@onmyway133
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants