Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:walmartreact/react-native-orienta…
Browse files Browse the repository at this point in the history
…tion-listener

Conflicts:
	index.js
  • Loading branch information
kenwheeler committed Mar 7, 2016
2 parents 0b216ba + 3ef33f4 commit 198ac33
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ public void onOrientationChanged(int orientation) {
}
params.putString("orientation", orientationValue);
params.putString("device", getDeviceName());
thisContext
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit("orientationDidChange", params);
if (thisContext.hasActiveCatalystInstance()) {
thisContext
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit("orientationDidChange", params);
}
}
};

Expand Down Expand Up @@ -105,4 +107,4 @@ public void getOrientation(Callback success) {
success.invoke(data);
}

}
}
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
'use strict';

var React = require('react-native');
<<<<<<< HEAD

var { DeviceEventEmitter } = React;

var {NativeModules} = React;
var { DeviceEventEmitter, NativeModules } = React;

module.exports = {
getOrientation: function(callback) {
Expand Down
14 changes: 14 additions & 0 deletions react-native-orientation-listener.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Pod::Spec.new do |s|
s.name = "react-native-orientation-listener"
s.version = "0.0.2"
s.summary = " react-native library for obtaining current device orientation"
s.requires_arc = true
s.author = { 'Ken Wheeler' => 'ken@outlook.com' }
s.license = 'MIT'
s.homepage = 'https://github.com/walmartreact/react-native-orientation-listener'
s.source = { :git => "https://github.com/walmartreact/react-native-orientation-listener.git" }
s.platform = :ios, "7.0"
s.dependency 'React'
s.source_files = "*.{h,m}"
s.preserve_paths = "*.js"
end

0 comments on commit 198ac33

Please sign in to comment.