15

On my machine, Xcode has automatically upgraded itself to latest version Xcode 12.5. And I'm facing issue now in building my project. It was running perfectly yesterday with Xcode 12.4, no code change nor library change. Literally the same codebase.

Anyone face this issue with solution fixed?

Error message received:

'exported: true' has no effect in '_specialize' attribute enter image description here

Tried (but non is helping):

  1. Restart machine
  2. Kill and restart Xcode
  3. Clean build
  4. Remove derived data
Tommy Leong
  • 2,509
  • 6
  • 30
  • 54
  • Looks like a problem with the CryptoSwift pod. Try deintegrating and starting over with your pods. – matt Apr 29 '21 at 04:20
  • I have temporarily downloaded 12.4 version to continue my work, will re-visit this topic again. Thanks for your recommendation. I believe `pod update` might resolve this issue – Tommy Leong Apr 29 '21 at 06:02

5 Answers5

8

I have resolved the issue with running pod update instead of pointing to a specific version in my Podfile

Otherwise, you could also follow what @coryhowell pointed out,

removed the pod and added it as a Swift Package (Version 1.4.0)

Podfile

platform :ios, '11.4'
use_frameworks!
inhibit_all_warnings!

target 'myAppp' do
  pod 'Alamofire', '~> 4.8.1'
  pod 'CryptoSwift'
end

Podfile.lock - auto-created, then pointed to latest version of the CryptoSwift

PODS:
  - Alamofire (4.8.2)
  - Countly (20.11.1):
    - Countly/Core (= 20.11.1)
  - Countly/Core (20.11.1)
  - Crashlytics (3.12.0):
    - Fabric (~> 1.9.0)
  - CryptoSwift (1.4.0)
  - Device (3.1.2)
  - Fabric (1.9.0)

..
...
not showing all lines
....
......
Tommy Leong
  • 2,509
  • 6
  • 30
  • 54
7

I'm having the same issue with the CryptoSwift pod. Xcode 12.5 is using Swift 5.4. I don't think CryptoSwift has been updated for swift 5.4 yet. I switched back to Xcode 12.4 and ran pod install. It's building again on Xcode 12.4. The Latest version of CryptoSwift only supports Swift 5.3

Update

I was unable to get CryptoSwift to update past version 1.2.0 using cocoa pods. I removed the pod and added it as a Swift Package (Version 1.4.0). I was able to build using Xcode 12.5

Confirmed this was fixed in CryptoSwift 1.3.2

coryhowell
  • 71
  • 4
1
  1. remove the old version
  2. reinstall the latest version
Jam
  • 101
  • 4
0

This is because @_specialize label is changed in Swift 5.4(Xcode 12.5), you can just make a substitution by regular expression:

@_specialize\(([^,]+),\s([^)]+)\)
@_specialize\($2\)
zteshadow
  • 1
  • 1
0

Just comment all @_specialize(exported: true, where T == ArraySlice<UInt8>) etc... and it should work.

ΩlostA
  • 2,501
  • 5
  • 27
  • 63