Can you please add guide for initial setup for OS X backendless project?
I’m having trouble to setup it because current iOS guide has many iOS only specific library.
Can you please add guide for initial setup for OS X backendless project?
I’m having trouble to setup it because current iOS guide has many iOS only specific library.
Sure, we can do that. I’ll open an internal ticket.
Great, thanks for the fast reply. Will also be great if you can add code generation for OS X too.
For Mac OS Cocoa projects with Backendless you should add to your project target the following frameworks and libs:
http://support.backendless.com/public/attachments/d753fdfe981a0c5af34acda61860f75f.png</img>
You can clone the Backendless Demo Samples - GitHub - Backendless/iOS-Samples: Contains sample projects demonstrating the usage of various Backendless 3.X API and functionality - and investigate the mac targets of project
Vyacheslav, I’ve already done that. The problem is when I only import that files, I need to add
#import “Backendless.h”
But if add Backendless.h to the project, it also import iOS specific classes which will make the build fail
// CommLibiOS
#import “DEBUG.h”
#import “Types.h”
#import “Responder.h”
#import “AMFSerializer.h”
You have to add the Backendless libs (“lib” dir from iOS SDK) to your project - using “File” → “Add Files to…” menu item:
http://support.backendless.com/public/attachments/26fc768589d8beaec490b5d6c6ee927c.png</img>
http://support.backendless.com/public/attachments/ebb2d3df952187e5d47b4a693bad6dc5.png</img>
Make sure all targets must be unselected. In result - lib dir with *.a and *.h files will be added in group “lib” of your project, and you can use them in all targets of the project.
Yes I’ve tried that, but still get errors.
Also if I the lib folder, it means that I will add all libraries in the folder including for iOS which is different from screenshot you gave me earlier that only has 6 libraries for Mac.
See above - “Make sure all targets must be unselected” when you add the “lib” dir.
If you wouldn’t like the iOS libs are in your project you can remove them from “lib” group of your project. Or you can remove all unused SDK libs from “lib” dir BEFORE you will add the libs to your project.
Ok, I’ll try it, thanks. Although it will be good if backendless team make it easier and make separate guide for iOS and OS X.
Another way is instead adding “lib” dir to your project you can set the target “Build Settings” → “Search Paths” → “Header Search Paths” with paths to /include dirs of backendless and CommLibiOS package.
For example, if you put SDK “lib” dir above your project dir:
http://support.backendless.com/public/attachments/805cdc0724fd6a79a6723dbc702d392c.png</img>
you can set this options with following:
http://support.backendless.com/public/attachments/ddae45661e384ac976e470f31181431d.png</img>
or you can simply set this line with:
$(inherited) /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include $(PROJECT_DIR)/…/lib/CommLibiOS/include $(PROJECT_DIR)/…/lib/backendless/include
Enjoy!
Backendless SDK OSX libs have been set in “osx” directory in ios-SDK package - see https://github.com/Backendless/ios-SDK
Backendless Mac OSX application setup
This post describes how to setup an OSX application with Backendless SDK libraries and server application options.
Getting Backendless SDK
http://support.backendless.com/public/attachments/d5483b373d499fc2176899413bb13d3b.png</img>
Add the Libraries and Frameworks to the project
http://support.backendless.com/public/attachments/3e70d9be7a626283028ba1b5a571e1ac.png</img>
http://support.backendless.com/public/attachments/7753c8e519b280cac7401e9459f9b875.png</img>
http://support.backendless.com/public/attachments/b795d9ce41bafdabe5302e7f57ce26b0.png</img>
Add Backendless Application Id & Secret Key
http://support.backendless.com/public/attachments/c039dd21bd5efbfd642fb601ce378706.png</img>
static NSString *APP_ID = @"YOUR-APP-ID-GOES-HERE";
static NSString *SECRET_KEY = @"YOUR-IOS-SECRET-KEY-GOES-HERE";
static NSString *VERSION_NUM = @"v1";
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[backendless initApp:APP_ID secret:SECRET_KEY version:VERSION_NUM];
return YES;
}
Enjoj!