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

Init() Unavailable #33

Closed
jpeters-ml opened this issue Apr 27, 2021 · 3 comments
Closed

Init() Unavailable #33

jpeters-ml opened this issue Apr 27, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@jpeters-ml
Copy link

Using Xcode Version 12.5 (12E262) and deploying to iOS 13.0, I am unable to build the CoreBluetoothMock pod. While building I get the following errors:

/Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMServiceTypes.swift:65:5: 'init()' is unavailable /CoreBluetooth.CBAttribute:4:12: 'init()' has been explicitly marked unavailable here /Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMServiceTypes.swift:72:14: 'init()' is unavailable /CoreBluetooth.CBAttribute:4:12: 'init()' has been explicitly marked unavailable here /Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMCentralManagerNative.swift:490:17: 'init()' is unavailable /CoreBluetooth.CBPeer:4:12: 'init()' has been explicitly marked unavailable here /Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMCentralManagerMock.swift:681:17: 'init()' is unavailable /CoreBluetooth.CBPeer:4:12: 'init()' has been explicitly marked unavailable here /Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMCentralManagerMock.swift:688:17: 'init()' is unavailable /CoreBluetooth.CBPeer:4:12: 'init()' has been explicitly marked unavailable here /Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMServiceTypes.swift:176:5: 'init()' is unavailable /Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMServiceTypes.swift:176:5: 'init()' has been explicitly marked unavailable here (CoreBluetooth.CBAttribute) /Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMServiceTypes.swift:184:5: 'init()' is unavailable /Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMServiceTypes.swift:184:5: 'init()' has been explicitly marked unavailable here (CoreBluetooth.CBAttribute) /Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMServiceTypes.swift:270:5: 'init()' is unavailable /Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMServiceTypes.swift:270:5: 'init()' has been explicitly marked unavailable here (CoreBluetooth.CBAttribute) /Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMServiceTypes.swift:276:5: 'init()' is unavailable /Pods/CoreBluetoothMock/CoreBluetoothMock/Classes/CBMServiceTypes.swift:276:5: 'init()' has been explicitly marked unavailable here (CoreBluetooth.CBAttribute)

@gentges
Copy link

gentges commented Apr 27, 2021

I get the same error (Xcode 12.5, Sim 14.5). Looks like that Apple is enforcing the availability annotations on init's more strongly.
In the Xcode 12.5 Release Notes they mention the following:

Clang now infers the availability of +new from availability annotations on -init methods. Since +new calls [[Foo alloc] init], +new isn’t available unless +init is available. (75884815)

@jpeters-ml
Copy link
Author

There's a PR that fixes this (#31), until it's merged in I just forked that repo to continue testing.

@philips77
Copy link
Member

#31 has been merged to develop and I'll release it shortly.

@philips77 philips77 added the bug Something isn't working label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants