-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Incomplete bit code when uploading to app store #61
Comments
you are getting this error because pre-built frameworks are built for simulator and device ARCHs. This is good for development because you don't have to worry about supported arch when building and running on different platforms. Before uploading to appstore, you have to strip away simulator platforms, and then use stripped versions of frameworks instead of current ones. You can also remove current pre-built libraries for embedded binaries, and add the ones from |
@ivpusic could you give a step by step for this process as I'm having real trouble getting rid of this error. It's definitely due to a misunderstanding of mine of how xcode works? |
then probably latter will be easier for you. go to project General tab, scroll down to Embedded binaries. You will see that there are two pre-built frameworks. You can remove them, build project for Device => this will produce Frameworks built for Device platform. Click + under Embedded binaries, and now you can add these two frameworks. Later probably you will want to switch back to pre-built frameworks because it is easier during development. |
@ivpusic I'm still getting the same error if I do that. |
This is what I did:
Before upload starts I get the same error in the first screenshot |
can you go to Project -> Build Settings -> Enable Bitcode. Is it yes or no? |
Yes, it's enabled. |
hm, then would be cool if you can investigate what is happening. Maybe try flags/options from this link http://stackoverflow.com/questions/34959767/whats-the-difference-between-fembed-bitcode-and-bitcode-generation-mode. Probably for some reason bitcode is not included in built frameworks, and as you said your app has it, which is causing this incompatibility. You can experiment by editing build options of each framework, build it and then link it with your app. Please keep me posted about progress here. |
Have you been able to upload to itunesconnect yet? |
nope, my personal project is still in development, so I didnt try upload yet. |
Adding |
great. will release new version with this fix. |
Great! thanks |
@superandrew213, Have you released anything with this package? This package works great on the simulator, but I put something on TestFlight and memory usage explodes when selecting photos with this... |
@parkerdan what "memory usage explodes" means in your context? How much memory usage is increased? In my testings when running on device memory usage is ok. "Exploding" comes if I send base64 image data over the RN bridge, which is something you should generally avoid with react-native. |
I love your work on being able to select multiple photos, and everything is great until the app is on the phone via TestFlight. My app is 80mb according to iOS Settings->General->Storage->Manage Storage. My app got to 160mb after selecting a few photos with your package. When I changed to react-native-image-picker, and added the same photos to the app, the memory was at 85mb. |
Yes, i"m including base64. |
@ivpusic, but I also get base64 from the other package without the memory increase.... |
sorry, I thought you were talking about RAM usage, but you are talking about disk usage? in that case reason why memory increases is because files are written to tmp location which is cleaned up automatically at some point. Maybe would be a good idea to export some cleanup function, so users can call it once they don't need file(s) anymore. |
I would love a clean-up function. Any idea how to go about that? |
@parkerdan I delete images in temp folder as soon as I am done with them. You can use react-native-fs for that @ivpusic it would be better to let react-native-fs handle that |
@superandrew213, Thanks for the tip |
@superandrew213 let't keep this option as well, because many people doesn't use fs package |
@ivpusic when add framework into Embedded Binaries, you can use |
hello, |
Also tried toggling the Enable Bitcode to Yes, and then to No.
Any other suggestions? |
I also have this issue with the latest version. Have no idea how to resolve it until I manually delete all the binary files, clean, clean build folder and archive project again. Finally it worked. In general, if some one can make it work but some one cannot make it work, then first thing should come up is try to clean the project as much as we can. This is a good experience |
I already have everything working properly on my dev environment. Now I want to upload it to testflight. I have a circle ci that will be triggered on push to master that will build the ipa and push it to testflight. In order to not have to change my project manually every time I want to push to master (and trigger circle ci), I need to be able to delete these files before I start to build the IPA.
This is not very clear for me. Which are the files I need to delete? EDIT: @ivpusic Is it something like this: https://github.com/oney/react-native-webrtc/blob/master/Documentation/iOSInstallation.md#appendix-b---apple-store-submission ? Could we benefit to a script similar to the one in react-native-webrtc? Based on that script I created this: https://gist.github.com/canastro/e8cf409f9a241cfb1d0763cdb66f3dc8 and now I run:
And then:
Now the error I have is:
Any tips on what I might be missing? |
My problem was solved after i deleted the folder installed by the Post-install steps 2 |
@canastro did you happen to solve "CFBundleIdentifier Collision"? I'm getting that too! |
@mayankbaiswar-CSE I tried what @codetay suggested (removing the manually added reference to ImageCropPickerSDK in Xcode) and this solved the collision problem for me. Also I took the script from https://github.com/oney/react-native-webrtc/blob/master/tools/ios_arch.js that @canastro mentioned and converted it into helper functions for fastlane. DEPENDENCIES_TO_STRIP = ['RSKImageCropper', 'QBImagePicker']
def strip_simulator_archs()
archs_to_keep = ['armv7', 'armv7s', 'arm64']
DEPENDENCIES_TO_STRIP.each { |dependency|
Dir.chdir("../node_modules/react-native-image-crop-picker/ios/ImageCropPickerSDK/#{dependency}.framework") do
sh("cp #{dependency} /tmp/#{dependency}")
archs_to_keep.each { |arch|
sh("lipo -extract #{arch} #{dependency} -o #{dependency}-#{arch}")
}
createParameters = archs_to_keep.reduce('') { |total, arch| "#{total} #{dependency}-#{arch}" }
sh("lipo -o #{dependency} -create#{createParameters}")
sh("rm #{dependency}-*")
end
}
end
def restore_simulator_archs()
DEPENDENCIES_TO_STRIP.each { |dependency|
Dir.chdir("../node_modules/react-native-image-crop-picker/ios/ImageCropPickerSDK/#{dependency}.framework") do
sh("mv /tmp/#{dependency} #{dependency}")
end
}
end In our release lane, |
excuse me, where exactly i do have to put this flag? Could provide a detailed instruction? |
This commit replaces react-native-image-picker in favor of react-native-image-crop-picker. It solves a few key issues like being able to - 1) Select multiple images 2) Being able to downsample image quality. See issue zulip#2749 3) Being able to scale down images. 4) Being faster at processing images. The removal of react-native-image-picker was done by: 1) Removing dependency from yarn 2) Running react-native unlink react-native-image-picker 3) Checking the initial commit and removing any code that may not be covered by unlink. For reference the initial commit that introduced changes was 515436a. The addition of react-native-image-crop-picker is done by following the installation instructions at https://github.com/ivpusic/react-native-image-crop-picker/blob/07d321e3bc279b0ad218817245264cda6a7c77cb/README.md This involved: 1) Adding the dependency via yarn 2) Running react-native link react-native-image-crop-picker 3) Adding the frameworks under embedded binaries as described by this comment ivpusic/react-native-image-crop-picker#61 (comment) and also under the "Manual" section of the PostInstall steps. Note: We are ignoring a few of the PostInstall steps described in the Readme namely: 1) Changing the deployment target to 8.0 - We already have a higher target set. 2) The steps described in "To localizate the camera / gallery text buttons" - I dont believe this is required and the instructions seem vague. 3) Adding "useSupportLibrary" as described in a previous commit - This is required for cropping images and we don't have that feature enabled currently. When we enable that feature we will want to add this as well. Note: We want to test this commit is working by archiving the project and uploading to TestFlight.
This commit replaces react-native-image-picker in favor of react-native-image-crop-picker. It solves a few key issues like being able to - 1) Select multiple images 2) Being able to downsample image quality. See issue zulip#2749 3) Being able to scale down images. 4) Being faster at processing images. The removal of react-native-image-picker was done by: 1) Removing dependency from yarn 2) Running react-native unlink react-native-image-picker 3) Checking the initial commit and removing any code that may not be covered by unlink. For reference the initial commit that introduced changes was 515436a. The addition of react-native-image-crop-picker is done by following the installation instructions at https://github.com/ivpusic/react-native-image-crop-picker/blob/07d321e3bc279b0ad218817245264cda6a7c77cb/README.md This involved: 1) Adding the dependency via yarn 2) Running react-native link react-native-image-crop-picker 3) Adding the frameworks under embedded binaries as described by this comment ivpusic/react-native-image-crop-picker#61 (comment) and also under the "Manual" section of the PostInstall steps. Note: We are ignoring a few of the PostInstall steps described in the Readme namely: 1) Changing the deployment target to 8.0 - We already have a higher target set. 2) The steps described in "To localizate the camera / gallery text buttons" - I dont believe this is required and the instructions seem vague. 3) Adding "useSupportLibrary" as described in a previous commit - This is required for cropping images and we don't have that feature enabled currently. When we enable that feature we will want to add this as well. Note: We want to test this commit is working by archiving the project and uploading to TestFlight.
YES |
I am a bit confused about I followed all steps for non-pod including post-install (adding I am using Is striping away simulator platforms still a required step? |
I also can't use cocoapods, so here is the setup process that worked for me in dev and prod.
|
@douglasjunior @mieszko4 @ivpusic With |
Following my steps you are ready for development and production. |
@douglasjunior I do not understand what you do exactly between point 5 and point 6 |
After step 4 the compiled |
That's the point - I did not embed binaries from derived folder (i.e. I did not do steps 5 and 6). |
Please mind I am not an expert in iOS stuff.
After adding them I've noticed that their paths are taken from I archived the app and sent to the store - no problem. After that I changed target to This is why I am confused why there is additional step for production only as it seems that the post-install ios Step 2 automatically does what needs to be done for production. |
@mieszko4 oh sure, I'm little bit confused. I also find I have this situation in Xcode: So, why does it work anyway? |
@paolospag you need to copy and paste the compiled frameworks to your |
@douglasjunior Why is mine still not working? Is there any missing steps? |
Can i use react-native-image-crop-picker with expo , |
img is file stream is undefined but showing filename. FrontEnd :ReactNative |
Version
Tell us which versions you are using:
Steps to reproduce
Attachments
The text was updated successfully, but these errors were encountered: