nativescript-community / nativescript-drawingpad

:pencil: NativeScript plugin to provide a way to capture any drawing (signatures are a common use case) from the device
Apache License 2.0
90 stars 32 forks source link

iOS SignatureView is not visible on release builds #25

Closed manojdcoder closed 7 years ago

manojdcoder commented 7 years ago

iOS SignatureView works fine on development builds installed on device / simulator, but when making a release build the SignatureView itself is completely hidden. Please refer the screenshots below.

Debug Build

debug

Release Build

release

Release build log for your reference. BuildLog.txt

prabudevarrajan1 commented 7 years ago

I am also facing the same issue. SignatureView works find in debug mode, but not in release mode

manojdcoder commented 7 years ago

It seems to be some issue when setting height of drawing pad component in css + webpack + uglify and not with this plugin, hence closing this issue.

bradmartin commented 7 years ago

Were you setting the height in CSS? Or on the element?

manojdcoder commented 7 years ago

@bradmartin I had set the height in css as follows,

DrawingPad {
    height: 60%;
    background-color: #f3f3f3;
    border-radius: 4
}

Looks like webpack for iOS compresses DrawingPad into something else and css is never applied when uglify is enabled. I just added DrawingPad to exception list and it worked then.

const mangle =  {
            except: [
                ...nsWebpack.uglifyMangleExcludes,
                "DrawingPad"
            ]
        };
bradmartin commented 7 years ago

Makes sense. Thanks for following up with that info. I believe the plugins can provide a file that helps prevent that from happening. I've never had to do it but might be a good addition if someone wants to put a PR together for it. The drop down plugin I think is a good example

On Wed, Sep 20, 2017, 4:01 PM Manojkumar Murugesan notifications@github.com wrote:

@bradmartin https://github.com/bradmartin I had set the height in css as follows,

DrawingPad { height: 60%; background-color: #f3f3f3; border-radius: 4 }

Looks like webpack for iOS compresses DrawingPad into something else and css is never applied when uglify is enabled. I just added DrawingPad to exception list and it worked then.

const mangle = { except: [ ...nsWebpack.uglifyMangleExcludes, "DrawingPad" ] };

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/bradmartin/nativescript-drawingpad/issues/25#issuecomment-330979619, or mute the thread https://github.com/notifications/unsubscribe-auth/AFulhLQKLUzQj6rLAJedhTVp7JiC7D5Dks5skX0PgaJpZM4PWuTm .