Skip to content
Open
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
3 changes: 0 additions & 3 deletions src/browser/DeviceProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
* under the License.
*
*/
var browser = require('cordova/platform');

function getPlatform () {
return 'browser';
}
Expand Down Expand Up @@ -70,7 +68,6 @@ module.exports = {
getDeviceInfo: function (success, error) {
setTimeout(function () {
success({
cordova: browser.cordovaVersion,
platform: getPlatform(),
model: getModel(),
version: getVersion(),
Expand Down
2 changes: 0 additions & 2 deletions src/ios/CDVDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
@interface CDVDevice : CDVPlugin
{}

+ (NSString*)cordovaVersion;

- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command;

@end
6 changes: 0 additions & 6 deletions src/ios/CDVDevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,11 @@ - (NSDictionary*)deviceProperties
@"platform": @"iOS",
@"version": [device systemVersion],
@"uuid": [self uniqueAppInstanceIdentifier:device],
@"cordova": [[self class] cordovaVersion],
@"isVirtual": @([self isVirtual]),
@"isiOSAppOnMac": @([self isiOSAppOnMac])
};
}

+ (NSString*)cordovaVersion
{
return CDV_VERSION;
}

- (BOOL)isVirtual
{
#if TARGET_OS_SIMULATOR
Expand Down
9 changes: 0 additions & 9 deletions tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,6 @@ exports.defineAutoTests = function () {
expect(String(window.device.cordova).length > 0).toBe(true);
});

it('should depend on the presence of cordova.version string', function () {
expect(window.cordova.version).toBeDefined();
expect(String(window.cordova.version).length > 0).toBe(true);
});

it('should contain device.cordova equal to cordova.version', function () {
expect(window.device.cordova).toBe(window.cordova.version);
});

it('should contain a model specification that is a string', function () {
expect(window.device.model).toBeDefined();
expect(String(window.device.model).length > 0).toBe(true);
Expand Down
2 changes: 0 additions & 2 deletions www/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ function Device () {
channel.onCordovaReady.subscribe(function () {
me.getInfo(
function (info) {
// ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js
// TODO: CB-5105 native implementations should not return info.cordova
var buildLabel = cordova.version;
me.available = true;
me.platform = info.platform;
Expand Down