Compare commits

...
5 Commits
Author SHA1 Message Date
Majd Alfhaily 8619332e52 Align version (1.0.2) 2021-05-24 12:36:33 +02:00
Majd Alfhaily 6db68b6bd2 Handle invalid license errors 2021-05-23 19:01:23 +02:00
Majd Alfhaily 3c90c45dab Add Makefile 2021-05-23 11:38:54 +02:00
Majd Alfhaily 94fc3a6d47 Align version (1.0.1) 2021-05-23 11:06:59 +02:00
Majd Alfhaily 0f517f43f6 Update readme 2021-05-23 11:00:44 +02:00
6 changed files with 55 additions and 9 deletions

No files matched your search

+1
View File
@@ -59,6 +59,7 @@ DerivedData/
*.ipa
*.dSYM.zip
*.dSYM
.build*
## Playgrounds
timeline.xctimeline
+17
View File
@@ -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
+3 -2
View File
@@ -1,4 +1,5 @@
# IPATool
[![Release](https://img.shields.io/github/release/majd/ipatool.svg)](https://GitHub.com/majd/ipatool/releases/)
![Swift](https://img.shields.io/badge/Swift-5.x-green.svg)
![macOS](https://img.shields.io/badge/macOS-10.11%2B-green.svg)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](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.
```
+30 -3
View File
@@ -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)
}
+1 -1
View File
@@ -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>