Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release-candidate' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Gordon committed Oct 25, 2017
2 parents f34691a + a8665c7 commit 5b0f22e
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 20 deletions.
36 changes: 27 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
language: objective-c
osx_image: xcode8.3
sudo: false

# Only do a shallow clone of our Git repo.
Expand All @@ -17,14 +16,33 @@ branches:

xcode_project: MDFInternationalization.xcodeproj
xcode_scheme: MDFInternationalizationTests
xcode_sdk: iphonesimulator10.3
env:
matrix:
- DESTINATION="platform=iOS Simulator,name=iPhone 4s,OS=8.3"
- DESTINATION="platform=iOS Simulator,name=iPad Air 2,OS=9.2"
- DESTINATION="platform=iOS Simulator,name=iPhone 7 Plus,OS=10.3.1"

matrix:
include:
- osx_image: xcode9
# The iPhone X was chosen because it is a device with a strange screen size and
# the 'notch'.
# OS 11.0 was chosen as the latest generally available iOS version.
env: DESTINATION="platform=iOS Simulator,name=iPhone X,OS=11.0" SDK="iphonesimulator11.0"
- osx_image: xcode9
# The iPhone 7 Plus was chosen because it is a device with a 3x screen and also changes
# its size category trait on rotation.
# OS 10.3.1 was chosen to represent iOS 10.
env: DESTINATION="platform=iOS Simulator,name=iPhone 7 Plus,OS=10.3.1" SDK="iphonesimulator11.0"
- osx_image: xcode8.3
# The iPad Pro 12.9 was chosen because it is the largest resolution we can test on.
# OS 9.3 was chosen to round out the range of iOS versions we are testing on.
env: DESTINATION="platform=iOS Simulator,name=iPad Pro (12.9-inch),OS=9.3" SDK="iphonesimulator10.3"
- osx_image: xcode8.3
# The iPhone 5 was chosen because it is a 32-bit device.
# OS 8.1 was chosen because it is the earliest iOS offered here.
env: DESTINATION="platform=iOS Simulator,name=iPhone 5,OS=8.1" SDK="iphonesimulator10.3"

# Test Execution
script:
- xcodebuild -project "$TRAVIS_XCODE_PROJECT" -scheme "$TRAVIS_XCODE_SCHEME" -sdk "$TRAVIS_XCODE_SDK" -destination "$DESTINATION" test | xcpretty
# TODO Enable set -euo pipefail
script:
- env
- set -o pipefail
- echo xcodebuild -project "$TRAVIS_XCODE_PROJECT" -scheme "$TRAVIS_XCODE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" test
- xcodebuild -project "$TRAVIS_XCODE_PROJECT" -scheme "$TRAVIS_XCODE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" test | xcpretty

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.0.2

* [Update Project and Scheme to latest recommended settings](https://github.com/material-foundation/material-internationalization-ios/8a0317501403463fab8c1d541eddf0f649df2fc6) (Ian Gordon)
* [Update Travis-CI build environments and simulators (#24)](https://github.com/material-foundation/material-internationalization-ios/25521a9733fea64a2c9cde737d1037d2ec5eee74) (ianegordon)
* [Disable warnings added in Xcode 9 (#23)](https://github.com/material-foundation/material-internationalization-ios/6909be2fcde579116d7e454ae308dac777b740bb) (ianegordon)

# 1.0.1

* [Modify sharedApplication call to avoid extension error (#17)](https://github.com/material-foundation/material-internationalization-ios/commit/902e392e78c11e8ae5169135dd7a0077bcf37d48) (ianegordon)
Expand Down
14 changes: 13 additions & 1 deletion Examples/Flags/Flags.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
4096E61E1D78ED7600389ECD /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = Google;
TargetAttributes = {
4096E6251D78ED7600389ECD = {
Expand Down Expand Up @@ -361,14 +361,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -410,14 +416,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -43,7 +43,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4021725D1EB14C6500966498"
BlueprintIdentifier = "40C483CC1F5DF2AD0097172E"
BuildableName = "FlagsUITests.xctest"
BlueprintName = "FlagsUITests"
ReferencedContainer = "container:Flags.xcodeproj">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -17,7 +17,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4021725D1EB14C6500966498"
BlueprintIdentifier = "40C483CC1F5DF2AD0097172E"
BuildableName = "FlagsUITests.xctest"
BlueprintName = "FlagsUITests"
ReferencedContainer = "container:Flags.xcodeproj">
Expand Down
2 changes: 1 addition & 1 deletion MDFInternationalization.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "MDFInternationalization"
s.version = "1.0.1"
s.version = "1.0.2"
s.authors = "The Material Foundation Authors"
s.summary = "Internationalization tools."
s.homepage = "https://github.com/material-foundation/material-internationalization-ios"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -10,6 +10,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
Expand All @@ -31,6 +32,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<string>1.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
10 changes: 8 additions & 2 deletions Sources/UIImage+MaterialRTL.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,22 @@ - (UIImage *)mdf_imageWithHorizontallyFlippedOrientation {
// On iOS 10 and above, UIImage supports the imageWithHorizontallyFlippedOrientation method.
// Otherwise, we manually manipulate the image.
if ([self respondsToSelector:@selector(imageWithHorizontallyFlippedOrientation)]) {
//TODO(#22): Replace with @availability when we adopt Xcode 9 as our minimum supported version.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
return [self imageWithHorizontallyFlippedOrientation];
#pragma clang diagnostic pop
} else {
UIImage *mirroredImage;
UIImageOrientation mirroredOrientation = MDFRTLMirroredOrientation(self.imageOrientation);
if (self.CGImage) {
mirroredImage = [[self class] imageWithCGImage:self.CGImage
CGImageRef _Nonnull image = (CGImageRef _Nonnull)self.CGImage;
mirroredImage = [[self class] imageWithCGImage:image
scale:self.scale
orientation:mirroredOrientation];
} else if (self.CIImage) {
mirroredImage = [[self class] imageWithCIImage:self.CIImage
CIImage * _Nonnull image = (CIImage * _Nonnull)self.CIImage;
mirroredImage = [[self class] imageWithCIImage:image
scale:self.scale
orientation:mirroredOrientation];
}
Expand Down
10 changes: 10 additions & 0 deletions Sources/UIView+MaterialRTL.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,16 @@
`+[UIView userInterfaceLayoutDirectionForSemanticContentAttribute:relativeToLayoutDirection:]`.
*/



@interface UIView (MaterialRTL)

// UISemanticContentAttribute was added in iOS SDK 9.0 but is available on devices running earlier
// version of iOS. We ignore the partial-availability warning that gets thrown on our use of this
// symbol.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"

/**
A semantic description of the view's contents, used to determine whether the view should be flipped
when switching between left-to-right and right-to-left layouts.
Expand Down Expand Up @@ -77,4 +85,6 @@
relativeToLayoutDirection:
(UIUserInterfaceLayoutDirection)layoutDirection;

#pragma clang diagnostic pop

@end
8 changes: 8 additions & 0 deletions Sources/UIView+MaterialRTL.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
#define MDF_BASE_SDK_EQUAL_OR_ABOVE(x) \
(defined(__IPHONE_##x) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_##x))

// UISemanticContentAttribute was added in iOS SDK 9.0 but is available on devices running earlier
// version of iOS. We ignore the partial-availability warning that gets thrown on our use of this
// symbol.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"

static inline UIUserInterfaceLayoutDirection
MDFUserInterfaceLayoutDirectionForSemanticContentAttributeRelativeToLayoutDirection(
UISemanticContentAttribute semanticContentAttribute,
Expand Down Expand Up @@ -158,3 +164,5 @@ - (void)mdf_setAssociatedSemanticContentAttribute:
}

@end

#pragma clang diagnostic pop

0 comments on commit 5b0f22e

Please sign in to comment.