-
-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Resolved] Failed to build with a lot of swift notes, warnings and errors (Phonegap Build) #397
Comments
@abardik I would bet you are not using the minimum required iOS target 10.2 that why you get this error. Finally the warning are only warning and do not cause issues.
Note: I use master in the example above so you can get the last version as 5.0.4 will be released soon. |
Note, when you create an issue we ask you iOS and Xcode version on the template, make sure to provide it next time. https://github.com/cordova-rtc/cordova-plugin-iosrtc/blob/master/ISSUE_TEMPLATE.md |
@hthetiot I can not use any of those commands in Phonegap Build. I just can modify config.xml. And for 4.0.2 it works fine:
But when I change spec to 5.0.* I got all those errors. |
I did not provide iOS and xCode version because I don't use them. I use Phonegap Build: |
Ok, I see, well you still need to target iOS 10.2 + if you want to use 5.0.1+ to use new AVAudioSession API.
|
Note: not sure it is the case, but you should not commit platforms/ios in your source, so it can be added and trigger the hook that does setup the min platform. |
Note: We going to migrate to cordova@5+ to solve some hook issues, that may be related to why you dont get the hook fully trigger see https://github.com/cordova-rtc/cordova-plugin-iosrtc/pull/376/files
|
That change nothing actually, you can still run this command locally to update config.xml then push to get phonegap to build. We use Travis here to fully build the IPA and it's free and works great on 5.0.1+ and using last Xcode 10 and 11. Closing the issue for now, if you comment i will continue to assist you. |
@abardik Thank you. Keep us posted, I may add documentation if you find what the right way to have 5+ build on phonegap build, I still think the reason you have this error is because your ios Target is below 10.2. May be your target is higher like iOS 13 and this API also changed, but people have built on iOS 13 succesfully so i doubt it, this may help us if you find the used target in your logs. Try adding this it should fix your issue.
Note: Alternatively, 5.0.1 should still support iOs Target 9+
|
If you can't run cordova command locally. |
I tried some combinations of:
But still got those errors:
|
Sorry i edited comment afterward that why you used wrong version. |
See original comment on changes and 10.2 requirements |
Note: we can confirm that the issue if you try to use 5.0.0 that still support ios target 9 |
I tried all of them: 10.1 and 10.2 with latest #master, and 9 with 5.0.0 and 5.0.1. The same result. |
Sorry man cannot help you more. Try to provide you full build logs so we can see the target version and Xcode version. Version 5 does work on last Xcode otherwise other people would have complained, the issue is with Phonegap build. Alternativly try a sample app and see if it build on phone gap.
Then add proper signing and config in build.json and upload to phone gap build. But it look to me they dont even support last Xcode anyway. |
See Adbobe support for iOS target. Example:
https://community.adobe.com/t5/Air/available-in-XCode-causes-Undefined-symbols-error/m-p/9353855 Keep me posted, Sorry i cant help you more. |
"Changing the swift language version from "3.3" to "4.1" solved the issue for me."
That the proof that you are not using swift 4.2 @abardik |
@hthetiot You were right, and I just didn't know how to configure Phonegap Build properly (never met issues like this before). It's done, finally, with the following preferences in config.xml:
I think, it would be helpful to add a note about Phonegap Build with this config to the Installation part of README. Thank you for the support and useful advices. |
I'm really happy you figured out. Thank you for your contribution. Happy RTC. Note: Will leave that issue open until phonegap build doc released and iosrtc hook updated to work like cordova-plugin-add-swift-support. |
For the case, 5.0.1 can be compiled with the same config (it's regarding the breaking changes in WebRTC API in 5.0.2+ where old-API-style data channels and media connections are not working anymore). |
@abardik I have added throw error on API Callbacks usage to help migration over Promise based WebRTC API see Changelogs preview for 5.0.4
See original changes on 5.0.2
For details about the callbacks issue see: Note: Removing Callback API was part of the TODO list from original maintainer that I will complete as my duty.
|
@abardik Please don't add topics to this issue, it will confuse people and I requested on other issues to others that topic of issue been respected. Feel free to create other issue if needed. I will assist as I proven today but respecting the topic is important for me. Thank you. |
@hthetiot Yes, I read about new API. Just mentioned it here in the context of 5.0.1 config for Phonegap Build. |
The current case of using phonegap build and not adding platform after the plugin should be resolved by this PR. #402 |
I use iosrtc in Phonegap Build project and now try to upgrade the plugin from 4.0.2 to 5.0.*, but it failed with a huge amount of swift notes, warnings and errors. I set cli to 9.0.0 (cordova-ios 5.0.1), also tried cli 8.1.1 (cordova-ios 4.5.5), but result is the same.
The amount of warnings and errors is just huge. So, I copy just some of them here:
And some errors:
Please, give me an advice what to do to fix this issue?
The text was updated successfully, but these errors were encountered: