Giter Club home page Giter Club logo

Comments (15)

areejmayadeh avatar areejmayadeh commented on September 15, 2024 1

@dorkyboi sorry for the trouble you are experiencing. I am looking into this issue and will get back to you.

Any update on this ?

from tiktok-opensdk-ios.

viet795 avatar viet795 commented on September 15, 2024 1

image

from tiktok-opensdk-ios.

nickdnk avatar nickdnk commented on September 15, 2024

#2 (comment) (don't use cocoapods)

from tiktok-opensdk-ios.

dorkyboi avatar dorkyboi commented on September 15, 2024

Correct me if I'm wrong, but isn't @import unavailable when the project has .mm files (aka Objective-C++ Source)?

from tiktok-opensdk-ios.

nickdnk avatar nickdnk commented on September 15, 2024

No idea. I just know that in a regular Objective-C project, the above syntax works fine if the package was added with SPM.

from tiktok-opensdk-ios.

dorkyboi avatar dorkyboi commented on September 15, 2024

Well, yeah – after extensive research, it would seem that Swift can only be used in Objective-C++ files when importing with -Swift postfix. Refactoring AppDelegate.mm to Swift seems to be the only option left on the table, but I don't have nearly enough skills to effectively move all changes made to it by other libraries while making sure nothing breaks.

Guess we will have to use the old SDK, at least for iOS.

Any idea why importing doesn't work? Can it/will it be fixed in the future? Excluding the whole React Native community seems like a big deal.

from tiktok-opensdk-ios.

nickdnk avatar nickdnk commented on September 15, 2024

I don't use React Native, but it seems this a known problem with RN and something they're debating how to fix: react-native-community/discussions-and-proposals#587

I don't work for TikTok, but I wouldn't expect this library to move away from SPM/Swift. I don't know if this particular problem is a limitation with RN or your ability to convert your AppDelegate to Swift. If it's the latter, I suggest you just get it done and move on.

from tiktok-opensdk-ios.

dorkyboi avatar dorkyboi commented on September 15, 2024

Still, I find it quite weird that other imports (for example #import <FBSDKCoreKit/FBSDKCoreKit-Swift.h>) do work but TikTok's SDK won't. Even though TikTok's documentation and this repo's readme both state that CocoaPods can be used as an alternative to SPM.

from tiktok-opensdk-ios.

stephen-boyle avatar stephen-boyle commented on September 15, 2024

@dorkyboi sorry for the trouble you are experiencing. I am looking into this issue and will get back to you.

from tiktok-opensdk-ios.

fobos531 avatar fobos531 commented on September 15, 2024

@dorkyboi sorry for the trouble you are experiencing. I am looking into this issue and will get back to you.

Any update on this ?

Same, I would love to use this within a React Native iOS app! @stephen-boyle

from tiktok-opensdk-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.