Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

VK Social Network
Started by Michael W. Sep 15 2015 02:35 PM

52 replies to this topic
release android ios
[TOPIC CONTROLS]
Page 2 of 3 1 2 3
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 533 posts
  • Corona Staff

Finally finished working on the accessToken and showShareDialog.

 

vk.getAccessToken() - new method.

 

vk.showShareDialog() - params have changed a little (no underscore syntax anymore). Added image upload ability. Added completion listener. Works on both iOS and Android.



[TOPIC: post.html]
#27

paisaev

[GLOBAL: userInfoPane.html]
paisaev
  • Observer

  • 16 posts
  • Corona SDK

Thank you for your work.

[TOPIC: post.html]
#28

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

Thank you!



[TOPIC: post.html]
#29

paisaev

[GLOBAL: userInfoPane.html]
paisaev
  • Observer

  • 16 posts
  • Corona SDK

Finally finished working on the accessToken and showShareDialog.

 

vk.getAccessToken() - new method.

 

vk.showShareDialog() - params have changed a little (no underscore syntax anymore). Added image upload ability. Added completion listener. Works on both iOS and Android.

After update we noticed that app fall down with error "..init.lua module plugin.vk not found...."

https://drive.google.com/open?id=0B-BZX85l7gp_Z1dpZERBc0Jla3M



[TOPIC: post.html]
#30

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 533 posts
  • Corona Staff

After update we noticed that app fall down with error "..init.lua module plugin.vk not found...."

https://drive.google.com/open?id=0B-BZX85l7gp_Z1dpZERBc0Jla3M

Some build process issue. I am figuring this out at the moment.



[TOPIC: post.html]
#31

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 533 posts
  • Corona Staff

You can now use the plugin on android and get the access token. However showShareDialog() is still not working. That will be resolved later.



[TOPIC: post.html]
#32

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 533 posts
  • Corona Staff

showShareDialog is now fixed as well.



[TOPIC: post.html]
#33

dementor000

[GLOBAL: userInfoPane.html]
dementor000
  • Observer

  • 4 posts
  • Corona SDK

Hello! Program crash after showShareDialog launch. Share window succes appear, after press "share" on it game crash without any error. Can you suggest whats the problem?

 

 


local function processOpenURL(url)
    if url:sub(1, 2) == 'vk' then
        vk.processOpenURL(url, 'com.vk.vkclient')
    end
end


local _init = vk.init  
function vk.init(app_id, permissions, launchArgs)  
    _init(app_id, permissions)
    if launchArgs and launchArgs.url then
        processOpenURL(launchArgs.url)
    end
end


local function onSystemEvent(event)
    if event.type == 'applicationOpen' and event.url then
        processOpenURL(event.url)
    end
end


Runtime:addEventListener('system', onSystemEvent)

local launchArgs = ...
vk.init("5625852",{'messages', 'friends', 'wall', 'photos'},launchArgs)  
 
vk.login() 
vk.showShareDialog({-- text = "Sample text",
text = 'Sample text', 
image = { filename="image.png", baseDir=system.ResourceDirectory },
listener = function(event)
print('Share dialog event:', json.prettify(event))
end
})


[TOPIC: post.html]
#34

dementor000

[GLOBAL: userInfoPane.html]
dementor000
  • Observer

  • 4 posts
  • Corona SDK

resolved. didn't add

 


local function onSystemEvent(event)
    if event.type == 'applicationOpen' and event.url then
        processOpenURL(event.url)
    end
end


[TOPIC: post.html]
#35

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 533 posts
  • Corona Staff

dementor000, thanks for sharing!



[TOPIC: post.html]
#36

admin@appscraft.ru

[GLOBAL: userInfoPane.html]
admin@appscraft.ru
  • Observer

  • 5 posts
  • Corona SDK

Hello.

 

We have a problem when we are trying to send the game to apple:

 

ERROR ITMS-90535: "Unexpected CFBundleExecutable Key. The bundle at 'Payload/Election source.app/VKSdkResources.bundle' does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue."



[TOPIC: post.html]
#37

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 533 posts
  • Corona Staff

Hi. I've seen this before, surprised it come back. Will look into it a bit later this week.



[TOPIC: post.html]
#38

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 533 posts
  • Corona Staff

Should be fixed now.



[TOPIC: post.html]
#39

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

I can't seem to be able to share and image on Android. 

I perform a login, then I call:

local options = {
    text = "some message",
    linkTitle = "My App Name",
    link = "http://mywebsite.com",
    image = { filename = "assets/images/share.png", baseDir = system.ResourceDirectory },
    listener = _shareListener
}
vk.showShareDialog(options)
And in response I get:
event : {
    name : "shareDialog",
    errorMessage : "VKError (API errorVKError (code: 15; ; Access denied: no access to call this method))",
    errorCode : -101,
    isError : true
}

Should the share dialog work on Android?

Which permissions should I ask for to be able to share? I didn't see anything about it in the docs. 

What else could be the problem?

 

Thanks



[TOPIC: post.html]
#40

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

There is another strange issue we are experiencing around the login. 

On iOS, when the VK app is not installed on the device, after running the following code:

local loginOptions = {}
vk.login(_vkLoginListener, loginOptions)

if the device is connected to wifi, there is no response after this login call. The listener is simply never called. 

If the device is roaming (no wifi, celular connection instead), immediately after the login call the listener receives the string:

The operation couldn’t be completed. (ErrorEmptyListForMessageSendDomain error 1001.)

This was tested with iOS 9 and 8, and it's persistent not matter what we pass to the login function:

local loginOptions = { inApp = false }
vk.login(_vkLoginListener, loginOptions)
or 
local loginOptions = { inApp = true }
vk.login(_vkLoginListener, loginOptions)

On Android, the login works as expected even when the VK app is not installed. 

 

Why is this happening? Can someone please help?

Thanks 

 

 



[TOPIC: post.html]
#41

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

I can now confirm that vk.login() does not work on iOS.

Whether the VK app is installed or not, calling either

local loginOptions = { inApp = false }
vk.login(_vkLoginListener, loginOptions)

or

local loginOptions = { inApp = true }
vk.login(_vkLoginListener, loginOptions)

Does nothing. There is no callback to the listener, and nothing happens. 

 

This has worked a while ago, only if the VK app was installed, but now nothing works...

 

Can someone please take a look at this issue? 

We want to be able to use this plugin, but logging in is crucial. 

Thanks



[TOPIC: post.html]
#42

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 533 posts
  • Corona Staff

stanga, for sharing you need the 'wall' and maybe 'photos' permissions. Which are submitted to the init() call.



[TOPIC: post.html]
#43

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 533 posts
  • Corona Staff

stanga, for iOS can you confirm you have all URL related stuff in build.settings?



[TOPIC: post.html]
#44

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 533 posts
  • Corona Staff

A heads up. The plugin will become paid on Wednesday (Oct. 12).
Launch sale for $7.49 for a week and $9.99 after that. Subscription.
This plugin is 50% cheaper than my other paid plugins because financial crisis and stuff.


[TOPIC: post.html]
#45

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

I updated the build.settings file according to the plugin docs, yet the login doesn't work. This in not only on iOS 10, but also iOS 8 and 9. 



[TOPIC: post.html]
#46

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 533 posts
  • Corona Staff

stanga, I am able to login using either VK app or Safari (or WebView). I am using latest iOS 9. Please try building the sample app (from github) with your settings.



[TOPIC: post.html]
#47

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

The sample app with my build.settings file also does not work. 

It also doesn't work if I take the build.settings file from the sample app and simply change the app number to my own, or use the app number originally there. 

 

In the console logs I see the line:

com.apple.xpc.launchd[1] (com.apple.WebKit.WebContent.318163E9-0CBF-4D65-BC01-DBD79FC9AC60[192]) <Warning>: Service exited with abnormal code: 1

So it looks like Safari is crashing for some reason. 



[TOPIC: post.html]
#48

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

Any progress with this issue? 

We're still unable to login on iOS, no matter which iOS version we use (8, 9, 10). 

Please help, we can't use the plugin without logging in. 



[TOPIC: post.html]
#49

Lerg

[GLOBAL: userInfoPane.html]
Lerg
  • Contributor

  • 533 posts
  • Corona Staff

stanga, I guess I need your project to look at. Source code plus VK settings on their website.



[TOPIC: post.html]
#50

stanga

[GLOBAL: userInfoPane.html]
stanga
  • Contributor

  • 193 posts
  • Corona SDK

How can we do that?

Regarding the VK settings on their website - is there any explanation of what should be set there? 

There is a good chance our problem lies there, but I haven't found any reference to it in your docs at:

http://spiralcodestudio.com/plugin-vk/




[topic_controls]
Page 2 of 3 1 2 3
 
[/topic_controls]

Also tagged with one or more of these keywords: release, android, ios