Closed MarsupiL closed 5 years ago
function loadProjectFile() {
var platform_ios;
var projectFile;
try {
// try pre-5.0 cordova structure
platform_ios = context.requireCordovaModule('cordova-lib/src/plugman/platforms')['ios'];
projectFile = platform_ios.parseProjectFile(iosPlatformPath());
} catch (e) {
try {
// let's try cordova 5.0 structure
platform_ios = context.requireCordovaModule('cordova-lib/src/plugman/platforms/ios');
projectFile = platform_ios.parseProjectFile(iosPlatformPath());
} catch (e) {
// Then cordova 7.0
var project_files = context.requireCordovaModule('glob').sync(path.join(iosPlatformPath(), '*.xcodeproj', 'project.pbxproj'));
if (project_files.length === 0) {
throw new Error('does not appear to be an xcode project (no xcode project file)');
}
var pbxPath = project_files[0];
var xcodeproj = context.requireCordovaModule('xcode').project(pbxPath);
xcodeproj.parseSync();
projectFile = {
'xcode': xcodeproj,
write: function () {
var fs = context.requireCordovaModule('fs');
var frameworks_file = path.join(iosPlatformPath(), 'frameworks.json');
var frameworks = {};
try {
frameworks = context.requireCordovaModule(frameworks_file);
} catch (e) { }
fs.writeFileSync(pbxPath, xcodeproj.writeSync());
if (Object.keys(frameworks).length === 0){
// If there is no framework references remain in the project, just remove this file
context.requireCordovaModule('shelljs').rm('-rf', frameworks_file);
return;
}
fs.writeFileSync(frameworks_file, JSON.stringify(this.frameworks, null, 4));
}
};
}
}
return projectFile;
}
@lovelyelfpop 's solution worked for me, thank you!
May I suggest the title contains at least the error encountered: Error: Cannot find module '../plugman/platforms/ios'
. I found driftyco/ionic-plugin-deeplinks#99 before this one, even though I search the issue here first.
Hi, this fix works as a temporary solution but is it going to be fixed on npm too ?
Still not fixed, this is quite a pain to edit this function every time I install dependencies
Can this be merged?
Why has this not been merged in 2 months? Is there a good reason?
Any updates on this?
Hellooooooo? there are even forks that have the fix: https://github.com/flipflopapp/cordova-universal-links-plugin
Hy guys, any plans to update it? Or should we use the fork already?
The latest commit was on January 29th and there doesn't seem to be much activity from @nikDemyankov so I've got the feeling this repository has been abandoned.
Any Plans on merging this fix?
Any chance this will get merged soon?
It would be amazing if this could get merged soon. Thanks!
This repository appears to be abandoned so your best option is to just use one of the forks mentioned in this thread.
I had the same issue with cordova 8.0 and was able to resolve this by reverting to cordova@6.5 --npm i cordova@6.5
The code provided by lovelyelfpop throws an error when returning from a webview out of the app ("Return to App name..." in top-left) .
InvalidCharacterError: The string contains invalid characters.
Any idea how to fix?
Also curious when an official fix will be merged... Official firebase docs reference this plugin as a dependency, le sigh. https://firebase.google.com/docs/auth/web/cordova
đ Hi! Thank you for your interest in this repo.
đĸ We are not using nordnet/cordova-universal-links-plugin anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.
đ This will now be closed & locked.
âšī¸ Please see #160 for more information.
See https://github.com/driftyco/ionic-plugin-deeplinks/issues/99 The fix suggested by peterpeterparker seems to work but a more permanent solution with a plugin update would be appreciated. Thanks for the support.