Ipapatch提供了一種修補iOS應用程序的簡單方法,而無需越獄。
[功能•說明•示例•常見問題•許可證]
ipapatch包括一個模板XCode項目,提供以下功能:
用您的代碼構建和運行第三方IPA
您可以在IPA文件中以動態庫運行自己的代碼。因此,您可以通過使用Objective-C運行時來更改該應用程序的行為。
在YouTube應用程序中提出了一個自定義警報
與LLDB一起逐步調試
您可以像您自己一樣調試第三方應用程序。例如:
用Xcode調試YouTube
鏈接外部框架
通過鏈接現有框架,您可以非常輕鬆地將第三方服務集成到應用程序,例如揭示。
通過鏈接啟示器來檢查YouTube.frame.framework
生成可分佈的.IPA文件
您可以使用IPAPATCH生成的.IPA文件的修改版本非常輕鬆地將補丁/工作分發給朋友
修改版的Facebook.ipa由ipapatch創建
克隆或下載此項目
將此項目下載到您的本地磁盤
準備解密的IPA文件
您使用的IPA文件需要解密,您可以從越獄設備中獲得解密的IPA或直接從IPA下載網站下載,例如http://www.iphonecake.com
更換佔位符IPA
用您的IPA文件替換位於IPAPatch/Assets/app.ipa IPA文件,這是一個佔位符文件。替換後,該文件名應保留為app.ipa 。
放置外部資源/框架(可選)
支持外部文件的類型:
IPAPatch/Assets/Frameworks文件夾上。IPAPatch/Assets/Frameworks/RevealServer.frameworkIPAPatch/Assets/Dylibs文件夾中。IPAPatch/Assets/Resources配置構建設置
IPAPatch.xcodeprojIPAPatch-DummyAppDisplay Name默認為“?”,它用作最終顯示名稱的前綴。Bundle Identifier以匹配您的供應配置文件配置IPPATCH選項
您可以將ipapatch的行為與Tools/options.plist配置。
| 姓名 | 描述 | 預設 |
|---|---|---|
| Restore_symbols | YES時,ipapatch將嘗試從Mach-O還原符號表進行調試提出建議(使用https://github.com/tobefuturer/restore-symbol的工具,也要感謝@henrayluo和@dannion) | 不 |
| create_ipa_file | 是YES ,iPapatch將在每個構建上生成一個IPA文件。 Genrated文件位於SRCROOT/Product | 不 |
| ignore_ui_supported_devices | YES ,iPapatch將從源應用程序的Info.plist中刪除UISupportedDevices | 不 |
| remove_watchplaceholder | 是YES ,ipapatch將從源應用程序的捆綁包中刪除com.apple.WatchPlaceholder文件夾 | 是的 |
| use_original_entitlements | YES ,iPapatch將使用源應用程序的權利辭職,您需要確保您的供應配置文件與權利匹配,或者您需要在目標設備上禁用AMFI | 不 |
編碼您的補丁
該條目在+[IPAPatchEntry load] ,您可以從這裡寫代碼開始。要更改應用程序的行為,您可能需要使用某些方法庫存庫,例如Steipete/exchings。
構建和運行
選擇一個真實的設備,然後在Xcode的左上角點擊“運行”按鈕。您寫的代碼和您放置的外部框架將自動注入IPA文件。
我創建了一些演示項目,該項目向您展示瞭如何使用IPAPatch :
問:圖書館沒有加載理由: mach-o, but wrong architecture ?
IPAPatch目標的Valid Architectures ,以匹配您的IPA二進制體系結構。問:流程啟動失敗:未指定(禁用)?
問:dyld:找不到符號:xxx,從:xxx,預期,以:xxx/libswiftxxx.dylib
Ipapatch已獲得MIT許可證的許可。
Copyright (c) 2017-present Wu Tian <[email protected]>.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Copyright (c) 2014, Alex Zielenski
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright (c) 2013, Facebook, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name Facebook nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.