react-native-tiktok icon indicating copy to clipboard operation
react-native-tiktok copied to clipboard

iOS Build Issue

Open Sivakumar415 opened this issue 2 years ago • 22 comments

Hey @Lg0gs, I am getting the below issue when I run the build from XCode. Can you help me to sort out this one

'TikTokOpenSDKShareRequest' has different definitions in different modules; first difference is definition in module 'TikTokOpenSDK.TikTokOpenSDKShare' found property

Screenshot 2022-04-20 at 2 30 07 PM

Sivakumar415 avatar Apr 25 '22 10:04 Sivakumar415

@Sivakumar415 Hey, can you remove asterisks everywhere and try again?

Lg0gs avatar Apr 26 '22 05:04 Lg0gs

@Lg0gs I tried, but it's not working.

Sivakumar415 avatar Apr 26 '22 12:04 Sivakumar415

Any updates on this?

Gedzis avatar May 13 '22 05:05 Gedzis

@Lg0gs does it work on your side?

vforvasile avatar May 13 '22 12:05 vforvasile

@Lg0gs I am hitting a similar error when trying to archive on a different line:

'TikTokOpenSDKShareRequest' has different definitions in different modules; first difference is definition in module 'TikTokOpenSDK.TikTokOpenSDKShare' found property name 'extraShareOptions'

kmooney517 avatar May 16 '22 21:05 kmooney517

Our build fails on CD tools because they don't have xCode 13.3 support yet. However, we managed to make it work locally with a patch (version 1.0.1)

diff --git a/node_modules/react-native-tiktok/ios/Podfile b/node_modules/react-native-tiktok/ios/Podfile
index e0be15c..050d9a4 100644
--- a/node_modules/react-native-tiktok/ios/Podfile
+++ b/node_modules/react-native-tiktok/ios/Podfile
@@ -4,7 +4,7 @@
 target 'Tiktok' do
   # Comment the next line if you don't want to use dynamic frameworks
   use_frameworks!
-  pod 'TikTokOpenSDK', '~> 5.0.0'
+  pod 'TikTokOpenSDK', '5.0.0'
 
   # Pods for Tiktok
 
diff --git a/node_modules/react-native-tiktok/react-native-tiktok.podspec b/node_modules/react-native-tiktok/react-native-tiktok.podspec
index 95c0dbe..d050793 100644
--- a/node_modules/react-native-tiktok/react-native-tiktok.podspec
+++ b/node_modules/react-native-tiktok/react-native-tiktok.podspec
@@ -10,11 +10,11 @@ Pod::Spec.new do |s|
   s.license      = package["license"]
   s.authors      = package["author"]
 
-  s.platforms    = { :ios => "10.0" }
+  s.platforms    = { :ios => "14.0" }
   s.source       = { :git => "https://github.com/Lg0gs/react-native-tiktok.git", :tag => "#{s.version}" }
 
   s.source_files = "ios/**/*.{h,m,mm,swift}"
 
   s.dependency "React-Core"
-  s.dependency "TikTokOpenSDK", "~> 5.0.0"
+  s.dependency "TikTokOpenSDK", "5.0.0"
 end

We switched to fixed 5.0.0 TikTokOpenSDK and modified s.platforms from 10.0 to 14.0

Hope this helps someone.

vforvasile avatar May 17 '22 07:05 vforvasile

Sorry guys sometimes I don't have much free time to take a look at the issues. @vforvasile Thanks for the information, did you try it on Android?

Lg0gs avatar Jun 04 '22 06:06 Lg0gs

I did the patch, but still facing the same issue

Baraa-bi avatar Jun 06 '22 16:06 Baraa-bi

same issue , is there any workaround solution ?

reehamRaed avatar Jun 09 '22 10:06 reehamRaed

@baraa95 @reehamRaed Did you try this workaround?

Lg0gs avatar Jun 10 '22 06:06 Lg0gs

@Lg0gs yes I did , but nothing happened

reehamRaed avatar Jun 12 '22 13:06 reehamRaed

I removed the share method (because i'm only using the login module) and modified the auth method in Tiktok.m and works for me Screenshot 2022-06-13 at 19 01 26

hbittar avatar Jun 13 '22 23:06 hbittar

@hbittar Does it work with this method?

Lg0gs avatar Jun 14 '22 05:06 Lg0gs

I removed the share method (because i'm only using the login module) and modified the auth method in Tiktok.m and works for me Screenshot 2022-06-13 at 19 01 26

can you explain the solution please ?

reehamRaed avatar Jun 14 '22 09:06 reehamRaed

finally found the workaround after changing to 5.0.0

https://github.com/Lg0gs/react-native-tiktok/issues/7#issuecomment-1128529980

cd node_modules/react-native-tiktok/ios pod install

it's remove 5.0.14 and install 5.0.0

after go regular /ios/ folder and make pod install

again..

that resolve the issue after 1.5 days dance with a tambourine

githubbla avatar Jun 24 '22 16:06 githubbla

@githubbla Still facing that problem Screenshot 2022-09-01 at 3 52 27 PM

Sivakumar415 avatar Sep 01 '22 10:09 Sivakumar415

does anyone have a better fix for this?

vforvasile avatar Sep 12 '22 14:09 vforvasile

Still, it does have the same error. Setting TikTokOpenSDK to 5.0.0 and using version 1.0.1 suggested here didn't work for me. Does anyone was able to use this package?

islamashraful avatar Sep 14 '22 05:09 islamashraful

@githubbla Unfortunately didn't work this workaround

islamashraful avatar Sep 14 '22 05:09 islamashraful

Any updates? i have the same issue on build for iOS

dhoncrisley-alive avatar Sep 20 '22 22:09 dhoncrisley-alive

Friends, I managed to solve the build problem by deleting the ios/Pods, ios/Podfile and ios/Podfile.lock

and running pod install --repo-update again.

as there is no need for these files as they are already listed as dependency in react-native-tiktok.podspec.

But when using the auth function nothing happens, and after a while I get an alert that the webview is finished.

In some version did this lib work correctly?

dhoncrisley-alive avatar Sep 21 '22 15:09 dhoncrisley-alive

The issue is the same as here detailed discussion.

supershik avatar Jan 05 '23 15:01 supershik