How to implement sharing suggestions in iOS Swift? - ios

I am trying to follow this apple developer article to implement share suggestions in a sample iOS project.
I have followed these 3 steps exactly as described
Added a share extension in my app.
Declared support for the INSendMessageIntent intent type.
Donated an INSendMessageIntent in app and its share extension.
In the below screenshot, we can see sharing suggestions from Messages app and one other app.
The problem
Although I have followed all the steps as described in the article, my sample app is not showing as a suggested conversation when i try to share something.
Sample code
You can find the sample project on Github
What am I missing here?
Any help would be much appreciated.
Thanks in advance.

1- First you must add your app in suggestions list from the "More" Options. ( Only if you are not seeing your app in apps row in the share sheet )
2- Code Problem: You must provide a not nil image inside intent:
INImage(named: "Image Name") // Won't work if image not exists.
Problem:
Or, Skip Image like this to make it work:
INImage(named: "") // Tested and working
One Interesting test, When image name doesn't have space, it works even if image doesn't exists:
INImage(named: "ImageName") // Tested and working
You can see the working example here: Github
Working:

Related

Socketscan softscan sample using Swift

Seemingly unavailable to SocketMobile's developer portal, does anyone have a minimal example of how to implement the softscan function (use the iPhone Camera) using Swift?
I've an iOS app that works great with the physical scanner, but I'd like to extend it to use the camera as a backup for a broken scanner etc.
[first ever post at StackOverflow, if I've got something wrong, please let me know and I'll attempt to correct it in future. Many thanks.]
Thanks Enrico.
SocketMobile have updated their git repo and it now contains a Swift version of their 'Single Entry' app that supports SoftScan. Using this I was able to work out how to call their ObjC library to implement to function correctly.

Complete Noob Aviary SDK Implentation header import

So I've got a basic app WireFrame going and the Nav works fine.
The app is for users to create artwork and upload for output.
I want to use the Aviary Photo Editor (with a few tweaks) to fulfill most of the artwork creation.
The major issue I'm having at the moment is understanding where to import the header to allow my app to see the SDK. Instruction below:
See Point 6
My third scene is Artworkviewcontroller and I was trying to put it into the .h and then use:
See basic usage
in the .m file.
BUT when I try to run the app in the simulator nothing happens! Aviary could really do with a forum!
Any help would be greatly appreciated, I have have all the bits I just need to know how to bolt them all together!!
Check out the demo application that is contained in the SDK distribution. The AFSDKDemoViewController.m file contains a full implementation of the AviarySDK. You can download the distribution here: developers.aviary.com.

share it button doesn't work ios 7 xcode 5

i'm trying to make two buttons in one new viewcontroller, one for facebook and the other one for twitter. I'only want to make a simple post for each one.
The problem is when i follow this tutorial http://www.appcoda.com/ios-programming-101-integrate-twitter-and-facebook-sharing-in-ios-6/ and i use it on my new xcode 5 project it doesn't do nothing. I don't know if there's a new way tho share content in xcode5/ios7 but for now can't find a way. If anyone knows how can i fix it it would be great. thank you in advance.
Marc
There is a sample project for sharing images and text on Facebook and
Twitter .
Please go through it .If you have any query ask me.
Here

How to get listed in the share menu?

I'm creating a messaging app and I would like to enable other apps to share text to my app via the share menu option.
How do I get my app listed in there?
This is the menu I would like to get listed in:
In iOS 8, Apple has now enabled a way for you to add your application to a user's Share Sheet as one of many features of Extensibility, which aims to make your app available to the user even when closed.
You can read a lot more about share extensions here, or go straight to Apple's pre-release documentation to dive into the code.
Update: Above link of Apple documentation is not working, check here App Extension Programming Guide: Share
You can do this by adding a few entries into your apps info.plist.
Here's a post that should answer this for you.
slashdot post
also here another link
You can't automatically be added to the UIActivityViewController in other apps. The only things that appear on that "share menu" are a few predefined apps that Apple has added support for, as well as any other app specific activities an app decides to add.
You can setup your app to appear in a list of apps for opening a file but that is not the same as what you are asking for here.

Is it possible to add an app to the native share dialog?

I am assuming it is not possible to add apps to the native share dialog, like the one used in the Camera Roll. However I see screenshots around with different apps in the dialog.
Is it only apps that are integrated in the OS that can be in this dialog? Or is it possible with some scheme or something?
I have researched the possibilities of UIDocumentInteractionController mentioned by 'The Tiger' and came to the conclusion that it is not possible.
I have looked at the Apple Documentation, declaring the Document Types in the info.plist works for other apps but not for Mail, Images / Camera Roll / etc; the native share dialogs.
Edit:
I really don't get the downvotes....
Here are some references that say it is not possible:
https://devforums.apple.com/thread/140939?tstart=0
why-cant-i-register-my-ios-application-to-handle-the-image-file-type
register-app-to-open-image-files
associate-audio-and-video-types-with-iphone-app
add-a-file-association-with-tiff-files-on-ios
associate-image-file-types-utis-with-ios-app-doesnt-show-open-in-in-m
You need to subclass UIActivity to achieve this.
Theres an example for Dropbox:
https://github.com/goosoftware/GSDropboxActivity
Register your app as supporting the file types that you want to open and add the code to open them. See Document Interaction Programming Topics.

Resources