ios
ios copied to clipboard
Can't build in Xcode 10, got lot of errors on build.
Steps to reproduce
Prepare all steps for running, run build
Expected behavior
Got a lot of errors from "Header 'RealmSwift-Swift.h' not found" and up to too many "'fromBlurRadius' is inaccessible due to 'private' protection level" as I understood inside Alamofire pod
Actual behavior
Build success
Device Info
Try on simulator Tested on [device], iOS [version]
I ran into this issue earlier myself. Although I got a build failure instead of build sucdess. Anyway, I resolved the private issue by unlocking the code for editing, and changing all ‘private’ headers to ‘fileprivate’ All variables that included ‘characters’ I removed the ‘.characters’ which left ‘String.___’ and then I upgraded the code from swift 3 to swift 4, this got rid of the majority of the errors as most of them were related to the swift version.
Environment: I am on macOS_12.14 (Mojave) Xcode_10.1 (build 10B61) Iphone_7_Plus w/IOS_12.1 (16B92)
Issue: What is the detailed step by step process necessary to resolve the below issues, especially upgrading Swift from 3 to 4.2 (since that seems to be a crux of most of the issues, I think).
Issue and error list: FetLife Workspace Group Swift Conversion Group Conversion to Swift 4.2 is available
Warning Group :-1: Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "Alamofire" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'Alamofire')
:-1: Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "AlamofireImage" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'AlamofireImage')
:-1: Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "AlamofireNetworkActivityIndicator" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'AlamofireNetworkActivityIndicator')
:-1: Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "DynamicBlurView" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'DynamicBlurView')
:-1: Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "Freddy" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'Freddy')
:-1: Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "JWTDecode" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'JWTDecode')
:-1: Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "RealmSwift" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'RealmSwift')
:-1: Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "SnapKit" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'SnapKit')
:-1: Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "StatefulViewController" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'StatefulViewController')
:-1: Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "p2.OAuth2" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'p2.OAuth2')
:-1: Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "FetLife" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'FetLife')
:-1: Swift 3 mode has been deprecated and will be removed in a later version of Xcode. Please migrate "FetLifeTests" to Swift 4.2 using "Convert > To Current Swift Syntax…" in the Edit menu. (in target 'FetLifeTests')
Pods project Group Validate Project Settings Group /Users/admin/ios/Pods/Pods.xcodeproj Update to recommended settings
FetLifeTests Group Swift Compiler Error Group /Users/admin/ios/FetLife/Cells/ConversationCell.swift:10:8: No such module 'AlamofireImage' /Users/admin/ios/FetLife/Cells/ConversationCell.swift:11:8: Could not build Objective-C module 'RealmSwift'
FetLife Group Swift Compiler Error Group /Users/admin/Library/Developer/Xcode/DerivedData/FetLife-edgyqguznvhpmxasvbzjoniehxoo/Build/Intermediates.noindex/SwiftMigration/FetLife/Products/Debug-iphonesimulator/DynamicBlurView/DynamicBlurView.framework/Modules/module.modulemap:9:12: Header 'DynamicBlurView-Swift.h' not found /Users/admin/ios/FetLife/BlurImageView.swift:10:8: Could not build Objective-C module 'DynamicBlurView' /Users/admin/ios/FetLife/Cells/ConversationCell.swift:11:8: Could not build Objective-C module 'RealmSwift'
Warning Group :-1: Automatically Adjusts Font before iOS 10.0 [5] :-1: Segues initiated directly from view controllers must have an identifier [9] :-1: Large Title font text style before iOS 11.0 [5] :-1: DEBUG_INFORMATION_FORMAT should be set to dwarf-with-dsym for all configurations. This could also be a timing issue, make sure the Fabric run script build phase is the last build phase and no other scripts have moved the dSYM from the location Xcode generated it. Unable to process FetLife.app.dSYM at path /Users/admin/Library/Developer/Xcode/DerivedData/FetLife-edgyqguznvhpmxasvbzjoniehxoo/Build/Intermediates.noindex/SwiftMigration/FetLife/Products/Debug-iphonesimulator/FetLife.app.dSYM
Alamofire Group Swift Compiler Warning Group /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2AuthRequest.swift:72:11: 'let' properties are implicitly 'final'; use 'public' instead of 'open' /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2AuthRequest.swift:75:11: 'let' properties are implicitly 'final'; use 'public' instead of 'open'
Swift Compiler Error Group /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2AuthRequest.swift:130:33: Use of undeclared type 'OAuth2StringDict' /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2AuthRequest.swift:176:37: Use of undeclared type 'OAuth2Base' /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2AuthRequest.swift:246:34: Use of undeclared type 'OAuth2StringDict' /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2AuthRequest.swift:319:57: Use of undeclared type 'OAuth2StringDict' /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2AuthRequest.swift:149:10: Use of unresolved identifier 'OAuth2Error' /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2AuthRequest.swift:167:9: Use of unresolved identifier 'OAuth2Error' /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2AuthRequest.swift:204:12: Use of unresolved identifier 'OAuth2Error' /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2AuthRequest.swift:256:23: Use of unresolved identifier 'OAuth2StringDict' /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2AuthRequest.swift:294:10: Use of unresolved identifier 'OAuth2Error'
p2.OAuth2 Group Swift Compiler Warning Group /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2Base.swift:40:11: 'let' properties are implicitly 'final'; use 'public' instead of 'open' /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2AuthorizerUI.swift:30:2: 'unowned' should not be applied to a property declaration in a protocol and will be disallowed in future versions /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2Requestable.swift:216:43: When calling this function in Swift 4 or later, you must pass a '()' tuple; did you mean for the input type to be '()'?
Swift Compiler Error Group /Users/admin/ios/Pods/p2.OAuth2/Sources/Base/OAuth2ClientConfig.swift:67:40: Use of unresolved identifier 'OAuth2EndpointAuthMethod' /Users/admin/ios/Pods/p2.OAuth2/Sources/Flows/OAuth2.swift:257:108: Use of undeclared type 'OAuth2AuthRequest' /Users/admin/ios/Pods/p2.OAuth2/Sources/Flows/OAuth2.swift:322:83: Use of undeclared type 'OAuth2AuthRequest' /Users/admin/ios/Pods/p2.OAuth2/Sources/Flows/OAuth2.swift:263:13: Use of unresolved identifier 'OAuth2AuthRequest' /Users/admin/ios/Pods/p2.OAuth2/Sources/Flows/OAuth2.swift:331:13: Use of unresolved identifier 'OAuth2AuthRequest'
DynamicBlurView Group Swift Compiler Error Group /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:49:17: 'linkForDisplay' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:163:18: 'linkForDisplay()' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:97:13: 'linkForDisplay' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:163:18: 'linkForDisplay()' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:154:26: 'blurLayer' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:18:17: 'blurLayer' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:155:42: 'staticImage' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:16:17: 'staticImage' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:156:23: 'renderingTarget' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:29:17: 'renderingTarget' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:156:52: 'staticImage' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:16:17: 'staticImage' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:156:67: 'snapshotImage' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:136:18: 'snapshotImage(for:conversion:)' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:164:9: 'displayLink' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:17:17: 'displayLink' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:165:9: 'displayLink' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:17:17: 'displayLink' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:166:9: 'displayLink' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:17:17: 'displayLink' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:177:9: 'blurLayer' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:18:17: 'blurLayer' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:178:9: 'staticImage' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:16:17: 'staticImage' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:185:9: 'blurLayer' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:18:17: 'blurLayer' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:186:9: 'staticImage' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:16:17: 'staticImage' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:193:9: 'blurLayer' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/DynamicBlurView.swift:18:17: 'blurLayer' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/BlurLayer.swift:82:9: 'fromBlurRadius' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/BlurLayer.swift:27:17: 'fromBlurRadius' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/BlurLayer.swift:87:13: 'blurLayout' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/BlurLayer.swift:25:28: 'blurLayout' declared here /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/BlurLayer.swift:89:9: 'blurLayout' is inaccessible due to 'private' protection level /Users/admin/ios/Pods/DynamicBlurView/DynamicBlurView/BlurLayer.swift:25:28: 'blurLayout' declared here
If I select the "Conversion to Swift 4.2 is available", it pops up the window to upgrade a list of items to swift 4.2, but no matter what I choose, it fails before completion. Seems all the other (swift) errors need to be resolved as is first.
Additional note (just in case its relevant): When executing the "Pod Install" command (in Terminal App), the last thing that shows right at the end of the "Pod Install" process, is "JSQMessageViewController has been deprecated" (this can be easily missed).