Skip to content

Commit

Permalink
feat(ios): remove need for the swift-support hook, remove script
Browse files Browse the repository at this point in the history
The plugin now requires cordova-plugin-swift-support as a dependency. This package handles the job

more effectively, and doesn't require cordova-plugin-qrscanner consumers to make any special

configuration changes to install the plugin on iOS.
  • Loading branch information
bitjson committed Oct 5, 2016
1 parent 38e14aa commit dca1f7e
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 155 deletions.
4 changes: 2 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
id="cordova-plugin-qrscanner"
version="2.2.0">
version="2.3.4">

<name>QRScanner</name>

Expand Down Expand Up @@ -35,7 +35,7 @@
<param name="ios-package" value="QRScanner"/>
</feature>
</config-file>
<header-file src="src/ios/QRScanner-Bridging-Header.h" />
<dependency id="cordova-plugin-swift-support" spec="~3.1.0" />
<source-file src="src/ios/QRScanner.swift"/>
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
<string>The camera is used to scan QR codes.</string>
Expand Down
143 changes: 0 additions & 143 deletions scripts/swift-support.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/ios/QRScanner-Bridging-Header.h

This file was deleted.

4 changes: 0 additions & 4 deletions tests/project/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,9 @@
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<hook src="plugins/cordova-plugin-qrscanner/scripts/swift-support.js" type="before_build" />
<preference name="orientation" value="all" />
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
<string>The test app uses the camera to scan QR codes.</string>
</config-file>
</platform>
<plugin name="cordova-plugin-qrscanner" spec="../../cordova-plugin-qrscanner" />
<plugin name="cordova-plugin-qrscanner-tests" spec="../../cordova-plugin-qrscanner/tests" />
Expand Down
2 changes: 1 addition & 1 deletion tests/project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"clean": "rm -rf node_modules && rm -rf platforms && rm -rf plugins",
"postinstall": "node scripts/timestamp.js && cordova prepare",
"test:ios": "cordova build ios && open platforms/ios/CvQRScnTst.xcodeproj",
"test:ios": "cordova prepare ios && cordova build ios && open platforms/ios/CvQRScnTst.xcodeproj",
"test:browser": "cordova run browser",
"test:android": "cordova build android && open -a /Applications/Android\\ Studio.app platforms/android"
},
Expand Down

0 comments on commit dca1f7e

Please sign in to comment.