-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Not able to generate archive when using a Pod file #14749
Comments
It seems that adding BatchedBridge subspec resolves the issue. |
@litmanenPL how to solve? |
@tuckg as mentioned above by adding BatchedBridge React subspec in Podfile
|
@litmanenPL Nice, It work |
@litmanenPL I have been staring at this for the last 3-4 days. You my friend, are awesome. |
Ah this! Thank you @litmanenPL ! |
Thank you @litmanenPL!!! |
@litmanenPL solution fixed that error but now I'm getting What can be done to fix this? Removing React from the Libraries (like it's suggested in https://github.com/auth0/react-native-lock/issues/3) ends up giving a lot of runtime errors. |
@jpamarohorta |
@litmanenPL solution fixed that error but now I'm getting error ArchiveIntermediates/elBacan/BuildProductsPath/Release-iphoneos/libRCTWebSocket.a(RCTWebSocketModule.o) |
@ArtyomCommander remove the |
@dotansimha Thanks you. I upgraded to 0.48.4, I also encountered duplicated symbols between libReact.a and libRCTWebSocket.a. With your advice, I removed the libRCTWebSocket.a from my xcode target's "Link Library with libraries" after putting the 'RCTWebSocket' in the pod 'React' subspecs. Now I can both run debug and archive. |
@tehong I don't have the same luck as you, I have to keep adding libs when running debug and removing when I'm about to run fastlane to build, archive and upload. |
I have the same issue, cannot build the archive no matter what I try to put in the Podfile. |
@rborn 's solution did it for me. I just added the libs |
Guys, are you having luck building "release" archive after importing Running app in "release" mode (via xCode + cable) is causing no problems. The issue comes when app is archived. |
Yes, I am having that very problem. When I build and archive, submit that archive to Test Flight, and then download the app from there then the app hangs on a blank, white screen. When I built the app from Xcode and installed directly on my iPhone via a cable then it works fine. There should be no difference between the two processes, but there obviously is. I haven't, until now, had any clue what the cause might be because I was quite late introducing Test Flight into my process. (Lesson learned there!) |
So I've now added BatchedBridge to the React subspec in my Pod file. I can now build, upload and then download from TestFlight, and the resulting app no longer hangs on the blank screen. Here's how I changed my Pod file:
So pretty much as @litmanenPL first said. That was the only change that I made. |
@brownieboy what RN version are you running? I believe |
React-Native 52.1 now, although I think I was on 51 when the problems first appeared. |
This is madness... For now, I opt in removal of # Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
target '{project}' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for {project}
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'BatchedBridge',
'DevSupport'
]
target '{project}Tests' do
inherit! :search_paths
# Pods for testing
end
end
target '{project}-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for {project}-tvOS
target '{project}-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end |
@grabbou @ide Would it be possible to get an example project with a working debug and release build, and at the same time possibility to archive? I've tried to get a plain react-native init, pod init, pod install working using 0.54.0 but no luck. Only way to get it working is with linking React manually and this hack: #15838 (comment)
Which kind of goes against the whole point of cocoapods.
Taking use_frameworks! into use causes these: |
Managed to get use_frameworks building with the patches from here: #17764 (comment) but archiving fails on 0.54 with this: #18205 |
I noticed that "react-native run-ios" was working and making a functional debug build (using RN 0.53.3). While building, running and archiving in XCode was broken. So I took the command it was running and changed Debug to Release, drag and dropped the app to the simulator, and voila, it was working. Changed the command a bit more, and managed to get it to produce an archive which shows up in the organizer.
The error in XCode is this (in case it rings any bells for anyone):
|
I'm getting the same issue @msand - I can't get debug, release and archive to work without manually adding/removing Link Binary with Libraries each time :/ I have to add libRCTWebSocket.a back in in order to get rid of that link error you pasted in |
@tlloydukdev Found another workaround for the non use_frameworks case: #15838 (comment) Essentially a duplicate target for debugging with manually linked React Native modules, and using the xcodebuild cli to build release for simulator and archive for TestFlight / AppStore. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
I managed to update to 0.46 rc2 from 0.43 today and everything was looking ok. Building a debug or production release was working. However when I tried to create an archive I ran in the following error:
In my project I'm using react-native-maps and since I'm running google maps on iOS I have a podfile similar to this one:
https://github.com/airbnb/react-native-maps/blob/master/example/ios/Podfile
It turns out that when I remove the following lines
the archive is being built correctly.
I've reproduced the error here:
https://github.com/compojoom/rn46crash/tree/7c34cf696cf940e21566d73b7e76365fb6aab677
As you can see the podfile just has the pod Yoga and pod React lines.
To run the app, clone the repository and do
yarn
. Afterwards open the rn46crash.xcworkspace with XCode, assign a team to the project and build it. You should run in the specified error above.I'm pasting this issue here and not in the react-native-maps repository as with RN 0.43 - I was able to create an archive with that pod configuration, that's why I think that there is something wrong in the RN package.
The text was updated successfully, but these errors were encountered: