Calculating the tax code for ios has never been easier.
The example can help you better understand how the library works.
You can use CocoaPods to install CodiceFiscale
by adding it to your Podfile
:
platform :ios, '10.0'
use_frameworks!
target 'MyApp' do
pod 'CodiceFiscale'
end
import CodiceFiscale
let fiscalCodeManager = FiscalCodeManager()
Or
let fiscalCodeManager = FiscalCodeManager(localAuthorietsFileName: <fileName>, localAuthorietsExtension: <extensionName>)
With this inizialization you can customize the local authorities list.
fiscalCodeManager.calculate(name: <name>, surname: <surname>, gender: <gender>, date: <date>, town: <town>, province: <province>)
These are the fields needed to calculate the fiscal code:
The function return a nullable value that contain the calculated fiscal code.
fiscalCodeManager.retriveInformationFrom(fiscalCode: <fiscalCode>)
The function return a nullable class that contain the all retrieved fields of input fiscal code.
For more info about fiscal code consult the site: Codice fiscale.
When calculating the Fiscal Code it is possible to incur in the homocody, that is in those cases in which two different people find themselves having an identical Fiscal Code, in order not to take risks we advise you to use the online service of the Revenue Agency and verify the code after having calculated it, thanks to this tool you can check the validity of the tax code, thus avoiding unpleasant surprises or making important official documents invalid.
SwiftMessages is distributed under the MIT license. See LICENSE for details.