How to keep using home folder for electron in MAS build? - electron

I have an app in electron that needs to stored some files in the user directory /Users/myuser.
When developing the app I used
const userHome = require('user-home');
For Windows and Mac (DMG target) and everything was great!
Now I'm doing MAS build, but what is happening is that the MAS target, once installed in the machine, is not using the userHome as /Users/myuser, instead it's using /Users/myuser/Library/Containers/myapp/Data
And the thing is that I need a more user friendly directory so the user can interact with those files/folders.
Is there a way I can do this for cross platform/targets? PD: I'm using electron-builder for the build.

Related

Selected folder doesn't contain a config.xml in phonegap

I am using windows 7 .my antivirus is now disabled. I want to build a hybrid app. i downloaded phone gap. when i creating new phone gap project their shows "Selected folder doesn't contain a config.xml ". I tried lot of time but i cant able to create a project .after seeing this message selected folder contain 4 folders but it is empty. I want to built a hybrid app but i am stuck in beginning stage.so please help me to solve problem.
i am attaching screenshot of project creation and error message .1st screen shot is how i created project.2nd one is error message when i click create project.3rd one is empty folders created in selected folder for creating project.
When i select a folder with config file it show below error...
It helped me to create the project through the PhoneGap CLI and then just add the project in the Gui. That worked for me
Install phonegap Cli with npm: npm install -g phonegap#latest
Go to your project folder and create the project: phonegap create testproject
Start the PhoneGap Desktop App and add the existing project
We've pinpointed the issue, there seems to be have been a recent change to the template and it seems to have a compatibility issue with the connect-phonegap create API which is used by PhoneGap Desktop to create projects.
We're currently working on a fix.
In the mean time you can also use the PhoneGap CLI as an alternative.

Change ionic bundle identifier not working in IOS

I hade to create a new Ionic app since the first one stopped working.
After that It got new numbers in the end of the name (i.e old name com.ionicframework.test420004, new name com.ionicframework.test122446).
I changed it everywhere (search and replace in VisualStudio 2015) I could find in the project.
IOS still looks for local (downloaded) files with the path of the wrong application name.
Does anybody know how to change it?
In this scenario you have to build it using cordova on a Apple computer. You can't build it and add the platform on a pc and the export the platform to an Apple computer.

iCloud documents no longer in Mobile Documents folder?

I have an app that creates a file in the iCloud documents folder. It is working fine, in that the devices that the app is installed on can access and update the file successfully. In my code, a NSLog of the file path gives me:
///private/var/mobile/Library/Mobile%20Documents/iCloud~my-company-name~appname/Documents/document_name
As part of my testing, I need to be able to view this file from my mac. Previously, I was able to do this by looking in my library/Mobile documents folder at the respective app folder.
However, I can't see the app folder in there. Any ideas why this would now not be showing up or pointers to configuration settings I could check? (I'm on Xcode 6.1, mac is Yosemite and all devices are iOS8).
Finder now treats this as a 'special' folder, so actively prevents you browsing the structure. You can do this if you use Terminal instead.

How to edit the Xcode Project for Meteor iOS integration?

I want to create an app icon, splash screen, edit the app name, and set some cordova / app settings.
meteor run ios opens up the simulator but doesn't open or the project. Where is that project and does this Xcode project ever get overwritten? I don't want to lose any settings I make.
For example I want to set the app url scheme so I can implement a redirect to the app. I also want to set cordova preferences to disallow over scroll. Typically I would do these things from within the .xcodeproj but where is it and when does it get overwritten / reset?
From what i have seen from the docs and my experience so far
meteor run ios only runs the iOS emulator with your code in it. The code related to this build is in .meteor/local/cordova-build but is temporary and will get overwritten all the time
meteor run ios-device -p yourlocalip:yourlocalport will launch XCode with the cordova-built .xcodeproject, and a local server on your computer. It is intended to make you able to run and debug your code from an actual iPhone device, with the changes you make on your computer to the code repercuted instantly on the iPhone screen. You need your computer and your phone to be on the same Wifi to enable this feature. The code related to this build is in .meteor/local/cordova-build but is temporary and will get overwritten all the time
meteor build /Path/To/Builds/Directory/NewBuild -p yourserverhost:yourserverip will actually create the cordova-built .xcodeproject pointing to your real server at the path you specified. From this project you can customize as much as you want BUT you will indeed loose these settings with a new build...
Except if you use the yourproject/cordova-build-override/ folder !
As described in the offical cordova meteor docs under "Advanced build configuration" everything you put in this folder will overwrite the files created by meteor during its build. So you can configure everything in the Cordova/Phonegap way there. If you were able to configure your features through Cordova usually, you will be able to do it there.
Bonus that I have learned the hard way :
Always destroy the .meteor/local folder before building one of those three things, i got stuck in a state where XCode remembered some of my changes to the .xcodeproject and everything was messed up. After destroying this folder, everything went back to normal :)
hope i helped
Mickael
If you are looking for the path to the Xcode project in your filesystem, it is located at:
/path/to/project/.meteor/local/cordova-build/platforms/ios/<project>.xcodeproj
You'll have to navigate to your project directory and open .meteor because it is a hidden file.
Note: If you want to be able to see hidden files in finder on a mac, then type into your terminal defaults write com.apple.finder AppleShowAllFiles TRUE, and then restart finder. Change TRUE to FALSE to only see visible files.

Two BlackBerry Webworks packagers in the same folder location

So we develop apps for Blackberry OS7 & earlier as well as of recently, apps for BB10. The problem is that BB OS7 uses a different WebWorks SDK as opposed to BB10 & yet I am to install them both in the same directory as per the documentation.
The problem comes in when attempting to sign since the executable files for both SDK's have the same name.
Hence when I attempt to sign my BB 7 app using "bbwp" it throws an error. The error output is "Cannot Sign Application - failed to find signing key file: author.p12". This is obviously the BB10 "bbwp" executable file that's running.This is because both "bbwp" executable files are in the same location and both are named "bbwp".
How does one get around this?
Solved it! And quite a simple solution too!
All I did was to give a different folder name to one of the SDK's. When I ran the command to sign, I simply navigated to the new folder name, called the bbwp.exe and ran it against my project!

Resources