How to get collection from Shopify SDK? - ios

I am Work With Shopify SDK. I Succesfully integrated it but the problem is when I have try to get collection from shopify then my app is crashed?
I have follow this tutorial which provided by shopify.
Code
// Shopify Initializtion
BUYClient *client;
client = [[BUYClient alloc] initWithShopDomain:SHOP_DOMAIN
apiKey:API_KEY
appId:APP_ID];
[client getCollectionsPage:1 completion:^(NSArray<BUYCollection *> * collections, NSUInteger page, BOOL reachedEnd, NSError *error)
{
// here get a collection
}];
Crash
Please help me to short out this.

Good news for you is I solved this earlier this week! You are probably using their static framework which has some issues presently (I think they will update their docs to reflect this).
Here was the answer I wrote on their GitHub issues board:
This stack-overflow answer ended up being the solution:
https://stackoverflow.com/a/29453132 I had to take the "Mobile Buy
SDK.xcdatamodel" from the Mobile Buy SDK project, and put it into my
project (plus make sure it is in compile sources!). After this, my
project works with the static framework.

Related

How to build app Twitter using Retrofit?

I need to help. I'm doing a project about Twitter, but I don't know how to build it by using Retrofit. I really need some documents or an available one to make a reference.
Thank you!!!
This is an example in a complete tutorial for retrofit, I suggest you read the whole tutorial before you start working on the Twitter example, good luck:
http://www.vogella.com/tutorials/Retrofit/article.html#exercise-using-retrofit-with-oauth-to-request-user-details-from-twitter-in-android

How to embed tweets in umbraco / articulate articles?

This video is showing how to embed tweets in umbraco 7. In the current version it does not seem to work anymore. When I try to do it I get the error message "not supported".
Is there anything additionally to do to get this working? Any additional packages?
I think that feature uses OEMBED, it's possible that Twitter have updated their API and the functionality is broken. I'd log an issue on the Umbraco Issue logger: http://issues.umbraco.org so that the core dev are aware of the issue and can investigate further.
Could also try this package https://our.umbraco.org/projects/website-utilities/utwit/ , have used it before and works perfect but haven't tried it on v7 yet but it says it work and i trust Matt (the guy that made it big umbraco dev and contributor) so should work.

Dropbox Core API for Swift:Cannot initialize DBSession?

I was following the link below in order to use the Dropbox Core API in my iOS application: https://www.dropbox.com/developers/core/start/ios
However, this is all written in Objective C. I have gotten it so that I have imported the DropboxSDK into my project but I can't seem to find the Swift equivalent code of beginning the authorization process. I have tried looking at all of the given functions in DBSession and DBSessionDelegate that look similar to those in the example tutorial above but I haven't had any luck. Any ideas how to do this? The following is the code in Objective C that I am trying to translate into Swift.
DBSession *dbSession = [[DBSession alloc]
initWithAppKey:#"INSERT_APP_KEY"
appSecret:#"INSERT_APP_SECRET"
root:INSERT_ACCESS_TYPE]; // either kDBRootAppFolder or kDBRootDropbox
[DBSession setSharedSession:dbSession];
Specifically, I can't seem to find any function to allow me to initialize my application key app secret, or root. If anyone could help me out, that'd be great! Thanks.
let session = DBSession(appKey:"...", appSecret:"...", root:...); works in my testing.
You may want to read https://www.dropbox.com/developers/blog/109/swift-apps-with-dropbox for the basics of using Dropbox SDKs in Swift. (That blog post doesn't deal specifically with the Core SDK, but the steps there still apply.)

Skmaps visual advice images

I am using skobbler in my iOS application to integrate the navigation functionality. Whereas while navigating I see in the demo of the sdk that one gets visual advice images for turns and other information. I want all these possible visual images. I need to know from where are these picked and how are these created? I could not find anything in skobbler how tos about this. Please provide some additional information regarding this.
After the route is calculated you can ask for all the advices. For each advice you will have a link to the corresponding visual image (with the visualAdviceFile property)
- (void)routingService:(SKRoutingService *)routingService didFinishRouteCalculationWithInfo:(SKRouteInformation*)routeInformation
{
NSLog(#"Route is calculated.");
NSArray* advices = [[SKRoutingService sharedInstance] routeAdviceListWithDistanceFormat:SKDistanceFormatMetric];
for (SKRouteAdvice *advice in advices)
{
NSLog(#"%#", advice.visualAdviceFile);
}
}
From the documentation http://developer.skobbler.com/getting-started/ios#sec15 and http://developer.skobbler.com/docs/ios/2.3.0/Classes/SKRouteAdvice.html#//api/name/visualAdviceFile

How to access Safari history from iPhone App using Private Frameworks

I got a situation something like, i can use Private Frameworks of Apple in order to know the operations being performed on iPhone Safari( i.e History the Tabs being browsed and time spend on browsing kind of info).
I have gone through some of the things like Dumping Private frameworks. But i don't know which Framework to Dump i guess WebKit may help.
Can some body please give the needful info to solve this problem.
i have imported the Dumped classes to Frameworks i.e WebHistory.h, WebHistoryItem.h, WebPreferences.h
Please let me know in case i miss anything
#import "WebHistory.h"
- (void)viewDidLoad {
[super viewDidLoad];
WebHistory *history=[WebHistory optionalSharedHistory];
NSLog(#"%#",history);
}
You can't access the Safari History. Apps are sandboxed.
If this is for an in-house app, then you might be able to jailbreak the phones and figure out a way around the sandboxing.
Update:
see this SO link: how-to-access-iphone-safari-history-in-an-app
We can find the history.plist in /var/mobile/Media/Safari/ and this we can read in jailbreaken iPhone.
I think you need a good web developer who will create the web page in such a way so that you can communicate with javascript and get the message you want to get. And for dumping the framework I think you should get with uikit+ webkit framework.
I hacked my framework by using this link - http://aralbalkan.com/2106 I hope this will help to you .

Resources