Kanthi solusi iki, Swift pangembang bisa gampang nggawe Word mung nganggo sawetara baris kode. Solusi kita bakal menehi sampeyan kabeh sing dibutuhake kanggo nggawe Word nggunakake Swift SDK.
Kanthi REST API, pangembang Swift bisa nggawe Word dokumen kanthi gampang. Kanggo nggawe file ing Word format dokumen, sampeyan kudu nindakake sawetara langkah nggunakake Swift SDK:
Wiwit Word dokumen kosong mesthine ngemot siji paragraf, nalika sampeyan nggawe Word file kanthi program, sampeyan bakal entuk struktur dhasar kasebut.
Elinga yen sampeyan bisa nambah konten menyang Word dokumen sing mentas digawe kanthi cepet. Mangkono, sampeyan bakal entuk ora mung Word file kosong, nanging dokumen sing ngemot konten sing dibutuhake. Kanggo informasi luwih lengkap babagan cara ngowahi Word dokumen, deleng kaca 'Edit Word Document'.
Kaya sing wis kasebut, Swift SDK kita ngidini sampeyan nggawe Word dokumen kanthi program. Sampeyan bisa nyoba fungsi sing kuat lan ngevaluasi carane nggawe Word file nggunakake conto Swift ing ngisor iki:
import AsposeWordsCloud
let config = Configuration(clientId: "####-####-####-####-####",
clientSecret: "##################");
let api = try WordsAPI(configuration: config);
let fileName = "Output.docx";
let createDocumentRequest = CreateDocumentRequest(fileName: fileName);
_ = try api.createDocument(request: createDocumentRequest);
let downloadDocumentRequest = DownloadFileRequest(path: fileName);
_ = try api.downloadFile(request: downloadDocumentRequest);
Sampeyan bisa nggunakake manajer paket Swift lan manajer dependensi Cocoapods kanggo nginstal Aspose.Words Cloud SDK for Swift. Informasi rinci babagan nginstal paket diwenehi ing bagean "Installation and Usage".
Minangka alternatif, sampeyan bisa clone Aspose.Words Cloud SDK for Swift saka GitHub lan nggunakake ing project.
Tututi Instructions iki supaya cepet entuk kredensial keamanan sing dibutuhake lan ngakses REST API kita.
Swift 4.2 utawa luwih anyar
Deleng Repository Documentation kanggo ndeleng rincian liyane.