iOS:About [UIDocumentInteractionController presentOptionsMenuFromRect:inView:animated:] - iphone

Now I have some files in the Document folder,and I use [UIDocumentInteractionController interactionControllerWithURL:myFileA]; to get the doc controller and the I use [UIDocumentInteractionController presentOptionsMenuFromRect:inView:animated:]; to present one options sheet.So now I have 2 questions:
[1] How can I give the doc controller more than one File URLs? Is there anyway to achieve this?
[2] I find that the method [UIDocumentInteractionController presentOptionsMenuFromRect:inView:animated:]; works fine in iOS6 or later, but not in iOS5.1. Why?
Hope your answers.Thanks a lot first!

1st question: I don't think you can do that, with that particular API, looking at the documentation.
2nd question: As stated by the documentation,
The options
menu may not be displayed in cases where there are no appropriate
items to include in the menu.
These include files with unknown extensions. iOS6+ however does handdle this well.

I had a similar experience to your problem in [2] while testing presentOptionsMenuFromRect:inView:animated: on iOS 5.1 and 6.0. In iOS 6.0 I got a full menu with apps and other options depending on the file. In iOS 5.1 I had a somewhat different experience than you: I got a menu with only one option.
The solution for me was to use presentOpenInMenuFromRect:inView:animated: instead for iOS 5.0. This at least gave me more than one app to open the document in.
For [1] I agree with the others that this isn't possible as of yet.

Related

Sygic Custom URL IOS

i have been using an url launch that open sygic and drives to coordinates n my website.
It looks like this: com.sygic.aura://coordinate|15.06591|47.73341|drive
After the last Sygic update this url launch does not work anymore, it fires up Sygic but no route is calculated any longer.
Does anybody have som ideas to overcome this?
Is there anyone else that hava this problem and found a solution for it?
This is what i tested with iPad Air 12.5.3, Sygic Version 20.4.5
All of Sygics custom url: https://www.sygic.com/developers/professional-navigation-sdk/ios/custom-url
I contacted the Sygic Support. Here is their answer:
Thank you for contacting Sygic.
We apologize for the inconvenience. You're using the legacy format which is no longer supported in the latest release. Instead of this format, universal links can be used.
For your use case, you can use:
https://go.sygic.com/directions?to=latitude,longitude

Example on how to use NFCTagReaderSession

I was not able to find a working example using the new NFCTagReaderSession functionality that has been introduced in iOS 13.
Perhaps some one could post one here.
please have a look at this stackoverflow entry -
it already contains some more infos:
"Missing required entitlement" for NFCTagReaderSession
e.g. after adding the entitlement, and the plist entry, you should focus on a supported polling option like iso 14443

Is there an *up to date* Facebook login example or documentation?

My question is - is there any example documentation or example project showing how to do authentication with Facebook that is up to date for iOS7?
Because trying to go through bad documentation is hard enough, but when the documentation is out of step with the source code, when both use deprecated iOS methods, or show evidence of bugs being present, or say to use nonexistent methods then its just beyond frustrating.
In particular:
The documentation says on the app becoming active to call [FBSession.activeSession handleDidBecomeActive]. But no such method exists.
So looking at what the scrumptious sample code does, it does nothing, instead it talks about a bug they have in their code. BUG: for the iOS 6 preview we comment this line out to compensate for a race-condition in our state transition handling
So should an app do anything on the app becoming active and if so what?
The documentation and sample implement application:openURL:sourceApplication:sourceApplication however its deprecated. Therefore is there an alternative?
I'm a little confused by this question.
handleDidBecomeActive is a method in FBSession, see https://developers.facebook.com/docs/reference/ios/current/class/FBSession/
application:openURL:sourceApplication:annotation has NOT been deprecated for UIApplicationDelegate (see https://developer.apple.com/library/ios/documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/application:openURL:sourceApplication:annotation:). Perhaps you were thinking about application:handleOpenURL:?
What version of the sdk are you using? The ones >= 3.8 have been updated for iOS 7.

Is there a way to change bracket placement and indentation in Xcode?

I want to change the default behavior of XCode (4) for aligning brackets from this:
- (BOOL)someValue {
return _someValue;
}
To this:
- (BOOL)someValue
{
return _someValue;
}
I've reviewed the docs here:
http://developer.apple.com/library/ios/#documentation/DeveloperTools/Reference/XcodeUserDefaultRef/100-Xcode_User_Defaults/UserDefaultRef.html#//apple_ref/doc/uid/TP40005535-CH3-SW57
But I still dont' understand how to make the change. Any help?
First off, the documentation you referred to is for XCode 3.1 (I've linked the introduction page which says so clearly). Judging by the number of comments on devforums.apple.com about this, I think the XCCodeSenseFormattingOptions key no longer exists under the new XCode4 defaults (which are stored under bundle ID com.apple.dt.XCode). If you want this particular feature restored, file a bug with Apple.
Secondly, you might be able to do what you're looking for by modifying templates. I discovered this very related question, but there's no tacit confirmation there that the suggestion actually succeeded.
You could try using an application called Snippet Edit that allows you to easily edit all of the supplied code snippets. You will need to be using Xcode v4.3 or later though if you wish to use it.
The application can be found at http://cocoaholic.com/snippet_edit/

How to render SVG images in iphone without uiwebview?

I want to render SVG images in iPhone without using a UIWebView. How can I do that?
I have checked these 2 links:
http://www.splashdust.net/2010/09/svgquartzrenderer-a-basic-iphone-sdk-compatible-svg-renderer/
https://github.com/splashdust/SVGQuartzRenderer
The above project on Github shows 102 errors showing UIKit framework missing and others and I are also not able to add that framework.
I think the application is for MacOS not for iOS.
http://maniacdev.com/2011/05/open-source-library-to-render-svg-graphics-as-core-animation-layers/
https://github.com/mattrajca/SVGKit
The project on the above url shows the error when i build the project.
Target specifies product type 'com.apple.product-type.framework', but there's no such product type for the 'iPhoneOS' platform.
Does anyone know how to solve that? Or other useful working examples that I can use for that? I want to render SVG's on iPhone.
UPDATE: I have got working SVGKit working by reading instructions. But when I tried to make project working which iI downloaded from Github (https://github.com/splashdust/SVGQuartzRenderer
) I got following errors:
1) UIKit/UIKit.h: No such file or directory (I am not able to add it using add existing framework)
2) Libxml/tree.h: No such file or directory
3) Expected specifier-qualifier-listbefore 'xmlParserCtxtPtr'.
Does anyone know that how to resolve it and make it work?
Jason Morrissey, author of the extremely excellent Alien Blue app, the best iOS Reddit client on the store (can you tell I'm a fan? I'm also a beta tester.) recently put up his SVGKit framework, which renders SVG images as Core Animation layers. I haven't used it, but I know it exists.
And then, look... if you're just getting lots of errors when you bring in other people's classes, my strong suspicion is that you're not following their "how to use" instructions. They'll mostly tell you what frameworks are required and what platforms they support. Every time I've tried to use something like this and had a compilation bloodbath, I've gone back and found some installation instruction step I missed.
I just managed to compile SVGFlashRenderer.
For iOS you need to open the project from the directory SVGRendererTouch.
And don't forget to separately download contents of the lib/MROGeometry dir from github (just follow the link in the source tree).
P.S. For me, the best working solution was SVGKit, but not the version from Jason Morissey (mentioned in another answer), but a fork from reklis. It has many bugs fixed and works in a much more correct way.
It's easy.
SVGKImage *svgImg = [SVGKImage imageNamed:#"add-control-panel"];
SVGKFastImageView *imgView = [[SVGKFastImageView alloc] initWithFrame:CGRectMake(10, 100, 420, 280)];
imgView.image = svgImg;
[self.view addSubview:imgView];