Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 397 Vote(s) - 3.44 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I use Twitter's Frameworks on iOS without installing Fabric.app?

#1
I'm working on an app which needs to integrate with Twitter in more detail than the built-in `Twitter.framework` allows for.

Twitter publishes their APIs using `Fabric.app` which has a very hard time with upgrading frameworks.

I would like to just include the Frameworks that `Fabric.app` is going to include in my project and skip all the setup hassle that they create with their "easy integration solution". What do?
Reply

#2
I dont think that it is possible at the moment, Since twitter bought crashlytics and crashlytics requires fabric we had the similar concerns and looks like TwitterKit also uses Fabric to start sessions.

According to here

[To see links please register here]


This call has to be made;

[[Twitter sharedInstance] startWithConsumerKey:@"your_key" consumerSecret:@"your_secret"];
[Fabric with:@[[Twitter class]]];

and you dont know what is going on in Fabric.m but header file requires Twitter to initialized

/**
* Fabric Base. Coordinates configuration and starts all provided kits.
*/
@interface Fabric : NSObject

/**
* Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use.
*
* For example, in Objective-C:
*
* `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];`
*
* Swift:
*
* `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])`
*
* Only the first call to this method is honored. Subsequent calls are no-ops.
*
* @param kitClasses An array of kit Class objects
*
* @return Returns the shared Fabric instance. In most cases this can be ignored.
*/
+ (instancetype)with:(NSArray *)kitClasses;

Reply

#3
Mike from Crashlytics and Fabric here.

If you want to install any part of Fabric, without Fabric.app, you can do so, via Cocoapods by heading to the web onboarding here: [

[To see links please register here]

][1]

Effectively, add the following to your podfile:

pod 'Fabric'
pod 'TwitterKit'

Then run `pod install`

Add the run script build phase with the API key and build secret that will be given when logged in at the above page.

"${PODS_ROOT}/Fabric/run" <API_KEY> <Build_secret>

Then add your API key and Twitter Consumer Key and Secret into your info.plist:



<key>Fabric</key>
<dict>
<key>APIKey</key>
<string>API_KEY</string>
<key>Kits</key>
<array>
<dict>
<key>KitInfo</key>
<dict>
<key>consumerKey</key>
<string>Consumer Key</string>
<key>consumerSecret</key>
<string>Consumer Secret</string>
</dict>
<key>KitName</key>
<string>Twitter</string>
</dict>
</array>
</dict>

Then initialize the kit, recommended in your app's delegate:

#import <Fabric/Fabric.h>
#import <TwitterKit/TwitterKit.h>

[Fabric with:@[[Twitter class]]];

[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through