Some proof of framework integration in the sample share extension

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent e9796600c6
commit 2c4cf96515

@ -12,8 +12,8 @@ def shared_pods
#pod 'HKDFKit', path: '../HKDFKit'
pod 'Curve25519Kit', git: 'https://github.com/WhisperSystems/Curve25519Kit', branch: 'mkirk/framework-friendly'
#pod 'Curve25519Kit', path: '../Curve25519Kit'
# FIXME SHARINGEXTENSION use up-to-date framework compatible OpenSSL
#pod 'OpenSSL', git: 'https://github.com/WhisperSystems/OpenSSL-Pod', inhibit_warnings: true
# TODO switch OpenSSL lib
pod 'GRKOpenSSLFramework'
# third party pods

@ -123,6 +123,8 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
// This block will be cleared in databaseViewRegistrationComplete.
[DeviceSleepManager.sharedInstance addBlockWithBlockObject:self];
// TODO this code is just to prove that the embedded framework is accessible from
// the main app.
DDLogVerbose(@"%@ shared path: %@", self.logTag, [[StorageCoordinator shared] path]);
[self setupEnvironment];

@ -4,6 +4,11 @@
import Foundation
/**
* This class doesn't actually do anything (yet?).
* It's just an example class to prove the embedded framework is correctly
* integrated with Signal-iOS and the Sharing Extension.
*/
@objc
public class StorageCoordinator: NSObject {

@ -38,7 +38,7 @@ An Objective-C library for communicating with the Signal messaging service.
s.dependency 'YapDatabase/SQLCipher', '~> 2.9.3'
s.dependency 'SocketRocket'
s.dependency 'libPhoneNumber-iOS'
# TODO use framework compatible OpenSSL
# FIXME SHARINGEXTENSION use up-to-date framework compatible OpenSSL
#s.dependency 'OpenSSL'
s.dependency 'GRKOpenSSLFramework'
s.dependency 'SAMKeychain'

@ -7,16 +7,31 @@ import Social
import SignalMessaging
import PureLayout
import SignalServiceKit
class ShareViewController: SLComposeServiceViewController {
override func viewDidLoad() {
super.viewDidLoad()
// None of the following code is intended to be used, it only serves to prove
// the project has been configured correctly
// Proof of cocoapods, utilizes PureLayout
let someView = UIView()
someView.backgroundColor = UIColor.green
view.addSubview(someView)
someView.autoPinEdgesToSuperviewEdges()
self.placeholder = StorageCoordinator.shared.path
someView.alpha = 0.2
let proofOfSharedFramework = StorageCoordinator.shared.path
let proofOfSSK = textSecureServerURL
// TODO: Shared Storage via app container
//let proofOfSharedStorage = TSAccountManager.localNumber()
let proofOfSharedStorage = "TODO"
self.placeholder = "shared framework: \(proofOfSharedFramework) \n sharedStorage: \(proofOfSharedStorage) \n proof of ssk: \(proofOfSSK)"
}
override func isContentValid() -> Bool {

Loading…
Cancel
Save