Forums

Home » Mobile » Liferay Mobile SDK

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Nha Duong
Build iOS App to Sync with liferay 6.2
February 20, 2014 8:49 PM
Answer

Nha Duong

Rank: New Member

Posts: 24

Join Date: February 20, 2014

Recent Posts

Hello everyone!
I am building iOS app to Sync media between iOS Device and Liferay Server , I search the Internet but not a way do this.
I trying Liferay Mobile SDK but not success.
Any idea for this or any documents.
Thanks!
Bruno Farache
RE: Build iOS App to Sync with liferay 6.2
February 21, 2014 3:38 AM
Answer

Bruno Farache

LIFERAY STAFF

Rank: Liferay Master

Posts: 602

Join Date: May 14, 2007

Recent Posts

Have you looked at the documentation?

https://github.com/liferay/liferay-mobile-sdk/tree/master/ios
Nha Duong
RE: Build iOS App to Sync with liferay 6.2
February 23, 2014 6:37 AM
Answer

Nha Duong

Rank: New Member

Posts: 24

Join Date: February 20, 2014

Recent Posts

Have another problem:
In code :

LRDLFolderService_v62 * service =[[LRDLFolderService_v62 alloc]init:session];
NSArray * folders=[service getFoldersWithGroupId:groupId parentFolderId:-1 start:-1 end:-1 obc:??? error:&error];

I wan't get folders in the server.

I see parameter "obc" is a NSDictionary for "OrderByComparator".
I trying pass to this parameter with some values but not success and receive Error "Problem while instantiating class com.liferay.portal.kernel.util.OrderByComparator".

Please help!A example for command above.
Thanks
Bruno Farache
RE: Build iOS App to Sync with liferay 6.2
February 23, 2014 10:56 AM
Answer

Bruno Farache

LIFERAY STAFF

Rank: Liferay Master

Posts: 602

Join Date: May 14, 2007

Recent Posts

Try LRDLAppService_v62, it's got simplified methods like this one:

https://github.com/liferay/liferay-mobile-sdk/blob/master/gen/ios/v62/m/LRDLAppService_v62.m#L481-L490

repositoryId = groupId, parentFolderId = 0 for the root folder.
Nha Duong
RE: Build iOS App to Sync with liferay 6.2
February 24, 2014 8:43 PM
Answer

Nha Duong

Rank: New Member

Posts: 24

Join Date: February 20, 2014

Recent Posts

I have dictionary from server of "shortcut file"
Printing description of dic:
{
active = 1;
companyId = 10154;
createDate = 1393231574000;
fileShortcutId = 108437;
folderId = 0;
groupId = 87101;
modifiedDate = 1393231574000;
repositoryId = 0;
status = 0;
statusByUserId = 10196;
statusByUserName = "Administrator System";
statusDate = 1393231574000;
toFileEntryId = 101028;
treePath = "/0/";
userId = 10196;
userName = "Administrator System";
uuid = "1941c25e-f7ee-46be-a00e-f5a47b3dfc5b";
}
Entity shortcut of image file ;
I want get link from image file to Show.
image file from another group;
case 1: i am member of it
case 2 : i am not member of it.
Any example, idea!
Thanks!
Bruno Farache
RE: Build iOS App to Sync with liferay 6.2
February 25, 2014 4:59 AM
Answer

Bruno Farache

LIFERAY STAFF

Rank: Liferay Master

Posts: 602

Join Date: May 14, 2007

Recent Posts

Each file in document library has a Webdav URL, you could use that to download your file, the authentication is done the same way as the SDK does.
Nha Duong
RE: Build iOS App to Sync with liferay 6.2
February 26, 2014 1:55 AM
Answer

Nha Duong

Rank: New Member

Posts: 24

Join Date: February 20, 2014

Recent Posts

I want to upload document from Device.
In SDK have some method.
You see: this is method to add file to server:
- (NSDictionary *)addFileEntryWithRepositoryIdemoticonlong long)repositoryId folderIdemoticonlong long)folderId sourceFileNameemoticonNSString *)sourceFileName mimeTypeemoticonNSString *)mimeType titleemoticonNSString *)title descriptionemoticonNSString *)description changeLogemoticonNSString *)changeLog bytesemoticonNSArray *)bytes serviceContextemoticonNSDictionary *)serviceContext erroremoticonNSError **)error

have many argument i don't understand
ex: changeLog, bytes, serviceContext??
These argument get from where.???

Please help!
Bruno Farache
RE: Build iOS App to Sync with liferay 6.2
February 27, 2014 9:14 AM
Answer

Bruno Farache

LIFERAY STAFF

Rank: Liferay Master

Posts: 602

Join Date: May 14, 2007

Recent Posts

Hey Cong,

Although it's possible to upload files with the JSON web services, the SDK doesn't support it.

I've filed a bug ticket for that:

https://issues.liferay.com/browse/MOBILESDK-4


You can watch it to see the progress, the fix should be included in the next release.

You could also fix it yourself, it isn't hard, here's a snippet of how we do in Liferay Sync:

https://gist.github.com/brunofarache/9254542

It uses the AFNetworking library.
Bruno Farache
RE: Build iOS App to Sync with liferay 6.2
June 2, 2014 11:24 AM
Answer

Bruno Farache

LIFERAY STAFF

Rank: Liferay Master

Posts: 602

Join Date: May 14, 2007

Recent Posts

In case someone looks into this thread...

We have added support for binary upload, check the last release 6.2.0.5 and the documentation about it.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!