I'm working on iOS app, and the app is currently running on Xcode 7 swift 2.3, and it has cocoa pods dependencies. I'm trying to migrate the app from swift 2 --> swift 4 and update the cocoa pods as while. Every time I try to migrate the app; I receive so many errors messages. I went into the pod file and update each pod in order to support swift 4 no luck. Can anyone help me complete this migrations step by step.
platform :ios, '9.2'
use_frameworks!
pod 'Parse'
pod 'ParseUI'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
pod 'ParseFacebookUtilsV4'
pod 'GoogleMaps', '~> 1.10.1'
pod 'Alamofire', '~> 3.2.1'
pod 'SwiftyJSON', '~> 2.3.0'
pod 'Onboard'
pod 'SWRevealViewController'
pod 'XLForm', '~> 3.1.1'
post_install do |installer|
swift3Targets = [
'Parse'
'ParseUI'
'FBSDKCoreKit'
'FBSDKLoginKit'
'FBSDKShareKit'
'ParseFacebookUtilsV4'
'GoogleMaps'
'Alamofire'
'SwiftyJSON'
'Onboard'
'SWRevealViewController'
'XLForm'
]
installer.pods_project.targets.each do |target|
if swift3Targets.include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
# Workaround for Cocoapods issue #7606
installer.pods_project.build_configurations.each do |config|
config.build_settings.delete('CODE_SIGNING_ALLOWED')
config.build_settings.delete('CODE_SIGNING_REQUIRED')
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if config.name == 'Debug'
config.build_settings['OTHER_SWIFT_FLAGS'] = ['$(inherited)', '- Onone']
config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Owholemodule'
end
end end end
Will my pod file look like this? I migrated my code from swift 2.3 --> swift 3