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

OpenGraphData fields are not visible in ObjC #69

Closed
Luten opened this issue Jul 17, 2018 · 12 comments
Closed

OpenGraphData fields are not visible in ObjC #69

Luten opened this issue Jul 17, 2018 · 12 comments

Comments

@Luten
Copy link

Luten commented Jul 17, 2018

NSLog(@"siteName = %@", data.siteName);

This example doesn't compile with error:
Property 'siteName' not found on object of type 'OpenGraphData *'

Looks like this will fix the issue: https://stackoverflow.com/a/45656756/1321401

@marty-suzuki
Copy link
Owner

Hi, @Luten !

What version do you build?
I've tried building latest master branch, and wroks fine with Xcode 9.4.1

@Luten
Copy link
Author

Luten commented Jul 17, 2018

I'm building with Xcode 9.2, swift4.0 (for business reasons upgrade not allowed yet )
Framework integrated via cocoaPods:

use_frameworks!
target 'MyTarget' do
    pod 'URLEmbeddedView'
end

@Luten
Copy link
Author

Luten commented Jul 17, 2018

Update:
pod install says:
Using URLEmbeddedView (0.14.0)

@marty-suzuki
Copy link
Owner

Example is not used cocoapods.
Please use carthage.

@Luten
Copy link
Author

Luten commented Jul 17, 2018

That cleary have nothing with carthage or cocoapods.
It's about Swift to ObjC bridge - it requires to add @objc on every property that should be available in ObjC

@marty-suzuki
Copy link
Owner

marty-suzuki commented Jul 17, 2018

@objc attribute is not matter because it had already implemented.
Don’t you look implementation?
https://github.com/marty-suzuki/URLEmbeddedView/blob/master/URLEmbeddedView/Core/Entity/OpenGraphData.swift

@marty-suzuki
Copy link
Owner

I've downloaded Xcode 9.2 and tried to build URLEmbeddedView Example with Carthage.
It works fine.

@Luten
Copy link
Author

Luten commented Jul 18, 2018

Your documentation says it should work with cocoapods too.

@marty-suzuki
Copy link
Owner

What version of README did you see?

Latest README is this.

To run the example project, clone the repo, and run carthage update from the Example directory first.

It have written clearly at https://github.com/marty-suzuki/URLEmbeddedView#usage

@Luten
Copy link
Author

Luten commented Jul 18, 2018

@objc attribute is not matter because it had already implemented.
Don’t you look implementation?
https://github.com/marty-suzuki/URLEmbeddedView/blob/master/URLEmbeddedView/Core/Entity/OpenGraphData.swift

This is implemented in newer versions.
In 0.14.0 wich is last for Swift 4.0 - it is not implemented.

What version of README did you see

I didn't run your example, I said that same code from your example doesn't compile in my project because object properties are not visible

Looks like 0.14 version was not updated for swift 4.0

@marty-suzuki
Copy link
Owner

marty-suzuki commented Jul 18, 2018

I didn't run your example, I said that same code from your example

Sorry, Now I understand your correct situation.

In 0.14.0 wich is last for Swift 4.0

Your wrong. I've succeed to run with Xcode 9.0 at latest version.
Don't you try installing pod with pod install --repo-update?

@Luten
Copy link
Author

Luten commented Jul 18, 2018

Don't you try install pod with pod install --repo-update?

Strangely pods didn't update to latest available version automatically, set manually to 0.15.3 (we need ios8) - now it works.
Great thanks!

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

2 participants