TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Custom |
ReleasedLast Release | Jun 2016 |
Maintained by Siddhant Goyal.
Walmart SDK is designed to let you drive sales right in your app or on your website. SDK components like BuyNow button can be placed next to a product offering on the website or in a mobile application and it can be configured to directly add the product to the cart on Walmart.com. With the Buy Now button, you can remove friction in purchase by reducing the number of steps required for a consumer to purchase an item from walmart.com and hence see an increased conversion rate.
CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects.You can install it with the following command:
$ gem install cocoapods
CocoaPods 1.0.0+ is required to build WalmartSDKKit 1.0.0.
To integrate WalmartSDKKit into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'MyApp' do
pod 'WalmartSDKKit', '~> 1.0.0'
end
If you are using Swift, be sure to add use_frameworks! and set your target to iOS 8+:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'WalmartSDKKit', '~> 1.0.0'
end
Then, run the following command:
$ pod install
You will need a publisher Id to use the SDK. This is either provided by Walmart or if you are a Rakuten
publisher, then Rakuten publisher Id can be used. You can SignUp here Now configure the .plist
for your project:
.plist
file and choose Open As Source Code
.Copy & Paste the XML snippet into the body of your file (<dict>...</dict>
).
<key>WalmartPublisherId</key>
<string>{your-publisher-id}</string>
Replace:
{your-publisher-id}
with your publisher Id
If you compile your app with iOS SDK 9.0
, you will be affected by App Transport Security.
Currently, you will need to whitelist Walmart domains in your app by adding the following to your application's plist
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>walmart.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionMinimumTLSVersion</key>
<string>TLSv1.0</string>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
</dict>
</dict>
In order to our SDK Demo app, use
$ pod try WalmartSDKKit
Read more here about how to initialize the SDK and use components like BuyNowButton
.
If you are receive an error when compiling about "Include of non-modular header inside framework module". you can resolve it by :
Set your project target's CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES
flag to YES
. This configuration setting can also be found under your target's Build Settings > Allow Non-modular Includes in Framework Modules within Xcode.
Here's more information from Apple's Developer Forums regarding the issue: https://forums.developer.apple.com/message/78028
The compiler will run into issues if the same header file is accessible both through Header Search Paths (
-I
,-isystem
) and Framework Search Paths (-F
,-iframework
), even if there are symbolic links involved. In these cases, you should prefer using Framework Search Paths. (Note that this invalid configuration may be generated by external systems, such as CocoaPods.)
@WalmartLabs
See the LICENSE file for more info.