PeterStaev / nativescript-photo-editor

🎨 Easily edit an image in your NativeScript app (crop, draw, etc)
Apache License 2.0
47 stars 15 forks source link

Possible ios bug #18

Closed YaakovDavid closed 5 years ago

YaakovDavid commented 5 years ago

Great Plugin, thanks!

This plugin has been working fine until yesterday when I get the below error

14:23 $ tns run ios
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
Found peer node-sass
Found peer TypeScript 3.1.6
Skipping prepare.
Building project...
Xcode build...
/Users/yaakov/Desktop/my_project/platforms/ios/Pods/iOSPhotoEditor/Photo Editor/Photo Editor/PhotoEditor+Font.swift:24:49: error: value of optional type 'CGFont?' must be unwrapped to a value of type 'CGFont'
        guard CTFontManagerRegisterGraphicsFont(font, &error) else {
                                                ^
/Users/yaakov/Desktop/my_project/platforms/ios/Pods/iOSPhotoEditor/Photo Editor/Photo Editor/PhotoEditor+Font.swift:24:49: note: coalesce using '??' to provide a default when the optional value contains 'nil'
        guard CTFontManagerRegisterGraphicsFont(font, &error) else {
                                                ^
                                                     ?? <#default value#>
/Users/yaakov/Desktop/my_project/platforms/ios/Pods/iOSPhotoEditor/Photo Editor/Photo Editor/PhotoEditor+Font.swift:24:49: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
        guard CTFontManagerRegisterGraphicsFont(font, &error) else {
                                                ^
                                                    !
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
/Users/yaakov/Desktop/my_project/platforms/ios/Pods/iOSPhotoEditor/Photo Editor/Photo Editor/PhotoEditor+Font.swift:24:49: error: value of optional type 'CGFont?' must be unwrapped to a value of type 'CGFont'
        guard CTFontManagerRegisterGraphicsFont(font, &error) else {
                                                ^
/Users/yaakov/Desktop/my_project/platforms/ios/Pods/iOSPhotoEditor/Photo Editor/Photo Editor/PhotoEditor+Font.swift:24:49: note: coalesce using '??' to provide a default when the optional value contains 'nil'
        guard CTFontManagerRegisterGraphicsFont(font, &error) else {
                                                ^
                                                     ?? <#default value#>
/Users/yaakov/Desktop/my_project/platforms/ios/Pods/iOSPhotoEditor/Photo Editor/Photo Editor/PhotoEditor+Font.swift:24:49: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
        guard CTFontManagerRegisterGraphicsFont(font, &error) else {
                                                ^
                                                    !
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
Command CompileSwift failed with a nonzero exit code
note: Using new build systemnote: Planning buildnote: Constructing build description
** BUILD FAILED **

Unable to apply changes on device: 869C07C8-E288-4D7F-AAF1-7DB78F487B8F. Error is: Command xcodebuild failed with exit code 65.
Stopping tsc watch
Stopping webpack watch

This error is coming from iOSPhotoEditor which from what I understand is used behind the scenes in this plugin. So I just want to notify you to this possible issue, I'm not sure the cause or how to fix it, all I know is that suddenly yesterday I couldn't run my ios simulator because of this (even though it was working fine for at least a month beforehand) and once I got rid of the plugin the simulator is running fine again.

PeterStaev commented 5 years ago

Hey @YaakovDavid , this is probably because your project uses newer version of swift and this plugin has not been updated to use those.

YaakovDavid commented 5 years ago

Okay, thanks!

PeterStaev commented 5 years ago

New version on npm should resolve this problem.