Closed dirkpostma closed 4 years ago
There are similar issues reported before. Please search for them and try to apply solutions given there.
The README states that this library support iOS 9.3 and above. I already tried increasing the deployment target to 9.3, include script to set deployment target of all pods to 9.3, but this appears not be be high enough. I also tried to use LTS package, which didn't work either. Which made me file this issue.
Is it true that the README is incorrect? Should 9.3 be changed to 10.0?
In my opinion, if someone follows the instructions in the README, no errors should occur.
I would suggest to add instructions to change first line to platform :ios, '10.0'
And I would also suggest to let users add this to the Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
end
end
end
For me, this worked out.
Do you agree with these README change suggetions?
By coincedence, the React Native team has just published React Native 0.63.0 and the typescript template is published last hour.
If you run this now:
npx react-native init TestFfmpeg --template react-native-template-typescript
cd TestFfmpeg
yarn add react-native-ffmpeg
cd ios; pod install; cd ..
open ios/TestFfmpeg.xcworkspace
...everything works out of the box!
Since React Native 0.63 has dropped iOS 9 support, the suggest change of Podfile is no longer necessary. For RN 0.62.* it is..
Do you agree with these README change suggetions?
No. Thread-local storage is not supported for the current target
message is generated by iOS, not by react-native-ffmpeg
. iOS generates this warning when the deployment target is not supporting thread locals. Since we know that iOS 9.3 supports thread locals, your problem should be coming from something else.
Please take a look at official test applications under the react-native-ffmpeg-test repository. They are all working fine with 9.3
.
These examples use React Native 0.61.x. I could test again with React Native 0.62. And note that the error only happens with Release builds, not with Debug builds. It could also depend on xCode version, there are many factors. Thing is: following the readme did not work for me using BLANK project.
I tested again, I can confirm the error occurs with React Native 0.62.2.
npx react-native init TestFfmpeg062Vanilla --version 0.62.2
cd TestFfmpeg062Vanilla
yarn add react-native-ffmpeg
cd ios; pod install; cd ..
# change Podfile, platform 9.0 to 9.3
open ios/TestFfmpeg062Vanilla.xcworkspace/
Build Release configuration
=> error
But.. I think not worth the time as problems are solved with React Native 0.63 anyway.
Issue closed.
Did some more testing. I think your overlook the fact that the error occurs with release build only.
I just tested default of react-native-ffmpeg-test
git clone git@github.com:tanersener/react-native-ffmpeg-test.git
cd react-native-ffmpeg-test/default
yarn
cd ios; pod install; cd ..; say ready
open ios/ReactNativeFFmpegTest.xcworkspace
Build Release configuration
=> error
So.. may be worth to look at it anyway?
After publishing a new react-native-ffmpeg
version, I'm validating that test applications can be built using both build types (debug, release). v0.4.4
was tested and validated in the same way. Please take a look at this video, https://www.dropbox.com/s/sg4hs3696e8ammq/issue-182-screenshot-capture.mov?dl=0.
Remember that this issue occurs because react-native
and cocoapods
don't always generate the correct deployment target for applications. This is why Thread-local storage is not supported for the current target
error is received. Additionally, defining a post_install
step doesn't always work. Because of that I recommend manually updating the deployment targets.
Also note that, this is issue is not specific to react-native-ffmpeg
. There are other projects which suffer from the same problem as well.
i get this error on a fresh installation, but on react 60.6 (since I'm trying to migrate my code base on a large project, after the auto linking has failed). target is 9.3. version 0.4.4. I might just downgrade to see if that works for me instead.
@DISKONEKTeD I believe I explained why this error happens and what must be done to fix it.
@tanersener This does not work. I am using react-native 0.63.2. Target everywhere 10.0. If the "Release" mod is set to "run" in the assembly scheme, the application build crashes. If the "Debug" mod is okay. Why does the error depend on the build mode?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@DISKONEKTeD I'm having the same issue. Did you manage suceed with the build release?
A solution for the problem of Release configuration builds breaking while Debug working was to make sure you set Build Active Architecture Only=YES for the Pods project:
Description Using blank React Native project, 0.62.2 when building a Release variant iOS, a build error occurs:
Thread-local storage is not supported for the current target
Expected behavior I would expect build to run without errors.
Current behavior When
change first line of Podfile from
platform :ios, '9.0'
toplatform :ios, '9.3'
run
cd ios; pod install; cd ..
In xCode, change build configuration to Release (CMD-SHIFT-<)
build
Then the following build errors occurs:
Screenshots Not applicable
Logs See above
Environment
Other thread_local is not supported on i386 architecture. Could that be a hint to solution?