Is it possible to gather other apps data in swift? - swift

I'm building an web application with react-native.
In this app I need to gather some information about users.
One of them is how much time they spend on other apps installed on their phone.
I couldn't find any library for this job, so I've decided to write the native code my self.
For android, apparently there is this UsageStatsManager that can help me achieve what I want.
But when I searched for sth similar in ios, I found lots of old forums saying that this is not possible.
But I recently I saw this:
It is asking for permission to gather other apps data. SO IT IS POSSIBLE?
Any suggestion is appreciated. How am I supposed to this?

There is no API by apple itself for retrieving data of third party applications. This is called "Sandboxing" where applications are restricted from changing the device settings or retrieving/changing other apps data. Hence, why iphones are secure.
What you have shown in your screenshots is to track application data for personalised ads and such. This can be achieved using the AppTrackingTransparency framework provided by apple. You can read more about the framework here.
TL;DR - You can use AppTrackingTransparency for personalisation

Related

iPhone and Webapp sync through iCloud ??

just checking if its possible to sync iOS devices AND a web app through iCloud. Currently we've got an iOS app built, are looking at using iCloud for synching between all the devices and also want a web app component. iCloud would be great to use as the module to sync everything together.
Anyone know if it's possible ?
I have a similar requirement and have wondered about this too.
Unfortunately iCloud data doesn't seem to be accessible to a Web app. And if you found a hack around it, it would still be an unreliable solution as Apple could always make changes down the road that break your Web component, intentionally or not.
Edit: With CloudKit this is no longer true. It comes with a Javascript API for the explicit purpose of providing a web version of your app.
Sorry if I'm misunderstanding the question, but I was looking to add iCloud support to my web app recently and came across the official iCloud JS API. The promo text reads:
Keep your apps connected and up to date across iOS, OS X, and now on the web with CloudKit JS.
[emphasis added]
https://developer.apple.com/icloud/
It is really hard to determine what you mean.... If you are asking if you can implement iCloud in a web app, then I believe that the answer is 'no', since there is only an API for Objective-C for iCloud.
However, you might be able to embed your JS code inside of a native wrapper and write some native code for working with iCloud. However, that may or may not be an option depending on your particular situation.
Edited for spelling.
You could possibly do this, but only if
You where running your own server
The server was running on the iOS platform
You where able to create software in Objective-C for that server
You could then potentially write a server application, that could be used to connect to the iCloud API, then return the calls back to the end user as Json messages that could be consumed, perhaps by some html interface.

Will a Safari-based app for iPhone be accepted to the iTunes store?

I'm about to begin development of an iPhone app. The app itself is fairly basic, and I want a speedy turnaround time.
I'm a web developer myself, specialising in traditional web technologies such as PHP/MySQL; I have no experience in Objective-C.
My plan was to create a very basic iPhone app that is just a Safari service that passes some basic variables to a URL. That URL is the app built in PHP and housed on my servers, this way I can create the app very quickly without needing to outsource anything.
My question is whether apps of this nature would be accepted into the iTunes store, or would they be out-right rejected? Anyone's experiences or comments are very welcome.
Thanks
It could go either way, but mind bullet 12.3 from the App Store Review Guidelines:
12.3 Apps that are simply web clippings, content aggregators, or a collection of links, may be rejected
In my opinion, a simple UIWebView wrapper around your web site comes close to the definition of a simple web clipping. Your approval may very well hinge on your luck in drawing a sympathetic reviewer.
It really depends upon your application...These kinds of application have been approved in the past but again I am saying that it depends on many factors.
Try to test your app in every possible manner and also keep in mind the memory issues.
Best of luck!!!
Should be fine - its called a web app and there is software out there that will do just this for you.
All you need to do is to make a UIWebView and put your web app into it.
Also look at http://jqtouch.com. That gives you some idea of what you can do web-side. :)
http://www.netbiscuits.com/559
Native Hybrid Apps
Native apps can interface more deeply
with the mobile handset modules and
sensors to create an even richer
mobile user experience. Netbiscuits
provides pre-build native apps
frameworks for all major mobile
operating systems to be easily
customized for the needs of
enterprises.
Get "2in1" by combining the power of
mobile websites and native apps by
wrapping mobile websites into hybrid
apps and list them easily in all major
app stores of providers like Apple,
Nokia, Google or Samsung to open a new
mobile distribution channel. The
benefits of this approach are fast
time to market, minimized development
and maintenance efforts and maximum
mobile cross-platform technology
coverage.
Yes, it will be accepted as long as you stick with HTML, CSS, JS and Obj-C on the client side. You still need to wrap it in an iPhone app. In my experience, the best way to this is to use http://www.phonegap.com/ or a similar framework.
You'll have the option of deploying you app through iTunes or as a regular web app (you users will be able to create a link to your web app right on their springboards)
It SHOULD be accepted, granted you test test test and make it look just like a native application. Also you'll have to make sure that your server is never down, or if the application can't reach it just display an error message. You also have to keep in mind that there are a lot of iPod Touch users, and they don't have access to the internet all the time. Which means that chances are you'll get a BUNCH of 1 star reviews

Google Analytics within iPhone SDK 4 Built App

Three questions for iPhone developers using Google Analytics within their apps for tracking use of their apps:
Will using Google Analytics cause us to be in breach of the terms and conditions of the Apple SDK 4 for developers?
If the answer to #1 is YES, then what are we -- as iPhone developers -- allowed to use to track usage of our apps?
Has anyone who is using the iPhone SDK 4 built their apps that included the Google Analytics library and found it not to work? I'm being told by my developer that it doesn't work when you build with a Base SDK set to iPhone Device 4.0 and and an iPhone OS Deployment Target set to iPhone OS 3.0.
Thanks in advance!
Answers to your questions:
Yes, with the current API and data collection it looks like it is not compliant with the terms of the SDK. I am using both Flurry and Google in my apps because they offer different feature sets that I need. While Flurry has been very vocal that they are working with Apple to resolve the terms of the SDK, Google hasn't said a peep. So, I'm nervous about using Google but not Flurry, because I think Flurry will change their data gathering if Apple presses hard enough. In any event, I have made sure that I can rip out either analytics service quickly if Apple rejects my app.
My understanding is that it's fine to collect your own device data, as long as you don't report it to others. You especially don't want to share any data that would hint at new devices. That's what got Flurry in trouble. Just remember that you are under NDA with Apple, so anything not publicly announced is between you and Apple. There are also rules about what you do with Device IDs, so make sure you understand those as well.
I am using Google analytics on iOS 4, with deployment target set to 3.0. While I no longer have a device to test against 3.0, it is deployed on the AppStore and seems to be working. (No crash reports)
Louie, I encourage you to take a look at Localytics, our app analytics service. Our service is real-time, we don't sell data to third parties and we release the source code to our libraries.
We also have an updated library that works better with the multitasking or fast-user switching in iOS 4: http://www.localytics.com/blog/
Check out www.flurry.com - they have an awesome service!
They allow you to add "events" so you know not only how many times the apps been downloaded, opened, removed... but you know what buttons and areas they are navigating to once the app is open.
If your app uses core location, you can even see where the users are on a map. Very cool!
Good luck my friend!

Omniture tracking in iPhone

I want to implement Omniture tracking in an iPhone application. I just have a basic clue on Omniture, that it is third party software that helps you to track keyword searches by your users in your application, and it also helps to present similar searches to the users, and helps reporting. Please correct me if I am wrong as I still digging information on it.
I want to implement the same iPhone form in my application.
I have googled for the information about Omniture tracking, it is scare and there is no help as to how to implement it in an iPhone application.
Can any one guide me how it is done and how to do it iPhone?
I can't give much advice if you're building a native Objective C app, other than to say you should read Omniture's iPhone implementation guide. If you're building an embedded web application, and given that you want to integrate keyword search suggestions, I don't think you have much of a choice, but I'd recommend using their regular JavaScript library the same way you would if you were integrating Omniture into your web site. The js engine on the iPhone is fast enough that you probably won't notice any degradation in performance and the memory footprint's not that big.
It sounds like you only want to use Omniture because it's the one you've heard of. There are other tracking solutions like Flurry and Google Analytics that both offer iOS SDKs and are easier to implement and easier to find documentation about than Omniture.
I recommend Flurry personally as it gives you more device-specific data that Google does.
http://www.flurry.com/product/analytics/index.html
http://code.google.com/apis/analytics/docs/mobile/ios.html

Possible to use Buddypress within an iPhone app?

I want to create a community for my venture and also an iphone application for the same. I am thinking of using Buddypress for the community.
But is it possible to use buddypress with an iPhone app? I'd like that when user posts a message via the iPhone app, it is also posted on buddypress? Or do I have to write custom scripts for editing the buddypress db according to user actions in the iPhone app?
Thanks.
I remember reading about a plugin for BuddyPress, called BPDEV XMLRPC that allows you to communicate with BuddyPress via XMLRPC. I'm not sure if it's out of the development trunk yet, but it seems like you could use that to post messages to BuddyPress from an iPhone app. bp-dev.org seems to be down at the moment, but I read about it there.
It's entirely possible to do -- but will require some heavy development work. Would have to modify heavily a child theme and do lots of stuff to make it work. Let me know if you find anything that works.