nativescript-markdown-view
nativescript-markdown-view copied to clipboard
PodFile SWIFT_SWIFT3_OBJC_INFERENCE to On
Hi,
I've recently installed your great markdown lib into my Nativescript angular app. Thanks for that ! But it seems your PodFile is changing the build configuration of Xcode.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_SWIFT3_OBJC_INFERENCE'] = 'On'
end
end
end
pod 'TSMarkdownParser'
This was failing the iOS build process for other libs !
Example of error it created with nativescript-toasty :
error: method 'makeToastActivity' with Objective-C selector 'makeToastActivity:' conflicts with previous declaration with the same Objective-C selector @objc func makeToastActivity(_ point: CGPoint) { ^ .../platforms/ios/Pods/Toast-Swift/Toast/Toast.swift:279:9: note: 'makeToastActivity' previously declared here func makeToastActivity(_ position: ToastPosition) { ^ note: Using new build systemnote: Planning buildnote: Constructing build descriptionwarning: **The use of Swift 3 @objc inference in Swift 4 mode is deprecated**. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the **"Swift 3 @objc Inference" build setting to "Default"** for the "Toast-Swift" target. (in target 'Toast-Swift' from project 'Pods')warning: The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Toast-Swift" target. (in target 'Toast-Swift' from project 'Pods') ** BUILD FAILED **
---> So I needed to change this line to :
config.build_settings['SWIFT_SWIFT3_OBJC_INFERENCE'] = 'Default'
to get the build pass and working again.
Can you confirm that changing this will not make your lib not working as expected ?
If so, can you update your repo ?
Thanks for help and thank you for this plugin ! Lo.
I have the exact same issue. I cretead App_Ressources/ios/Podfile
with this content
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_SWIFT3_OBJC_INFERENCE'] = 'Default'
end
end
end
effectively overriding this plugin's mistake.
Can you confirm that the plugin is working without any issue when the SWIFT_SWIFT3_OBJC_INFERENCE
setting is set to Default
?
Yes ;-)
Is this still an issue? Can someone create a PR for this?