I am trying to do a really basic sharing on Facebook from my app, with ShareKit. Most things looks ok, but I don't understand why there's no icon to the left, just the small one in the footer. I can't find a way to put it there. How do I customize it? For me it looks like the left picture I attach, but I would like to have it like the right.
NSURL *url = [NSURL URLWithString:#"http://itunes.apple.com/us/app/...?mt=8"];
item = [SHKItem URL:url title:[NSString stringWithFormat:#"I'm playing someGame on my iPhone! My Highscore is %i, think you can beat it?", 456]];
[SHKFacebook shareItem:item];
You cannot out of the box. This dialog is provided by the Facebook SDK, which is just built into ShareKit's files - unchanged.
I am sure if you do a bit of digging around in ShareKit's folders you'll find the Facebook SDK, but I am not sure if you're allowed to edit its appearance (I know you aren't allowed to change the Share button for example)
With regards to the icon - this is loaded from the web and cannot be changed. The dialog comes from the Facebook website directly and somehow intercepting it and putting it on your own website would create an invalid request.
Edit: Based on your lovely edit (love the spray annotations :P), you can achieve this in the settings page for your app in Facebook. To do this, head over to Facebook's developer app (should be in the applications section of your Facebook account) and upload a large resolution icon for your app. Remember, it asks for a small 16x16 icon and the same one in different sizes, if it finds no icon with the sufficient size it'll display nothing.
Related
I want to add a link from my app to another of my apps on the appstore.
Question How to link to apps on the app store showed that the itunes.apple.com link was,until recently, the normal way to go. I've tried this and everything is fine. The problem begins when I disgard this and use Apple's new recommendation of using appstore.com. I use the following line of code:
[UIApplication sharedApplication] openURL:[NSURL URLWithString:#http://appstore.com/myappname"]];
The first time I call this from my app it works well. You see it jump through Safari and move onto the appstore where it displays my app.
At this point if you look back into Safari you will notice a new blank tab labelled Favourites has been created.
If I go back to my app and perform the same action to link to the appstore again I'm prompted with one of the two popup boxes:
"Open this page in "App Store"? [Cancel] or [Open].
or
"Cannot Open Page. Safari cannot open the page because the address is invalid" [OK]
I've found that manually deleting the blank tab in Safari will allow the link to work properly but this behaviour isn't what I want my users to see- and I wouldn't be expecting them to delete the blank tabs from Safari.
Any advice on stopping this behaviour whilst following Apple's new rules greatly appreciated.
A simple and clean solution is to present an instance of SKStoreProductViewController inside your app (modally) to display information on the products you are interested in. The user can interact with it as a small view on the App Store and you can simply dismiss it when done.
I'm working on a project for school and im pretty much done. Anyways project is to make a list of friends in a view controller, just user image and username, then clicking on their user image would bring up another nib with the same user picture only larger and username. We have to use GET friends/list and this is my call https://api.twitter.com/1.1/friends/list.json?cursor=-1&skip_status=true&include_user_entities=false&count=20
and im using this to get the profile image
NSString *imageUrl = [[usersArray objectAtIndex:i] objectForKey:#"profile_image_url"];
The only problem is that these pics are so tiny, and blurry. Making them larger just makes them more blurry, example from twitter api webpage:
http://a0.twimg.com/profile_images/2838630046/4b82e286a659fae310012520f4f756bb_normal.png
I know this would work, but its only for each individual profile.
http://api.twitter.com/1/users/profile_image?screen_name=USERNAME&size=bigger
Is there a way to use the GET friends/list call and get bigger more clear pictures?
Try replacing the "_normal.png" in the image url with with "_bigger.png" for 73px by 73px
http://a0.twimg.com/profile_images/2838630046/4b82e286a659fae310012520f4f756bb_bigger.png
or you can get the original image by stripping "_normal" from the url.
http://a0.twimg.com/profile_images/2838630046/4b82e286a659fae310012520f4f756bb.png.
Twitter documentation can be found at: https://dev.twitter.com/docs/user-profile-images-and-banners
I am currently making an app that recommends other apps to download on the apple app store. I assumed that the only way for users to download these linked apps was to call the iTunes URL of the particular app -> the apple app store would then open pushing the original calling app into the background -> then the user would press the download button here as per normal.
Then I was playing with the app "App Hero" and they do something I thought wasn't possible. You can actually download another app to your device without ever leaving the "App Hero" application. I thought this was impossible due to sandboxing. They have a modal segue to what appears to be an embedded app store where you can commence installation of another app. This "embedded" app store doesn't have the usual UITabBar running along the bottom but everything else is basically the same.
Does anyone have any idea how they would have achieved this? It doesn't appear to be a UIWebView, perhaps I am wrong. And is this against any of the apple regulations?
*This is no way an advertisement for "App Hero". I am genuinely impressed/confused how they are able to do this and would love this functionality in my own app if it is allowed.
The class you are looking for is called SKStoreProductViewController. Docs here.
If you view a PDF in Safari, it will show button in the toolbar that reads "Open in iBooks".
As far as I know there is the custom URL scheme "itms-books:" for iBooks and that allows passing a file path. iBooks then seems to be able to copy the file from the source app (from anywhere, or only from the personal documents folder?).
How does this work? The only way I'm aware of to share documents with other apps is via UIDocumentInteractionController, but that that is tied to the default popup.
Is there a way to transfer files using a custom URL scheme like iBooks does?
Or is this some hack only Apple is allowed to use (private API)?
Another way I could think of is to render the controller off screen, loop through it and touch the correct target app by code. Sounds dirty though....
Please note that my intention is not to open something in iBooks but in another app somebody else implemented (that app would be registered for the file types I offer and maybe have a custom URL scheme if required).
Is it possible to disable the location prompt (or auto decline/accept it) that pops up when you visit certain websites that ask for locations? I am not using a MKMapView because my app will be not be just viewing maps (it just may visit websites that might have maps on it).
I'm guessing since the prompt is not being controlled by my app, but by the iOS system, I probably will not be able to auto decline/accept the dialog.
As far as disabling the prompt from within an IOS app while loading a UIWebView, it is possible.
You will need to intercept the html before it gets loaded into the UIWebView then find which part of it triggers the GPS/Location Prompt. Once you found it, you simply remove it from the html then feed the html into the UIWebView thus 'disabling' the prompt. However, as a result, the webpage will be missing that element.
No, it's not possible to do that. Not with UIWebView, not with any iOS browser.
I know no way to prevent the prompt, I hope it will be implemented as a property of the UIWebView.
The dialog is not there for the safety of the user, when it comes to UIWebViews. The app containing the view has already asked for locations access, and it can be enabled and disabled on settings. To ask for location access both from the app and from the web view, I would regard as a bug.