Closed rwillett closed 7 years ago
Cordova has native support for cocoapods. You should have to manually install the SDK, only add it like you normally do. Make sure you have the latest Cordova CLI, Cordova iOS, and pod installed. I would also recommend clearing your derived data folder.
Is this an upgrade from an older versio of our plugin? If so, it's possible Cordova might of left some older files around. You could try recreating the iOS project if you did not do any major modifications to it.
You will also need to open the generated xcworkspace instead of the xcproject when trying to build it directly in xcode.
@rlepinski
Thanks for the replies.
When you say manually install the SDK do you mean follow the instructions for installing the IOS Urban Airship SDK rather than the Cordova SDK. i.e. the instructions at http://docs.urbanairship.com/platform/ios.html#getting-started
We installed the Urban Airship plugin by doing what we would expect to normally do,cordova plugins add <plugin name>
I'll check that we have the latest Cordova versions, we're normally pretty up to date with these, we certainly have the latest CocoaPod as we installed that purely to try and get the urban Airship Plugin installed.
We've never installed Urban Airship before. We currently use another commercial notification plugin and was interested in seeing if Urban Airship was a better option for us.
We'll recreate the derived data folder as well as opening the generated xcworkspace rather than the xcproject as well and report back.
Thanks
Rob
Houston, we no longer have a problem :)
We have now got this to compile, so thanks very much for this. I'll log what we did so other people can see and possibly benefit.
We installed CocoaPods as per the CocoaPods website.
We cd'ed to the platforms/IOS directory in our cordova project and did pod install
This is the point at which we had the error
ld: warning: directory not found for option '-L/Users/XXXXXX/Library/Developer/Xcode/DerivedData/Jambuster-cmfogaxzhfoatwfrmwanlvsmvfwd/Build/Products/Debug-iphoneos/UrbanAirship-iOS-SDK'
ld: library not found for -lUrbanAirship-iOS-SDK
clang: error: linker command failed with exit code 1 (use -v to see invocation)
We then started working through the suggestions you made:
We deleted the DataDerived folder and tried again. Same error.
We started the project up using xcworkspace and that resolved the problem. BINGO!
Our project now starts up, Urban Airship produces a massive amount of debugging information, which is fine at this stage.
We now have to work through all the differences between Urban Airship and our current notification provider and see how it differs.
Thanks for your help
Rob
@rwillett Cordova has support for cocaopods, so ideally you would not have to run pod install manually, instead running cordova build ios
should do that for you.
We will update the readme with a note that we use cocapods now and what differences that entails.
Thanks for the update.
After looking at our log trail it's entirely possible that all we needed to do was open the project workspace and the previous work was wholly redundant.
We may have to do a complete rebuild shortly so well have a look then.
Thanks again for the help.
Rob
The other thing you pointed out is the logging for the UA SDK is very verbose. The SDK supports different log levels, but the cordova plugin sets it to DEBUG for debug builds, and ERROR for release builds. If its an issue for you we can expose a way to set the log level in the plugin.
Yes, it is very verbose.
We have a working app, we have got the server API working and can send notifications to the app quite easily now.
We're still exploring how UA works in comparison to other notification providers though. We have been using a different provider for the last year and thats been working pretty well. Their model of notifications is quite different to yours, so we're trying to understand those differences and whether they are good, bad or we can ignore them.
At the moment we'd prefer to cut the logging down as we work through evaluating UA, so if there is an easy way that'd be great.
Rob
The plugin is setting the log levels directly, so its going to require a code change. We can have something out this week to address the issue.
Actually you can probably modify the UAirshipPlugin.m directly in the generated project. Remove these 2 lines and it will reduce the logs - https://github.com/urbanairship/phonegap-ua-push/blob/master/src/ios/UAirshipPlugin.m#L85 or you can set them to a higher level like INFO.
It looks like they are currently set to trace instead of the default values.
Ok, thanks we'll do that. We're finishing off some other code so will be a day or so before we get back to this.
Best wishes,
Rob
@rwillett We released 6.4.0 with configurable log levels. We are also no longer setting all log levels to trace, so by just updating to 6.4.0 logging should be significantly better.
Hi,
We're testing out our app to see if Urban Airship is the right solution for us. We seem to have stumbled at the first hurdle in that we can' t get our app to compile. Just to put some context, we have a production app thats been in the Apple App store for months so we have a working workflow using another notification provider
We followed the guide at
http://docs.urbanairship.com/platform/phonegap.html#getting-started
We then downloaded all the CocaPods stuff and got that working (or we think we have).
We then tried to compile and had this error message.
Looking through this repository we found issue #163 which seemed to match our problem. Based on this issue #163 we cd'ed to platforms/ios and did
which gave us this message
Unclear if there is a problem here or not :)
We then did
followed by trying to run this in Xcode where we get the same linker error message.
We're a little stuck as we've not had to do this with other plugin software. We also have never used CocaPods so we're having to learn that as well.
We have cleaned out the build folders, started and stopped Xcode (I'm embarrassed to admit that).
We're running
On Ionic 1 and urbanairship-cordova 6.3.0 "Urban Airship"
We can see the following from the root cordova folder
Apologies if there is a simple solution but we can't find it :(
Thanks
Rob