Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release build #2

Closed
Minishlink opened this issue Nov 5, 2021 · 10 comments · Fixed by #3
Closed

Release build #2

Minishlink opened this issue Nov 5, 2021 · 10 comments · Fixed by #3

Comments

@Minishlink
Copy link
Contributor

@Minishlink Minishlink commented Nov 5, 2021

Hello,

Thanks a lot for the project!
It compiles and works well in Debug configuration. But as soon as I switch to Release configuration I have the following errors:

node_modules/react-native-shareplay/ios/SharePlay.swift:21:19: Cannot find type 'GroupActivityMetadata' in scope
node_modules/react-native-shareplay/ios/SharePlay.swift:12:30: Cannot find type 'GroupActivity' in scope
node_modules/react-native-shareplay/ios/SharePlay.swift:55:30: Cannot find 'GroupStateObserver' in scope
node_modules/react-native-shareplay/ios/SharePlay.swift:78:23: Cannot find type 'GroupSession' in scope
node_modules/react-native-shareplay/ios/SharePlay.swift:79:20: Cannot find type 'GroupSessionMessenger' in scope
node_modules/react-native-shareplay/ios/SharePlay.swift:98:31: Cannot find type 'GroupSession' in scope
node_modules/react-native-shareplay/ios/SharePlay.swift:22:24: Cannot find 'GroupActivityMetadata' in scope
node_modules/react-native-shareplay/ios/SharePlay.swift:24:26: Cannot infer contextual base in reference to member 'generic'
node_modules/react-native-shareplay/ios/SharePlay.swift:64:55: Type 'GenericGroupActivity' has no member 'sessions'
node_modules/react-native-shareplay/ios/SharePlay.swift:82:29: 'nil' requires a contextual type
node_modules/react-native-shareplay/ios/SharePlay.swift:83:26: 'nil' requires a contextual type
node_modules/react-native-shareplay/ios/SharePlay.swift:89:31: Type of expression is ambiguous without more context
node_modules/react-native-shareplay/ios/SharePlay.swift:101:25: Cannot find 'GroupSessionMessenger' in scope
node_modules/react-native-shareplay/ios/SharePlay.swift:103:45: Unable to infer type of a closure parameter 'state' in the current context
node_modules/react-native-shareplay/ios/SharePlay.swift:110:49: Unable to infer type of a closure parameter 'activity' in the current context
node_modules/react-native-shareplay/ios/SharePlay.swift:115:49: Tuple pattern cannot match values of non-tuple type '_'
node_modules/react-native-shareplay/ios/SharePlay.swift:138:31: Type of expression is ambiguous without more context
node_modules/react-native-shareplay/ios/SharePlay.swift:143:59: Value of type 'GenericGroupActivity' has no member 'prepareForActivation'
node_modules/react-native-shareplay/ios/SharePlay.swift:144:40: Value of type 'GenericGroupActivity' has no member 'activate'
node_modules/react-native-shareplay/ios/SharePlay.swift:148:32: Value of type 'GenericGroupActivity' has no member 'activate'
node_modules/react-native-shareplay/ios/SharePlay.swift:152:31: Type of expression is ambiguous without more context
node_modules/react-native-shareplay/ios/SharePlay.swift:158:28: Type of expression is ambiguous without more context
node_modules/react-native-shareplay/ios/SharePlay.swift:164:31: Type of expression is ambiguous without more context
node_modules/react-native-shareplay/ios/SharePlay.swift:170:31: Type of expression is ambiguous without more context

It looks like it cannot find the GroupActivity framework.

I am on XCode 13.1. My app entitlements contain the Group Activities capability (com.apple.developer.group-session).

Have you built a project in Release configuration with your module? Have you made any additional steps?

@zhigang1992
Copy link
Collaborator

@zhigang1992 zhigang1992 commented Nov 5, 2021

Yeah, we have released to AppStore with this module. no extra steps required.

@zhigang1992
Copy link
Collaborator

@zhigang1992 zhigang1992 commented Nov 5, 2021

is it failing for you in the example app as well?

@Minishlink
Copy link
Contributor Author

@Minishlink Minishlink commented Nov 5, 2021

Yes I can reproduce it with the example:

gh repo clone popshoplive/react-native-shareplay
cd react-native-shareplay
yarn
cd example
yarn
cd ios && pod install && cd -
react-native run-ios --configuration Release

@Minishlink
Copy link
Contributor Author

@Minishlink Minishlink commented Nov 5, 2021

swift --version gives:

swift-driver version: 1.26.9 Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)
Target: x86_64-apple-macosx11.0

@zhigang1992 Do you have the same version?

@zhigang1992
Copy link
Collaborator

@zhigang1992 zhigang1992 commented Nov 5, 2021

That's odd,
Example project also doesn't work in release mode for me now.

But our own project still works. 😄

I'll look into this a bit more tonight.

@Minishlink
Copy link
Contributor Author

@Minishlink Minishlink commented Nov 8, 2021

Hi @zhigang1992, have you been able to take a look by any chance? Thanks 🙏

@zhigang1992
Copy link
Collaborator

@zhigang1992 zhigang1992 commented Nov 9, 2021

@Minishlink sry I couldn't figure out what's going on yet.

We are using expo for our project, this library works without any issue there

https://github.com/zhigang1992/shareplay-example

This is the simplest example that works fine in Release configuration.

I'm not sure what's different from this example and example in this repo.

I'll keep checking, but in the mean time. You can look into the example from above link as well.

Maybe you'd have better luck spotting the differences.

@zhigang1992
Copy link
Collaborator

@zhigang1992 zhigang1992 commented Nov 9, 2021

https://github.com/zhigang1992/shareplay-test-bare-rn

it actually works in bare react-native project as well.

@Minishlink
Copy link
Contributor Author

@Minishlink Minishlink commented Nov 9, 2021

Could reproduce the issue with bare react-native project on 0.64.2 but not on your test bare rn project so there's something between these versions.

EDIT: Builds successfully on 0.65.2

@Minishlink
Copy link
Contributor Author

@Minishlink Minishlink commented Nov 9, 2021

Found the culprit :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants