Getting safari history from phone - iphone

I'm creating a custom browser application.
apart from the sites visited from my browser, i'd like to show the history of the sites visited from safari browser as well.
From my application, can I get the history of the web sites visited from safari browser on iphone or ipod or ipad?

Simply put NO, you can't access the Safari History. Apps are sandboxed.
If this is for an in-house app, then you could jailbreak the phones and go around the sandboxing like so -
We can find the history.plist in /var/mobile/Media/Safari/ and this we can read in jailbreaken iPhone.
Update:
see this SO link: How to access iPhone Safari History in an App?

Simply put, you cannot. The history is stored in a property list outside of your applications sandbox and you cannot access it.
On the jailbroken side, there is a History.plist located at /private/var/mobile/Library/Safari

You can't. There is NO API to access Safari's browsing history.

I got it. Please follow following path then you will retrieve Browser history for iOS7 iPhone.
/private/var/mobile/Applications//Library/Safari/History.plist
In iOS7 safari app not a system app. When you open Applications folder then you can find history and other plist files.

Related

How do you get your app to appear on the Facebook Mobile Application? (specifically iPhone)

We have a popular Facebook Application and a version of our App for the iPhone. I was wondering how we can make our Application appear in the "Apps" Section on the new Facebook iPhone app. On my iPhone I currently see links to the App store for Pixable, Badoo, Airbnb, Foursquare and WhoisNear iPhone Application.
I have filled out the Native iOS App settings in the Developer section on Facebook (including adding the Bundle ID and the iPhone app store ID) several weeks ago thinking it took a while to update, but still nothing shows up on my iPhone app.
Any help would be appreciated.
Best,
M
Screenshot of where we want our app to show up:
Edit your Application Settings and on the Basic Settings specify a Mobile Web URL for your Mobile Web integration. You should be able to set the URL to your app's iTunes URL.
Fill out the iOS information within the admin settings of your application, which also means they are using the same application id. You also have to have granted at least the basic permissions via connect on the app, and have the app installed on the phone.

How does Safari manage its cookies?

I recently realised that Safari in iOS manages cookie separately for Safari.app and other apps that embed UIWebViews. I concluded so because I developed browser based app and saw the following behaviour:
login to web service which then sets session id to cookie.
when I go to safari app and access the web service, I was asked to log in again.
Is it true that Safari in iOS manages cookie separately for safari app and other browser based app?
Yes, you are correct.
Every app is sandboxed, meaning is has no access to any other app (which Mobile Safari is).
Thus, cookies set in a browser-based app will not affect the Mobile Safari app.
See this question for a possible workaround (kinda): Setting a cookie in an iPhone App
It looks like you are trying to track your mobile app installations. I would recommend checking out yoz.io because they are free and do not require an sdk.
Enjoy ;)

Face book latest IOS SDK problems in iPhone?

I am working in face book functionality in my apps. I have integrated the latest Face book-IOS-SDK. When runs the application, the application is started and runs in the safari browser. Now I want to load the application in the user view(FB web view) instead of Safari. How can I achieve this?
Facebook doesn't want you to. Facebook's new SDK wants the user to login into Facebook once, and than that Facebook login be used in every app on the device that uses Facebook. Because of the way the iPhone works, the way they had to do that was through safari so that each app could get that info. You can go back to the original way (which so far I personally prefer), but I'm not entirely sure how.
However, if you use the new way, it will automatically redirect the user back to your app once they finish authenticating it. Also in the Safari page they can give your app permissions, ie. post status updates.

iphone - Upload image to flickr like Hipstamatic

I'm developing a small app allowing users to upload their photos to flickr.
I have tried ObjectiveFlickr framework, but it is too buggy (can compile on device, but not on simulator) and not very convenient for users (user must leave the app, open Safari to go to flickr website to authenticate, then switch back to the app again)
I've seen apps like Hipstamatic doing a really good job on this, it doesn't need to open Safari, everything's done in the app.
Could anyone please suggest some ways to do that?
Thanks a lot
First, I have used ObjectiveFlickr without problems in the iOS Simulator.
Second, ObjectiveFlickr itself does not concern itself with the browser that is used for authentication. It just generates the URL you need to open to let the user authenticate your app. Whether you open this URL in Safari or in a web view inside your app is entirely your choice.

URL for sending a user to the app review page on device's app store

What's the URL to launch in order to bring the iTunes App Store to the front, and open it to show the Reviews page of an app?
I want to send my users to the "Write a Review" page.
Some other SO answers provided URLs like the one below, but it doesn't seem to work:
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=12345678&pageNumber=0&sortOrdering=1
Any suggestions for a URL that'll work on iPhone and iPad?
Update: iOS 4.2 seems to have fixed this and links now open the App Store app directly rather than the review page.
This article Dissecting iTunes links explains everything.
Heading straight to a review form
It’s also possible to send someone
straight to the review form for an
app.
https://userpub.itunes.apple.com/WebObjects/MZUserPublishing.woa/wa/addUserReview?id=337064413&type=Purple+Software
Simply replace the ID with your app’s
ID to create a URL for your app.
On a desktop or laptop, this will take
you directly to the review form in
iTunes for the app or item. On an
iPhone or iPod touch, this will open
MobileSafari, then open iTunes or the
App Store app on the reviews page,
leaving the user only one tap away
from writing a review.
To find out an item’s ID, right (Mac &
PC) or control-click (Mac) on a link
to the item in iTunes and select Copy
Link. The result will look something
like this.
http://itunes.apple.com/au/album/dig-your-own-hole/id19605549
http://itunes.apple.com/au/app/consume-mobile-isp-packages/id337064413?mt=8
The ID is the number in the URL after
“id’.
It might be worth noting that this URL
was created using iTunes 8. I don't
think there’s a way to create review
links in iTunes 9, so maybe this URL
is being phased out. Use with caution.
Update: #mareMtl has provided an
alternative review link for apps.
Please note that it only works on
iPhone OS devices.
itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=337064413
I tried a bunch of different links, this is only one working for me on iPhone AND iPad consistently:
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8&id=YOUR_APP
Check out Appirater - http://arashpayan.com/blog/index.php/2009/09/07/presenting-appirater/
Every time the user launches your app, Appirater will see if they’ve used the app for 30 days and launched it at least 15 times. If they have, they’ll be asked to rate the app, and then be taken to your app’s review page in the App Store.
this works for me:
itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=584691809
Am using Appirater for Rating my App
These links in AppiRater
// for ios6 or earlier
NSString *templateReviewURL = #"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=APP_ID";
// for ios7
NSString *templateReviewURLiOS7 = #"itms-apps://itunes.apple.com/app/idAPP_ID";
These links works fine .
But takes me to "Details" page of the app .
But it should go to "Ratings and Reviews" page..
suggest me any idea
Thanks
iTunes has a link maker you can use to get the URL. Tested on my app. It works.
For Requesting for rate and review to user after iOS 10.3+
The SKStoreReviewController allows users to rate an app directly from within the app through a dialog box. The only downsite is that you can only request StoreKit to display the dialog, but can't be sure if it will.
import StoreKit
func requestToRate() {
SKStoreReviewController.requestReview()
}