Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,27 @@ post_install do |pi|
end
end
end

afnetworking_reachability = pi.sandbox.root + 'AFNetworking/AFNetworking/AFNetworkReachabilityManager.m'
if File.exist?(afnetworking_reachability)
file_content = File.read(afnetworking_reachability)
patched_content = file_content
.gsub('#import <netinet/in.h>' + "\n", "#import <sys/socket.h>\n#import <netinet/in.h>\n")
.gsub("#import <netinet6/in6.h>\n", '')
.gsub('struct sockaddr_in6 address;', 'struct sockaddr_storage address;')
.gsub('address.sin6_len = sizeof(address);', 'address.ss_len = sizeof(address);')
.gsub('address.sin6_family = AF_INET6;', 'address.ss_family = AF_INET6;')
if patched_content != file_content
File.write(afnetworking_reachability, patched_content)
end
end

afnetworking_http = pi.sandbox.root + 'AFNetworking/AFNetworking/AFHTTPSessionManager.m'
if File.exist?(afnetworking_http)
file_content = File.read(afnetworking_http)
patched_content = file_content.gsub("#import <netinet6/in6.h>\n", '')
if patched_content != file_content
File.write(afnetworking_http, patched_content)
end
end
end
1 change: 0 additions & 1 deletion Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,25 @@ echo "Preparing environment"

START_TIME=$(date +"%T")

defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
if ! defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES >/dev/null 2>&1; then
echo "Warning: failed to enable Xcode build duration output"
fi

if [ -n "$PATH_TO_PROJECT" ]; then
if [ -d "$PATH_TO_PROJECT" ]; then

echo "Running XcodeBenchmark..."
echo "Please do not use your Mac while XcodeBenchmark is in progress\n\n"

xcodebuild -workspace "$PATH_TO_PROJECT" \
if ! xcodebuild -workspace "$PATH_TO_PROJECT" \
-scheme XcodeBenchmark \
-destination generic/platform=iOS \
-derivedDataPath "$PATH_TO_DERIVED" \
build
build; then
echo ""
echo "❌ XcodeBenchmark build failed"
rm -rf "$PATH_TO_DERIVED"
exit 1
fi

echo "System Version:" "$(sw_vers -productVersion)"
xcodebuild -version | grep "Xcode"
Expand Down Expand Up @@ -54,9 +61,10 @@ if [ -n "$PATH_TO_PROJECT" ]; then
echo ""
echo "2️⃣ Share your results at https://github.com/devMEremenko/XcodeBenchmark"

rm -rfd "$PATH_TO_DERIVED"
rm -rf "$PATH_TO_DERIVED"

else
echo "XcodeBenchmark.xcworkspace was not found in the current folder"
echo "Are you running in the XcodeBenchmark folder?"
exit 1
fi