Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Property with 'retain (or strong)' attribute must be of object type #210

Closed
hubab00ba opened this issue Nov 17, 2020 · 7 comments
Closed
Assignees
Labels
bug Something isn't working fixed

Comments

@hubab00ba
Copy link

Description
I installed the library. First problem was during "pod install" - "Specs satisfying the react-native-ffmpeg/https (= 0.5.0) dependency were found, but they required a higher minimum deployment target.", so I set my deployment target to 11. Then I was able to run "pod install" and when I try to start the project from XCode there is an error "Property with 'retain (or strong)' attribute must be of object type".

Expected behavior
Project build without errors.

Current behavior
Project can't build.

Environment

  • "react-native": "~0.63.3"

Podfile:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12'

target 'Example' do
  use_unimodules!
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end
@christian150590
Copy link

I have the same problem

@hubab00ba
Copy link
Author

hubab00ba commented Nov 20, 2020

@christian150590 You can change
@property (nonatomic, strong, readonly) dispatch_queue_t methodQueue;
to
@property (nonatomic, assign, readonly) dispatch_queue_t methodQueue;
in the RTCBridgeModule.h file to make it work but this definitely is not a correct fix.

@aemre
Copy link

aemre commented Dec 15, 2020

any update on this ?

@AlkanV
Copy link

AlkanV commented Dec 17, 2020

i am facing same issue.

@hubab00ba
Copy link
Author

hubab00ba commented Dec 19, 2020

Solved: Add pod 'react-native-ffmpeg/full', :path => '../node_modules/react-native-ffmpeg' to your Podfile.

Read more here .

@tanersener Do you know why it was not working with pod 'react-native-ffmpeg', :podspec => '../node_modules/react-native-ffmpeg/react-native-ffmpeg.podspec' as it is shown in the README file?

@tanersener
Copy link
Owner

It seems like the latest versions of react-native and cocoapods changed the build flags generated for react-native-ffmpeg.

In this issue, the problem is, build flags generated for react-native-ffmpeg include OS_OBJECT_USE_OBJC=0 flag, which is why you get Property with 'retain (or strong)' attribute must be of object type error for a GCD queue object.

I modified the podspec and fixed the issue in v0.5.1. You don't need to use workarounds anymore.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

5 participants