Trouble with linker error after installation

I am attempting to transition to backendless from parse and have run through the installation steps outlined here:
https://backendless.com/documentation/messaging/ios/messaging_requirements.htm

The pod doesn’t seem to be in working order so I chose to install the iOS SDK manually. I went through all of the steps and my app continued to run without issues after adding '#import “Backendless.h” but when I added:
[backendless initApp:APP_ID secret:SECRET_KEY version:VERSION_NUM];

to didFinishLaunchingWithOptions:
I encountered the following linker error:

Undefined symbols for architecture armv7:
OBJC_CLASS$_Backendless”, referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I feel as though I’ve set up all the search paths correctly and was just wondering if someone could give me any support or direction on where I might have gone wrong. I can provide additional info as requested.

Thanks.

Hi Brandon,

Could you please check if you performed step 9 from this guide?:
https://backendless.com/mobile-developers/quick-start-guide-for-ios/

Regards,
Mark

Yes, here is a screenshot of my Library Search Paths. I have yet to remove any of the working Parse logic from my code. Is there any chance this could be contributing to the problem? I don’t think it should relate but I’m just trying to cover all of the bases. I compiled your sample projects and those have been working for me so I’ve been looking for differences in the Build Settings there as well.

I’ve noticed that your sample project includes ‘backendless.a’ in Link Binary with Libraries. This is not the case in my project and doesn’t seem to be an option. Does this give you any clues as to what the problem may be?

Hi Brandon,

I just created the project using CocoaPods - and it is built and works fine for me.
I used the simplest podfile:
pod ‘Backendless-ios-SDK’

You can try this project (it makes user login):
https://drive.google.com/file/d/0B3yyaWhA4ib0ZkUwclFVblhyNGc/view?usp=sharing

Regards,
Slava

I’ve removed the Parse logic and am going to try installing Backendless using the Pod again. I’ll let you know how it goes.

I was able to add [backendless initApp:APP_ID secret:SECRET_KEY version:VERSION_NUM]; without any errors this time. I still need to go through the process of turning on Push Notifications and such since the branch I am on now doesn’t include any of those features. Everything seems to be working for now though. Thanks for the prompt responses. Not sure what was causing the error but it doesn’t seem to be occuring anymore.

Why not?
If the dependences of your project were previously created using CocoaPods, you can add Backendless libs manually to your project as https://backendless.com/mobile-developers/quick-start-guide-for-ios/ guide describes - I did it successfully.

You can use this demo as example of Push Notifications with Backendless:

Thanks for the sample. I noticed that you use [backendless.messaging …] throughout your example but the documentation talks about using [backendless.messagingService …] which seems to have a much more complex setup for things like registering the device (https://backendless.com/documentation/messaging/ios/messaging_device_registration.htm) and no mention of [backendless messaging …] is made. Would you be able to explain the difference beween backendless.messaging and backendless.messagingService?

Thank you.

Hopefully someone is still following this thread.

See this demo sample: https://github.com/Backendless/iOS-Samples/tree/master/samples/objective-c/backendlessDemos/PushNotify

And also you should make this: https://backendless.com/documentation/messaging/ios/messaging_push_notification_setup_ios.htm

backendless.messaging is a shortcut for backendless.messagingService (they are equal), so you can use that what you like

@interface Backendless : NSObject
// context
@property (strong, nonatomic, getter = getHostUrl, setter = setHostUrl:) NSString *hostURL;
@property (strong, nonatomic, getter = getAppId, setter = setAppId:) NSString *appID;
@property (strong, nonatomic, getter = getSecretKey, setter = setSecretKey:) NSString *secretKey;
@property (strong, nonatomic, getter = getVersionNum, setter = setVersionNum:) NSString *versionNum;
@property (strong, nonatomic, getter = getApiVersion, setter = setApiVersion:) NSString *apiVersion;
// options
@property (strong, nonatomic) NSMutableDictionary *headers;
@property (strong, nonatomic, readonly) NSDictionary *appConf;
// services
@property (strong, nonatomic, readonly) UserService *userService;
@property (strong, nonatomic, readonly) PersistenceService *persistenceService;
@property (strong, nonatomic, readonly) GeoService *geoService;
@property (strong, nonatomic, readonly) MessagingService *messagingService;
@property (strong, nonatomic, readonly) FileService *fileService;
@property (strong, nonatomic, readwrite) MediaService *mediaService;
@property (strong, nonatomic, readonly) CustomService *customService;
@property (strong, nonatomic, readonly) Events *events;
@property (strong, nonatomic, readonly) CacheService *cache;
@property (strong, nonatomic, readonly) AtomicCounters *counters;
@property (strong, nonatomic, readonly) Logging *logging;
// service shortcuts
@property (assign, nonatomic, readonly) PersistenceService *data;
@property (assign, nonatomic, readonly) GeoService *geo;
@property (assign, nonatomic, readonly) MessagingService *messaging;
@property (assign, nonatomic, readonly) FileService *file;

Ok, I’ve done everything in the samples. My device is registered for remote notifications and my certificate is uploaded. Is there any way to confirm that the certificate I have uploaded is actually working properly? I tested it by giving it an invalid password and it doesn’t seem to care one way or the other which I find concerning. When sending a push notification from the backendless console, I follow the instructions and check the one device that I have registered and then publish the message to the selected device but nothing happens. I have break points active in “didReceiveRemoteNotification” but the breakpoints are never hit. How can I go about debugging a notification that is sent but never arives? I’ve already confirmed that the device registered matches the device I’m using and push notifications are fully enabled. I am also using the same distribution certificate (.p12) that I was using for for Parse so I know that it has worked in the past. I’m running out of ideas.

I just decided to log back on to Parse and attempt to send a Push from there since my device is still in the Installation table. Even though I don’t have any Parse code or even the pod installed on the app anymore, the Parse console is still able to successfully deliver a push which triggers the break point I have set in “didReceiveRemoteNotification.” I feel like this narrows down the list of possible issues because it shows that my device is configured properly to receive remote notifications. So, it must have something to do with the way I have set up the permissions or certificate on the Backendless console. Do you have any thoughts on how I might further narrow down the source of the problem? For instance, does your system support Distribution certificates with empty passwords?

Hi Brandon,

Do you specify any values for the headers when you publish a message from Backendless console?

Regards,
Mark

No, I figured those were optional for adding sounds and badges and what not. Was that assumption wrong? Thank you for the continued help. Successfully sending these notifications has been the only thing holding me up.

The assumption is not correct. Sorry, it is not clear from the docs. You need to specify the headers so we can “package” a notification appropriately for the client side.

So, what would an example of a good default header be if I don’t want any badge or sound added. Ultimately I don’t even want the push notification to be displayed on the device since this is a “silent notification” used for signaling certain actions on the device behind the scenes.

If it is just text, then send only “ios-alert”:value

Support for silent notifications is coming up in one of the immediate service updates.

Regards,
Mark