mirror of
https://github.com/majd/ipatool
synced 2026-11-28 02:07:52 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8619332e52 | ||
|
|
6db68b6bd2 | ||
|
|
3c90c45dab | ||
|
|
94fc3a6d47 | ||
|
|
0f517f43f6 |
No files matched your search
@@ -59,6 +59,7 @@ DerivedData/
|
||||
*.ipa
|
||||
*.dSYM.zip
|
||||
*.dSYM
|
||||
.build*
|
||||
|
||||
## Playgrounds
|
||||
timeline.xctimeline
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
prefix ?= /usr/local
|
||||
bindir = $(prefix)/bin
|
||||
|
||||
build:
|
||||
xcodebuild -scheme ipatool -configuration release -archivePath .build archive
|
||||
|
||||
install: build
|
||||
install -d "$(bindir)"
|
||||
install ".build.xcarchive/Products/$(bindir)/ipatool" "$(bindir)"
|
||||
|
||||
uninstall:
|
||||
rm -rf "$(bindir)/ipatool"
|
||||
|
||||
clean:
|
||||
rm -rf .build.xcarchive
|
||||
|
||||
.PHONY: build install uninstall clean
|
||||
@@ -1,4 +1,5 @@
|
||||
# IPATool
|
||||
[](https://GitHub.com/majd/ipatool/releases/)
|
||||

|
||||

|
||||
[](https://github.com/majd/ipatool/blob/main/LICENSE)
|
||||
@@ -18,14 +19,14 @@ To search for apps on the App Store, use the `search` command.
|
||||
```
|
||||
OVERVIEW: Search for iOS apps available on the App Store.
|
||||
|
||||
USAGE: ipatool search [--log-level <log-level>] [--limit <limit>] <term>
|
||||
USAGE: ipatool search [--limit <limit>] <term> [--log-level <log-level>]
|
||||
|
||||
ARGUMENTS:
|
||||
<term> The term to search for.
|
||||
|
||||
OPTIONS:
|
||||
--log-level <log-level> (default: info)
|
||||
--limit <limit> (default: 5)
|
||||
--log-level <log-level> (default: info)
|
||||
--version Show the version.
|
||||
-h, --help Show help information.
|
||||
```
|
||||
|
||||
@@ -138,7 +138,27 @@ extension Download {
|
||||
logger.log("Authenticated as '\(account.firstName) \(account.lastName)'.", level: .info)
|
||||
|
||||
logger.log("Requesting a signed copy of '\(app.identifier)' from the App Store...", level: .info)
|
||||
let item = try storeClient.item(identifier: "\(app.identifier)", directoryServicesIdentifier: account.directoryServicesIdentifier)
|
||||
let item: StoreResponse.Item
|
||||
|
||||
do {
|
||||
item = try storeClient.item(identifier: "\(app.identifier)", directoryServicesIdentifier: account.directoryServicesIdentifier)
|
||||
} catch {
|
||||
logger.log("\(error)", level: .debug)
|
||||
|
||||
switch error {
|
||||
case StoreClient.Error.invalidResponse:
|
||||
logger.log("Received invalid response.", level: .error)
|
||||
case StoreResponse.Error.invalidItem:
|
||||
logger.log("Received invalid store item.", level: .error)
|
||||
case StoreResponse.Error.invalidLicense:
|
||||
logger.log("Your Apple ID does not have a license for this app. Download the app on an iOS device to obtain a license.", level: .error)
|
||||
default:
|
||||
logger.log("An unknown error has occurred.", level: .error)
|
||||
}
|
||||
|
||||
_exit(1)
|
||||
}
|
||||
|
||||
logger.log("Received a response of the signed copy: \(item.md5).", level: .debug)
|
||||
|
||||
logger.log("Creating signature client...", level: .debug)
|
||||
@@ -158,8 +178,15 @@ extension Download {
|
||||
logger.log("Saved app package to \(URL(fileURLWithPath: path).lastPathComponent).", level: .info)
|
||||
|
||||
logger.log("Applying patches...", level: .info)
|
||||
try signatureClient.appendMetadata(item: item, email: email)
|
||||
try signatureClient.appendSignature(item: item)
|
||||
|
||||
do {
|
||||
try signatureClient.appendMetadata(item: item, email: email)
|
||||
try signatureClient.appendSignature(item: item)
|
||||
} catch {
|
||||
logger.log("\(error)", level: .debug)
|
||||
logger.log("Failed to apply patches. The ipa file will be left incomplete.", level: .error)
|
||||
_exit(1)
|
||||
}
|
||||
|
||||
logger.log("Done.", level: .info)
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ struct IPATool: ParsableCommand {
|
||||
static var configuration: CommandConfiguration {
|
||||
return .init(commandName: "ipatool",
|
||||
abstract: "A cli tool for interacting with Apple's ipa files.",
|
||||
version: "1.0.0",
|
||||
version: "1.0.2",
|
||||
subcommands: [Download.self, Search.self])
|
||||
}
|
||||
}
|
||||
@@ -56,8 +56,8 @@
|
||||
isEnabled = "NO">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "download com.apple.TestFlight"
|
||||
isEnabled = "NO">
|
||||
argument = "download -b com.apple.TestFlight"
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "search --help"
|
||||
@@ -65,7 +65,7 @@
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "search TestFlight --limit 1"
|
||||
isEnabled = "YES">
|
||||
isEnabled = "NO">
|
||||
</CommandLineArgument>
|
||||
</CommandLineArguments>
|
||||
</LaunchAction>
|
||||
|
||||
Reference in new issue
Block a user