owncloud / ios-library

MIT License
77 stars 90 forks source link

App Extension, please. #120

Closed marinofaggiana closed 8 years ago

marinofaggiana commented 8 years ago

Help my for this problem :

OCCommunicationLib/OCWebDavClient/OCWebDAVClient.m

[operation setShouldExecuteAsBackgroundTaskWithExpirationHandler:^{ handler(); }];

OCCommunicationLib/OCWebDavClient/OCWebDAVClient.m:328:16: 'setShouldExecuteAsBackgroundTaskWithExpirationHandler:' is unavailable: not available on iOS (App Extension) - Not available in app extensions.

what is the solution ??

thanks

javiergonzper commented 8 years ago

Hello @marinotws

Looks like this could be the problem: https://github.com/AFNetworking/AFNetworking/issues/2119

At the end we are using AFNetworking in the bottom to make the requests

marinofaggiana commented 8 years ago

hi @javiergonzper i've used preprocessor but I do not like the hardcoded in library .. if possible ...

//Execute task when backgroun expired
#ifndef EXENSION
    [operation setShouldExecuteAsBackgroundTaskWithExpirationHandler:^{
        handler();
    }];
#endif
javiergonzper commented 8 years ago

Send us a PR explaining why do yo make that and we will merge it in our code because we ca use it also :+1: Anyway in future updates we plan to change AFNetworking 2 for the 3 in order to user NSURLSession for everything.

marinofaggiana commented 8 years ago

no problem @javiergonzper !! no problem, these are not the real problems ;)

javiergonzper commented 8 years ago

@marinotws I want to let you know that we added a fix on the https://github.com/owncloud/ios-library/tree/release_1.2.0_library to support the new ownCloud 9 servers that will be release on March. It is important for your app.

marinofaggiana commented 8 years ago

ok @javiergonzper i use now for next version ! thanks

p.s.

@param shareeType -> NSInteger: to set the type of sharee (user/group/federated)

0 = user 1 = group 2 = federated

???

javiergonzper commented 8 years ago

@marinotws this is the type of share that you read from the server and that you create. 0 = share with a concrete user 1 = share with a group of users 2 = share with a user of other server. It is available since 8.2.2. You can share for example with user@server.com and the "user" of "server.com" will receive the share document.

Here you have Doc about the Share API: https://doc.owncloud.org/server/9.0/developer_manual/core/ocs-share-api.html Take into account that it still under development

marinofaggiana commented 8 years ago

thanks @javiergonzper !!

javiergonzper commented 8 years ago

You are welcome :wink:

marinofaggiana commented 8 years ago

aaa @javiergonzper i see this goooooood news : thumbnail API ... when it's ready?

thanks

javiergonzper commented 8 years ago

:smirk:

On the app it is under quality assurance and will be release on the next update. On the library I think that it is ready, but until it is not in "master" branch maybe we can change something.

I will close this issue. You can open others to speak about those topics, it is better to be read by others developers :+1: