I'm using INSendPaymentIntentHandling protocol for Siri Payments.
I followed Apple Developer portal & the sample code.
The delegate methods confirmSendPayment, resolvePayeeForSendPayment & resolveCurrencyAmountForSendPayment are getting called, where as two delegates handleSendPayment & confirmSendPayment are not called, below is the Siri Message.
Any help would be appreciated?
Siri Message:
You'll have to continue in your app. Would you like to open it?
Note: Deployment Target is iOS 10. Also, I'm using Obj-C language with Xcode 8.3 and iPhone 6S (iOS 10.3).
You must haven’t called completion(xxx) in all of your resolveXXX method logic.
Related
I am developing a flutter plugin for accessing Apple HomeKit features inside my flutter app. The following project and code setup is done for iOS project inside flutter folder:
Project setup:
1. Enabled HomeKit in Capabilities
2. Added Privacy – HomeKit Usage Description Key in Info.plist
Code Setup inside plugin:
1. Created instance of HMHomeManager
2. Set the HMHomeManager delegate
3. Implemented delegate methods
Also, cross verified the access to HomeKit for my flutter app in the Settings.
Issue 1:
For the same set up, a native iOS application is running fine and homeManagerDidUpdateHomes delegate method is getting called immediately after accessing HomeKit Database which is properly providing Home information.
But, in flutter plugin, delegate method is not getting called and always home count is Zero.
Issue2:
I have written code to add new HomeKit Home inside iOS plugin and tried calling the method from flutter UI. Strangely the code inside addHome(withName: ) block is not executing but Home is getting created inside HomeKit database. This is confirmed by running Apple ‘Home’ app.
In this case also, homeManager(didAdd home: ) delegate method is not called.
Version details:
Xcode: 11.2, swift 4.2
Flutter: 1.14.6, Dart: 2.8.0
Does any other set up is required in flutter plugin to set HomeKit Delegate?
As an alternative approach, also tried using cupertino_ffi_generated 0.1.1 (https://pub.dev/packages/cupertino_ffi_generated) which is a recent package from flutter for accessing Apple APIs. (Even though it is directly mentioned: “Most Flutter developers should not use this package. It's almost always a better idea to write a Flutter plugin than use this package.” ).
But, flutter throwing an error ‘Target of URI doesn't exist:’
Version details:
Flutter: 1.14.6, Dart: 2.8.0
I was facing a similar problem. iOS swift delegate methods were not triggered. It appears that the methods must have been declared public.
Just replace
func addHome...
with
public func addHome...
Maybe it will helps someone...
Recently I submitted my app on AppStore with a method setting badgecolor of tabbaritem.
[[[AppDelegate globalDelegate].tabBarController viewControllers] objectAtIndex:1].tabBarItem.badgeColor = kTabBarBadgeColor;
This badgeColor came in iOS 10 only and my app supported iOS 8 and above. I had no idea about it and the app got approved. Now, I have to resubmit my app with fixing this issue.
I want to know if there is a way to find out such cases where methods get deprecated or are visible in specific OS versions only.
By changing target of Xcode project you can see errors & warnings while building.
If you need more info,
You can visible all API changes like Added,Modified & Deprecated variants in Apple documentation
it will give you searching options for both Swift & Objective C
Searching UITabBarItem Instance Property badgeColor. it gives API changes are none.Supporting SDK's version
SDKs
iOS 10.0+
tvOS 10.0+
Searching finishedSelectedImage instance method of UITabBarItem.
SDK
iOS 5.0–7.0 Deprecated
Deprecated Use selectedImage with UIImageRenderingModeAlwaysOriginal
instead.
I wanted to use the #warn_unused_result #rethrows func filter(#noescape includeElement: (Self.Generator.Element) throws -> Bool) rethrows -> [Self.Generator.Element] method in one of my projects. The App should run on iOS 8 and later. If I look the method up in the documentation it says "Availability: iOS (9.2 and later)"
However, if I call the method on iOS 8.4 it works w/o any issues.
Any ideas why the documentation says iOS 9.2 but it still works on iOS 8.4? So can I call it w/o any availability check and be sure it won't crash in the future?
Thanks in advance!
This is the part of Swift standard library, it doesn't depend on iOS SDK at all. Swift runtime is bundled with application, so for the system it doesn't matter which version of Swift application was written in. I assume that this availibility mark might have something in common with the change which was made to filter function in Swift 2. Look at those two docs:
Swift 2.1
Swift 1.2
As you can see, declarations of those two methods are different.
I need to use beginAppearanceTransition:animated: in a UIViewController subclass that implements controller containment with custom animation transitions. I need to support iOS5 as a minimum.
The Apple docs say the method is:
Available in iOS 6.0 and later
Yet UIViewController.h has the method tagged with:
__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0)
I'm hoping the docs are just wrong. Can anyone give me a definitive answer on whether I'm allowed to call this in iOS5?
I filed a bug report with Apple about this discrepancy and got the response that the methods are available in iOS 5.0. The headers are right and the documentation is wrong. I've filed another report to ask for the documentation to be updated...
The methods were added to the public headers in the iOS 6 SDK, but are available and can be used on devices running iOS 5.0.
Update (28-Aug-2013)
The documentation has been updated to show that beginAppearanceTransition:animated: and endAppearanceTransition are available on iOS 5.0.
In my experience when in doubt, the headers are more accurate. the docs are generated / written using the headers. So I assume at this point that iOS 5 is supported.
Now I tested it on the simulator. Once for 5.0 and once for iOS 6.1 and the moths are called on both versions whenever you push or pop a vc.
Strange bug in iOS 6.0 sdk. Apple promised to deliver full reminder support via api, to allow thirdparty applications to read and write reminders on behalf of user. There is new methods in SDK to init storekit for use with reminders.
But seems like main method to make it possible - just not present. Both GM version of XCode 4.5 and simulator/ios-6 upgraded device shows that EKEventStore:initWithAccessToEntityTypes is not present in SDK and attempt to call it on device/simulator crashing application with
Error invoking method 'EKRemsIsGranted' on 'CEKtils' because
-[EKEventStore initWithAccessToEntityTypes:]: unrecognized selector sent to instance 0x13a59140
Interesting that this method is also mentioned and described in MacOs 10.8
but in iOS sdk it is mentioned but NOT described
Seems like apple devs forgot to "enable" it on iOS. is it possible at all or I missing something?
There's a description of the event (and some other useful information) here. You might also double-check that your UIEventKit framework is properly linked and up to date.