Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

[iOS] Can't build without ARC errors #31

Closed
jonestheguitar opened this issue Jun 24, 2016 · 12 comments
Closed

[iOS] Can't build without ARC errors #31

jonestheguitar opened this issue Jun 24, 2016 · 12 comments

Comments

@jonestheguitar
Copy link

RNFetchBlobNetwork.m:32:13: ARC forbids synthesizing a property of an Objective-C object with unspecified ownership or storage attribute
RNFetchBlobNetwork.m:35:13: ARC forbids synthesizing a property of an Objective-C object with unspecified ownership or storage attribute
RNFetchBlobNetwork.m:36:13: ARC forbids synthesizing a property of an Objective-C object with unspecified ownership or storage attribute
RNFetchBlobFS.h:18:28: Existing instance variable 'callback' for property 'callback' with unsafe_unretained attribute must be __unsafe_unretained

I'm using 0.5.3.
Is it because I've added the project manually rather then with rnpm and have missed some build flags?

@jonestheguitar
Copy link
Author

The properties it's complaining about are:

@Property (nullable, nonatomic) RCTResponseSenderBlock callback;
@Property (nullable, nonatomic) CompletionHander fileTaskCompletionHandler;
@Property (nullable, nonatomic) DataTaskCompletionHander dataTaskCompletionHandler;

@wkh237
Copy link
Owner

wkh237 commented Jun 24, 2016

Hi @jonesdar , I think this problem is similar to #30 , I'm still trying to reproduce this error, looks like these block properties can't be nullable, if you remove nullable from those properties, do you still get the error ?

@wkh237 wkh237 added the ios label Jun 24, 2016
@jonestheguitar
Copy link
Author

Hello. No that doesn't help. Adding strong fixes things though - is that the right thing to do?
It's interesting that you don't see these errors - is it related to the version of Xcode perhaps? I'm using 7.2.

@jonestheguitar
Copy link
Author

I think it might be Xcode version related. Our build machine has just built things successfully and it's using Xcode 7.3.

@wkh237
Copy link
Owner

wkh237 commented Jun 24, 2016

@jonesdar great thanks ! I'm using Xcode 7.3 and I can build it without error, I'll release a version after doing some test.

@jonestheguitar
Copy link
Author

Thanks @wkh237. That fixes the 3 errors in RNFetchBlobNetwork.m. The one in RNFetchBlobFS.h is still there though. Adding strong to @property (nonatomic) RCTResponseSenderBlock callback; seems to fix it.

@wkh237 wkh237 self-assigned this Jun 27, 2016
@wkh237
Copy link
Owner

wkh237 commented Jun 27, 2016

@jonesdar thank you, Looks like I missed that one in RNFetchBlobFS.h, I'll fix that one ASAP.

wkh237 added a commit that referenced this issue Jun 27, 2016
@jonestheguitar
Copy link
Author

Xcode 7.2 build is now working for me. Thanks @wkh237 for the quick turnaround.

@wkh237
Copy link
Owner

wkh237 commented Jun 27, 2016

@jonesdar you're welcome 👍

@Pianist038801
Copy link

@wkh237 Hi! Image-upload to firebase storage using React Native is what I wanna do right now.
But the same error occurred during the development. I am using XCode 8.3.3.
I am sure you can figure this out.

@wkh237
Copy link
Owner

wkh237 commented Jul 25, 2017

@Pianist038801 let me clone the repository and see if there's anything I can help.

@Pianist038801
Copy link

@wkh237 Oh, I just found a mistake. I fixed it. Thanks for your kindness.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.