triniwiz / nativescript-videorecorder

:video_camera: NativeScript plugin for Video Recording . :video_camera:
Apache License 2.0
43 stars 29 forks source link

Livesync hangs at "Project successfully prepared (ios)" #79

Open Naethyn opened 4 years ago

Naethyn commented 4 years ago

Similar to the issue located here. https://github.com/NativeScript/sidekick-feedback/issues/465

When I add this plugin to my project it hangs at "Project successfully prepared (ios)" using the latest (6.5.0) nativescript ios.

djp3d commented 4 years ago

I have the same issue, using version 6.5.0

mreall commented 4 years ago

I have the same issue, using nativescript 6.7.8 and tns-ios 6.5.2. I can deploy successfully to my device from XCode, though. Has anyone had any success fixing this issue?

mreall commented 4 years ago

I figured out the problem. The file nativescript-videorecorder/after-prepare.js is called after the tns prepare phase (when we see the "Project successfully prepared (ios)" message. The script creates a promise that only resolves if the AndroidManifest.xml is found in the platforms folder. If you do a clean build or delete the platforms folder, the AndroidManifest.xml file doesn't exist, so the promise hangs and prevents the ios build from happening.

As a workaround, you can run your android build first to generate the AndroidManifest.xml in the platforms folder.

In order to fix the issue, the promise should only be created if the platform being built is android.

mreall commented 4 years ago

@triniwiz please see my previous comment. Do you mind to update the plugin so it only creates the promise in after-prepare.js when building for android? Thanks.