Skip to content

Commit

Permalink
PR 91: Merge release-1.0.1 to master #15071
Browse files Browse the repository at this point in the history
 - Make several changes regarding version #15071
 - Check version where not generated #15071
 - Remove 'beta' from supported platforms #15071
 - Refine supported list #15071

Related work items: #15071
  • Loading branch information
Mike Richter committed Jul 6, 2016
2 parents 23f27be + c7bc677 commit 21dafcc
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 20 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
@@ -1,6 +1,14 @@
Change Log
==========

1.0.1
-----------------------
### Enhancements:

* Now supports macOS Sierra and Xcode 8.
* Updated documentation.


1.0
-----------------------
### Functional Changes:
Expand Down Expand Up @@ -35,4 +43,4 @@ Change Log

### Additional Details

Original commit [509591f](https://github.com/Polidea/ios-class-guard/commit/509591f78f37905913ba0cbd832e5e4f7b925a8a) was corrupted. This was fixed by modifying it and rewriting the commit history after it. The new repaired commit is 496ae586. The fork point in the new history is 94121d10.
Original commit [509591f](https://github.com/Polidea/ios-class-guard/commit/509591f78f37905913ba0cbd832e5e4f7b925a8a) was corrupted. This was fixed by modifying it and rewriting the commit history after it. The new repaired commit is 496ae586. The fork point in the new history is 94121d10.
14 changes: 9 additions & 5 deletions Makefile
Expand Up @@ -2,11 +2,13 @@
# See LICENSE.txt for licensing information

PROJECT_NAME=PPiOS-Rename
VERSION=v1.0.0
NUMERIC_VERSION=1.0.1
VERSION=v$(NUMERIC_VERSION)
PROGRAM_NAME=ppios-rename

BUILD_DIR=build
PROGRAM="$(shell pwd)/$(BUILD_DIR)/Build/Products/Release/$(PROGRAM_NAME)"
README="$(shell pwd)/README.md"
GIT_CMD=git rev-parse --short HEAD
GIT_HASH_CHECK=$(GIT_CMD) &> /dev/null
GIT_HASH=$(shell $(GIT_HASH_CHECK) && $(GIT_CMD) | sed 's,^,-,')
Expand Down Expand Up @@ -41,12 +43,14 @@ $(WORKSPACE) Pods Podfile.lock: Podfile

.PHONY: program
program: Pods
xctool $(XCODEBUILD_OPTIONS) build
# Merged the separate build and test steps: xcodebuild was rebuilding the product for 'test'. It
# appears that Xcode 8 provides test-without-building option for xcodebuild, and once we move to
# that version we should be able to separate these two parts again.
xctool $(XCODEBUILD_OPTIONS) CLASS_DUMP_VERSION=$(NUMERIC_VERSION) build test

.PHONY: check
check: program
xctool $(XCODEBUILD_OPTIONS) test
( cd test/tests ; PPIOS_RENAME=$(PROGRAM) ./test-suite.sh )
check:
( cd test/tests ; PPIOS_RENAME=$(PROGRAM) README=$(README) NUMERIC_VERSION=$(NUMERIC_VERSION) ./test-suite.sh )

.PHONY: archive
archive: package-check distclean archive-dir program check $(DIST_PACKAGE)
Expand Down
22 changes: 11 additions & 11 deletions README.md
Expand Up @@ -44,14 +44,14 @@ Supported Platforms
-------------------
*PPiOS-Rename* supports apps developed for:

* iOS 9, 10 beta
* iPhone, iPod Touch, and iPad
* ARM 32-bit, 64-bit, and x86 simulator
* iOS 9, iOS 10
* iPhone, iPod touch, and iPad
* ARM 32-bit, ARM 64-bit, and x86 Simulator

Using:

* Xcode 7, Xcode 8 beta
* OS X El Capitan
* Xcode 7, Xcode 8
* OS X El Capitan, macOS Sierra
* Objective-C


Expand Down Expand Up @@ -100,9 +100,9 @@ Once you are comfortable using *PPiOS-Rename,* it can be easier to use if you in

8. Rename the phase from "Run Script" to "Analyze Binary".

9. Where it says "Type a script or ...", paste the following script, adjusting for the correct path:
9. Expand the phase, and where it says "Type a script or ...", paste the following script, adjusting for the correct path:

PATH="${PATH}:${HOME}/Downloads/PPiOS-Rename-v1.0.0"
PATH="${PATH}:${HOME}/Downloads/PPiOS-Rename-v1.0.1"
[[ "${SDKROOT}" == *iPhoneSimulator*.sdk* ]] && sdk="${SDKROOT}" || sdk="${CORRESPONDING_SIMULATOR_SDK_DIR}"
ppios-rename --analyze --sdk-root "${sdk}" "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"

Expand All @@ -112,15 +112,15 @@ Once you are comfortable using *PPiOS-Rename,* it can be easier to use if you in

12. Duplicate the original target again, and rename it to "Apply Renaming to <original-target-name>".

13. Delete all of the steps in this target.
13. Delete all of the build phases in this target.

14. If there are any target dependencies, delete them as well.

15. Add a script phase, and rename it to "Apply Renaming to Sources" (this should be the only real action for this target).

16. Paste the following script, again adjusting for the correct path:

PATH="${PATH}:${HOME}/Downloads/PPiOS-Rename-v1.0.0"
PATH="${PATH}:${HOME}/Downloads/PPiOS-Rename-v1.0.1"
ppios-rename --obfuscate-sources

17. Edit the scheme (or add one) for this new target, renaming the scheme to "Apply Renaming to <original-scheme-name>".
Expand Down Expand Up @@ -347,12 +347,12 @@ Note that `nm` will not work properly after stripping symbols from your binary.
#### Reversing obfuscation in crash dumps
*PPiOS-Rename* lets you reverse the process of obfuscation for crash dump files. This is important so you can find the original classes and methods involved in a crash. It does this by using the information from a map file (e.g. `symbols.map`) to modify the crash dump text, replacing the obfuscated symbols with the original names. For example:

ppios-rename --translate-crashdump --symbols-map path/to/symbols_1.0.0.map path/to/crashdump path/to/output
ppios-rename --translate-crashdump --symbols-map path/to/symbols_1.0.1.map path/to/crashdump path/to/output

#### Reversing obfuscation in dSYMs
*PPiOS-Rename* lets you reverse the process of obfuscation for automatic crash reporting tools such as HockeyApp, Crashlytics, Fabric, BugSense/Splunk Mint, or Crittercism. It does this by using the information from a map file (e.g. `symbols.map`) to generate a "reverse dSYM" file that has the non-obfuscated symbol names in it. For example:

ppios-rename --translate-dsym --symbols-map path/to/symbols_1.0.0.map path/to/input.dSYM path/to/output.dSYM
ppios-rename --translate-dsym --symbols-map path/to/symbols_1.0.1.map path/to/input.dSYM path/to/output.dSYM

The resulting dSYM file can be uploaded to e.g. HockeyApp.

Expand Down
2 changes: 0 additions & 2 deletions Source/CDClassDump.h
Expand Up @@ -10,8 +10,6 @@

#import "CDFile.h" // For CDArch

#define CLASS_DUMP_VERSION "1.1.0"

@class CDFile;
@class CDTypeController;
@class CDVisitor;
Expand Down
4 changes: 4 additions & 0 deletions ppios-rename.xcodeproj/project.pbxproj
Expand Up @@ -1339,6 +1339,7 @@
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CLASS_DUMP_VERSION = "$(CLASS_DUMP_VERSION)";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand All @@ -1351,6 +1352,7 @@
"DEBUG=1",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "CLASS_DUMP_VERSION=\\\"$(CLASS_DUMP_VERSION)\\\"";
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down Expand Up @@ -1394,12 +1396,14 @@
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = NO;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CLASS_DUMP_VERSION = "$(CLASS_DUMP_VERSION)";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "CLASS_DUMP_VERSION=\\\"$(CLASS_DUMP_VERSION)\\\"";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
Expand Down
44 changes: 44 additions & 0 deletions test/tests/check-documentation.sh
@@ -0,0 +1,44 @@
#!/bin/bash

#Copyright 2016 PreEmptive Solutions, LLC
#See LICENSE.txt for licensing information

targetAppName=BoxSim
thisDirectory="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
testRoot="$(dirname "${thisDirectory}")"
. "${testRoot}/tests/common.sh"

oneTimeSetUp() {
checkForPPiOSRename
}

oneTimeTearDown() {
return
}

setUp() {
return
}

tearDown() {
return
}

TEST "PPiOS-Rename version referenced in README.md is current"
verify test -f "${README}"
verifyFails test -z "${NUMERIC_VERSION}"

# Find all of the version numbers "x.y.z" in the document, and put them on separate lines.
# The two lines that follow that have trailing backslashes are newlines embedded in the sed
# replacement text, do not indent or otherwise alter.
versionNumbers=$(cat "${README}" | sed -n 's,\([1-9][0-9]*[.][0-9][0-9]*\([.][0-9][0-9]*\)*\),\
\1\
,pg' | grep '[1-9][0-9]*[.][0-9][0-9]*\([.][0-9][0-9]*\)*')

# Remove all of the instances of the expected version number
badVersionNumbers="$(echo "${versionNumbers}" | grep -v "$(echo "^${NUMERIC_VERSION}\$" | sed 's,[.],[.],g')")"

# Verify that nothing is left
verify test -z "${badVersionNumbers}"

report
2 changes: 1 addition & 1 deletion test/tests/test-new-options.sh
Expand Up @@ -49,7 +49,7 @@ tearDown() {
checkVersion() {
verify grep PreEmptive "${lastRun}"
verify grep -i version "${lastRun}"
verify grep '[1-9][0-9]*.[0-9]*.[0-9]*' "${lastRun}"
verify grep '[1-9][0-9]*[.][0-9][0-9]*[.][0-9][0-9]*' "${lastRun}"
}

checkUsage() {
Expand Down
1 change: 1 addition & 0 deletions test/tests/test-suite.sh
Expand Up @@ -14,3 +14,4 @@ type "${PPIOS_RENAME}" | sed 's,.* is , ,'
./test-new-options.sh
./test-obfuscate-sources.sh
./test-post-obfuscation-behavior.sh
./check-documentation.sh

0 comments on commit 21dafcc

Please sign in to comment.