How to fetch the list of near by wifi networks and able to connect to them from our App in ios (Using private API for enterprise App)? - ios

I want to fetch the list of near by wifi networks and able to connect to them from our App in ios, and my Application is Enterprise App so even private api's is also fine. Stuck this issue since 2 weeks, please provide me some references..

What you require will only work on JailBroken devices, the blog(blog.guvenergokce.com/iphone-wireless-scanner-ios5/170) which #Ckouta referred also has one comment from the Blog Admin,
I’m assuming that your device is already jailbroken (otherwise not possible)
You shall create release build of sample app and upload release build in to /Applications folder.
(you can use open ssh for that )

Public API allows you to have only information about the current wifi used by your device using CNCopyCurrentNetworkInfo
In order to fetch all the wifi available in your area, take a look at: Stumbler which is using MobileApple80211. I think, it handles what you are looking for. Moreover, you can also use it to connect your device to a specific wifi. You can find a good example of what you need here (answer #9)
Just keep in mind, if you are using private API, your app will be rejected by Apple.

Although it's late but have a look at this link. You can do what you want with the use of MobileWifi.framework and thanks to Cykey there are some reversed headers to use. I have done what you want myself using the link above:)

Related

Is it possible to detect if any other certain app is Currently running or not in iOS?

Let say If I want to check if the facebook or any other application is currently running on device ?
The answer is simply "No", this is absolutely not possible in iOS.
(Note that you can easily "open" another app - it's just like opening a web link - but you can not "check if it is already open".)
Simply your answer is NO
The reason behind this, in case of iOS, every app is running like on own sandbox. So there is no connection between one sandbox to another.
Update 2:
Decided to use Code-Level Support.
Included with your paid membership are two Technical Support Incidents
(TSIs) for code-level support from Apple support engineers.
Reply from Apple:
Automatic Assessment Configuration limits what features of the system
are available while in a testing environment. It locks the device to a
single app. It does not provide oversight, such as identifying which
apps are running.
Classroom is an app targeting K-12 classrooms. It provides teacher
oversight of student activities during lessons, including viewing
student screens.
https://www.apple.com/education/k12/teaching-tools/
https://support.apple.com/guide/classroom/welcome/ipados
I'm not aware of any functionality associated with either of these
that provides for notification of apps running in the background.
While I cannot say how any given app is implementing apparent
functionality, I'm pretty confident in saying that the app you mention
earlier is not using either Automatic Assessment Configuration or
integrating with Classroom.
You may want to contact the developer of the app in question.
Of course, it's also possible your colleague misunderstood and the app
is not in fact doing any such reporting.
I would also encourage you to file feedback requesting such a feature.
Please submit your suggestion via Feedback Assistant
https://feedbackassistant.apple.com. For more information on
Feedback Assistant, please visit
https://developer.apple.com/bug-reporting/.
While you were initially charged a technical support incident for this
request, we have assigned a replacement incident back to your Apple
Developer Program account.
Perhaps my colleague mistook Android version of the app for iOS.
Update:
After reading some more about this it could be related to Automatic Assessment Configuration and AEAssessmentSession.
This allows an app to:
Enter single-app mode and prevent students from accessing specific
system features while taking an exam.
and
A session provides protections by preventing access to desktop
elements like:
...
Other apps, except those that you selectively allow
https://developer.apple.com/documentation/automaticassessmentconfiguration
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_automatic-assessment-configuration
https://developer.apple.com/documentation/automaticassessmentconfiguration/aeassessmentsession
Sample code here:
https://developer.apple.com/documentation/automaticassessmentconfiguration/build_an_educational_assessment_app
Original:
I agree with #AnkurLahiry and #Fattie that it should not be possible due to sandbox environment. According to Apple Developer Forums it is not possible either:
https://developer.apple.com/forums/thread/48374
However a colleague took his hunting degree and they used an app for examination. This app could detect other apps running in the background. For example one person had Teams app running and the examinators could then tell that he had that exact app running on his phone. Not just installed but running in the background.
https://apps.apple.com/se/app/teoriprov-f%C3%B6r-j%C3%A4garexamen/id1548547811
He took the test 2022-04-29 and was using the app version 1.0.8.
I'm not an iOS developer but I have done some experiments with disabling or bypassing SSL Pinning/Certificate Pinning on Android. In this case developers often used checks in the native layer as well as the Java layer to make it difficult to bypass. My guess is that they use low-level access to detect if a process is running or not.
https://security.stackexchange.com/questions/149325/disable-or-bypass-ssl-pinning-certificate-pinning-on-android-6-0-1
https://developer.apple.com/documentation/objectivec
Unfortunately I don't have more information than that. Next step could be contacting them and see if they are willing to share how they did it.
You could also read up on examination apps and classroom:
https://apps.apple.com/us/app/classroom/id1085319084
For Android you can check it like this:
https://stackoverflow.com/a/22503513/3850405

How to fetch information from one app to another app in iOS

I've been searching for a way that if there's any way that an app can push / pull a message to / from another app, assuming that both apps have been installed. I have a feeling that probably that it is not possible, but would like to confirm with SO.
Basically, I'm going to develop two apps, app1 and app2. Let's assume that a user always downloads both of the apps (or, I've found previous discussions over SO that it is possible for an app to figure out if another target app is installed assume it makes Uri registration.) App1 would generate some information and have to pass to app2. One way to do it is that I can have an external server as a relay, and both apps can talk over network. However, is it possible to pass information locally from an app to another app, just like Service in Android? It would be appreciated if you can give me a keyword or a link. I read it further. Thank you.
Your solution is the App Groups Entitlement.
For files see: https://developer.apple.com/documentation/foundation/filemanager/1412643-containerurl
For NSUserDefaults see: https://developer.apple.com/documentation/foundation/userdefaults#1664611

iOS Conversion / installation Tracking

Objective: i want to fetch my custom parameter(referrer) from iTunes link upon installation of my application in device.
iTunes links look somethings like this:
https://itunes.apple.com/in/app/complete-gym-guide-lite/id550449574?mt=8
If i append my parameter say(&referrer=xyz)at the end and i open this url in ios safari browser then it will prompt to download the application.
Confusion: will app store send my parameter(referrer) to my application on launch so that i can fetch it in my application and use it.
In case of Android play store link look like this: http://play.google.com/store/apps/details?id=&referrer=guid%3D%guid%
As you can see referrer parameter at the end of url. Once app is installed in device then play store will send this parameter to app using INSTALL_REFERRER broadcast receiver. We can use this parameter.
What i tried OR Other people doing for conversion tracking: Other people are simply sending static data to their server at the first time opening of app and maintain a flag in NSDefault to make sure that app does not send same data again. I can also do the same as well as alternate ways suggested in below links but i want to do something with custom parameter.
I have already seen below links:
iOS - track which ad campaigns my installs are coming from
Tracking iOS installs from multiple marketing sources
Please help me out.
As #Aditya said, for now, Apple is not sending any referrer (or params) from iTunes to installation.
The only way you have it's to use a third party sdk to get your installations.
I have been working on a own sdk to get this but the way to get any info it's really hard and not really confident to use it. So endly we used some third party which are using many techniques to getting this (as fingerprint data, App2App methods, etc...)
I have tested appsflyer sdk and facebook sdk, they work as expected, use this or any else you prefer.
Hope this helps

Can I do an app like Find my iphone in iOS?

I want to create an app which has the following features.
Track friends / family members location
Locate/track the stolen device location
Lock the device, delete the device datas by using desktop or by SMS.
Most of the above features are provided by Apple's "Find my iPhone" app. But I just want to know whether is it possible to create such an app.
From my understanding, Apple wont let the developers to use private API's and they wont allow to erase datas (like Messages, Calls details) remotely.
Please suggest me some ideas.
If you create any app which directly competes with any of the apples build app will be rejected by appstore.. But most of the above things you can do with private api's and with the help of a web service..
It wasn't possible prior to iOS7. App was not able to respond to any remote calls. There is a new API which "can" be used to solve similar things: http://mobile.tutsplus.com/tutorials/iphone/ios-7-sdk-mutlitasking-enhancements/ or http://www.objc.io/issue-5/multitasking.html (Remote notifications). You may be able to track your friends or stolen device, but not to lock or erase it.
There is a way to remotely erase the iPhone without Apple's Find My iPhone - via Exchange account. There are some open source implementations of MS Exchange, so there may be a chance to make a service which would be able to wipe the device. But even when you make that service, there will be a need to add the "exchange account" into the iDevice. I am not aware of any function which can do so programmatically.
Anyway - You can do an app which is similar to Apple's apps, but it must be somehow different. It must provide some special content or functionality, otherwise it will be rejected.

Share data across multiple apps on iOS

I know there are quite a few threads on this, but it seems none of them would satisfy what I am trying to look for. Here's my constraints:
not a hack that uses private API/framework or undocumented
directory access that would run the risk of app being rejected
because of that
being able to share data across different
vendors / app developers
data can persist outside the lifecycle
of the app (even after app is deleted)
UPDATED: I was in general trying to stay away from using a 3rd party cloud-based service to achieve the goal as this would introduce additional external dependency. But if I have to, I was hoping it could satisfy this one constraint
being able to tell which iOS device it is communicating with. It shouldn't have to uniquely identify the device (which will go into that evil UDID discussion route as we all experienced ). But as long as it can differentiate among different iOS devices it should be fine.
I kind of need this too. I use Parse.com as the backend of all my apps — their free tier should satisfy your development needs.
Parse has APIs available for iOS, Android, Windows 8, OS X, JavaScript and .NET, with all your data available on the cloud on any platform (contrary to Core Data and iCloud). They also offer "Cloud Code," which is code you can execute remotely, to process information remotely and get the data back to your app.
You should definitely check Parse.com out for cloud storage for your app. In my experience, it really gets the job done.
For Data Persistence, I think you might want to take a look at FMDB (although if you decide to persist data locally, it will get deleted with your app, but it might help you, anyways). Core Data is an overkill in many cases.
Edit: Parse.com has an "Installation" class, in which all the devices that have your app installed get listed (wether they're running iOS or Android), uniquely, without you having to type any code.
Maybe this blog post by TextExpander authors will help:
Smile has responded to this by discussing the issue with Apple
engineers at WWDC, filing a bug (#14168862), and checking up on the
status of that bug. We also developed a workaround by storing the
TextExpander data in a new place. Reminders requires user consent to
store and retrieve data. Completed reminders are not normally shown in
its interface. Long-past reminders appear at the bottom of the
completed reminders.
TextExpander touch 2.1 (and later) supports storing shared snippet
data in a long-past, completed reminder. We produced an updated SDK
and kept our developers posted on its progress. Our final SDK was
ready within a few hours of the end of Apple's official iOS 7
announcement.
UPDATE (22.11.2013)
This might not be the best way to do that, because TextExpander's team recently had problems with the App Review Team.
Edit: this only works for apps with the same vendor.
You can save a password to the device's keychain, then access that password from any app.
Using the SSKeychain library...
NSString *service = #"com.yourcompany.yourservice";
// read
NSString *password = [SSKeychain passwordForService:service account:#"user"];
// write
[SSKeychain setPassword:password forService:service account:#"user"];
The password string doesn't have a length limit, so encode all your data as a string and save it there. The keychain entry will persist after the user deletes the app.
One of the ways to do this is using THRIFT. This is a data communication protocol that would need a back end server (private) and THRIFT can be compiled into many languages / platforms. There is a meta language to describe the data and then can be thrift compiled into many languages. Write the data definition once and can be used on many platforms.
More information at.
http://thrift.apache.org/
for me (I have 2 apps and a widged) the best solution is using SSKeyChain and do not forget to add Capabilities for your apps like here
or if you don't wanna to use 3rd party library you can use NSUserDefaults and set the group identifier like here but again do not forget to add the group identifier in Capabilities in AppGroups section for all your apps that have share data.

Resources