From 49ff822502559f774ee81c82393ad01c1b183ba8 Mon Sep 17 00:00:00 2001 From: Felix Herrmann Date: Thu, 4 Jan 2024 03:39:12 +0100 Subject: [PATCH 1/4] Remove SwiftPackageListObjcTests --- .../SwiftPackageList-Package.xcscheme | 24 - Package.swift | 5 - .../Resources/example_1.json | 33 - .../Resources/example_2.plist | 916 ------------------ .../SPLPackageListTests.m | 74 -- 5 files changed, 1052 deletions(-) delete mode 100644 Tests/SwiftPackageListObjcTests/Resources/example_1.json delete mode 100644 Tests/SwiftPackageListObjcTests/Resources/example_2.plist delete mode 100644 Tests/SwiftPackageListObjcTests/SPLPackageListTests.m diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/SwiftPackageList-Package.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/SwiftPackageList-Package.xcscheme index 5b7eb20..76dd0d5 100644 --- a/.swiftpm/xcode/xcshareddata/xcschemes/SwiftPackageList-Package.xcscheme +++ b/.swiftpm/xcode/xcshareddata/xcschemes/SwiftPackageList-Package.xcscheme @@ -104,20 +104,6 @@ ReferencedContainer = "container:"> - - - - - - - - - - - - - identity - swift-algorithms - license - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - -## Runtime Library Exception to the Apache 2.0 License: ## - - - As an exception, if you use this Software to compile your source code and - portions of this Software are embedded into the binary product as a result, - you may redistribute such product without providing attribution as would - otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. - - name - swift-algorithms - repositoryURL - - relative - https://github.com/apple/swift-algorithms - - revision - b14b7f4c528c942f121c8b860b9410b2bf57825e - version - 1.0.0 - - - identity - swift-argument-parser - license - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - -## Runtime Library Exception to the Apache 2.0 License: ## - - - As an exception, if you use this Software to compile your source code and - portions of this Software are embedded into the binary product as a result, - you may redistribute such product without providing attribution as would - otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. - - name - swift-argument-parser - repositoryURL - - relative - https://github.com/apple/swift-argument-parser - - revision - 060d52364cf2a3e06b7adf0b17dbb7c33c77e1d3 - - - identity - swift-collections - branch - main - license - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - -## Runtime Library Exception to the Apache 2.0 License: ## - - - As an exception, if you use this Software to compile your source code and - portions of this Software are embedded into the binary product as a result, - you may redistribute such product without providing attribution as would - otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. - - name - swift-collections - repositoryURL - - relative - https://github.com/apple/swift-collections - - revision - 108ac4fa4ef7f2622b97a1f5dd92a3e0c6857c60 - - - identity - swift-numerics - license - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - -## Runtime Library Exception to the Apache 2.0 License: ## - - - As an exception, if you use this Software to compile your source code and - portions of this Software are embedded into the binary product as a result, - you may redistribute such product without providing attribution as would - otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. - - name - swift-numerics - repositoryURL - - relative - https://github.com/apple/swift-numerics - - revision - 0a5bc04095a675662cf24757cc0640aa2204253b - version - 1.0.2 - - - diff --git a/Tests/SwiftPackageListObjcTests/SPLPackageListTests.m b/Tests/SwiftPackageListObjcTests/SPLPackageListTests.m deleted file mode 100644 index f6a24ee..0000000 --- a/Tests/SwiftPackageListObjcTests/SPLPackageListTests.m +++ /dev/null @@ -1,74 +0,0 @@ -// -// SPLPackageListTests.m -// SwiftPackageListObjcTests -// -// Created by Felix Herrmann on 15.05.22. -// - -#import -@import SwiftPackageListObjc; - -@interface SPLPackageListTests : XCTestCase - -@end - -@implementation SPLPackageListTests - -- (void) testJSON { - NSArray *packages = SPLPackageListFromBundleWithFileName(SWIFTPM_MODULE_BUNDLE, @"example_1", nil); - - NSArray *expectedIdentities = @[@"swift-algorithms", @"swift-argument-parser", @"swift-collections", @"swift-numerics"]; - XCTAssertEqualObjects([packages valueForKey:@"identity"], expectedIdentities); - - NSArray *expectedNames = @[@"swift-algorithms", @"swift-argument-parser", @"swift-collections", @"swift-numerics"]; - XCTAssertEqualObjects([packages valueForKey:@"name"], expectedNames); - - NSArray *expectedVersions = @[@"1.0.0", [NSNull null], [NSNull null], @"1.0.2"]; - XCTAssertEqualObjects([packages valueForKey:@"version"], expectedVersions); - - NSArray *expectedBranches = @[[NSNull null], [NSNull null], @"main", [NSNull null]]; - XCTAssertEqualObjects([packages valueForKey:@"branch"], expectedBranches); - - NSArray *expectedRevisions = @[@"b14b7f4c528c942f121c8b860b9410b2bf57825e", @"060d52364cf2a3e06b7adf0b17dbb7c33c77e1d3", @"108ac4fa4ef7f2622b97a1f5dd92a3e0c6857c60", @"0a5bc04095a675662cf24757cc0640aa2204253b"]; - XCTAssertEqualObjects([packages valueForKey:@"revision"], expectedRevisions); - - NSArray *expectedRepositoryURLs = @[@"https://github.com/apple/swift-algorithms", @"https://github.com/apple/swift-argument-parser", @"https://github.com/apple/swift-collections", @"https://github.com/apple/swift-numerics"]; - XCTAssertEqualObjects([packages valueForKey:@"repositoryURL"], expectedRepositoryURLs); - - NSArray *expectedLicenseLengths = @[@11751, @11751, @11751, @11751]; - XCTAssertEqualObjects([packages valueForKeyPath:@"license.length"], expectedLicenseLengths); -} - -- (void) testPropertyList { - NSArray *packages = SPLPackageListFromBundleWithFileName(SWIFTPM_MODULE_BUNDLE, @"example_2", nil); - - NSArray *expectedIdentities = @[@"swift-algorithms", @"swift-argument-parser", @"swift-collections", @"swift-numerics"]; - XCTAssertEqualObjects([packages valueForKey:@"identity"], expectedIdentities); - - NSArray *expectedNames = @[@"swift-algorithms", @"swift-argument-parser", @"swift-collections", @"swift-numerics"]; - XCTAssertEqualObjects([packages valueForKey:@"name"], expectedNames); - - NSArray *expectedVersions = @[@"1.0.0", [NSNull null], [NSNull null], @"1.0.2"]; - XCTAssertEqualObjects([packages valueForKey:@"version"], expectedVersions); - - NSArray *expectedBranches = @[[NSNull null], [NSNull null], @"main", [NSNull null]]; - XCTAssertEqualObjects([packages valueForKey:@"branch"], expectedBranches); - - NSArray *expectedRevisions = @[@"b14b7f4c528c942f121c8b860b9410b2bf57825e", @"060d52364cf2a3e06b7adf0b17dbb7c33c77e1d3", @"108ac4fa4ef7f2622b97a1f5dd92a3e0c6857c60", @"0a5bc04095a675662cf24757cc0640aa2204253b"]; - XCTAssertEqualObjects([packages valueForKey:@"revision"], expectedRevisions); - - NSArray *expectedRepositoryURLs = @[@"https://github.com/apple/swift-algorithms", @"https://github.com/apple/swift-argument-parser", @"https://github.com/apple/swift-collections", @"https://github.com/apple/swift-numerics"]; - XCTAssertEqualObjects([packages valueForKeyPath:@"repositoryURL.relative"], expectedRepositoryURLs); - - NSArray *expectedLicenseLengths = @[@11751, @11751, @11751, @11751]; - XCTAssertEqualObjects([packages valueForKeyPath:@"license.length"], expectedLicenseLengths); -} - -- (void) testErrors { - NSError *error; - SPLPackageListFromBundleWithFileName(SWIFTPM_MODULE_BUNDLE, @"test", &error); - - XCTAssertEqual(error.code, SPLErrorNoPackageList); -} - -@end From 476ecfd89a2e0a82dbb8fd47ad276b8bf805a07d Mon Sep 17 00:00:00 2001 From: Felix Herrmann Date: Thu, 4 Jan 2024 03:39:46 +0100 Subject: [PATCH 2/4] Remove SwiftPackageListObjc --- .../xcshareddata/xcschemes/Libraries.xcscheme | 14 --- .../SwiftPackageList-Package.xcscheme | 14 --- .../xcschemes/SwiftPackageListObjc.xcscheme | 91 ------------------- Package.swift | 2 - Sources/SwiftPackageListObjc/SPLError.m | 10 -- Sources/SwiftPackageListObjc/SPLPackage.m | 32 ------- Sources/SwiftPackageListObjc/SPLPackageList.m | 75 --------------- .../SwiftPackageListObjc/include/SPLError.h | 22 ----- .../SwiftPackageListObjc/include/SPLPackage.h | 54 ----------- .../include/SPLPackageList.h | 37 -------- 10 files changed, 351 deletions(-) delete mode 100644 .swiftpm/xcode/xcshareddata/xcschemes/SwiftPackageListObjc.xcscheme delete mode 100644 Sources/SwiftPackageListObjc/SPLError.m delete mode 100644 Sources/SwiftPackageListObjc/SPLPackage.m delete mode 100644 Sources/SwiftPackageListObjc/SPLPackageList.m delete mode 100644 Sources/SwiftPackageListObjc/include/SPLError.h delete mode 100644 Sources/SwiftPackageListObjc/include/SPLPackage.h delete mode 100644 Sources/SwiftPackageListObjc/include/SPLPackageList.h diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/Libraries.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/Libraries.xcscheme index 0772892..793be37 100644 --- a/.swiftpm/xcode/xcshareddata/xcschemes/Libraries.xcscheme +++ b/.swiftpm/xcode/xcshareddata/xcschemes/Libraries.xcscheme @@ -34,20 +34,6 @@ ReferencedContainer = "container:"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Package.swift b/Package.swift index f6d8992..647491d 100644 --- a/Package.swift +++ b/Package.swift @@ -21,7 +21,6 @@ let package = Package( .plugin(name: "SwiftPackageListSettingsBundlePlugin", targets: ["SwiftPackageListSettingsBundlePlugin"]), .plugin(name: "SwiftPackageListPDFPlugin", targets: ["SwiftPackageListPDFPlugin"]), .library(name: "SwiftPackageList", targets: ["SwiftPackageList"]), - .library(name: "SwiftPackageListObjc", type: .dynamic, targets: ["SwiftPackageListObjc"]), .library(name: "SwiftPackageListUI", targets: ["SwiftPackageListUI"]), ], dependencies: [ @@ -60,7 +59,6 @@ let package = Package( dependencies: [.target(name: "SwiftPackageList")] ), .target(name: "SwiftPackageList"), - .target(name: "SwiftPackageListObjc"), .target( name: "SwiftPackageListUI", dependencies: [.target(name: "SwiftPackageList")], diff --git a/Sources/SwiftPackageListObjc/SPLError.m b/Sources/SwiftPackageListObjc/SPLError.m deleted file mode 100644 index ce9a48d..0000000 --- a/Sources/SwiftPackageListObjc/SPLError.m +++ /dev/null @@ -1,10 +0,0 @@ -// -// SPLError.m -// SwiftPackageListObjc -// -// Created by Felix Herrmann on 28.02.22. -// - -#import "SPLError.h" - -NSErrorDomain const SPLErrorDomain = @"SPLErrorDomain"; diff --git a/Sources/SwiftPackageListObjc/SPLPackage.m b/Sources/SwiftPackageListObjc/SPLPackage.m deleted file mode 100644 index 89f0c01..0000000 --- a/Sources/SwiftPackageListObjc/SPLPackage.m +++ /dev/null @@ -1,32 +0,0 @@ -// -// SPLPackage.m -// SwiftPackageListObjc -// -// Created by Felix Herrmann on 27.02.22. -// - -#import "SPLPackage.h" - -@implementation SPLPackage - -- (instancetype)initWithIdentity:(NSString *)identity - name:(NSString *)name - version:(NSString *)version - branch:(NSString *)branch - revision:(NSString *)revision - repositoryURL:(NSURL *)repositoryURL - license:(NSString *)license { - self = [super init]; - if (self) { - _identity = identity; - _name = name; - _version = version; - _branch = branch; - _revision = revision; - _repositoryURL = repositoryURL; - _license = license; - } - return self; -} - -@end diff --git a/Sources/SwiftPackageListObjc/SPLPackageList.m b/Sources/SwiftPackageListObjc/SPLPackageList.m deleted file mode 100644 index 68a86ab..0000000 --- a/Sources/SwiftPackageListObjc/SPLPackageList.m +++ /dev/null @@ -1,75 +0,0 @@ -// -// SPLPackageList.m -// SwiftPackageListObjc -// -// Created by Felix Herrmann on 27.02.22. -// - -#import "SPLPackageList.h" -#import "SPLError.h" - -#pragma mark - Helpers - -NSArray *SPLTransformArray(NSArray *array) { - NSMutableArray *packages = [[NSMutableArray alloc] init]; - for (NSDictionary *packageDict in array) { - SPLPackage *package = [[SPLPackage alloc] initWithIdentity:[packageDict valueForKey:@"identity"] - name:[packageDict valueForKey:@"name"] - version:[packageDict valueForKey:@"version"] - branch:[packageDict valueForKey:@"branch"] - revision:[packageDict valueForKey:@"revision"] - repositoryURL:[packageDict valueForKey:@"repositoryURL"] - license:[packageDict valueForKey:@"license"]]; - [packages addObject:package]; - } - return packages; -} - -#pragma mark - Package List - -NSArray *SPLPackageListFromBundleWithFileName(NSBundle *bundle, NSString *fileName, NSError *__autoreleasing *errorPtr) { - - NSString *jsonPath = [bundle pathForResource:fileName ofType:@"json"]; - if (jsonPath) { - NSURL *jsonPathURL = [NSURL fileURLWithPath:jsonPath]; - NSData *jsonData = [NSData dataWithContentsOfURL:jsonPathURL options:kNilOptions error:errorPtr]; - if (jsonData) { - NSArray *jsonObject = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:errorPtr]; - if (jsonObject) { - return SPLTransformArray(jsonObject); - } - } - return nil; - } - - NSString *plistPath = [bundle pathForResource:fileName ofType:@"plist"]; - if (plistPath) { - NSURL *plistPathURL = [NSURL fileURLWithPath:plistPath]; - NSData *plistData = [NSData dataWithContentsOfURL:plistPathURL options:kNilOptions error:errorPtr]; - if (plistData) { - NSArray *propertyList = [NSPropertyListSerialization propertyListWithData:plistData options:NSPropertyListMutableContainers format:nil error:errorPtr]; - if (propertyList) { - return SPLTransformArray(propertyList); - } - } - return nil; - } - - if (errorPtr) { - NSDictionary *userInfo = @{ - NSLocalizedDescriptionKey: NSLocalizedString(@"Reading package list unsuccessful.", nil), - NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"There is no package-list file located in the bundle", nil), - NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure that the file is part of your project/target.", nil), - }; - *errorPtr = [NSError errorWithDomain:SPLErrorDomain code:SPLErrorNoPackageList userInfo:userInfo]; - } - return nil; -} - -NSArray *SPLPackageListFromBundle(NSBundle *bundle, NSError *__autoreleasing *errorPtr) { - return SPLPackageListFromBundleWithFileName(bundle, @"package-list", errorPtr); -} - -NSArray *SPLPackageList(NSError *__autoreleasing *errorPtr) { - return SPLPackageListFromBundleWithFileName([NSBundle mainBundle], @"package-list", errorPtr); -} diff --git a/Sources/SwiftPackageListObjc/include/SPLError.h b/Sources/SwiftPackageListObjc/include/SPLError.h deleted file mode 100644 index 7b9d668..0000000 --- a/Sources/SwiftPackageListObjc/include/SPLError.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// SPLError.h -// SwiftPackageListObjc -// -// Created by Felix Herrmann on 28.02.22. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -/// Domain for all Swift Package List errors -NSErrorDomain const SPLErrorDomain; - -/// The possible thrown errors of the SPLPackageList function. -NS_ERROR_ENUM(SPLErrorDomain, SPLErrorCode) { - - /// Couldn't find a package-list file in the specified bundle and specified file name. - SPLErrorNoPackageList = 100, -}; - -NS_ASSUME_NONNULL_END diff --git a/Sources/SwiftPackageListObjc/include/SPLPackage.h b/Sources/SwiftPackageListObjc/include/SPLPackage.h deleted file mode 100644 index 5e76a1f..0000000 --- a/Sources/SwiftPackageListObjc/include/SPLPackage.h +++ /dev/null @@ -1,54 +0,0 @@ -// -// SPLPackage.h -// SwiftPackageListObjc -// -// Created by Felix Herrmann on 27.02.22. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -/// A package object in the package-list file. -@interface SPLPackage : NSObject - -/// The package identity based on it's source location. -@property(nonatomic, readonly) NSString *identity; - -/// The name of the package. -@property(nonatomic, readonly) NSString *name; - -/// The version of the package. -/// -/// Could be nil if the package's dependency-rule is branch or commit. -@property(nonatomic, readonly, nullable) NSString *version; - -/// The name of the branch. -/// -/// Could be nil if the package's dependency-rule is version or commit. -@property(nonatomic, readonly, nullable) NSString *branch; - -/// The exact revision/commit. -/// -/// This is always present, regardless if the package's dependency-rule is version or branch. -@property(nonatomic, readonly) NSString *revision; - -/// The URL to the git-repository. -@property(nonatomic, readonly) NSURL *repositoryURL; - -/// The license text. -/// -/// This is always present if the --requires-license flag is parsed on command execution. -@property(nonatomic, readonly, nullable) NSString *license; - -- (instancetype)initWithIdentity:(NSString *)identity - name:(NSString *)name - version:(nullable NSString *)version - branch:(nullable NSString *)branch - revision:(NSString *)revision - repositoryURL:(NSURL *)repositoryURL - license:(nullable NSString *)license; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Sources/SwiftPackageListObjc/include/SPLPackageList.h b/Sources/SwiftPackageListObjc/include/SPLPackageList.h deleted file mode 100644 index e949425..0000000 --- a/Sources/SwiftPackageListObjc/include/SPLPackageList.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// SPLPackageList.h -// SwiftPackageListObjc -// -// Created by Felix Herrmann on 27.02.22. -// - -#import -#import "SPLPackage.h" - -NS_ASSUME_NONNULL_BEGIN - -/// This function reads the package-list file in the specified bundle with the specified file name. -/// -/// Make sure that the file is part of your project/target. -/// @param bundle The bundle where the file is stored. -/// @param fileName The name of the package-list file. -/// @param errorPtr If an error occurs, upon return contains an NSError object with code SPLErrorCode that describes the problem. -/// @returns An array of SPLPackage objects or nil of an error occurred. -NSArray *_Nullable SPLPackageListFromBundleWithFileName(NSBundle *bundle, NSString *fileName, NSError **errorPtr); - -/// This function reads the package-list.json or package-list.plist file in the specified bundle. -/// -/// Make sure that the file is part of your project/target. -/// @param bundle The bundle where the file is stored. -/// @param errorPtr If an error occurs, upon return contains an NSError object with code SPLErrorCode that describes the problem. -/// @returns An array of SPLPackage objects or nil of an error occurred. -NSArray *_Nullable SPLPackageListFromBundle(NSBundle *bundle, NSError **errorPtr); - -/// This function reads the package-list.json or package-list.plist file in the main bundle. -/// -/// Make sure that the file is part of your project/target. -/// @param errorPtr If an error occurs, upon return contains an NSError object with code SPLErrorCode that describes the problem. -/// @returns An array of SPLPackage objects or nil of an error occurred. -NSArray *_Nullable SPLPackageList(NSError **errorPtr); - -NS_ASSUME_NONNULL_END From 475ce0f863d3676555c2728e1aa601d3a15cf641 Mon Sep 17 00:00:00 2001 From: Felix Herrmann Date: Thu, 4 Jan 2024 03:45:38 +0100 Subject: [PATCH 3/4] Remove SwiftPackageListObjc from documentation --- README.md | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/README.md b/README.md index e7f162f..f0c0775 100644 --- a/README.md +++ b/README.md @@ -178,8 +178,7 @@ Load the generated package-list file from the bundle or use some pre-build UI co Add the package to your project as shown [here](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app). -It contains 3 libraries; `SwiftPackageList`/`SwiftPackageListObjc` for loading the Data in Swift and Objective-C -and `SwiftPackageListUI` to get an iOS Settings-like user interface. +It contains 2 libraries; `SwiftPackageList` for loading the Data and `SwiftPackageListUI` to get an iOS Settings-like user interface. #### SwiftPackageList @@ -195,24 +194,6 @@ do { } ``` -#### SwiftPackageListObjc - -```objc -@import SwiftPackageListObjc; - -NSError *error; -NSArray *packages = SPLPackageList(&error); -if (packages) { - // use packages -} else { - if (error.code == SPLErrorNoPackageList) { - NSLog(@"There is no package-list file"); - } else { - NSLog(@"%@", error); - } -} -``` - #### SwiftPackageListUI ```swift From 3b4127a559d5c76695cb4136a96dfedb7e25c670 Mon Sep 17 00:00:00 2001 From: Felix Herrmann Date: Thu, 4 Jan 2024 03:45:58 +0100 Subject: [PATCH 4/4] Remove SwiftPackageListObjc from CI --- .github/workflows/xcodebuild.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/xcodebuild.yml b/.github/workflows/xcodebuild.yml index 96bf10f..3d9ea8e 100644 --- a/.github/workflows/xcodebuild.yml +++ b/.github/workflows/xcodebuild.yml @@ -22,7 +22,6 @@ jobs: matrix: scheme: - SwiftPackageList - - SwiftPackageListObjc - SwiftPackageListUI destination: - platform=macOS