Skip to content

Commit 0d59cc2

Browse files
committed
Merge branch 'feature/cordova-9.0.0'
# Conflicts: # example/package.json
2 parents 0e464c9 + 491767a commit 0d59cc2

File tree

6 files changed

+23
-209
lines changed

6 files changed

+23
-209
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This project shows how to easily integrate the [PhotoEditor SDK](https://www.pho
77

88
**THIS IS A DEMO**. This repository is not meant as a fully fledged Cordova plugin, but as a base for further development instead. You can copy the repository into your own project and use the `cordova plugin add /path/to/plugin --link` command to add it to your app. You will most likely need to adjust the codebase to fit your requirements and to customize the PhotoEditor SDK. For customizations, take a look at the [PESDKPlugin.m](src/ios/PESDKPlugin.m) and [PESDKPlugin.java](src/android/PESDKPlugin.java) files. You can easily alter the configurations to change colors, behaviour etc. and handle callbacks that are sent by our SDK. For further reference take a look at our [documentation](http://docs.photoeditorsdk.com/?utm_campaign=Projects&utm_source=Github&utm_medium=Side_Projects&utm_content=Cordova-Demo).
99

10-
> :warning: The latest iOS SDK needs to be downloaded manually from [our repository](https://github.com/imgly/pesdk-ios-build/releases) and placed in the `/src/ios/` directory.
10+
> :warning: The latest iOS SDK which consists of the `ImglyKit.framework` and `PhotoEditorSDK.framework` needs to be downloaded manually from [our repository](https://github.com/imgly/pesdk-ios-build/releases) and placed in the `/src/ios/` directory.
1111
1212
## License Files
1313

example/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"license": "Apache-2.0",
1212
"dependencies": {
1313
"cordova-android": "^7.0.0",
14-
"cordova-ios": "^4.5.4",
15-
"cordova-plugin-add-swift-support": "^1.7.1",
16-
"cordova-plugin-whitelist": "^1.3.4"
14+
"cordova-plugin-whitelist": "^1.3.4",
15+
"cordova-ios": "^5.0.1",
16+
"cordova-plugin-add-swift-support": "^2.0.2"
1717
},
1818
"cordova": {
1919
"plugins": {
@@ -25,4 +25,4 @@
2525
"android"
2626
]
2727
}
28-
}
28+
}

hooks/README.md

-196
This file was deleted.

hooks/resolveDependencies.js

+12-5
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,14 @@
131131
return -1;
132132
}
133133
logger.verbose("Removed package.json.tmp");
134-
complete();
134+
installModules(function(err) {
135+
if (err) {
136+
deferral.reject("Error installing original modules: " + err);
137+
return -1;
138+
}
139+
logger.verbose("Installed original modules");
140+
complete();
141+
});
135142
})
136143
});
137144
} else {
@@ -152,10 +159,10 @@
152159

153160
module.exports = function (ctx) {
154161
// resolve modules
155-
exec = ctx.requireCordovaModule('child_process').exec,
156-
fs = ctx.requireCordovaModule('fs'),
157-
path = ctx.requireCordovaModule('path'),
158-
deferral = ctx.requireCordovaModule('q').defer();
162+
exec = require('child_process').exec,
163+
fs = require('fs'),
164+
path = require('path'),
165+
deferral = require('q').defer();
159166

160167
// resolve paths
161168
hooksPath = path.resolve(ctx.opts.projectRoot, "plugins", ctx.opts.plugin.id, "hooks");

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
"camera"
2121
],
2222
"dependencies": {
23-
23+
"glob": "^7.1.5",
24+
"q": "^1.5.1",
25+
"xcode": "^2.0.0"
2426
}
2527
}

plugin.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<keywords>cordova,camera</keywords>
2929
<repo>https://github.com/imgly/pesdk-cordova-demo.git</repo>
3030

31-
<dependency id="cordova-plugin-add-swift-support" version="1.7.1"/>
31+
<dependency id="cordova-plugin-add-swift-support" version="2.0.2"/>
3232

3333
<js-module src="src/www/pesdk.js" name="PESDK">
3434
<clobbers target="PESDK" />
@@ -70,10 +70,11 @@
7070
<framework src="AssetsLibrary.framework" />
7171
<framework src="MobileCoreServices.framework" />
7272
<framework src="src/ios/PhotoEditorSDK.framework" custom="true" embed="true" />
73+
<framework src="src/ios/ImglyKit.framework" custom="true" embed="true" />
7374

75+
<!-- Custom Hooks -->
7476
<hook type="after_plugin_install" src="hooks/resolveDependencies.js" />
7577
<hook type="after_platform_add" src="hooks/resolveDependencies.js" />
76-
7778
</platform>
7879

7980
<!-- Browser -->

0 commit comments

Comments
 (0)