Compare commits

...
5 Commits
Author SHA1 Message Date
chedabob dba1d3b195 Fix 2FA code not being requested (#49) 2022-03-05 18:09:53 +01:00
Majd Alfhaily eee3416b67 Update readme (#48) 2022-03-01 00:36:48 +00:00
Majd Alfhaily 2f3b0330e0 Fix building for older macOS versions (#45)
* Explicitly set GitHub runners
* Install Swift runtime for integration tests
2022-03-01 00:48:29 +01:00
Majd Alfhaily b257a5c8b1 Add workflow for integration tests 2022-02-23 23:04:13 +01:00
Majd Alfhaily df45f1cc44 Update readme formatting 2022-02-22 23:12:28 +01:00
8 changed files with 92 additions and 64 deletions

No files matched your search

+4 -8
View File
@@ -8,7 +8,7 @@ on:
jobs:
get_version:
name: Get version
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Set output
id: set_output
@@ -17,12 +17,10 @@ jobs:
version: ${{ steps.set_output.outputs.version }}
test:
name: Run tests
runs-on: macos-latest
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure Xcode
run: sudo xcode-select -s "/Applications/Xcode_13.2.1.app"
- name: Inject version
run: ./Scripts/version
- name: Build
@@ -31,13 +29,11 @@ jobs:
run: swift test
build:
name: Build
runs-on: macos-latest
runs-on: macos-11
needs: [get_version, test]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure Xcode
run: sudo xcode-select -s "/Applications/Xcode_13.2.1.app"
- name: Inject version
run: ./Scripts/version
- name: Build
@@ -50,7 +46,7 @@ jobs:
if-no-files-found: error
distribute:
name: Distribute
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
needs: [get_version, build]
steps:
- name: Download binary
+49
View File
@@ -0,0 +1,49 @@
name: Integration Tests
on:
pull_request:
branches:
- main
jobs:
build:
name: Build
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Inject version
run: ./Scripts/version
- name: Build
run: make build
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: ipatool
path: .build/ipatool
if-no-files-found: error
test:
name: Test
runs-on: ${{ matrix.macos }}
needs: [build]
strategy:
fail-fast: false
matrix:
macos: [macos-10.15, macos-11]
command: [download, search]
steps:
- name: Download binary
uses: actions/download-artifact@v2
with:
name: ipatool
path: ipatool-current
- name: Update permissions
run: chmod +x ./ipatool-current/ipatool
- name: Install Swift toolchain
run: |
wget https://download.swift.org/swift-5.5.3-release/xcode/swift-5.5.3-RELEASE/swift-5.5.3-RELEASE-osx.pkg
sudo installer -pkg swift-5.5.3-RELEASE-osx.pkg -target /
- name: Run tests
run: |
export DYLD_LIBRARY_PATH=/Library/Developer/Toolchains/swift-5.5.3-RELEASE.xctoolchain/usr/lib/swift/macosx
./ipatool-current/ipatool ${{ matrix.command }} --help
+1 -3
View File
@@ -8,12 +8,10 @@ on:
jobs:
test-networking:
name: Test Networking
runs-on: macos-latest
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure Xcode
run: sudo xcode-select -s "/Applications/Xcode_13.2.1.app"
- name: Inject version
run: ./Scripts/version
- name: Build
+2 -2
View File
@@ -2,8 +2,8 @@ prefix ?= /usr/local
bindir = $(prefix)/bin
build:
swift build --configuration release --triple arm64-apple-macosx
swift build --configuration release --triple x86_64-apple-macosx
swift build --product ipatool --configuration release --triple arm64-apple-macosx
swift build --product ipatool --configuration release --triple x86_64-apple-macosx
lipo -create -output .build/ipatool .build/arm64-apple-macosx/release/ipatool .build/x86_64-apple-macosx/release/ipatool
install: build
+8 -5
View File
@@ -15,11 +15,14 @@ let package = Package(
.package(url: "https://github.com/weichsel/ZIPFoundation", revision: "0.9.14")
],
targets: [
.executableTarget(name: "CLI", dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.byName(name: "Networking"),
.byName(name: "StoreAPI")
]),
.executableTarget(
name: "CLI",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser"),
.byName(name: "Networking"),
.byName(name: "StoreAPI")
]
),
.target(
name: "StoreAPI",
dependencies: [
+26 -46
View File
@@ -2,6 +2,7 @@
[![Release](https://img.shields.io/github/release/majd/ipatool.svg?label=Release)](https://GitHub.com/majd/ipatool/releases/)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/majd/ipatool/blob/main/LICENSE)
[![Unit Tests](https://github.com/majd/ipatool/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/majd/ipatool/actions/workflows/unit-tests.yml)
[![Integration Tests](https://github.com/majd/ipatool/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/majd/ipatool/actions/workflows/integration-tests.yml)
![Swift](https://img.shields.io/badge/Swift-5.5-green.svg)
![macOS](https://img.shields.io/badge/macOS-10.15%2B-green.svg)
@@ -9,13 +10,21 @@
![Demo](./demo.gif)
* [Requirements](#requirements)
* [Installation](#installation)
* [Manual](#manual)
* [Homebrew](#homebrew)
* [Usage](#usage)
* [FAQ](https://github.com/majd/ipatool/wiki/FAQ)
* [License](#license)
## Requirements
* macOS 10.15 or later.
* Apple ID set up to use the App Store.
## Installation
### Manual Install
### Manual
You can grab the latest version of `ipatool` from [GitHub releases](https://github.com/majd/ipatool/releases).
@@ -38,16 +47,14 @@ OVERVIEW: Search for iOS apps available on the App Store.
USAGE: ipatool search <term> [--limit <limit>] [--country <country>] [--device-family <device-family>] [--log-level <log-level>]
ARGUMENTS:
<term> The term to search for.
<term> The term to search for.
OPTIONS:
-l, --limit <limit> The maximum amount of search results to retrieve.
(default: 5)
-c, --country <country> The two-letter (ISO 3166-1 alpha-2) country code for
the iTunes Store. (default: US)
-l, --limit <limit> The maximum amount of search results to retrieve. (default: 5)
-c, --country <country> The two-letter (ISO 3166-1 alpha-2) country code for the
iTunes Store. (default: US)
-d, --device-family <device-family>
The device family to limit the search query to.
(default: iPhone)
The device family to limit the search query to. (default: iPhone)
--log-level <log-level> The log level. (default: info)
--version Show the version.
-h, --help Show help information.
@@ -58,55 +65,28 @@ To download a copy of the ipa file, use the `download` command.
```
OVERVIEW: Download (encrypted) iOS app packages from the App Store.
USAGE: ipatool download --bundle-identifier <bundle-identifier> [--email <email>] [--password <password>] [--auth-code <auth-code>] [--country <country>] [--device-family <device-family>] [--log-level <log-level>]
USAGE: ipatool download --bundle-identifier <bundle-identifier> [--email <email>] [--password <password>] [--auth-code <auth-code>] [--country <country>] [--device-family <device-family>] [--output <output>] [--log-level <log-level>]
OPTIONS:
-b, --bundle-identifier <bundle-identifier>
The bundle identifier of the target iOS app.
-e, --email <email> The email address for the Apple ID.
The bundle identifier of the target iOS app.
-e, --email <email> The email address for the Apple ID.
-p, --password <password>
The password for the Apple ID.
--auth-code <auth-code> The 2FA code for the Apple ID.
-c, --country <country> The two-letter (ISO 3166-1 alpha-2) country code for the iTunes Store. (default: US)
The password for the Apple ID.
--auth-code <auth-code> The 2FA code for the Apple ID.
-c, --country <country> The two-letter (ISO 3166-1 alpha-2)
country code for the iTunes Store. (default: US)
-d, --device-family <device-family>
The device family to limit the search query to. (default: iPhone)
-o, --output <output> The destination path of the downloaded app package.
--log-level <log-level> The log level. (default: info)
--version Show the version.
-h, --help Show help information.
```
**Note:** You can specify the Apple ID email address and username as arguments when using the tool or by setting them as environment variables (`IPATOOL_EMAIL` and `IPATOOL_PASSWORD`). If you do not specify this information using either of those methods, the tool will prompt for user input in an interactive session. Similarly, you can supply the 2FA code interactively or using the environment variable `IPATOOL_2FA_CODE`.
## Common Knowledge
## License
**Are my Apple ID credentials stored safely?**
The tool does not store your credentials anywhere and it only communicates with Apple servers directly. Feel free to go through the source code.
**Will my Apple ID get flagged for using this tool?**
Maybe, but probably not. While this tool communicates with iTunes and the App Store directly, mimicking the behavior of iTunes running on macOS, I cannot guarantee its safety. I recommend using a throwaway Apple ID. **Use this tool at your own risk**.
**Can I use this tool to download paid apps without paying for them?**
**No**. This is is not a piracy tool; you can only download apps that you have previously installed on your iOS device. This limitation applies to free apps as well. Essentially, your account must already have a license for the app you are trying to download.
**Can I use this tool to sideload unsupported iOS apps on Apple Silicon Macs?**
While it was previously possible to download ipa files using this tool and install them on Macs running on Apple Silicon, this is no longer the case as of recently. Apple stopped serving macOS compatible `sinf` data for the app package. You could, however, use this tool to get a copy of the iOS app and use a jailbroken iOS device to strip any codesigning requirements then codesign the app again using an adhoc signature to run on Apple Silicon.
## Troubleshooting
If `ipatool download` fails with the following error despite providing
correct email/password/auth code:
```
==> ℹ️ [Info] Querying the iTunes Store for '<bundle-identifier>' in country '<country>'...
==> ℹ️ [Info] Authenticating with the App Store...
==> ❌ [Error] An unknown error has occurred.
```
then see [issue #30](https://github.com/majd/ipatool/issues/30)
(particularly [this
comment](https://github.com/majd/ipatool/issues/30#issuecomment-977852648))
for a fix. Note that you may need version 1.0.7 or later.
IPATool is released under the [MIT license](https://github.com/majd/ipatool/blob/main/LICENSE).
@@ -64,6 +64,8 @@ extension StoreResponse: Decodable {
self = .failure(error: Error.invalidCredentials)
case "An Apple ID verification code is required to sign in. Type your password followed by the verification code shown on your other devices.":
self = .failure(error: Error.codeRequired)
case "MZFinance.BadLogin.Configurator_message":
self = .failure(error: Error.codeRequired)
case "This Apple ID has been locked for security reasons. Visit iForgot to reset your account (https://iforgot.apple.com).":
self = .failure(error: Error.lockedAccount)
default:
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 159 KiB