You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2016/11/01 23:01:25 UTC

ios commit: CB-12049 user-agent string has a unique number appended

Repository: cordova-ios
Updated Branches:
  refs/heads/master 69e06b0a8 -> fa72583ea


CB-12049 user-agent string has a unique number appended

 This closes #272


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/fa72583e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/fa72583e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/fa72583e

Branch: refs/heads/master
Commit: fa72583eaa1cb91c6473e179ed6b9df392f73c50
Parents: 69e06b0
Author: Sterling <st...@gmail.com>
Authored: Tue Nov 1 15:15:08 2016 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Nov 1 16:02:22 2016 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/Public/CDVViewController.m | 2 +-
 tests/CordovaLibTests/CDVUserAgentTest.m      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/fa72583e/CordovaLib/Classes/Public/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m
index f3a763b..3856c56 100644
--- a/CordovaLib/Classes/Public/CDVViewController.m
+++ b/CordovaLib/Classes/Public/CDVViewController.m
@@ -499,7 +499,7 @@
         _userAgent = [NSString stringWithFormat:@"%@ %@", localBaseUserAgent, appendUserAgent];
     } else {
         // Use our address as a unique number to append to the User-Agent.
-        _userAgent = [NSString stringWithFormat:@"%@ (%lld)", localBaseUserAgent, (long long)self];
+        _userAgent = localBaseUserAgent;
     }
     return _userAgent;
 }

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/fa72583e/tests/CordovaLibTests/CDVUserAgentTest.m
----------------------------------------------------------------------
diff --git a/tests/CordovaLibTests/CDVUserAgentTest.m b/tests/CordovaLibTests/CDVUserAgentTest.m
index f52178a..a028158 100644
--- a/tests/CordovaLibTests/CDVUserAgentTest.m
+++ b/tests/CordovaLibTests/CDVUserAgentTest.m
@@ -129,7 +129,7 @@
     NSString* ua1 = [vc1WebView stringByEvaluatingJavaScriptFromString:getUserAgentCode];
     NSString* ua2 = [vc2WebView stringByEvaluatingJavaScriptFromString:getUserAgentCode];
 
-    XCTAssertFalse([ua1 isEqual:ua2], @"User-Agents should be different.");
+    XCTAssertTrue([ua1 isEqual:ua2], @"User-Agents should be different.");
 }
 
 - (void)testBaseUserAgent


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org