terikon / cordova-plugin-photo-library

Maintainer needed. Please contact if you're using this library in your project
MIT License
149 stars 295 forks source link

Swift support error #122

Closed NareshKukreti12 closed 6 years ago

NareshKukreti12 commented 6 years ago

@viskin hello sir, this plugin works fine on android but when I am trying to install this plugin in ios , I am getting some syntax error in following files 1-PhotoLibrary.swift 2- PhotoLibraryService.swift 3- PhotoLibraryProtocol.swift

Cli packages ionic/cli-utils:1.19.1 ionic (ionic CLI): 3.19.1

Global Packages: cordova (Cordova CLI) : 8.0.0

Local Packages:

ionic/app-scripts: 3.1.6 Cordova Platforms : ios 4.5.4

DEPENDECIES cordova-plugin-add-swift-support: 1.7.1 cordova-plugin-camera: 3.0.0 cordova-plugin-file: 6.0.1

rayonx commented 6 years ago

@NareshKukreti12 Check your environment and build settings, I had the same problem and turns out it was cocoapods. Running pod update within the platform/ios directory helped me compile this.

NareshKukreti12 commented 6 years ago

@rayonx Not working for me, still getting following erroros 1- PhotoLibraryProtocol.swift:133:16: error: consecutive declarations on a line must be separated by ';' fileprivate func sendErrorResponse( statusCode: Int, error: String) { ^ 2- PhotoLibraryProtocol.swift:138:5: error: expected declaration fileprivate func sendResponseWithResponseCode( statusCode: Int, data: Data?, mimeType: String?) { ^ And many more . There are around 40+ errors in all files

rayonx commented 6 years ago

@NareshKukreti12 Ok, it sounds like you have the incompatible Swift version here. Which version of Xcode are you on? To get the latest version of Swift (at current time of writing it is only on OSX High Sierra), you will need the latest version of Xcode.

NareshKukreti12 commented 6 years ago

@rayonx thank you so much , that problem is gone, app build is succeed but after launching , app stuck at splash screen . There is no errors in logs. Any idea ?

NareshKukreti12 commented 6 years ago

@rayonx thanks I found the solution. Thanks for your support & help.