From 50b929262b3753df51d9cf1661bc67a1cec67ac1 Mon Sep 17 00:00:00 2001 From: Diego Serrano Date: Wed, 16 Nov 2016 19:43:47 -0500 Subject: [PATCH] Fix method conflict on category Category UIView+Constraints had methods name that caused conflicts with 3rd party libraries or other extentions of the same kind. Methods are now prefixed using Apple conventions: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html\#//apple_ref/doc/uid/TP40011210-CH6-SW4 How to test I'm including a sample project that contains an extention with a method named the same way we have currently on the SDK (production) To replicate crash: Go to Podfile Uncomment line # gets latest version [!] Unknown command: `WootricSDK` Did you mean: trunk? Usage: $ pod COMMAND CocoaPods, the Cocoa library package manager. Commands: + cache Manipulate the CocoaPods cache + deintegrate Deintegrate CocoaPods from your project + env Display pod environment + init Generate a Podfile for the current directory + install Install project dependencies according to versions from a Podfile.lock + ipc Inter-process communication + lib Develop pods + list List pods + outdated Show outdated project dependencies + plugins Show available CocoaPods plugins + repo Manage spec-repositories + search Search for pods + setup Setup the CocoaPods environment + spec Manage pod specs + trunk Interact with the CocoaPods API (e.g. publishing new specs) + try Try a Pod! + update Update outdated project dependencies and create new Podfile.lock Options: --silent Show nothing --version Show the version of the tool --verbose Show more debugging information --no-ansi Show output without ANSI codes --help Show help banner of specified command From terminal run [!] No `Podfile' found in the project directory. This should get the SDK from Cocoapods Change clientId, clientSecret and accountToken in ViewControler.swift If you run the project the app should crash. To fix this:comment [!] Unknown command: `WootricSDK` Did you mean: trunk? Usage: $ pod COMMAND CocoaPods, the Cocoa library package manager. Commands: + cache Manipulate the CocoaPods cache + deintegrate Deintegrate CocoaPods from your project + env Display pod environment + init Generate a Podfile for the current directory + install Install project dependencies according to versions from a Podfile.lock + ipc Inter-process communication + lib Develop pods + list List pods + outdated Show outdated project dependencies + plugins Show available CocoaPods plugins + repo Manage spec-repositories + search Search for pods + setup Setup the CocoaPods environment + spec Manage pod specs + trunk Interact with the CocoaPods API (e.g. publishing new specs) + try Try a Pod! + update Update outdated project dependencies and create new Podfile.lock Options: --silent Show nothing --version Show the version of the tool --verbose Show more debugging information --no-ansi Show output without ANSI codes --help Show help banner of specified command Uncomment line and change YOUR_PATH to where the local WootricSDK is. Run [!] No `Podfile' found in the project directory. Now if you run the project there should be no crash and run normally. Trello: https://trello.com/c/fjwDvdRe/975-ios-sdk-crashes-on-swift --- CHANGELOG.md | 7 +++ README.md | 2 +- WootricSDK.podspec | 2 +- .../WootricSDK.xcodeproj/project.pbxproj | 8 ++- .../xcschemes/WootricSDK.xcscheme | 2 +- WootricSDK/WootricSDK/UIView+Constraints.h | 24 ++++---- WootricSDK/WootricSDK/UIView+Constraints.m | 24 ++++---- WootricSDK/WootricSDK/WTRCircleScoreButton.m | 4 +- WootricSDK/WootricSDK/WTRCircleScoreView.m | 4 +- WootricSDK/WootricSDK/WTRFeedbackView.m | 26 ++++---- WootricSDK/WootricSDK/WTRSingleScoreLabel.m | 6 +- WootricSDK/WootricSDK/WTRSocialShareView.m | 50 ++++++++-------- WootricSDK/WootricSDK/WTRiPADFeedbackView.m | 30 +++++----- .../WootricSDK/WTRiPADNPSQuestionView.m | 18 +++--- .../WootricSDK/WTRiPADSocialShareView.m | 38 ++++++------ .../WTRiPADSurveyViewController+Constraints.m | 60 +++++++++---------- .../WootricSDK/WootricSDK.bundle/Info.plist | 2 +- 17 files changed, 160 insertions(+), 147 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed53bf4..4bce225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 0.5.12 (2016-11-17) + +### Fixed: + +- Change method names in category to avoid conflict +- Update project settings + ## 0.5.11 (2016-10-12) ### Fixed: diff --git a/README.md b/README.md index 9b15aee..7ef406d 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ The easiest way to get Wootric into your iOS project is to use [CocoaPods](http: 2. Create a file in your Xcode project called Podfile and add the following line: ```ruby - pod "WootricSDK", "~> 0.5.11" + pod "WootricSDK", "~> 0.5.12" ``` 3. In your Xcode project directory run the following command: diff --git a/WootricSDK.podspec b/WootricSDK.podspec index ff147a4..16f4389 100644 --- a/WootricSDK.podspec +++ b/WootricSDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'WootricSDK' - s.version = '0.5.11' + s.version = '0.5.12' s.license = 'MIT' s.summary = 'Wootric SDK for displaying survey for end user.' s.homepage = 'https://github.com/Wootric/WootricSDK-iOS' diff --git a/WootricSDK/WootricSDK.xcodeproj/project.pbxproj b/WootricSDK/WootricSDK.xcodeproj/project.pbxproj index 44499b4..4a3a04f 100644 --- a/WootricSDK/WootricSDK.xcodeproj/project.pbxproj +++ b/WootricSDK/WootricSDK.xcodeproj/project.pbxproj @@ -538,7 +538,7 @@ B2DC6EF91B81E6F900F599B3 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = Wootric; TargetAttributes = { B2DC6F011B81E6F900F599B3 = { @@ -670,8 +670,10 @@ 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -718,8 +720,10 @@ 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -749,6 +753,7 @@ B2DC6F191B81E6F900F599B3 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -768,6 +773,7 @@ B2DC6F1A1B81E6F900F599B3 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; diff --git a/WootricSDK/WootricSDK.xcodeproj/xcshareddata/xcschemes/WootricSDK.xcscheme b/WootricSDK/WootricSDK.xcodeproj/xcshareddata/xcschemes/WootricSDK.xcscheme index 6c36134..7c0f9e1 100644 --- a/WootricSDK/WootricSDK.xcodeproj/xcshareddata/xcschemes/WootricSDK.xcscheme +++ b/WootricSDK/WootricSDK.xcodeproj/xcshareddata/xcschemes/WootricSDK.xcscheme @@ -1,6 +1,6 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 0.5.11 + 0.5.12 CFBundleVersion $(CURRENT_PROJECT_VERSION)