Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13978

Swift 3-4 support

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: cordova-android-7.0.0
    • Fix Version/s: None
    • Component/s: cordova-cli, cordova-ios
    • Labels:
      None

      Description

      I tried to transform the cordova-plugin-fcm to Swift, and i realized lots of bugs.

      1, I cannot configure the use_targets! in the pod file, there is no flag for it.

      2, the target device preference does not pick up the version. (it goes to default 8)

      3, Automatically set some capabilities like Capabilities -> Background mode - Remote notification in my workspace. I have no idea how to configure it automatically.

      The cordova build is failing, however the xcode version seems to me working:

      ProcessProductPackaging "" /Users/zetor/Library/Developer/Xcode/DerivedData/MyScoutee-eqekewxmsowscjfwgtlfqmttjzrv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/GoogleToolboxForMac.build/GoogleToolboxForMac.framework.xcent
      cd /Users/zetor/Desktop/shared/myscoutee/frontend/platforms/ios/Pods
      export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
      builtin-productPackagingUtility -entitlements -format xml -o /Users/zetor/Library/Developer/Xcode/DerivedData/MyScoutee-eqekewxmsowscjfwgtlfqmttjzrv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/GoogleToolboxForMac.build/GoogleToolboxForMac.framework.xcent
      warning: Falling back to contents of entitlements file "Entitlements-Debug.plist" because it was modified during the build process. Modifying the entitlements file during the build is unsupported.error: The file "Entitlements-Debug.plist" couldn't be opened because there is no such file.

        • BUILD FAILED **

      The following build commands failed:
      ProcessProductPackaging "" /Users/zetor/Library/Developer/Xcode/DerivedData/MyScoutee-eqekewxmsowscjfwgtlfqmttjzrv/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/GoogleToolboxForMac.build/GoogleToolboxForMac.framework.xcent
      (1 failure)
      (node:2660) UnhandledPromiseRejectionWarning: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/zetor/Desktop/shared/myscoutee/frontend/platforms/ios/cordova/build-debug.xcconfig,-workspace,MyScoutee.xcworkspace,-scheme,MyScoutee,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone SE,build,CONFIGURATION_BUILD_DIR=/Users/zetor/Desktop/shared/myscoutee/frontend/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/zetor/Desktop/shared/myscoutee/frontend/platforms/ios/build/sharedpch
      (node:2660) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
      (node:2660) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

      4, With swift 3.2 i was able to access the methods of the plugin, but with swift4, the methods were unavailable. (the class has been identified)

      There is a swift support plugin, but i would like to set the bridging header once, instead of creating a new one. I have used a cocoapod-support plugin, although it was not working. I think both of the them should be integrated into the cordova.

      I have wasted more than 10 hours to hack around the plugin config to make it work.

      5, The cordova headers went to the emulator folder and it's not set in the workspace.

      6, GoogleToolboxForMac framework was not accessible from command line, but it was working under Xcode UI.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              raxim Peter
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: