Generate Factur-X Invoices with Objective-C
Learn how to easily integrate GoFX into your Objective-C stack.
Dealing with complex XML generation in Objective-C can be extremely tedious. GoFX abstracts all the EN16931 complexity away. Send a simple JSON payload and get a perfectly compliant hybrid PDF back in milliseconds.
Ecosystem Focus
Integrating Factur-X / EN16931 within the Objective-C ecosystem is now seamless. Avoid building complex XML DOMs manually and let GoFX handle the heavy lifting. Generate hybrid PDF/A-3 invoices directly via our REST API.
Prerequisites
Ensure you have iOS 12+ / NSURLSession configured in your environment to make outbound HTTP POST requests to the GoFX API.
> Code Example
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.gofx.app/v1/invoice/generate"]];
[request setHTTPMethod:@"POST"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[request setHTTPBody:jsonData];
NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
[data writeToFile:@"facture.pdf" atomically:YES];
}];
[task resume];