Is there any sandbox environment for Twitter app development? - ios

I am developing an iOS application and I am integrating the ShareKit 2.0 project. I want to share content via Facebook and Twitter. Both of them require to create an application on their platform. Everything at this point is ok.
The problem is that as the application in under development, we don't want it to be visible by anybody that is not in this project, so we can't publish content on our facebook/twitter accounts visibly for external people.
Facebook supports a sandbox environment where the app admin can allow just certain users to use the application, so only those users will be able to access and view contents related with that app. And I am looking for something similar on Twitter, but I can't find it.
This is a very hard problem, when you don't find out if this is possible or not, because you never know when you should stop looking for the answer and decide it's not possible. So here I am, asking to SO gurus: is there any sandbox environment for Twitter so we can develop and test our applications?
Thank you very much!

Ok, as I received no answer for this question, I will finally deduce that there does not exist such a sandbox environment for Twitter.
However, I "solved" my requirements by setting my testing account in private mode (I didn't know about this because I rarely use Twitter). Right now this will do the trick, but of course it's much worse than the Facebook sandbox environment.

Apparently not:
https://dev.twitter.com/discussions/1238
#episod Taylor Singletary
There are unfortunately no sandboxes for this kind of activity. It's best for automated testing to not actually hit the API but instead to mock it out.
I recommend you just create a dummy account for testing. I don't know any other way.

Have you tried http://twitsandbox.com
twitSandbox is a web application to support creating applications using the Twitter APIs. It actually processes the methods of almost all and you can confirm what kind of response receives.

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

iOS - Retrieve the most visited websites on the device

I am developing a mobile app in objective-c for iOS.
Is there a way inside my app to programmatically retrieve the most visited websites from the browsers on the device?
I am interested in the urls specifically (e.g. "http://www.google.com"), in order to check a couple of things.
I've searched online but I haven't find anything that could satisfy these needs: does every browser save this kind of information in a private folder not accessible to anyone else and so it's not possible to get this data? Or am I missing something else?
Thanks anyway for your answers
The answer is: No, it's impossible. Apple doesn't give as an API to do that.
No, the developed applications are sandboxed. You can't access data out of one app from another. It's part of the security model.
Apple didn't published APIs for this privacy access level, It only published the following APIs for Safari extensions:
https://developer.apple.com/documentation/safariservices/safari_app_extensions
BTW, This question is asked alot before, you can check them:
how to programmatically access iphone browser history
How to access iPhone Safari History in an App?

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

Share data between ios applications

I have to share the login data between two applications, so that in app br.com.companyB.app2 can use the login data of application br.com.companyA.app1 as in this:
I've done a lot of research, and they all lead me to using "apps group". But I've seen that to use this, apps must be on the same developer account, but in my case I have two apps on separate accounts. I also saw that using the API would help me, but I'm looking for a "native" way. Is there any way to share data between these applications?
Unfortunately, app groups are indeed restricted to a single developer team only:
https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW21
As far as I know, there is no native workaround as apps are sandboxed.
If the apps are not on the same developer portal then the answer is no , you can share the data by webServices not locally ,other option is using UIPasteboard with suite but it's neither the right nor the secure way to go

How to Add Phone With twitter using Third Party tool

I need a script that will add my phone with Twitter for All latest notification.
I found this page Twitter but i need to create script for my own application.
I goggled but i didn't get any solution For this.Please Help me to find this answer.
Thanks a lot in advance.
First Edit
This is a twitter's new feature Send notification to Phone. Actually I want to create an app that will allow users to register there phone with twitter via my application. Ie I need a script to implement send notification to phone.
The question that others are asking you Pankaj is what platform is your application being written for. You keep saying you want a "script" to do this, but what kind of script?
Giving us more insight to what your application is (a console application written in C#, or an ASP.NET web application) would lend more detail and raise the chances of someone being able to help you. :)
Regardless of your app's platform though, you're probably going to need to look into the Twitter API for setting this up. This is the normal method to interact with Twitter from 3rd party applications. So all the suggestions above, specifically the list of API's available, is probably what you're looking for.
Hey, can you give some more information? What kind of Phone are you developing for?
Maybe that helps solving your Problem.
If you are just searching for a way connecting your Phone to Twitter, here is the Twitter FAQ for Phone connecting:
http://support.twitter.com/articles/14014-twitter-phone-faqs
Maybe it helps, or give you more keywords for your search.
I don't believe there's a way to get or set the notification phone number using the API, however if a phone is already setup on the profile you want to configure, you can do the following to get notification from all user friends.
The user will need to authorize your application to access her account. This flow uses OAuth, and begins here:
http://api.twitter.com/oauth/request_token
Once the user has granted your app access, and your application has all the required OAuth credentials, turn on notifications using account/update_delivery_device:
http://api.twitter.com/1/account/update_delivery_device.json?device=sms
Next, fetch all the IDs for your user's friends using the friends/ids API call. Be sure to study the documentation; this call uses cursors, so you will have to manage those if the user has over 5,000 friends. Store these IDs for use in the next step. Here's an example call:
http://api.twitter.com/1/friends/ids.json?cursor=-1
Once you have all of the friend IDs, you can call notifications/follow repeatedly to enable notifications on your mobile device whenever your friend makes an update:
http://api.twitter.com/1/notifications/follow.xml?user_id=12345
This approach will burn one API call for each user that you enable notifications for; there's no way currently to manage notifications en masse.

Resources