ios-extensions

How to localise Service Extension and access APPDelgate property in Service Extension

て烟熏妆下的殇ゞ 提交于 2019-12-10 12:21:42
问题 I have two quostions related to the Service Extension 1. How to localise Service Extension I have supported 2-3 languages in my app, a user can select any language and app will get displayed in that language. I haven't used the device language. All is working fine. I want to display push notification based on user selected language. I used Service Extension and It is working but getting all notifications in English(default development) language. I have created LocalisationManager singleton

How to add app in UIActivityViewController

左心房为你撑大大i 提交于 2019-12-08 04:37:56
问题 I am developing one app in that user can upload video to our server. Now I want to add my app in UIActivityViewController so from gallery user can select video and open my app so it will directly upload to my server from gallery itself. How can I add my app to UIActivityViewController ? Like Facebook, Vimeo and YouTube in this screenshot: I have write below code in info.plist file but it’s not showing in the app! <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key>

Items in File provider extension for ios 11

社会主义新天地 提交于 2019-12-06 08:22:26
问题 I have an app with file provider extension in it. I tried giving support to the new file app with the ios 11 using this link I did what is instructed in this but no item is getting displayed. I have added this NSExtensionFileProviderSupportsEnumeration = YES in my plist as well. ProviderEnumerator is my NSFileProviderEnumerator class where ProviderItem is a NSFileProviderItem. inside my enumerator class I have this, func enumerateItems(for observer: NSFileProviderEnumerationObserver,

NEVPNErrorDomain Error 1 when trying to start TunnelProvider network extension

时光毁灭记忆、已成空白 提交于 2019-12-06 00:44:30
I'm trying to make a custom TunnelProvider network extension by starting with the XCode template for the TunnelProvider and then adding the code to the host app in order to configure it and start it. I am using an instance of NETunnelProviderManager to configure it, and when I call saveToPreferencesWithCompletionHandler: I get success (error = 0). However, when I call startVPNTunnelAndReturnError: on the (non-zero) connection I always get the below error: Error Domain=NEVPNErrorDomain Code=1 "(null)" I have read through all of the related Apple documentation as well as tried to make my program

iOS Share extension not working on image urls

为君一笑 提交于 2019-12-05 18:40:42
I have a share extension that uses those rules: <dict> <key>NSExtensionActivationSupportsWebURLWithMaxCount</key> <integer>1</integer> <key>NSExtensionActivationSupportsWebPageWithMaxCount</key> <integer>1</integer> <key>NSExtensionActivationSupportsImageWithMaxCount</key> <integer>10</integer> <key>NSExtensionActivationSupportsText</key> <integer>1</integer> </dict> It works perfectly for normal websites and images but I can't parse image urls like this : ( http://www.zappos.com/images/z/3/3/5/4/0/3/3354034-p-2x.jpg ). I tired to add other rules but still my share extension won't appear when

iOS 10 don't call Notification Service Extension

牧云@^-^@ 提交于 2019-12-04 23:32:59
I tried to implement the new Notification Service Extension, but I have a problem. In my NotificationService.swift file I have this code: class NotificationService: UNNotificationServiceExtension { var contentHandler: ((UNNotificationContent) -> Void)? var bestAttemptContent: UNMutableNotificationContent? override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { self.contentHandler = contentHandler bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) if let bestAttemptContent =

iOS Share Extension is not working in Chrome

喜欢而已 提交于 2019-12-03 12:01:36
Works for Safari, Doesn't work for Chrome Maybe the question is simple and stupid but I am new to iOS Development and I cannot find any right solution to solve this issue. I need to get: 1) page url 2) page name Extension Info.plist <dict> <key>NSExtensionAttributes</key> <dict> <key>NSExtensionActivationRule</key> <dict> <key>NSExrensionActivationSupportsText</key> <true/> <key>NSExtensionActivationSupportsFileWithMaxCount</key> <integer>1</integer> <key>NSExtensionActivationSupportsImageWithMaxCount</key> <integer>1</integer> <key>NSExtensionActivationSupportsMovieWithMaxCount</key> <integer

How to structure a Xcode project with Frameworks, Extensions and CocoaPods

≡放荡痞女 提交于 2019-12-03 02:59:15
问题 NB: Here is a more abstract and simplified sub-set of this question. With the addition of Touch Frameworks, Extensions and the Apple Watch Xcode 6 projects and workspaces are getting more and more complex. If you add CocoaPods into this mix things start to get almost unmanageable. How would I structure an Xcode project/Workspace with the following targets and dependancies? (Assumptions: I am using Git for all the components, I am using CocoaPods for all third party code, I am using Xcode 6).

How can I guarantee unique entries in a Core Data store in a shared app container used by both the host app and an extension?

风流意气都作罢 提交于 2019-12-03 02:07:53
问题 To ask my question effectively, let's first consider the exact scenario I'm facing: General Setup A host iOS 8 app. One or more iOS 8 extensions (WatchKit, Share, etc.) bundled with the host app. The host app and all extensions share the same Core Data SQLite store in the shared app group container. Each app/extension has its own NSPersistentStoreCoordinator and NSManagedObjectContext. Each persistent store coordinator uses a persistent store that shares the same SQLite resources in the group

ERROR ITMS-90512: Invalid sdk value… 8.2 is higher than maximum allowed value of 10.3?

戏子无情 提交于 2019-12-03 00:40:26
问题 Trying to upload a binary, which includes a watch app. The error I'm getting (which I wasn't getting a couple days ago) is the value provided for LC_VERSION_MIN_IPHONEOS for the watchkit extension is 8.2 which is greater than the maximum allowed value of 10.3... apparently 8.2 > 10.3? I'm updated to the latest XCode, 8.3, that didn't fix the problem. Tried changing the iOS deployment target for the watch app and extension, no apparent effect on the message. 回答1: Update: it's fixed! I have