diff --git a/.travis.yml b/.travis.yml index 1c1977b..9127e12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ # * http://www.objc.io/issue-6/travis-ci.html language: objective-c -osx_image: xcode7.1 +osx_image: xcode9.4 # cache: cocoapods before_install: - gem install cocoapods # Since Travis is not always on latest version diff --git a/MathEditor.xcodeproj/project.pbxproj b/MathEditor.xcodeproj/project.pbxproj index e601607..bae7b70 100644 --- a/MathEditor.xcodeproj/project.pbxproj +++ b/MathEditor.xcodeproj/project.pbxproj @@ -336,7 +336,6 @@ 6003F586195388D20070C39A /* Sources */, 6003F587195388D20070C39A /* Frameworks */, 6003F588195388D20070C39A /* Resources */, - D8A5CFAD5F09AAA428AB4D10 /* [CP] Embed Pods Frameworks */, E202BD0EA2A01E97CAF04F2E /* [CP] Copy Pods Resources */, ); buildRules = ( @@ -356,7 +355,6 @@ 6003F5AA195388D20070C39A /* Sources */, 6003F5AB195388D20070C39A /* Frameworks */, 6003F5AC195388D20070C39A /* Resources */, - E5084554A0ECA0F3755B8CC7 /* [CP] Embed Pods Frameworks */, 02495CB9EE6CCCBF5814B5C0 /* [CP] Copy Pods Resources */, ); buildRules = ( @@ -375,7 +373,7 @@ isa = PBXProject; attributes = { CLASSPREFIX = MT; - LastUpgradeCheck = 0720; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = "Kostub Deshmukh"; TargetAttributes = { 490BE5551CE695CC00AE31A0 = { @@ -431,9 +429,14 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-MathEditor_Tests/Pods-MathEditor_Tests-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/MathEditor/MTKeyboardResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/iosMath/mathFonts.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MTKeyboardResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/mathFonts.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -446,13 +449,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-MathEditor-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 4B44B263AD3BCE039EE8DD71 /* [CP] Check Pods Manifest.lock */ = { @@ -461,13 +467,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-MathEditor_Tests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 4C3A2645A6B5FE31FA662BF1 /* [CP] Copy Pods Resources */ = { @@ -476,9 +485,12 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-MathEditor/Pods-MathEditor-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/iosMath/mathFonts.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/mathFonts.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -491,28 +503,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-MathEditor_Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - D8A5CFAD5F09AAA428AB4D10 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MathEditor_Example/Pods-MathEditor_Example-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; E202BD0EA2A01E97CAF04F2E /* [CP] Copy Pods Resources */ = { @@ -521,30 +521,20 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-MathEditor_Example/Pods-MathEditor_Example-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/MathEditor/MTKeyboardResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/iosMath/mathFonts.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MTKeyboardResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/mathFonts.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MathEditor_Example/Pods-MathEditor_Example-resources.sh\"\n"; showEnvVarsInLog = 0; }; - E5084554A0ECA0F3755B8CC7 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MathEditor_Tests/Pods-MathEditor_Tests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -609,7 +599,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ( "$(inherited)", @@ -629,7 +619,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ( "$(inherited)", @@ -648,19 +638,32 @@ 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_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -688,18 +691,31 @@ 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_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = 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; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; diff --git a/MathEditor.xcodeproj/xcshareddata/xcschemes/iosMathEditor-Example.xcscheme b/MathEditor.xcodeproj/xcshareddata/xcschemes/iosMathEditor-Example.xcscheme index 6ca118a..0a10336 100644 --- a/MathEditor.xcodeproj/xcshareddata/xcschemes/iosMathEditor-Example.xcscheme +++ b/MathEditor.xcodeproj/xcshareddata/xcschemes/iosMathEditor-Example.xcscheme @@ -1,6 +1,6 @@ + + + + IDEDidComputeMac32BitWarning + + + diff --git a/MathKeyboardResources/MTKeyboardTab3.xib b/MathKeyboardResources/MTKeyboardTab3.xib index ba3d5b6..e1fd211 100644 --- a/MathKeyboardResources/MTKeyboardTab3.xib +++ b/MathKeyboardResources/MTKeyboardTab3.xib @@ -262,7 +262,7 @@ - + @@ -476,7 +476,7 @@ - + diff --git a/Podfile.lock b/Podfile.lock index 5f07901..1fb6169 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,20 +1,24 @@ PODS: - - iosMath (0.9.3) - - MathEditor (0.2.0): + - iosMath (0.9.4) + - MathEditor (0.3.0): - iosMath (~> 0.9.3) DEPENDENCIES: - iosMath - MathEditor (from `./`) +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - iosMath + EXTERNAL SOURCES: MathEditor: - :path: ./ + :path: "./" SPEC CHECKSUMS: - iosMath: 619e53c34dfa19ac3062869f9974747b44507083 - MathEditor: e93c1344182203e0eafe5c95a6c424a3bbc89bbd + iosMath: f7a6cbadf9d836d2149c2a84c435b1effc244cba + MathEditor: f470005e0d04126644a80b7a245d7ce7c68a9e40 PODFILE CHECKSUM: 824592d1d06afe0a23f07736e4e1f8968e497263 -COCOAPODS: 1.1.1 +COCOAPODS: 1.5.3 diff --git a/mathEditor/editor/MTEditableMathLabel.m b/mathEditor/editor/MTEditableMathLabel.m index 05f528f..8aa10c4 100644 --- a/mathEditor/editor/MTEditableMathLabel.m +++ b/mathEditor/editor/MTEditableMathLabel.m @@ -976,7 +976,12 @@ - (void)insertDictationResult:(NSArray *)dictationResult } - (id)insertDictationResultPlaceholder { - return nil; + // NOTE: "Implementation of this method is optional ... + // The actual contents of the object are not accessed by UIKit but + // you can use the object to store whatever information you need + // to identify the location for the animation." + // https://developer.apple.com/documentation/uikit/uitextinput/1614466-insertdictationresultplaceholder?language=objc + return [NSObject new]; } - (NSInteger)offsetFromPosition:(UITextPosition *)fromPosition toPosition:(UITextPosition *)toPosition @@ -1004,7 +1009,8 @@ - (void)replaceRange:(UITextRange *)range withText:(NSString *)text } - (NSArray *)selectionRectsForRange:(UITextRange *)range { - return nil; + // NOTE: Must return non-nil NSArray* according to UIKit/Headers/UITextInput.h + return [NSArray array]; } - (void)setBaseWritingDirection:(UITextWritingDirection)writingDirection forRange:(UITextRange *)range { diff --git a/mathEditor/internal/MTDisplay+Editing.m b/mathEditor/internal/MTDisplay+Editing.m index bc719e4..36dbc77 100644 --- a/mathEditor/internal/MTDisplay+Editing.m +++ b/mathEditor/internal/MTDisplay+Editing.m @@ -534,7 +534,7 @@ - (MTDisplay*) subAtomForIndex:(MTMathListIndex*) index - (CGPoint)caretPositionForIndex:(MTMathListIndex *)index { - CGPoint position = kInvalidPosition; + CGPoint position; if (!index) { return kInvalidPosition; } diff --git a/mathEditor/keyboard/MTMathKeyboardRootView.m b/mathEditor/keyboard/MTMathKeyboardRootView.m index cdbb35f..1bc222a 100644 --- a/mathEditor/keyboard/MTMathKeyboardRootView.m +++ b/mathEditor/keyboard/MTMathKeyboardRootView.m @@ -130,7 +130,7 @@ -(void)assignAndAnimateKeyboard:(NSInteger)keyboardNumber _currentKeyboard.alpha = 1.0; [UIView animateWithDuration:0.1 animations:^{ newKeyboard.alpha = 1.0; - _currentKeyboard.alpha = 0.5; + self->_currentKeyboard.alpha = 0.5; }]; [_contentView bringSubviewToFront:newKeyboard];