How to track events in extension? - ios8

Most iOS analytics tools (flurry, new relics) use the standard uiapplication delegate methods to upload events in batch, every minute or when the application terminate. I haven't seen any dedicated solution for extension (today, photo...) from these guys. What do you do for analytics in extension in ios8?

For now, I used two work arounds
1 - I used app group shared data https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html and I log the event when the user open the containing app
2 - My today extension allow user to openURL to open the containing app, I pass data in the params of the url.

In my WatchKit app, I use openParentApplication:reply: to pass a request to the host app and log my analytics from there.

Flurry has announced support for Apple Watch extensions. You can find out more in the developer documentation here:
https://developer.yahoo.com/flurry/docs/analytics/gettingstarted/technicalquickstart/applewatch/
It's possible that this will open the door for tracking activity within other extensions, but I haven't seen anything about it yet.

Related

Need to convert a legacy safari extension into Safari App Extension. Searching for documentation, starting steps and tutorials on Xcode

I have a legacy safari extension which I need to convert into Safari App Extension to submit into Extension Gallery. I am new to Xcode therefore, not familiar with it's build and run process. I tried looking into official documentation from developer.apple.com but it is so abstract.
Why do we need to create a parent app in Xcode before creating a
safari extension target?
If so what parent app template should I
choose? Cocoa App?
Where I can find starter tutorials on Xcode?
What is the submission process to Extension Gallery?
How can add the extension under development to my safari through xcode for testing?
I heard they need the URL for extension to approval, when we are submitting extension through developer account why to host it on URL?
Any documentation or answers to the above questions would be very helpful. Thank you.
On 2. and 3, I had the same struggles - I wrote up a tutorial on basic style sheet injection in Safari App Extensions here: https://ulyngs.github.io/blog/posts/2018-11-02-how-to-build-safari-app-extensions/
I'm converting the legacy safari extension to safari app extension too and have some answers for your questions:
Because app extension is more as functional extension then safari browser extension and could bring more features to you. And as per Apple says: safari app extension gives more communication and data exchange between Safari and your native app, docs.
But I have no more ideas if you only want an extension for safari why this is only way to do extensions.
Yes, you should use the Cocoa App template. If you don't need the window for your app, you can remove it simply in Main.storyboard or make app as a "service".
A lot of docs from Apple I've read but understood a bit then expected. So I found some youtube channels (they are 2 or more years old but some things seems don't changed) Some vieos here and the Osx Dev Daily playlist on this channel. And of course official swift docs if you select swift for your app as PL.
I haven't read about this, but think it must be submitted with your Cocoa App.
First of all you should to run your app target and only after this you should run your extension target and choose "Safari" in showed window to run in. If you have no the signing at the moment so ensure to enable "Allow unsigned extensions" in Development > Allow unsigned extensions in Safari app.
Don't meet this info, could you share it, pls? (sry, don't have enough knowledges)
Hope, it helps to you!
P.S. also recomend to see the converting docs, but it may be insufficient for converting :)
EDIT: it's seems to be incorrect to remove app window or change the default menus created by Cocoa App template for app submit for App Store. Some people got negative decision of app submit because of menus changes of redundant items or app have poor functionality or has not it at all. So consider to read the submit docs.
Please, share your experience when you'll have success app submit!
EDIT 2: Today I found template in Xcode 10.1 that can be used for Safari Extensions directly. It is as previous workflow (template Cocoa App + add extension target) but there is safari extension target already included
The app window and menu is simplified for developers:
So you don't need work with your app and you can concentrate on extension only.

Xamarin-iOS: host application will not run with share extension

My app setup is a basic new app with default viewController with the default classes for share extension on iOS 11.2.
The host AppDelegate class FinishedLaunching never gets called.
Just shows the launch screen and closes the app.
The sample Xamarin app provided also has the same issue.
Link to the sample app:
Share Extension sample
Any idea whats going wrong?
Do you want to open the app which you created with the share extension, when user clicks the share button to use this share extension? If so, this app should be called Containing App.
But unfortunately, there's no way to do this on iOS8.3+ except Today Extension. From this post we know that:
The intended approach for share extensions is that they handle all of
the necessary work themselves.
Also from the Apple documentation about extension:
An extension’s UI should be simple, restrained, and focused on
facilitating a single task.
Apple doesn't recommend us to open its containing app from extensions, actually it avoids that. If you want to retrieve data in containing app, you can set up an app group so that data can be shared between these two apps.

Sharing Files with other Chrome Extensions using ARC

We have an Android application that we have developed and are testing with ARC. Part of the functionality is to share Word/PDF and other documents with other applications on an Android device and then have them pass the content back to us when done. However, since ARC applications run in their own sandbox instance of Android there are no other applications to share with using the standard intents. I know that Chrome Extensions can message each other, but is there a way to access this functionality from an Android APP running arc. Ideally we'd like to share a document have it open in say Google Drive, and then be able to get it back from there using the standard Android intents. Is this possible, or do we have to look at other ways to accomplish this (i.e. SDKs.)
Update: Here is the code we use to launch external activities to have them open files for editing:
Uri uri = Uri.fromFile(attachmentFile);
Intent intentUrl = new Intent(Intent.ACTION_VIEW);
intentUrl.setDataAndType(uri, applicationType);
intentUrl.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getContext().startActivity(externalActivityIntent);
You can get the file from Google Drive or any other file provider available on the chromeOS using the new intent: ACTION_OPEN_DOCUMENT

some of the iOS apps does not shows action extension feature in iOS8 devices

Basically when i do open in functionality in other apps basically it
will show tow options 1. open-in 2. extensions. But i am seeing some
of the apps not showing the other apps action extension feature. I do
not know how they are hiding it?. Or they doing something else to do
not show the other apps extensions other than iOS defaults action
extensions?.
Example:
YES: Mailbox, Dropbox, Box etc. - these app was able to show the other
apps action extension
NO: Evernote, Acompli, Zoho Docs - - these app does not shows the
other apps action extension.
Any idea? why evernote and Zoho not showing the other apps action extension feature?. Is there something they need to do on their side or i need to do on my side to make it show?.
Any help that might be really appreciated.
screenshots attached.
Action and Share extensions have an activation rule, which is stored as NSExtensionActivationRule in their Info.plist. These extensions only appear if the host app is sharing data that matches the activation rule. For example, if an app shares images and the extension can only handle text, the extension will not be displayed as an option in that app.

Google Apps Marketplace SDK : setup a contextual gadget

Ok, so without much notification given, adding market place listings to your vendor profile is no longer possible. The 'create new listing' button is greyed out.
I need to make changes to an existing marketplace listing but that gives errors. We are forced into the new SDK.
So I went ahead and enabled the apps market SDK, filled out all details including images of all sizes, add a COB extension for the contextual gadget and saved the whole thing.
A minute later I return to make a modification and dang... error: "We are looking into this.".
#Google: HELP !
UPDATE : I can reliably reproduce the error as explained here.
Enable Google Apps Marketplace SDK in your project
click on the gear icon, you will be directed to the old API Console
Fill out all details
Add a COB extension (Contextual gadget)
Save everything
Close the API console
Go back to your cloud console -> Google Apps Marketplace SDK
Click on the gear icon again
ERROR
Tested with several google accounts on different computeres and multiple projects on the cloud console.
#jonathanberi could we have a status on this issue, please? We are experiencing the exact same issue and we are unable to publish our app (which is ready) because of this bug. We have tried both creating a new Google Apps console project from scratch as well as modifying a draft of a yet to be published page with the same result. Is any information that we could provide to help?
You must fill out parameter name and a paramter value or your cloud console will return errors and you will not be able to recover from this.
Ouch, that were 3 useless weeks....

Resources