-
Notifications
You must be signed in to change notification settings - Fork 7
Getting started
This is a guide to help developers get up to speed with TIBCO Jaspersoft Mobile SDK. It is geared primarily towards anyone who is new to Mac or iOS development, or has not worked extensively with 3rd-party libraries before.
The recommended approach for installing JaspersoftSDK for building application is via the CocoaPods package manager, as it provides flexible dependency management and dead simple installation. For best results, it is recommended that you install via the latest version of CocoaPods and Git >= 1.8.0.
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like JaspersoftSDK in your projects.
CocoaPods is distributed as a ruby gem, and is installed by running the following commands in Terminal.app:
$ sudo gem install cocoapods
$ pod setup
Depending on your Ruby installation, you may not have to run as
sudo
to install the cocoapods gem.
Project dependencies to be managed by CocoaPods are specified in a file called Podfile
. Create this file in the same directory as your Xcode project (.xcodeproj
) file:
$ touch Podfile
$ open -a Xcode Podfile
You just created the pod file and opened it using Xcode! Ready to add some content to the empty pod file?
Copy and paste the following lines into the window:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
pod 'JaspersoftSDK', :git => 'https://github.com/Jaspersoft/js-ios-sdk.git', :tag => '2.6', :subspecs => ['JSCore', 'JSSecurity', 'JSReportExtention', 'JSDashboardExtention']
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
if target.name == "Pods-JaspersoftSDK"
target.build_configurations.each do |config|
if config.build_settings['GCC_PREPROCESSOR_DEFINITIONS']
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] |= ['$(inherited)']
elsif
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
end
if config.name == 'Debug'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] |= ['__DEBUG__']
elsif config.name == 'Adhoc'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] |= ['__ADHOC__']
elsif config.name == 'Release'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] |= ['__RELEASE__']
end
end
end
end
end
Also, you can use follow subspecs: JSCore, JSSecurity, JSReportExtention and JSDashboardExtention. You should remove from subspecs list unneeded subspecs in the row:
pod 'JaspersoftSDK', :git => 'https://github.com/Jaspersoft/js-ios-sdk.git', :tag => '2.6', :subspecs => ['JSCore', 'JSSecurity', 'JSReportExtention', 'JSDashboardExtention']
You shouldn’t use TextEdit to edit the pod file because TextEdit likes to replace standard quotes with more graphically appealing quotes. This can cause CocoaPods to get confused and display errors, so it’s best to just use Xcode or another programming text editor.
Now you can install the dependencies in your project:
$ pod install
From now on, be sure to always open the generated Xcode workspace (.xcworkspace
) instead of the project file when building your project:
$ open <YourProjectName>.xcworkspace
At this point, everything's in place for you to start using JaspersoftSDK. Just #import
the headers for the classes you need and get to it!
If you run into any issues with a CocoaPods based installation out of the box the most likely cause is that project or target contains configuration that is overriding the settings provided via CocoaPods. CocoaPods works by adding a
.xcconfig
file that contains configuration aggregated from the Pods you have installed. If you augment these configuration settings within your target, you have to be sure to include the$(inherited)
value to pick up the values provided by CocoaPods.
Please be check the following settings for overridden configuration and add the
$(inherited)
if necessary:
- OTHER_LDFLAGS
- HEADER_SEARCH_PATHS
TIBCO JasperSoft