Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create new pin on iOS, working fine on android #2

Open
tonystaa opened this issue Nov 23, 2017 · 6 comments
Open

Can't create new pin on iOS, working fine on android #2

tonystaa opened this issue Nov 23, 2017 · 6 comments

Comments

@tonystaa
Copy link

tonystaa commented Nov 23, 2017

Successfully logged in Pinterest on iOS
Successfully fetched Pinterest boards list on iOS
But can not create new pin
createPin(note, boardId, imageUrl, link, onSuccess, onError)

and also no callback is called(neither onSuccess nor onError)

my actual code

cordova.plugins.Pinterest.createPin(

"Heloo there", 

"807551845621954609", 

"https://ichef-1.bbci.co.uk/news/660/cpsprodpb/1325A/production/_88762487_junk_food.jpg" , 

"www.google.com",

function(result){
	alert("Succesfully pinned your post")
}, 

function(error){
	alert("Error while pinning your post")
})

The same code is working absolutely fine on android.
This is the screenshot of pinterest website(I successfully pinned it from android emulator using above code) :

pinterest pin

ionic Version : 1.3.1

please ask for any other information required.

@ihadeed
Copy link
Member

ihadeed commented Nov 25, 2017

Thanks for reporting this.

  • I checked the code and it looks like everything is linked properly, from the JS interface, to the Pinterest SDK
  • I check if Pinterest updated their iOS SDK. They didn't.

I can't tell what the issue here is.

  • Do other functions work fine on iOS?
  • Did you try to remove the plugin and re-install it to get a fresh copy of the SDK?

@tonystaa
Copy link
Author

tonystaa commented Nov 27, 2017

I have checked all the function on iOS, and found that all the functions are working fine except these two functions:

createPin(note, boardId, imageUrl, link, onSuccess, onError)
getBoardPins(boardId, onSuccess, onError, fields, limit)

I have already told you about createPin method.
code i used for getBoardPins()

cordova.plugins.Pinterest.getMyBoards(function (success) {
    debugger
    cordova.plugins.Pinterest.getBoardPins(success[0].id, function (s) {
        debugger
    }, function (e) {
        debugger
    })
}, function (error) {
    debugger
})

No debugger is being hit on iOS.
I have checked multiple times on two different Macbook . Also I reinstalled the plugin twice.But nothing worked.
Please check the above functions.

Also,
getMyLikes(onSuccess, onError, fields, limit)

is throwing error on both android and iOS

message:"404: Not Found"
type:"http"

But may be it's beacuse i dont have any likes yet.

Everything is working fine on android.

@oosswwaalldd
Copy link

Hi!

How did you manage to install this plugin in an Ionic project? at iOS compilation time it gives me "PDKResponseObject.h" file does not exist.

Some help needed please, i am following the instructions on https://ionicframework.com/docs/native/pinterest/

Here is my Ionic info command output:

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.15.2
ionic (Ionic CLI) : 3.15.2

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.0.0
Cordova Platforms  : ios 4.5.2
Ionic Framework    : ionic-angular 3.7.1

System:

Android SDK Tools : 25.2.2
ios-deploy        : 1.9.2
Node              : v8.8.1
npm               : 5.5.1
OS                : macOS High Sierra
Xcode             : Xcode 9.1 Build version 9B55

Environment Variables:

ANDROID_HOME : /Users/tuity/Library/Android/sdk

Misc:

backend : legacy

Thanks in advance

@tonystaa
Copy link
Author

Hi @oosswwaalldd I got the same issue while trying to install it second time in iOS, there was a mix-up of plugin errors, I got various other ".h" file error for other plugins also. what i did was:
deleted all the plugins which are causing those errors using command:

cordova plugin list - this will list all the installed plugins

cordova plugin remove <NAME-OF-PLUGIN> - remove all the plugins which are causing error

then i removed both the platform android and iOS(yes, i removed android platform while running it on iOS)

ionic cordova platform remove ios
ionic cordova platform remove android

IMPORTANT: Restart the terminal if any of the steps fails or give error.

I then installed pinterest plugin again using command :
cordova plugin add cordova-plugin-pinterest --variable APP_ID=YOUR_APP_ID (which is on github page)
then run using:
ionic cordova emulate ios

@oosswwaalldd
Copy link

@tonystaa thanks, I've tried that but i am still having the same error, I thinks it is the cocoa pods not installing after the plugin installation

@chiemekailo
Copy link

chiemekailo commented Apr 8, 2019

Please how did you handle your Redirect URI? An issue is open here for it, but no response at all. But it is working for you, so please could you respond to that issue.?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants