{"id":15652999,"url":"https://github.com/zhongwuzw/objc-runtime-cn","last_synced_at":"2025-04-30T20:30:06.025Z","repository":{"id":74773359,"uuid":"94962164","full_name":"zhongwuzw/objc-runtime-CN","owner":"zhongwuzw","description":"Objective-C Runtime Analysis (Objective-C运行时分析)","archived":false,"fork":false,"pushed_at":"2019-05-25T04:49:55.000Z","size":2408,"stargazers_count":30,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-25T10:54:02.789Z","etag":null,"topics":["ios","objc","objective-c","runtime","source-code","source-code-analysis"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhongwuzw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-21T04:17:32.000Z","updated_at":"2023-11-20T03:48:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"2f2df387-451b-4a69-98e7-b866d2110227","html_url":"https://github.com/zhongwuzw/objc-runtime-CN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongwuzw%2Fobjc-runtime-CN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongwuzw%2Fobjc-runtime-CN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongwuzw%2Fobjc-runtime-CN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongwuzw%2Fobjc-runtime-CN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhongwuzw","download_url":"https://codeload.github.com/zhongwuzw/objc-runtime-CN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242704602,"owners_count":20172249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","objc","objective-c","runtime","source-code","source-code-analysis"],"created_at":"2024-10-03T12:44:26.735Z","updated_at":"2025-03-09T14:30:51.942Z","avatar_url":"https://github.com/zhongwuzw.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OC-Runtime\n\n## Objective-C Runtime Anatamy\n-----\n\nSource code from [objc runtime](https://opensource.apple.com/tarballs/objc4/), I will add comment for learning.\n\n***!!! All the comments I added based for `iOS` `arm64`（I use Chinese for comments)***\n\n## Objective-C Runtime Version\n-----\n\n***[~~objc4-709~~](https://opensource.apple.com/tarballs/objc4/)***\n***[~~objc4-723~~](https://opensource.apple.com/tarballs/objc4/)***\n***[objc4-750.1](https://opensource.apple.com/tarballs/objc4/)***\n\n## CoreFoundation Version\n-----\n\n***[CF-1151.16](https://opensource.apple.com/tarballs/CF/)***\n\n## 附录\n-----\n\n1. 查找方法实现时的方法`IMP lookUpImpOrForward(Class, SEL, id, bool, bool, bool)`存在一个`bug`,当在当前类的缓存或方法列表中找不到`IMP`时，将从类的父类继续查找，代码中的`for`循环，`curClass`从`cls`开始，这就导致又需要在当前类的缓存或列表中查找一次，这一次是完全没有必要的，所以`curClass`初始值的正确方法为`Class curClass = cls-\u003esuperclass;`：\n    \n```\n    // Try superclass caches and method lists.  从父类的缓存和方法列表中查找\n    {\n        unsigned attempts = unreasonableClassCount();\n        // curClass是从cls开始的，应该从cls-\u003esuperclass开始，这应该是个bug\n        for (Class curClass = cls;\n             curClass != nil;\n             curClass = curClass-\u003esuperclass)\n        {\n            // Halt if there is a cycle in the superclass chain.\n            if (--attempts == 0) {\n                _objc_fatal(\"Memory corruption in class list.\");\n            }\n            \n            // Superclass cache.\n            imp = cache_getImp(curClass, sel);\n            if (imp) {\n                if (imp != (IMP)_objc_msgForward_impcache) {\n                    // Found the method in a superclass. Cache it in this class.\n                    log_and_fill_cache(cls, imp, sel, inst, curClass);\n                    goto done;\n                }\n                else {\n                    // Found a forward:: entry in a superclass.\n                    // Stop searching, but don't cache yet; call method \n                    // resolver for this class first.\n                    break;\n                }\n            }\n            \n            // Superclass method list.\n            Method meth = getMethodNoSuper_nolock(curClass, sel);\n            if (meth) {\n                log_and_fill_cache(cls, meth-\u003eimp, sel, inst, curClass);\n                imp = meth-\u003eimp;\n                goto done;\n            }\n        }\n    }\n```\n20170926更新：\n向`Apple`提交`bug`后，期间沟通了几次（一开始`Apple`说没问题，`Sigh`），最新收到邮件，已经在`macOS 10.13 GM`中修复了，不过没说怎么修复的，只能等待新的运行时版本，看怎么解决的。\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/zhongwuzw/ObjC-Runtime/master/images/IMPBug.png\"/\u003e\n\u003c/p\u003e\n\n20171026更新：\n看了一下新发布的[objc4-723](https://opensource.apple.com/source/objc4/objc4-723/runtime/objc-runtime-new.mm.auto.html)，已经做了修复，初始值变为了`superclass`:\n\n```\n    // Try superclass caches and method lists.\n    {\n        unsigned attempts = unreasonableClassCount();\n        // 从superclass开始进行遍历\n        for (Class curClass = cls-\u003esuperclass;\n             curClass != nil;\n             curClass = curClass-\u003esuperclass)\n        {\n            // Halt if there is a cycle in the superclass chain.\n            if (--attempts == 0) {\n                _objc_fatal(\"Memory corruption in class list.\");\n            }\n            \n            // Superclass cache.\n            imp = cache_getImp(curClass, sel);\n            if (imp) {\n                if (imp != (IMP)_objc_msgForward_impcache) {\n                    // Found the method in a superclass. Cache it in this class.\n                    log_and_fill_cache(cls, imp, sel, inst, curClass);\n                    goto done;\n                }\n                else {\n                    // Found a forward:: entry in a superclass.\n                    // Stop searching, but don't cache yet; call method \n                    // resolver for this class first.\n                    break;\n                }\n            }\n            \n            // Superclass method list.\n            Method meth = getMethodNoSuper_nolock(curClass, sel);\n            if (meth) {\n                log_and_fill_cache(cls, meth-\u003eimp, sel, inst, curClass);\n                imp = meth-\u003eimp;\n                goto done;\n            }\n        }\n    }\n```\n\n## License\n-----\n\nThe MIT License \n\nCopyright (c) 2017 Zhong Wu\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\nAPPLE PUBLIC SOURCE LICENSE\nVersion 2.0 - August 6, 2003\n\nPlease read this License carefully before downloading this software.\nBy downloading or using this software, you are agreeing to be bound by\nthe terms of this License. If you do not or cannot agree to the terms\nof this License, please do not download or use the software.\n\n1. General; Definitions. This License applies to any program or other\nwork which Apple Computer, Inc. (\"Apple\") makes publicly available and\nwhich contains a notice placed by Apple identifying such program or\nwork as \"Original Code\" and stating that it is subject to the terms of\nthis Apple Public Source License version 2.0 (\"License\"). As used in\nthis License:\n\n1.1 \"Applicable Patent Rights\" mean: (a) in the case where Apple is\nthe grantor of rights, (i) claims of patents that are now or hereafter\nacquired, owned by or assigned to Apple and (ii) that cover subject\nmatter contained in the Original Code, but only to the extent\nnecessary to use, reproduce and/or distribute the Original Code\nwithout infringement; and (b) in the case where You are the grantor of\nrights, (i) claims of patents that are now or hereafter acquired,\nowned by or assigned to You and (ii) that cover subject matter in Your\nModifications, taken alone or in combination with Original Code.\n\n1.2 \"Contributor\" means any person or entity that creates or\ncontributes to the creation of Modifications.\n\n1.3 \"Covered Code\" means the Original Code, Modifications, the\ncombination of Original Code and any Modifications, and/or any\nrespective portions thereof.\n\n1.4 \"Externally Deploy\" means: (a) to sublicense, distribute or\notherwise make Covered Code available, directly or indirectly, to\nanyone other than You; and/or (b) to use Covered Code, alone or as\npart of a Larger Work, in any way to provide a service, including but\nnot limited to delivery of content, through electronic communication\nwith a client other than You.\n\n1.5 \"Larger Work\" means a work which combines Covered Code or portions\nthereof with code not governed by the terms of this License.\n\n1.6 \"Modifications\" mean any addition to, deletion from, and/or change\nto, the substance and/or structure of the Original Code, any previous\nModifications, the combination of Original Code and any previous\nModifications, and/or any respective portions thereof. When code is\nreleased as a series of files, a Modification is: (a) any addition to\nor deletion from the contents of a file containing Covered Code;\nand/or (b) any new file or other representation of computer program\nstatements that contains any part of Covered Code.\n\n1.7 \"Original Code\" means (a) the Source Code of a program or other\nwork as originally made available by Apple under this License,\nincluding the Source Code of any updates or upgrades to such programs\nor works made available by Apple under this License, and that has been\nexpressly identified by Apple as such in the header file(s) of such\nwork; and (b) the object code compiled from such Source Code and\noriginally made available by Apple under this License.\n\n1.8 \"Source Code\" means the human readable form of a program or other\nwork that is suitable for making modifications to it, including all\nmodules it contains, plus any associated interface definition files,\nscripts used to control compilation and installation of an executable\n(object code).\n\n1.9 \"You\" or \"Your\" means an individual or a legal entity exercising\nrights under this License. For legal entities, \"You\" or \"Your\"\nincludes any entity which controls, is controlled by, or is under\ncommon control with, You, where \"control\" means (a) the power, direct\nor indirect, to cause the direction or management of such entity,\nwhether by contract or otherwise, or (b) ownership of fifty percent\n(50%) or more of the outstanding shares or beneficial ownership of\nsuch entity.\n\n2. Permitted Uses; Conditions \u0026 Restrictions. Subject to the terms\nand conditions of this License, Apple hereby grants You, effective on\nthe date You accept this License and download the Original Code, a\nworld-wide, royalty-free, non-exclusive license, to the extent of\nApple's Applicable Patent Rights and copyrights covering the Original\nCode, to do the following:\n\n2.1 Unmodified Code. You may use, reproduce, display, perform,\ninternally distribute within Your organization, and Externally Deploy\nverbatim, unmodified copies of the Original Code, for commercial or\nnon-commercial purposes, provided that in each instance:\n\n(a) You must retain and reproduce in all copies of Original Code the\ncopyright and other proprietary notices and disclaimers of Apple as\nthey appear in the Original Code, and keep intact all notices in the\nOriginal Code that refer to this License; and\n\n(b) You must include a copy of this License with every copy of Source\nCode of Covered Code and documentation You distribute or Externally\nDeploy, and You may not offer or impose any terms on such Source Code\nthat alter or restrict this License or the recipients' rights\nhereunder, except as permitted under Section 6.\n\n2.2 Modified Code. You may modify Covered Code and use, reproduce,\ndisplay, perform, internally distribute within Your organization, and\nExternally Deploy Your Modifications and Covered Code, for commercial\nor non-commercial purposes, provided that in each instance You also\nmeet all of these conditions:\n\n(a) You must satisfy all the conditions of Section 2.1 with respect to\nthe Source Code of the Covered Code;\n\n(b) You must duplicate, to the extent it does not already exist, the\nnotice in Exhibit A in each file of the Source Code of all Your\nModifications, and cause the modified files to carry prominent notices\nstating that You changed the files and the date of any change; and\n\n(c) If You Externally Deploy Your Modifications, You must make\nSource Code of all Your Externally Deployed Modifications either\navailable to those to whom You have Externally Deployed Your\nModifications, or publicly available. Source Code of Your Externally\nDeployed Modifications must be released under the terms set forth in\nthis License, including the license grants set forth in Section 3\nbelow, for as long as you Externally Deploy the Covered Code or twelve\n(12) months from the date of initial External Deployment, whichever is\nlonger. You should preferably distribute the Source Code of Your\nExternally Deployed Modifications electronically (e.g. download from a\nweb site).\n\n2.3 Distribution of Executable Versions. In addition, if You\nExternally Deploy Covered Code (Original Code and/or Modifications) in\nobject code, executable form only, You must include a prominent\nnotice, in the code itself as well as in related documentation,\nstating that Source Code of the Covered Code is available under the\nterms of this License with information on how and where to obtain such\nSource Code.\n\n2.4 Third Party Rights. You expressly acknowledge and agree that\nalthough Apple and each Contributor grants the licenses to their\nrespective portions of the Covered Code set forth herein, no\nassurances are provided by Apple or any Contributor that the Covered\nCode does not infringe the patent or other intellectual property\nrights of any other entity. Apple and each Contributor disclaim any\nliability to You for claims brought by any other entity based on\ninfringement of intellectual property rights or otherwise. As a\ncondition to exercising the rights and licenses granted hereunder, You\nhereby assume sole responsibility to secure any other intellectual\nproperty rights needed, if any. For example, if a third party patent\nlicense is required to allow You to distribute the Covered Code, it is\nYour responsibility to acquire that license before distributing the\nCovered Code.\n\n3. Your Grants. In consideration of, and as a condition to, the\nlicenses granted to You under this License, You hereby grant to any\nperson or entity receiving or distributing Covered Code under this\nLicense a non-exclusive, royalty-free, perpetual, irrevocable license,\nunder Your Applicable Patent Rights and other intellectual property\nrights (other than patent) owned or controlled by You, to use,\nreproduce, display, perform, modify, sublicense, distribute and\nExternally Deploy Your Modifications of the same scope and extent as\nApple's licenses under Sections 2.1 and 2.2 above.\n\n4. Larger Works. You may create a Larger Work by combining Covered\nCode with other code not governed by the terms of this License and\ndistribute the Larger Work as a single product. In each such instance,\nYou must make sure the requirements of this License are fulfilled for\nthe Covered Code or any portion thereof.\n\n5. Limitations on Patent License. Except as expressly stated in\nSection 2, no other patent rights, express or implied, are granted by\nApple herein. Modifications and/or Larger Works may require additional\npatent licenses from Apple which Apple may grant in its sole\ndiscretion.\n\n6. Additional Terms. You may choose to offer, and to charge a fee for,\nwarranty, support, indemnity or liability obligations and/or other\nrights consistent with the scope of the license granted herein\n(\"Additional Terms\") to one or more recipients of Covered Code.\nHowever, You may do so only on Your own behalf and as Your sole\nresponsibility, and not on behalf of Apple or any Contributor. You\nmust obtain the recipient's agreement that any such Additional Terms\nare offered by You alone, and You hereby agree to indemnify, defend\nand hold Apple and every Contributor harmless for any liability\nincurred by or claims asserted against Apple or such Contributor by\nreason of any such Additional Terms.\n\n7. Versions of the License. Apple may publish revised and/or new\nversions of this License from time to time. Each version will be given\na distinguishing version number. Once Original Code has been published\nunder a particular version of this License, You may continue to use it\nunder the terms of that version. You may also choose to use such\nOriginal Code under the terms of any subsequent version of this\nLicense published by Apple. No one other than Apple has the right to\nmodify the terms applicable to Covered Code created under this\nLicense.\n\n8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in\npart pre-release, untested, or not fully tested works. The Covered\nCode may contain errors that could cause failures or loss of data, and\nmay be incomplete or contain inaccuracies. You expressly acknowledge\nand agree that use of the Covered Code, or any portion thereof, is at\nYour sole and entire risk. THE COVERED CODE IS PROVIDED \"AS IS\" AND\nWITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND\nAPPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS \"APPLE\" FOR THE\nPURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM\nALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT\nNOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF\nMERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR\nPURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD\nPARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST\nINTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE\nFUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS,\nTHAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR\nERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO\nORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE\nAUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.\nYou acknowledge that the Covered Code is not intended for use in the\noperation of nuclear facilities, aircraft navigation, communication\nsystems, or air traffic control machines in which case the failure of\nthe Covered Code could lead to death, personal injury, or severe\nphysical or environmental damage.\n\n9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO\nEVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL,\nSPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING\nTO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR\nANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY,\nTORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF\nAPPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY\nREMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF\nINCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY\nTO YOU. In no event shall Apple's total liability to You for all\ndamages (other than as may be required by applicable law) under this\nLicense exceed the amount of fifty dollars ($50.00).\n\n10. Trademarks. This License does not grant any rights to use the\ntrademarks or trade names \"Apple\", \"Apple Computer\", \"Mac\", \"Mac OS\",\n\"QuickTime\", \"QuickTime Streaming Server\" or any other trademarks,\nservice marks, logos or trade names belonging to Apple (collectively\n\"Apple Marks\") or to any trademark, service mark, logo or trade name\nbelonging to any Contributor. You agree not to use any Apple Marks in\nor as part of the name of products derived from the Original Code or\nto endorse or promote products derived from the Original Code other\nthan as expressly permitted by and in strict compliance at all times\nwith Apple's third party trademark usage guidelines which are posted\nat http://www.apple.com/legal/guidelinesfor3rdparties.html.\n\n11. Ownership. Subject to the licenses granted under this License,\neach Contributor retains all rights, title and interest in and to any\nModifications made by such Contributor. Apple retains all rights,\ntitle and interest in and to the Original Code and any Modifications\nmade by or on behalf of Apple (\"Apple Modifications\"), and such Apple\nModifications will not be automatically subject to this License. Apple\nmay, at its sole discretion, choose to license such Apple\nModifications under this License, or on different terms from those\ncontained in this License or may choose not to license them at all.\n\n12. Termination.\n\n12.1 Termination. This License and the rights granted hereunder will\nterminate:\n\n(a) automatically without notice from Apple if You fail to comply with\nany term(s) of this License and fail to cure such breach within 30\ndays of becoming aware of such breach;\n\n(b) immediately in the event of the circumstances described in Section\n13.5(b); or\n\n(c) automatically without notice from Apple if You, at any time during\nthe term of this License, commence an action for patent infringement\nagainst Apple; provided that Apple did not first commence\nan action for patent infringement against You in that instance.\n\n12.2 Effect of Termination. Upon termination, You agree to immediately\nstop any further use, reproduction, modification, sublicensing and\ndistribution of the Covered Code. All sublicenses to the Covered Code\nwhich have been properly granted prior to termination shall survive\nany termination of this License. Provisions which, by their nature,\nshould remain in effect beyond the termination of this License shall\nsurvive, including but not limited to Sections 3, 5, 8, 9, 10, 11,\n12.2 and 13. No party will be liable to any other for compensation,\nindemnity or damages of any sort solely as a result of terminating\nthis License in accordance with its terms, and termination of this\nLicense will be without prejudice to any other right or remedy of\nany party.\n\n13. Miscellaneous.\n\n13.1 Government End Users. The Covered Code is a \"commercial item\" as\ndefined in FAR 2.101. Government software and technical data rights in\nthe Covered Code include only those rights customarily provided to the\npublic as defined in this License. This customary commercial license\nin technical data and software is provided in accordance with FAR\n12.211 (Technical Data) and 12.212 (Computer Software) and, for\nDepartment of Defense purchases, DFAR 252.227-7015 (Technical Data --\nCommercial Items) and 227.7202-3 (Rights in Commercial Computer\nSoftware or Computer Software Documentation). Accordingly, all U.S.\nGovernment End Users acquire Covered Code with only those rights set\nforth herein.\n\n13.2 Relationship of Parties. This License will not be construed as\ncreating an agency, partnership, joint venture or any other form of\nlegal association between or among You, Apple or any Contributor, and\nYou will not represent to the contrary, whether expressly, by\nimplication, appearance or otherwise.\n\n13.3 Independent Development. Nothing in this License will impair\nApple's right to acquire, license, develop, have others develop for\nit, market and/or distribute technology or products that perform the\nsame or similar functions as, or otherwise compete with,\nModifications, Larger Works, technology or products that You may\ndevelop, produce, market or distribute.\n\n13.4 Waiver; Construction. Failure by Apple or any Contributor to\nenforce any provision of this License will not be deemed a waiver of\nfuture enforcement of that or any other provision. Any law or\nregulation which provides that the language of a contract shall be\nconstrued against the drafter will not apply to this License.\n\n13.5 Severability. (a) If for any reason a court of competent\njurisdiction finds any provision of this License, or portion thereof,\nto be unenforceable, that provision of the License will be enforced to\nthe maximum extent permissible so as to effect the economic benefits\nand intent of the parties, and the remainder of this License will\ncontinue in full force and effect. (b) Notwithstanding the foregoing,\nif applicable law prohibits or restricts You from fully and/or\nspecifically complying with Sections 2 and/or 3 or prevents the\nenforceability of either of those Sections, this License will\nimmediately terminate and You must immediately discontinue any use of\nthe Covered Code and destroy all copies of it that are in your\npossession or control.\n\n13.6 Dispute Resolution. Any litigation or other dispute resolution\nbetween You and Apple relating to this License shall take place in the\nNorthern District of California, and You and Apple hereby consent to\nthe personal jurisdiction of, and venue in, the state and federal\ncourts within that District with respect to this License. The\napplication of the United Nations Convention on Contracts for the\nInternational Sale of Goods is expressly excluded.\n\n13.7 Entire Agreement; Governing Law. This License constitutes the\nentire agreement between the parties with respect to the subject\nmatter hereof. This License shall be governed by the laws of the\nUnited States and the State of California, except that body of\nCalifornia law concerning conflicts of law.\n\nWhere You are located in the province of Quebec, Canada, the following\nclause applies: The parties hereby confirm that they have requested\nthat this License and all related documents be drafted in English. Les\nparties ont exige que le present contrat et tous les documents\nconnexes soient rediges en anglais.\n\nEXHIBIT A.\n\n\"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights\nReserved.\n\nThis file contains Original Code and/or Modifications of Original Code\nas defined in and that are subject to the Apple Public Source License\nVersion 2.0 (the 'License'). You may not use this file except in\ncompliance with the License. Please obtain a copy of the License at\nhttp://www.opensource.apple.com/apsl/ and read it before using this\nfile.\n\nThe Original Code and all software distributed under the License are\ndistributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\nEXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\nINCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\nPlease see the License for the specific language governing rights and\nlimitations under the License.\"\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhongwuzw%2Fobjc-runtime-cn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhongwuzw%2Fobjc-runtime-cn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhongwuzw%2Fobjc-runtime-cn/lists"}