NSSharingServices completely removed from 32-Bit on 10.10

Downloaded the GM and tested the sharing to find that it’s now all been removed :frowning: This is going to break most of my recent applications, I’m not a happy bunny.

Before the GM, it was possible to still get a list of available services for the data you want to share, now under the GM, I can’t even get a list of compatible services. This not only pisses the hell out of me, but also worries me as to what other frameworks they’ve done this for and will do this for!

I followed the procedure and filed a bug report, but it seems that someone at Apple would rather stick their two fingers up at me!

The only workaround is to write a Objective-C (I guess I’ll have to learn Swift, as Objective-C is going to be deprecated in the future), that not only actually does the tricking sharing, but can also report what services are available for data. Then I’m going to have to update all the apps I’ve created in the past few years to use this new system.

writing a helper app in Xcode as 64bit app may be a solution.

Sam, pardon me, but will it be better when Xojo 64 bits will be released (when it will be released) ?

This seems like my only option, then I have to back-port it to the previous applications I’ve written in the last two years!

I hope so, but as Xojo have said 64-Bit won’t be ready until next year, I’m probably going to have to do something else until then.

Sam if you find any solution, please let me know. My App makes heavy use of this API and I fear is going to be removed from the App Store if finally 10.10 deprecates 32 bit NSSharingServices. It’s so tied to the App, I can’t remove the API calls :frowning:

Have you studied how are you going to handle Backup To Go with Yosemite?

Regards!

Thankfully in Backup To Go, sharing is a very minor part and I can use URLs to share the basic information on Facebook and Twitter.

I have removed all sharing functions from the new App Wrapper at the moment, I’ll focus on finishing up what I can (my Window restoration code is also broken with the GM, so I need to fix that ASAP).

It looks like, the solution for sharing is to write a Obj-C console application, it’s going to be a chore as I’ve never written a console application in Obj-C, and I need to design it to integrate with Xojo (and we’ll have to use NSTask).

I don’t think Apple will remove your application, but I can assure you that users will soon be complaining.

[quote=133223:@Sam Rowlands]I don’t think Apple will remove your application, but I can assure you that users will soon be complaining.
[/quote]

Ouch! Yes, that is exactly my main worry: users complaining for key features they use. :frowning:

Saying goodbye to my beloved app is going to be a tough time ( will need to remove it ). Damn 64 bits! Damn Crisis! Damn Money!

Christian,

Could it be some part of MBS?? Maybe you can surprise us with such feature! :wink:

What are you sharing? Currently we share pictures and with BTG we share text.

Pictures can be written out as files, so this will also cover file sharing, text can be escaped and passed through via NSTask.

Yes, mainly pictures (although PFDs and some vector format is in the works).

If you throw some light I will really appreciate it Sam!!

What does that gesture mean where you come from? :slight_smile:

If I were in your position, I’d contact Christian and see about paying him to write you the helper app or helper library - he does good work and fast.

[quote=133232:@Amando Blasco]Christian,

Could it be some part of MBS?? Maybe you can surprise us with such feature! ;)[/quote]
Not unless its a full blown APP
A 32 bit app can’t load 64 bit libraries

I’ll still look into that. Maybe we can find a workaround.

This may seem silly, but couldn’t you just include the 32bit lib/framework in your app bundle and call into that instead of the OS framework? Then you wouldn’t have to learn Swift and write a helper app.
Again, just a (possibly silly) idea since I have never done so and don’t know how it might affect MAS submissions.

I just wrote myself a test solution.
A proxy in 64bit and the plugin has a connect method to talk to it.
So the plugin can forward some calls there in order to access some things.

More work is needed and it would bring you only the classes like NSSharingServiceMBS, not the GUI as we have two apps here.

But I can already get list of supported services. (Sharing Services.rbp example app shows content in the 4 lists)

[quote=133304:@Jason King]This may seem silly, but couldn’t you just include the 32bit lib/framework in your app bundle and call into that instead of the OS framework? Then you wouldn’t have to learn Swift and write a helper app.
Again, just a (possibly silly) idea since I have never done so and don’t know how it might affect MAS submissions.[/quote]
Sadly not, Apple will not let you post an application to the App Store, containing their frameworks.

There’s also the question of compatibility, it could be that a required framework is no longer 32-Bit, which would mean that it won’t work.

Lastly, the NSSharingServices framework on Yosemite is 15mb, so it would add bloat to your app.

Nice idea, and I sure would love something as simple as this :slight_smile:

Go learn swift. With your skill level, Sam, you will learn it less than a day. I promise. It is stupidly easy compared to Objective-C. Learning the framework and the ins/outs of Xcode… that is the harder part. But overall, still simple once you see the pattern. On top of that, packaging and sending things off to the App Store is literally 2 or 3 clicks and you are done. No need to fight with certificates, code signing, retina preparations, etc. Xcode handles all of that for you. So many resources available too. Cocoacontrols, swifttoolbox, cocoapods, heck, even GitHub.

You will be glad you did. Finally, everything is free (except for your annual $99 dev fee).

[quote=133465:@Koua Lo]Go learn swift. With your skill level, Sam, you will learn it less than a day. I promise. It is stupidly easy compared to Objective-C. Learning the framework and the ins/outs of Xcode… that is the harder part. But overall, still simple once you see the pattern. On top of that, packaging and sending things off to the App Store is literally 2 or 3 clicks and you are done. No need to fight with certificates, code signing, retina preparations, etc. Xcode handles all of that for you. So many resources available too. Cocoacontrols, swifttoolbox, cocoapods, heck, even GitHub.

You will be glad you did. Finally, everything is free (except for your annual $99 dev fee).[/quote]
Indeed Swift is really simply compared to Objective-C and it may be the direction I go in the future, especially as I’ve heard it mentioned several times now that eventually Obj-C will be replaced by Swift. A great deal of things are certainly easier when using Swift, and it would save me time for quite a few projects, I am toying with re-starting the HDRtist Pro update in Swift.

However like all things, there are some things that are easier in Xojo. For instance when Swift was first announced I tried to create a simple application in it, however when I wanted to EncodeHEX or create a MD5 checksum, I couldn’t figure it out. After 4 days of discussing with others in the ADF, it seemed like the only way was to create a Objective-C class, add in some special code, then you either had to compile it or do something else ‘magical’ before you could them import it into Swift. At which point I felt like, yes Swift is easier, but also just as restrictive as Xojo. Now had I written the test application in Objective-C, I could have done it all in Objective-C and be done with it!

I then wrote the sample application in Xojo in about 10 mins flat, and it worked perfectly on first run. I’ll take another look at Swift, before I consider re-starting our HDR application.

The other thing I didn’t like about Swift, is the need for support libraries to be bundled with your application if you want to ship it on 10.9, it’s always one thing I’ve appreciated about Objective-C, is that you can write fully functional applications, that take less then a MB.

However; back to your point and yes NSSharingServices is available to Swift, whereas it’s no longer available to Xojo.

Also thanks for the comment on my skill level, although I fear you may over-estimate me :slight_smile:

[CryptoSwift]

Has MD5 in Swift