1 line
21 KiB
JSON
Raw Permalink Normal View History

{"primaryContentSections":[{"kind":"content","content":[{"anchor":"Installing-the-package","level":2,"type":"heading","text":"Installing the package"},{"type":"paragraph","inlineContent":[{"type":"text","text":"It is possible to add this package to other libraries and applications by adding it as a dependency in a "},{"type":"codeVoice","code":"Package.swift"},{"type":"text","text":" file or in a Xcode project, through the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Package dependencies"}]},{"type":"text","text":" interface."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"It is also important to highlight that this package has minimum platform requirements that must be taken into account:"}]},{"type":"unorderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"emphasis","inlineContent":[{"type":"text","text":"iOS 15.0 or higher"}]},{"type":"text","text":";"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"emphasis","inlineContent":[{"type":"text","text":"macOS 12.0 or higher"}]},{"type":"text","text":";"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"emphasis","inlineContent":[{"type":"text","text":"tvOS 15.0 or higher"}]},{"type":"text","text":";"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"emphasis","inlineContent":[{"type":"text","text":"watchOS 8.0 or higher"}]},{"type":"text","text":"."}]}]}]},{"anchor":"The-Packageswift-file-way","level":3,"type":"heading","text":"The “Package.swift” file way"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In the intended "},{"type":"codeVoice","code":"Package.swift"},{"type":"text","text":" file, it is required to add the dependency, as demonstrated below:"}]},{"type":"codeListing","syntax":"swift","code":["dependencies: ["," \/\/ ..."," .package(url: \"https:\/\/github.com\/rock-n-code\/amiibo-service.git\", from: \"1.0.3\")"," \/\/ ...","],"]},{"type":"paragraph","inlineContent":[{"type":"text","text":"Then it is required to add the package to your target, like this:"}]},{"type":"codeListing","syntax":"swift","code":["targets: ["," .target("," \/\/ ..."," dependencies: ["," .product(name: \"AmiiboService\", package: \"amiibo-service\")"," ],"," \/\/ ..."," ),","]"]},{"anchor":"The-Package-dependencies-in-Xcode-way","level":3,"type":"heading","text":"The “Package dependencies” in Xcode way"},{"type":"paragraph","inlineContent":[{"type":"text","text":"In an opened Xcode project, it is required to follow these steps to install the package:"}]},{"type":"orderedList","items":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"click on the Xcode project file in the sidebar to display "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Project"}]},{"type":"text","text":" and "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Targets"}]},{"type":"text","text":";"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"select the project under the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Project"}]},{"type":"text","text":" section to show the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Info"}]},{"type":"text","text":", "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Build Settings"}]},{"type":"text","text":" and "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Package Dependencies"}]},{"type":"text","text":" options in the center menu just right on top;"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"select the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Package Dependencies"}]},{"type":"text","text":" option to show the defined dependencies of the project;"}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"press on the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"+"}]},{"type":"text","text":" (plus) button to add dependencies to the project;"}]}]},{"content":[{"type":"paragraph","inlineConte