FolioReaderKit throws error when used in Siri Intent extension - ios-app-extension

I am trying to use FolioReaderKit in my app extensions that I am using for Siri. It is showing me an error "'shared' is unavailable: Use view controller based solutions where appropriate instead.". I have read the apple document and it says that
Some APIs Are Unavailable to App Extensions.
So as we can't use shared objects in app extensions, this is the code that is creating the problem:
UIApplication.shared.sendAction(#selector(mik_findFirstResponder(_:)), to: nil, from: nil, for: nil)
How can I resolve this?

Related

Unable to access web extension in Hybris

I have created my Web extension by extending ycommercewebservices extension but upon build I could not able to access any of the API from my custom extension(Error-404).
Entry in a extensioninfo.xml already available ::
<webmodule jspcompile="false" webroot="/myCustomExtension"/>
Also I could see my extension in Hac -> Extension but unable to access any of the API.
I have checked the logs and there is no any error as such w.r.t extensions.
Can someone please point out if I am missing anything.

XPC Service NSCocoaError domain

I've written an Application that uses XPC Service to communicate with its helper. The application launches and works as expected within Xcode.
However, the following error appears when I try to run the application outside of Xcode after I Archive it.
HideMyMac[27183:936477] XPCService error: Error
Domain=NSCocoaErrorDomain Code=4097 "connection to service named
io.jabbari.HideMyMac.HideMyMac-XPCService" UserInfo=
{NSDebugDescription=connection to service named
io.jabbari.HideMyMac.HideMyMac-XPCService}
Here is the source of this application on Github. I normally would provide source with my code, however, the xml style plists would clutter the page and take away from the post.
Here what I have attempted:
Step 1: Updated - Main App Target -> Capabilities Tab
Turned on 'App Sandbox'
Turned on 'App Groups'
Added an app group - 'XYZ'
Step 2: Updated - Helper Target -> Capabilities Tab
Turned on 'App Sandbox'
Enabled 'Outgoing Connections (Client)'
Turned on 'App Groups'
Added an app group - 'XYZ'
What am I missing anything?
This is probably not a good question for StackOverflow, because it's a very project-specific configuration issue.
The actual problem you're running into is that the XPCService crashes immediately:
HideMyMac[5999]: XPCService error: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named io.jabbari.HideMyMac-XPCService" UserInfo={NSDebugDescription=connection to service named io.jabbari.HideMyMac-XPCService}
ReportCrash[5995]: Saved crash report for HideMyMac-XPCService[6000] version ??? to …
this is because the SMJobKit framework cannot be found by the dynamic loader at the expected place:
Dyld Error Message:
Library not loaded: #rpath/SMJobKit.framework/Versions/A/SMJobKit
Referenced from: /Users/USER/Library/Developer/Xcode/Archives/2016-02-24/HideMyMac 24.02.16, 16.32.xcarchive/Products/Applications/HideMyMac.app/Contents/XPCServices/HideMyMac-XPCService.xpc/Contents/MacOS/HideMyMac-XPCService
Reason: image not found
So, you should check the copy files / embed framework phases in Xcode's build phases tab.

EventKit and App Extensions on the Mac

I'm trying to make an App Extension for the Mac that accesses the current users calendars, but it doesn't seem to work. Am I missing something?
I added the Calendar app data capability to the extension (and the main app to see it it would make any difference -- it didn't). I have the following code in my extension:
EKEventStore* store = [[EKEventStore alloc] init];
It doesn't even get to the requestAccessToEntityType:completion: method (next line) before throwing an error into the console:
serviceName = "com.apple.CalendarAgent.database";
} ... returned error Error Domain=NSCocoaErrorDomain Code=134070 "An error occurred in the persistent store." UserInfo=0x61000026dd80 {Problem=request failed, insufficient permission} with userInfo dictionary {
Problem = "request failed, insufficient permission";
The documentation says that I can't use APIs "marked in header files with the NS_EXTENSION_UNAVAILABLE macro" (no such macros are in the header). It does say "the HealthKit framework and EventKit UI framework are unavailable to app extensions" but EventKit is not "EventKit UI framework" which is iOS only as far as I can tell.
My guess is that there's a problem showing the permissions dialog. Does Apple's Calendar Today Widget have special permissions that third-party apps can't access?
Does Apple's Calendar Today Widget have special permissions that third-party apps can't access?
it is an apple app and doesn't need to worry about permissions AFAIK
but:
from reading the docs regarding core location I understand that the extension can only use GPS after the user approved it for the app -- I would transfer it to the calendar access! => ergo - in my eyes: it works in the app but not in the ext then it is a bug

problems using universal image loader for downloading images and showing them in custom listview?

I am new to android programing and i am now facing an issue in a task. I have made my custom listView which is showing data parsed from a JSON object. Now, I also have to show images which are to be downloaded from the internet. For that purpose I am trying to use universal image loader from github, but when in my adapter class I do
imageLoader.init(ImageLoaderConfiguration.createDefault(context));
I get the error on init saying
Syntax error on token "init", Identifier expected after this token
What am I doing wrong?

Microsoft.SharePoint.WebControls.SPRibbon not Working In Sharepoint SandBox Solution?

I wanna create Contextual Tab using Webpart In Sandbox Solution..that time I am getting Error as below When i am added Custom-Webpart :
Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred.
In My Webpart's Code
Microsoft.SharePoint.WebControls.SPRibbon.GetCurrent(this.Page).MakeTabAvailable("MyProject.Ribbon.HelloTab");
Is there another way to Solution To create Custom Ribbon Tab?
Altering the ribbon is not permitted from within the sandbox. You have to options available to you.
Make your solution a farm solution (thereby giving it the necessary permissions)
Use a sandbox proxy the perform the steps on the ribbon (see MSDN)

Resources