viromedia / viro

ViroReact: AR and VR using React Native
MIT License
2.27k stars 481 forks source link

Looks like viro is dead for ios till update #852

Open ghost opened 4 years ago

ghost commented 4 years ago

ITMS-90809: Deprecated API Usage - Apple will no longer accept submissions of new apps that use UIWebView as of April 30, 2020 and app updates that use UIWebView as of December 2020. Instead, use WKWebView for improved security and reliability. Learn more ( https://developer.apple.com/documentation/uikit/uiwebview ).

react-viro uses UIWebView component, so since April 30 2020 it's will be rejected by apple, when you are trying to publish it.

ranjanpoudel1234 commented 4 years ago

Our app was all ready to be released as well, but due to this, we are stuck. This is going to prevent any new apps from making to App Store and eventually, by December, all existing apps will stop working as well. Sounds like a high priority item. Any plans from Viro team to tackle this soon ?

ManigandanRaamanathan commented 4 years ago

Guys any update on this issue? Apple already stopped receiving the UIWebView API. Now we are unable to upload the app

ManigandanRaamanathan commented 4 years ago

@dthian please fix the OS deprecated UIWebView issue

dthian commented 4 years ago

Hey @ManigandanRaamanathan, as mentioned in the other post, I'm not currently working on ViroReact, and that ViroReact and ViroCore are both open sourced - so that shouldn't be any blocking factors preventing you from viewing the source and patching the fix.

As mentioned, You would essentially need to abstract the GVR implementations away such that they aren't build into the renderer on iOS, that should remove the webview dependency (hopefully). @HedwigAR might have made some progress, so I would check in with him.

ManigandanRaamanathan commented 4 years ago

@dthian, I tried @HedwigAr's GVR removed version v2.18.0, it works perfectly fine now

MinhazMM commented 4 years ago

@ManigandanRaamanathan If we remove GVR that means we can't have VR support on the app yeah?

jogboms commented 4 years ago

Yes @MinhazMM. That is indeed the case.

ranjanpoudel1234 commented 4 years ago

@ManigandanRaamanathan , where can I access the v2.18.0(the one with GVR removed)? and what react-native version are you using it with ? Thank you in advance.

ManigandanRaamanathan commented 4 years ago

@ranjanpoudel1234 https://github.com/mendix/viro/pull/1

ranjanpoudel1234 commented 4 years ago

Thank you very much @ManigandanRaamanathan . Please forgive my lack of knowledge on this. Did you use the github link(this one https://github.com/mendix/viro.git) directly on your package.json, or did you fork it and make npm package out of that build branch(which has the fix) ?

diegothucao commented 4 years ago

are we planing to release a new version that fix issue of Apple ? @ManigandanRaamanathan with https://github.com/mendix/viro.git, seems IOS ok but Android cannot run because it does not have gvr @mendix

ManigandanRaamanathan commented 4 years ago

@diegothucao on my end, AR works on both android and ios version. I installed me ndix pull request version.

namthan commented 4 years ago

I've also installed mendix version (master branch on https://github.com/mendix/viro.git) but after I run yarn install and react-native run-android --variant=arDebug to open the app (in code-sample folder) on my device, it crashed out. Do you have any idea, is there any step I'm missing? or I'm using the incorrect branch (or git link)? @ManigandanRaamanathan thank you so much.

ManigandanRaamanathan commented 4 years ago

@namthan dont use master branch. Use the branch that is is pending merge request

namthan commented 4 years ago

@namthan dont use master branch. Use the branch that is is pending merge request

Do you mean branch UpdateReactNative ? I'm trying it on. This is an urgent issue in my project, hopefully can get your supports. Thanks a lot.

diegothucao commented 4 years ago

@diegothucao on my end, AR works on both android and ios version. I installed me ndix pull request version.

@ManigandanRaamanathan : I went to https://github.com/mendix/viro.git and do not see any pull request version ? Could you have time to support me a bit in detail how could I do ? thanks so much for your reply.

ManigandanRaamanathan commented 4 years ago

@diegothucao https://github.com/mendix/viro/pull/1

diegothucao commented 4 years ago

hi @ManigandanRaamanathan , thanks for your answer. I downloaded the build branch as in https://github.com/mendix/viro/pull/1 and run example with react-native run-android --variant=arDebug However it crashes when Android app comes up. Can the issue is about permission or missing something else from me?

ManigandanRaamanathan commented 4 years ago

@diegothucao the same version works fine on android 10 samsung s10 and note 9

diegothucao commented 4 years ago

Thanks @ManigandanRaamanathan I used note 9 as well. But still issue if you have any other idea for me. Please let me know. Thanks so much.

namthan commented 4 years ago
Screen Shot 2020-05-30 at 12 20 03 PM

After building successfully with medix pr, I'm running into this error. @ManigandanRaamanathan could you please help?

jpudysz commented 4 years ago

Did anyone manage to create 2.18 alternative with reverted GVR removal? I would like to have an updated version with fix for #835 . I was trying to but I always get white screen in VR mode.

ktemby commented 4 years ago

Good news - Viro not dead for iOS! Making some further changes to the Viro source to get the static library compiling with no GVR (Viro in AR only mode), I was able to successfully upload to Apple/Testflight to get past the UIWebView blocker. Total hack, but happy to share what worked.

I'm now successfully using RN 0.62.2 and have Viro static library working great with no UIWebViews.

Note that below I'm using a temporary viro fork. This could be merged back to main if it meets the quality bar. I can't maintain a fork, I just want to contribute to viro. Below will take a couple of hours to figure out the details... it's taken me days to get this working, so I may be missing key steps.

Gist:

Part 1: Build the static lib with no GVR UIWebView:

  1. Clone my Viro repo git clone https://github.com/ktemby/viro (hacked edits to remove GVR from static library target, I make no claims to have quality tested properly, especially for Android).
  2. Build viro (from the viro folder, cd ios, pod install, then open ViroReact.xcworkspace in Xcode and build all the targets, the 'static lib' target last)

Part 2: Get your project to use my viro temp fork

  1. Remove Viro from your current project npm uninstall react-viro
  2. Install my github fork npm install git+https://github.com/ktemby/viro
  3. Clear your build folder by doing a clean build of your app.

Part 3: Copy the locally built static library over to your project

  1. Go back to where you built viro, we'll be copying the 'dist' (the static library files) over.
  2. cp /viro/ios/dist/* ~<your project in part 2>/node_modules/react-viro/ios/dist/
  3. Why? Because the static library files that I built won't upload to my repo (they're too large).

Part 4: Rebuild your app with the updated library

  1. Go back to your app directory.
  2. Ensure you're using the static lib in your Podfile (see https://docs.viromedia.com/docs/no_use_frameworks)
  3. Do pod install first from the ios folder.
  4. Now build in xcode or with NPX.
  5. Enjoy seeing your AR functionality now working in your app!
  6. Upload to Apple and enjoy the feeling of not being rejected due to UIWebView.

Next steps?

I can post a sample RN 0.62.2 + Viro project with key configurations on the weekend if more details needed.

Takeaway - I was able to get this to work, and successfully submitted to Apple, but the quality of my effort is a way lower bar than you want, so please proceed with caution and understand my good intentions for sharing what worked for me is no replacement for your own diligence!

tscj3490 commented 4 years ago

Thanks for your detail explanation Would you share the dist folder via google driver or dropbox ? Because I am struggling to build "Build viro (from the viro folder, cd ios, pod install, then open ViroReact.xcworkspace in Xcode and build all the targets, the 'static lib' target last)" stage all day long. My react-native version is "react-native": "0.59.9" When I build all the targets and 'static lib', it shows so many errors. Thanks in advance.

ktemby commented 4 years ago

@tscj3490 I don't think this will work for you - but feel free to try https://drive.google.com/file/d/1XnIN0tPXGiLT1bRwEAxE1HWW1rU1edxc/view?usp=sharing. I'll run through the full steps of building a RN 0.62.2 test app, and post that over the weekend.

tscj3490 commented 4 years ago

Thanks for your dedicated effort and help. I will try again. Thanks again.

tscj3490 commented 4 years ago

I just did as your guide and deployed app that GVR is removed to test flight. I did like below.

  1. Removed Viro from my current project npm uninstall react-viro
  2. Ran npm install git+https://github.com/ktemby/viro
  3. Copied to the dist folder you shared and pasted to {my work project}/node_modules/react-viro/ios/dist/ .
  4. Ran pod install again and then, I could build app successfully. But once I deploy app to test flight, apple doesn't still allow my app. It shows same error. (Apple doesn't allow UIWebView) Please guide me again.
ktemby commented 4 years ago

I can't be sure- but you may need to clean your build folder completely first. I'd also isolate out what contains the UIWebview https://stackoverflow.com/questions/58091231/how-to-search-for-any-uiwebview-component-usage-inside-a-current-project. You may also want to ensure you're using the static lib - added step 2 to Part 4. I may have missed one of the steps I took, I'll do this for a clean test app on the weekend.

tscj3490 commented 4 years ago

I can't be sure- but you may need to clean your build folder completely first. I'd also isolate out what contains the UIWebview https://stackoverflow.com/questions/58091231/how-to-search-for-any-uiwebview-component-usage-inside-a-current-project. You may also want to ensure you're using the static lib - added step 2 to Part 4. I may have missed one of the steps I took, I'll do this for a clean test app on the weekend.

Hi, Ktemby. Did u do the work ? If you did, please share.. Thanks.

greenbaypayment commented 4 years ago

I can't be sure- but you may need to clean your build folder completely first. I'd also isolate out what contains the UIWebview https://stackoverflow.com/questions/58091231/how-to-search-for-any-uiwebview-component-usage-inside-a-current-project. You may also want to ensure you're using the static lib - added step 2 to Part 4. I may have missed one of the steps I took, I'll do this for a clean test app on the weekend.

Hi, ktemby I can't still deploy app to app store. Could you share source code that apple can approve ? Thanks in advance.

tscj3490 commented 4 years ago

I can't be sure- but you may need to clean your build folder completely first. I'd also isolate out what contains the UIWebview https://stackoverflow.com/questions/58091231/how-to-search-for-any-uiwebview-component-usage-inside-a-current-project. You may also want to ensure you're using the static lib - added step 2 to Part 4. I may have missed one of the steps I took, I'll do this for a clean test app on the weekend.

Hi, ktemby. Would you share test app apple approved ? I tried as your guide, but again, I got a mail like below. I am struggling on this for a long time.

ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).

Please help me.. If apple doesn't approve this Viro app, this isn't really useful. Thanks.

pradipBhuva27 commented 3 years ago

Hello,

Good news for everyone, i have just make changes in SDK for issue of UIWebView and i am getting successful to do that. now my iOS app is live on app store. so here is my solution : just download dist file from following link and extract and replace it in "..node_modules/react-viro/ios" path.

Link : https://drive.google.com/file/d/1F_5i59mCIWorF8N7f5A-CbuugrFKv3ia/view

please download it and paste in path and upload your app to app store.

tscj3490 commented 3 years ago

Hello,

Good news for everyone, i have just make changes in SDK for issue of UIWebView and i am getting successful to do that. now my iOS app is live on app store. so here is my solution : just download dist file from following link and extract and replace it in "..node_modules/react-viro/ios" path.

Link : https://drive.google.com/file/d/1F_5i59mCIWorF8N7f5A-CbuugrFKv3ia/view

please download it and paste in path and upload your app to app store.

Thanks for your update.. I just replaced the dist folder in "..node_modules/react-viro/ios" and deployed app again to test flight, but apple doesn't still approve... What did I missed else ? Thanks in advance.

pradipBhuva27 commented 3 years ago

Hello, Good news for everyone, i have just make changes in SDK for issue of UIWebView and i am getting successful to do that. now my iOS app is live on app store. so here is my solution : just download dist file from following link and extract and replace it in "..node_modules/react-viro/ios" path. Link : https://drive.google.com/file/d/1F_5i59mCIWorF8N7f5A-CbuugrFKv3ia/view please download it and paste in path and upload your app to app store.

Thanks for your update.. I just replaced the dist folder in "..node_modules/react-viro/ios" and deployed app again to test flight, but apple doesn't still approve... What did I missed else ? Thanks in advance.

Please check somewhere else you have used UIWebview?

tscj3490 commented 3 years ago

Hello, Good news for everyone, i have just make changes in SDK for issue of UIWebView and i am getting successful to do that. now my iOS app is live on app store. so here is my solution : just download dist file from following link and extract and replace it in "..node_modules/react-viro/ios" path. Link : https://drive.google.com/file/d/1F_5i59mCIWorF8N7f5A-CbuugrFKv3ia/view please download it and paste in path and upload your app to app store.

Thanks for your update.. I just replaced the dist folder in "..node_modules/react-viro/ios" and deployed app again to test flight, but apple doesn't still approve... What did I missed else ? Thanks in advance.

Please check somewhere else you have used UIWebview?

In my project, I searched UIWebview, but I couldn't find. By the way, I am not sure why apple don't approve.. Could you share the source code apple approved ?

Cosmitar commented 3 years ago

Hello, Good news for everyone, i have just make changes in SDK for issue of UIWebView and i am getting successful to do that. now my iOS app is live on app store. so here is my solution : just download dist file from following link and extract and replace it in "..node_modules/react-viro/ios" path. Link : https://drive.google.com/file/d/1F_5i59mCIWorF8N7f5A-CbuugrFKv3ia/view please download it and paste in path and upload your app to app store.

Thanks for your update.. I just replaced the dist folder in "..node_modules/react-viro/ios" and deployed app again to test flight, but apple doesn't still approve... What did I missed else ? Thanks in advance.

Please check somewhere else you have used UIWebview?

In my project, I searched UIWebview, but I couldn't find. By the way, I am not sure why apple don't approve.. Could you share the source code apple approved ?

Based on this Stackoverflow answer you can run grep -r UIWebView to detect the component. So I ran it into /dist folder shared by @pradipBhuva27 and had the following result


Binary file ~/Downloads/dist/ViroRenderer/static_lib/ViroKit_static_lib.framework/ViroKit_static_lib matches

I guess UIWebView is still there (of course the build was rejected by Apple).

Vednus commented 3 years ago

@Cosmitar strange. The dist worked for me and my app is in the store

Cosmitar commented 3 years ago

it turns out that I had 2 different Viro packages and I was updating the dist folder into one but using the other. After updating the right folder the VR is working as expected and Apple accepted the build without warnings! 🎉

gbalduzzi commented 3 years ago

To anyone still struggling with this problem, I will share my experience hoping it could help someone.

I need to integrate viro AR functionality in a react native 0.62.2 project targeting both android and ios.

To make it work on android without androidX problems, I used the citychallenge fork: https://github.com/citychallenge/viro

That worked good both on android on iOS, but I could not submit my app on the apple store due to UIWebView.

I followed the suggestions in this very same thread and, while I managed to get it working on iOS using @ktemby instructions, it didn't work on android anymore and the solution could not be "gitted" due to large files that required copy-pasting.

So:

Note: I can not guarantee that my org repo will be maintained in the future, so if you decide to use it anyway it will be at your own risk.

Additional note: I could not build the dist folder by myself because the fork by @ktemby raised some errors about the react library missing. I run pod install on the ios folder, but the podfiile is actually empty so it didn't help. If anyone else managed to build its own dist folder I would be interested in undrstanding and replicating the process.

Cosmitar commented 3 years ago

@gbalduzzi similar situation here for VR functionalities.

It works and is published on both iOS and Android stores

hokaiyipFS commented 3 years ago

Hi @Cosmitar, @gbalduzzi

in android/settings.gradle do I need to add the following

include ':react_viro', ':arcore_client', ':gvr_common', ':viro_renderer'
project(':arcore_client').projectDir = new File(rootProject.projectDir,'../node_modules/@citychallenge/react-viro/android/arcore_client')
project(':gvr_common').projectDir = new File(rootProject.projectDir,'../node_modules/@citychallenge/react-viro/android/gvr_common')
project(':viro_renderer').projectDir = new File(rootProject.projectDir,'../node_modules/@citychallenge/react-viro/android/viro_renderer')
project(':react_viro').projectDir = new File(rootProject.projectDir,'../node_modules/@citychallenge/react-viro/android/react_viro')

notice "@citychallenge"

gbalduzzi commented 3 years ago

If you are using the citychallenge fork yeah. Adjust those path to whatever fork you are using

kevinrodriguez-io commented 3 years ago

@dam00n Anyone on the team working on this?

haider792 commented 3 years ago

@Cosmitar VR is working fine after publishing over the apple store?

Cosmitar commented 3 years ago

@haider792 it is working so far

haider792 commented 3 years ago

can you please guide me on this. my android side is working good but on ios i have change the setting as you have described, i have installed the package and change the dist folder but it is still giving me the error.

Binary file ./node_modules/@citychallenge/react-viro/ios/dist/ViroRenderer/static_lib/ViroKit_static_lib.framework/ViroKit_static_lib matches.

Binary file ./ios/Pods/GVRSDK/Libraries/libGVRSDK.a matches

@Cosmitar

@gbalduzzi similar situation here for VR functionalities.

It works and is published on both iOS and Android stores

Cosmitar commented 3 years ago

@haider792 the matches on grep -r UIWebView are still there, however Apple is accepting the build after overwriting dist folder. Did you tried to publish your app?

haider792 commented 3 years ago

ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).

this is the warning they are sending me in the email and not accepting the build on testflight

Cosmitar commented 3 years ago

@haider792 two things that happened to me: 1 - I forgot to remove react-viro package after installing @citychallenge/react-viro package. 2 - typo in overwriting script wasn't overwriting /dist folder.

What I want to say with this, the patch works and probably in the whole mess there's a simple bothering mistake like I described above. Don't give up, review the process, make sure you're overwriting the right /dist folder with the right downloaded source and that's the only react-viro code you're building.

haider792 commented 3 years ago

@Cosmitar can you please guide me on this issue. attached is the image.

dyld`__abort_with_payload: 0x113a21ed4 <+0>: movl $0x2000209, %eax ; imm = 0x2000209 0x113a21ed9 <+5>: movq %rcx, %r10 0x113a21edc <+8>: syscall -> 0x113a21ede <+10>: jae 0x113a21ee8 ; <+20> 0x113a21ee0 <+12>: movq %rax, %rdi 0x113a21ee3 <+15>: jmp 0x113a20408 ; cerror_nocancel 0x113a21ee8 <+20>: retq
0x113a21ee9 <+21>: nop
0x113a21eea <+22>: nop
0x113a21eeb <+23>: nop

crashing when changing the dist folder as you describe and ios is not running showing this error.