I'm building a FileProvider extension for iOS 11, but we already get Document Picker View Controller extension to provide UI for iOS 10.This causes Document picker will pop out even in iOS 11.
we don't need Document Picker View Controller extension in iOS 11.
My question is how to disable Document Picker View Controller extension just for iOS 11 and later?
I finally figure this out on my own.
Apple Document says this
If you're updating an existing File Provider extension, be sure to set the NSExtensionFileProviderSupportsEnumeration key to YES in your extension's Info.plist file. If you're creating a new extension, Xcode automatically sets this key for you.
but they forget to mention that you should put NSExtensionFileProviderSupportsEnumeration key inside the NSExtension dictionary not just in that plist file.
The right plist should be looking like this
Related
i'm working on developing share extension.
I add NSExtensionActivationRule in info.plist. and my app appear on activity view when it match file type.
But in some app(not for all) trying to share image (ex. google drive..) this (Copy to *) icon has already on the activity view before i start develop. so i have two my app icon on activity view/ first one i created, second already in it.
i try to make a change in plist reomve another attributes, but none of them working correctly
i want to disappear "Copy to MyApp" let me know someone knows about this.
Finally after long research and test i found solution~!!!
there is "Document types" key in info.plist in project.
My Project has been set All files supports so I delete this property .
Now that Save to MyApp icon disappear in UIActivityViewController.
I want to create a Notification Content Extension to take advantage of the new iOS 10 rich notifications. However, in the main application we do not make use of interface builder. How can I create a content extension that does not utilize a story board?
Create the Notification Content extension target as you normally would.
Remove the storyboard file from the project
Remove the NSExtensionMainStoryboard entry from the extension's Info.plist.
Add a new entry of NSExtensionPrincipalClass to the Info.plist under NSExtension. The value should be the
namespace of your extension and the class of the main ViewController. For example, if your extension is called Pretty Notification and the class is PrettyNotificationViewController, you would enter Pretty_Notification.PrettyNotificationViewController.
Note: Your principal class must conform to UNNotificationContentExtension
I'm trying to make a custom notification alert. I added my extension target and changed the UNNotificationExtensionCategory value to 'drawing'.
In my push notification I added a "category" : "drawing" element to the aps block. The didReceive(_:) method from that extension is never getting called though. What did I forget to do?
You seem to have done whats needed. I too had similar problem of not seeing the custom notification screen.
However, whats not mentioned in the documents of UNNotificationContentExtension is that the custom screen appears only when you do a 3D touch on the notification alert. I tried to do a 3D touch and the custom screen appeared. Please check.
First check that the extension category is set appropriately in the extension info.plist file to match what is being sent in the aps block of your push notification
Second check that the deployment target for the extension is <= to the iOS version of the device you're trying to run on.
Have u added this in your target's info.plist file instead of ACTIONABLE add drawing
I had similar issue, it was just that in the plist I made my UNNotificationExtensionCategory to be an Array and I wasn't adding them correctly.
Incorrect:
It shouldn't come next to UNNotificationExtensionCategory ie it shouldn't be a field of NSExtensionAttributes
Correct:
It should be a field of UNNotificationExtensionCategory
Apparently to learn how to use the plist you need at least 25 years of experience :)
This method is only called once you force touch into the notification.
If you are monitoring this through LLDB, it runs as a separate process. Make sure you're building your extension target in order to access these methods and the logs from LLDB.
Lastly, if you are like me, and you have discarded the storyboard, then you need to specify the principal class in your extensions Info.plist. This class must be your main view controller including the target namespace. For example, if your extension is MyNotificationExtension then you would set NSExtension > NSPrincipalClass to MyNotificationExtension.MyNotificationExtensionViewController.
I build my app with Document Picker Extension & Document Porvider Extension and they worked well before iOS8.3.
With iOS 8.3, nothing happened if I called dismissGrantingAccessToURL. View controller of Picker did not dismiss and Host app's delegate function didPickDocumentAtURL was not called. There was not any error or warning message. It just...nothing happened!!!, like I did not call this function.
Anyone also has this issue?
XCode: 6.3
iOS: 8.3
We fixed this by removing the local property named navigationController that we redefined in our custom DocumentPickerVC. Turns out in 8.3 and later you have access to self.navigationController and by overriding the property you break Apples dismissal functions.
I have only custom keyboard code not full project code. I don't know how to integrate in my app or in new app. In custom keyboard some code is used that is not reachable for custom keyboards. Can any tell me how can i use this code. I know that i can make a new project with custom keyboard templCete but it doesn't work for me
In your current app add new keyboard extension as follows
go to file/New/target/Application Extension/Custom keyboard
give some name for keyboard.
Then in your app file list "KeyboardViewController" class added.
open that KeyboardViewController.m file and just replace that keyboard code which you have.
Before running app in simulator or device first go to device
Setting->General->keyboard->keyboards->add new keyboard
add your custom keyboard there
and run the app.