You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Peter (JIRA)" <ji...@apache.org> on 2018/03/15 02:57:00 UTC

[jira] [Created] (CB-13978) Swift 3-4 support

Peter created CB-13978:
--------------------------

             Summary: Swift 3-4 support
                 Key: CB-13978
                 URL: https://issues.apache.org/jira/browse/CB-13978
             Project: Apache Cordova
          Issue Type: Bug
          Components: cordova-cli, cordova-ios
    Affects Versions: cordova-android-7.0.0
            Reporter: Peter
            Assignee: Suraj Pindoria


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.

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 was 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org