Create a config file for MacOs application - swift

I am creating an application on MacOS using swift. I want the end-user to save some details in a config file like "Server Address" ,"port" etc. My app reads from this config file and used the values at runtime. What kind of files are used on MacOs as config files? What extensions would they have? I came across plist files. But I am confused if this file can be used by a end-user.

Real Mac apps don't use user editable config files, but store their settings in UserDefaults.
https://developer.apple.com/documentation/foundation/userdefaults

Related

how make secure key.properties file in flutter

as we write passwords in key.properties file for signing flutter APK. its not dangerous? how we can make it secure after debugging and reverse engenearing?
storePassword=
keyPassword=
keyAlias=
storeFile=
This is already a secure mechanism that is followed by Android.
Full Article : Article to refer
In Brief:
Creating a keystore file is quite similar as storing configs in environment variables, By default if you generate or sign app using android studio it stores the credentials directly in the gradle file so instead of this when we are working in teams we store these in a different file which is not included when we build and also can be excluded when from source control using .gitignore
So we use this keystore variables while signing the app instead of hard coded strings.
Another reason is the .jks file which is indeed really important exists on your pc only and without which you cannot compile the app.
There are practices that you can follow to ensure security like using Proguard and code obfuscation, flutter still is in growing stage so they would likely ensure the use of NDK with which one can write the files natively into .so files, which are much less likely to be decompiled than APKs.
To keep the file private, add it to the .gitignore file:
**/android/key.properties

How logging to be done into a file in a specific folder

Some macOS apps write their logs into a folder like /Library/Logs or ~/Library/Logs? How this can be achieved?
I tried by creating a folder in ~/Library/Logs using FileManager.createDirectory. But I think creating a file and write every time on it using file manager functions will make the app more complex.

SAPUI5 deploy application with binary files MIMES

I'm currently building an app with some binary files (jpeg, mp3 ...).
When I upload my app on the gateway system, the binaries are uploaded in a "MIMES" folder.
How can I access those files from SAPUI5 ?
I placed all my binaries (PNG images in my case) into a separate folder /png under webapp folder in Web IDE and in controller onInit event I calculate the path like this ("hcm.myleaverequest.ESSLeaveReqExt" is my app id):
this._sPNGpath = $.sap.getModulePath("hcm.myleaverequest.ESSLeaveReqExt", "/png");
and also store this path in a local JSON model ViewSettings to make it possible use it in binding expressions. Something like this:
icon="{ViewSettings>/PNGPath}/mylogo.png"
Such an arrangement works fine for me after deploying to the SAP gateway.
Update for MP3 files:
It appears Web IDE can't import MP3 file as binary, it always formats it thinking it's a text file. However, if you change the file extension to png you can load the file into a project folder. After that you can play the file by standard tag using sap.ui.core.HTML control:
<core:HTML content='<audio controls><source src="{ViewSettings>/PNGPath}/old_telephone_ringing_copy.png" type="audio/mpeg"></audio>'>
Most probably it would work after deployment (I didn't try it though)

Deploy files in the localState folder during installation of a store app

I am building an app for windows store and I need some default and example data to be in the localstate folder (Windows.Storage.ApplicationData.current.localFolder) when the app run the first time.
The folder and files structure is a bit complex and I tryed to copy the files at the start of the application, but I can't manage that way.
Is it possible to have files being copied automatically from the installation folder to the localstate folder during the store app installation?
Unfortunately, customization of the app install process isn't currently supported. You have to do this as part of your first run processing.
One possibility is that you include the data in your package as a .ZIP or other compressed file and use an appropriate library to expand that file into a folder structure on startup. That could simplify your logic considerably. (I don't have a library to recommend; it's just an idea.)

How to extract sms.db from non-jailbroken iphone on linux

Objective: Extract the sms.db sms text message database from an Iphone 4S.
I have installed ifuse on ubuntu 12.04 and am able to browse certain folders. None seem to contain the 'sms.db' file.
It is possible to extract the sms.db using freely available tools on linux?
I don't know yet how to access the SMS.DB file directly from the phone. But if you backup an iPhone using for example iTunes, you can then read the SMS.DB file from within the backup. It will be SHA-1 hashed (the file name will be gibberish), but it should still be a .DB file. You'll need iPhone Analyzer to unhash the file names, or something similar. Then you can load it into SQLite.
Please post here if you find a solution.
I've figured out a way on how to access it with Jailbroken devices... It miiiiiight be the same if you aren't jailbroken based on what the Github says (https://github.com/libimobiledevice/ifuse)
Anyways, open a terminal
Sudo su
now make a folder in your home and direct ifuse to that folder
ifuse --root /home/<INSERT NAME>/<INSERT NAME OF FOLDER>
Now you gotta open that folder as root
nautilus
Browse through your /home/ and find the folder.
It should be in
/var/mobile/Library/SMS/sms.db
Then you just copy it to your desktop and your good to go!