Access saved wifi connections and their passwords on android sdk >=30 - flutter

I need to retrieve all wifis that are saved on a device (were used before) and if it is possible get their passwords.
I tried couple of libraries to do it but none of them managed to do what I'd like to achieve.
The closest to the solution was wifi_iot flutter library.
I managed to get all wifis that are currently available and there is method to check whether connection was registered before or not, but in newer version of android sdk >= 29 it doesn't work (and password field is always null).
Is it even possible to get these data?

You cannot retrieve the password of a WiFi network unless your app is a Privileged app (i.e. an app that is pre-loaded on the device).

Related

How can i know if user delete my app from device and reinstall it again on the same device without user registeration

I have an app in which users can use some data without registration and data limited. how can I know if the user uninstalls my app and reinstall it again on the same device?
I tried to use a UUID package to sign a device but it does not work.
EDIT: I figure out an idea to get device id and store it on web when the user uninstall app and reinstall again i will know user old usage
It is not possible to definitively determine if an app has been uninstalled and reinstalled on the same device. When an app is uninstalled, all of its data is typically removed from the device, including any unique identifier that you may have stored.
If you have a server-side component to your app, you can store information about the device and its usage. When the app is reinstalled, it can communicate with the server and provide information that can help you determine if the app is installed on a new or an existing device.

tvOS unique device identifier

I'm developing now an app for Apple TV. It is a client-server app. On registration, users get a free trial period. My goal is to avoid situations when user will just register new account or reinstall the app and get the trial period again. I need to identify if trial was already activated for each concrete device. So I would like to know if there is a legal or semi-legal way to identify each device? I will appreciate any ideas!
You can store some value in the Keychain (read more about it
here) and check if this value was previously stored in the Keychain. If so, it means that user installed your application before.
You can use identifierForVendor (documentation) but that changes once the app is uninstalled.
The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them.
Perhaps you could couple that with a user's email address to prevent creating new accounts. Not foolproof, but certainly makes it more difficult for the user to get around it. They would need to uninstall the app and use a different email address to circumvent you.

Copying data from a free iOS version to a full version of my app?

How could a full version of my iOS app access / copy the database / settings from the free version ?
I'm thinking of providing a free version of my app and I can't see how people then buying the full version could get access to the data from my free version ?
All apps are isolated on iOS. They are installed as different iOS system users. One user do not have permission to access another user's files. In the old times, one common approach to address this problem is to enable iTunes file sharing. And tell users to manually copy the files.
Your better bet is to use the freemium model to sell your app. Make the app free, and unlock extra features via in-app-purchase. This way, your files, documents, settings won't need transferring to the pro version. The app itself becomes pro after unlocking.
Here is the guide from Apple: https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/Introduction/Introduction.html (though not very intuitive).
The walkthrough here: http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/ is very helpful.
Last but not least, be aware that in-app-purchase is crackable. So please read: How to detect "IAP crackers"? , Verifying In App Purchase Receipt from Client , and https://stackoverflow.com/questions/4715414/apple-in-app-purchase-verify-receipt , verify in app purchase , In App Purchase Receipt verification within app .
Note that you are supposed to setup a server to validate iap receipts. Though it's doable from within the app, it's not safe. As far as I can remember, you can test in-app-purchase through StoreKit in iOS simulator v5.0, that should be Xcode 4.2. Before that, it can only be tested on a device.
#Dominik Hadl mentioned you can use a server to sync the file. The operation is usually complicated. If you prefer this idea, you can choose to use custom url scheme to launch one app from another to ease the operation. See steps below:
User press "Begin sync" in the free app to upload the file to your server
Server return the ID of the file to the free app
User press "Launch Pro App and Download my file", which leads to a custom url scheme to launch your Pro version (must be installed first), with the file ID
Pro version use the file ID to download that file directly
I think the only way how you can do this is syncing the data with some server, registering the device and the syncing the data back to the full version.
Because all iOS apps are sandboxed, they can't access any other application data (unless you have jailbroken iOS).
Since multiple apps can share the same iCloud container, I'd say that the best practice nowadays is to "simply" store the data in iCloud.
(I'm putting "simply" under quotes, because it is easy to put data in iCloud and take it out; but if you actually want to do syncing, you may need to do more than just "I'll load from iCloud and save to iCloud" in order to provide the best experience to the user.)

Is there an Iphone app <-> UID correlation?

Android maps each app to it's own UID. I was just curious if the iPhone does something similar.
To avoid confusion with another post, I'm referring to UNIX User ID here.
One more note on this. The way to check is, is to open up a terminal app and get a shell on the phone ( I'm assuming iPhone has one). Once you have the shell run the "ps" command. I just want to know if the user ids of the apps are different.
iOS's sandboxing doesn't work the same way Android's does. Apps all run as the user "mobile". If you're interested in how the sandboxing actually works, check out the Mac OS X documentation for the (optional) sandbox available to Mac apps—I'm pretty sure they're the same thing.
There is metadata in each iPhone app's .ipa file that contains information related to the purchaser's iTunes account user ID. However this iTunes account is not related to any OS user account on the device on which the app is run.
iOS does allow you to call getuid(), getgid() and friends. But they always return 501, if I recall correctly.
I don't recall seeing a call that allows you to fetch a 16-byte UUID created by the OS during install (similar to what Noah suggested). I think the closest thing is the identifier com.example.myproduct.

How can I install our iPhone project without connect the device but only using device ID?

I want to build my iPhone app only using device ID without connecting the device to my apple PC. Can I do this?
You can use the simulator, and never develop on the device. Is that what you mean? I wouldn't like to be one of your customers when I bought that app from the appstore in that case though - there would be so many defects.
If you don't mean that, how would you get the app on your device? I'm confused.
Are you suggesting that you do not want to test your app on a real device before releasing it? Please don't do that. There are a lot of differences when testing the app on a device or on simulator.
If you want to create a build for adhoc testing without connecting a device to your mac, you can do that by simply creating a mobileprovision file for adhoc testing where you can specify upto 100 device ids. For this you need to be a member of the Apple Developer Program though.
If I read your question right, you want to put your app on your phone without actually connecting your phone?
If so, it is not possible. You must connect your phone to load applications you develop.
if you are registered iPhone developer, u can create Ad Hoc distribution via defining device ids that you want the app to be used (steps are listed at 'Program Portal User Guide' at apple's developer site). then u can install the app on your device via iTunes.
Well, you can't install just based on the device number or something else.
There are two solutions:
1/But what you can do without plugging the phone is to Post your App on some testing platform like TestFlight, or Answers. And you enter users' email address and they can get the email.
2/You can set up a config file that declare your OS X Server address. And add the iPhone into your Server Open Directory. Then you can send and deploy the app to iPhone devices.
If you have future questions, comment.