├── plugin.xml
├── src
└── ios
│ ├── DisableShakeToEdit.h
│ └── DisableShakeToEdit.m
├── package.json
├── LICENSE
└── README.md
/plugin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 | iOS Disable Shake to Edit
8 | Disables iOS shake to undo feature in all input fields.
9 | MIT
10 | cordova,ios,input,gesture,shaketoedit
11 | https://github.com/nleclerc/cordova-plugin-ios-disableshaketoedit.git
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/ios/DisableShakeToEdit.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface DisableShakeToEdit : CDVPlugin
23 | @end
24 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "1.0.0",
3 | "name": "cordova-plugin-ios-disableshaketoedit",
4 | "cordova_name": "cordova-plugin-ios-disableshaketoedit",
5 | "description": "Sets status bar as hidden in ios cordova project.",
6 | "author": "Nicolas Leclerc",
7 | "license": "MIT",
8 | "repository": {
9 | "type": "git",
10 | "url": "https://github.com/nleclerc/cordova-plugin-ios-disableshaketoedit.git"
11 | },
12 | "issue": "https://github.com/nleclerc/cordova-plugin-ios-disableshaketoedit/issues",
13 | "cordova": {
14 | "id": "cordova-plugin-ios-disableshaketoedit",
15 | "platforms": [
16 | "ios"
17 | ]
18 | },
19 | "keywords": [
20 | "cordova",
21 | "ios",
22 | "input",
23 | "gesture",
24 | "shaketoedit"
25 | ],
26 | "engines": [
27 | {
28 | "name": "cordova",
29 | "version": ">=3.0.0"
30 | }
31 | ]
32 | }
33 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | Copyright (c) 2013 Nicolas Leclerc
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 |
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 |
--------------------------------------------------------------------------------
/src/ios/DisableShakeToEdit.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "DisableShakeToEdit.h"
21 | #import
22 |
23 | @implementation DisableShakeToEdit
24 |
25 | - (void)pluginInitialize
26 | {
27 | [UIApplication sharedApplication].applicationSupportsShakeToEdit = NO;
28 | NSLog(@"DisableShakeToEdit plugin initialized.");
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # cordova-plugin-ios-disableshaketoedit
2 |
3 | ## Description
4 | This plugin disables the infamous "Shake to undo" feature by setting the application's `applicationSupportsShakeToEdit` property to `NO`.
5 |
6 | ## Installation
7 | Use the following command in your cordova project folder.
8 |
9 | $ cordova plugin add cordova-plugin-ios-disableshaketoedit
10 |
11 | ## Version History
12 | ### 1.0.0
13 | * Changed license to MIT.
14 | * Changed plugin id to conform to new standard.
15 | * Added package.json to allow npm publishing.
16 |
17 | ### 0.2.0
18 | * Fixed plugin not working anymore with cordova 3.2+.
19 |
20 | ### 0.1.0
21 | * Initial release.
22 |
23 | ## License
24 | [The MIT License (MIT)](http://opensource.org/licenses/mit-license.html)
25 | Copyright (c) 2013 Nicolas Leclerc
26 |
27 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
28 |
29 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
30 |
31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32 |
--------------------------------------------------------------------------------