Skip to content

Commit

Permalink
Fixed iOS "could not find -Info.plist file, or config.xml file"
Browse files Browse the repository at this point in the history
Solution was found in: apache/cordova-ios#764

Had to change the "projectFile.js"
  • Loading branch information
mashfiqui-rabbi committed Feb 23, 2020
1 parent a35ef35 commit a26f459
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 5 deletions.
4 changes: 2 additions & 2 deletions platforms/ios/SARA.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
Expand Down Expand Up @@ -668,7 +668,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
Expand Down
Binary file not shown.
19 changes: 19 additions & 0 deletions platforms/ios/cordova/lib/projectFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,27 @@ function parseProjectFile (locations) {
var xcodeproj = xcode.project(pbxPath);
xcodeproj.parseSync();

/*
var xcBuildConfiguration = xcodeproj.pbxXCBuildConfigurationSection();
var plist_file_entry = _.find(xcBuildConfiguration, function (entry) { return entry.buildSettings && entry.buildSettings.INFOPLIST_FILE; });
*/

//solution comes from here: https://github.com/apache/cordova-ios/issues/764
var projectName = fs
.readdirSync(project_dir)
.find(d => d.includes(".xcworkspace"))
.replace(".xcworkspace", "");

var xcBuildConfiguration = xcodeproj.pbxXCBuildConfigurationSection();
var plist_file_entry = _.find(xcBuildConfiguration, function(entry) {
return (
entry.buildSettings &&
entry.buildSettings.INFOPLIST_FILE &&
entry.buildSettings.INFOPLIST_FILE.includes(projectName)
);
});


var plist_file = path.join(project_dir, plist_file_entry.buildSettings.INFOPLIST_FILE.replace(/^"(.*)"$/g, '$1').replace(/\\&/g, '&'));
var config_file = path.join(path.dirname(plist_file), 'config.xml');

Expand Down
3 changes: 2 additions & 1 deletion platforms/ios/www/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14518,7 +14518,8 @@ __webpack_require__.r(__webpack_exports__);
var environment = {
production: false,
userServer: "http://adaptsdata.research.chop.edu:5000",
oneSignalAppId: "de3580a2-4aae-42c4-87cf-2c319c2df0c3",
//oneSignalAppId: "de3580a2-4aae-42c4-87cf-2c319c2df0c3",
oneSignalAppId: "f9c4370d-cbcb-4e6f-ab1f-25d1c41b8f3a",
firebaseConfig: {
apiKey: "AIzaSyBK_PwjnsC01Q-a-sV7LsA7qIeIhCx4ts0",
authDomain: "sarav2-6a033.firebaseapp.com",
Expand Down
2 changes: 1 addition & 1 deletion platforms/ios/www/main.js.map

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion www/cordova_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
"clobbers": [
"OneSignal"
]
},
{
"id": "cordova-plugin-app-version.AppVersionPlugin",
"file": "plugins/cordova-plugin-app-version/www/AppVersionPlugin.js",
"pluginId": "cordova-plugin-app-version",
"clobbers": [
"cordova.getAppVersion"
]
}
];
module.exports.metadata = {
Expand All @@ -248,6 +256,7 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
"cordova-plugin-splashscreen": "5.0.2",
"cordova-plugin-statusbar": "2.4.2",
"cordova-plugin-whitelist": "1.3.3",
"onesignal-cordova-plugin": "2.8.2"
"onesignal-cordova-plugin": "2.8.2",
"cordova-plugin-app-version": "0.1.9"
};
});

0 comments on commit a26f459

Please sign in to comment.