Skip to content

Commit

Permalink
Fix #54: Issue while presenting SDK screen from parent App
Browse files Browse the repository at this point in the history
  • Loading branch information
Mumthasir mohammed authored and georgepadayatti committed Oct 5, 2023
1 parent 57ce471 commit 4e60245
Show file tree
Hide file tree
Showing 7 changed files with 154 additions and 16 deletions.
12 changes: 10 additions & 2 deletions PrivacyDashboardiOS/Classes/BBConsentPrivacyDashboardiOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@ public class BBConsentPrivacyDashboardiOS: UIViewController {
let data = apiKey.data(using: .utf8) ?? Data()
_ = BBConsentKeyChainUtils.save(key: "BBConsentToken", data: data)

let myBundle = Bundle(for: BBConsentOrganisationViewController.self)
let storyboard = UIStoryboard(name: "PrivacyDashboard", bundle: myBundle)
let frameworkBundle = Bundle(for: BBConsentOrganisationViewController.self)
let bundleURL = frameworkBundle.resourceURL?.appendingPathComponent("PrivacyDashboardiOS.bundle")
var storyboard = UIStoryboard()
if let resourceBundle = Bundle(url: bundleURL!) {
storyboard = UIStoryboard(name: "PrivacyDashboard", bundle: resourceBundle)
} else {
let myBundle = Bundle(for: BBConsentOrganisationViewController.self)
storyboard = UIStoryboard(name: "PrivacyDashboard", bundle: myBundle)
}

let orgVC = storyboard.instantiateViewController(withIdentifier: "BBConsentOrganisationViewController") as? BBConsentOrganisationViewController ?? BBConsentOrganisationViewController()
orgVC.organisationId = organisationId
let navVC = UINavigationController.init(rootViewController: orgVC)
Expand Down
12 changes: 10 additions & 2 deletions PrivacyDashboardiOS/Classes/Constatnts/Constant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ import UIKit

struct Constant {
static func getStoryboard(vc: AnyClass) -> UIStoryboard {
let myBundle = Bundle(for: vc.self)
let storyboard = UIStoryboard(name: "PrivacyDashboard", bundle: myBundle)
let frameworkBundle = Bundle(for: vc.self)
let bundleURL = frameworkBundle.resourceURL?.appendingPathComponent("PrivacyDashboardiOS.bundle")

var storyboard = UIStoryboard()
if let resourceBundle = Bundle(url: bundleURL!) {
storyboard = UIStoryboard(name: "PrivacyDashboard", bundle: resourceBundle)
} else {
let myBundle = Bundle(for: BBConsentOrganisationViewController.self)
storyboard = UIStoryboard(name: "PrivacyDashboard", bundle: myBundle)
}
return storyboard
}

Expand Down
10 changes: 2 additions & 8 deletions PrivacyDashboardiOS/Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

114 changes: 114 additions & 0 deletions PrivacyDashboardiOS/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'AFDateHelper' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for AFDateHelper

end

target 'Alamofire' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for Alamofire

end

target 'ExpandableLabel' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for ExpandableLabel

end

target 'IQKeyboardManagerSwift' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for IQKeyboardManagerSwift

end

target 'Kingfisher' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for Kingfisher

end

target 'MiniLayout' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for MiniLayout

end

target 'Pods-PrivacyDashboardiOS_Example' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for Pods-PrivacyDashboardiOS_Example

end

target 'Pods-PrivacyDashboardiOS_Tests' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for Pods-PrivacyDashboardiOS_Tests

end

target 'PrivacyDashboardiOS' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for PrivacyDashboardiOS

end

target 'SDStateTableView' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for SDStateTableView

end

target 'StepProgressView' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for StepProgressView

end

target 'SweeterSwift' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for SweeterSwift

end

target 'SwiftEntryKit' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for SwiftEntryKit

end

target 'SwiftyJSON' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for SwiftyJSON

end
3 changes: 3 additions & 0 deletions PrivacyDashboardiOS/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PODFILE CHECKSUM: 358153f61ad1abd3d69bcffbbb227ba1a4422c28

COCOAPODS: 1.13.0
9 changes: 5 additions & 4 deletions PrivacyDashboardiOS/PrivacyDashboardiOS.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'PrivacyDashboardiOS'
s.version = '0.1.5'
s.version = '0.1.10'
s.summary = 'A short description of PrivacyDashboardiOS.'

# This description is used to generate tags and improve search results.
Expand All @@ -30,11 +30,12 @@ TODO: Add long description of the pod here.

s.ios.deployment_target = '13.0'

s.source_files = 'PrivacyDashboardiOS/Classes/**/*', 'PrivacyDashboardiOS/Classes/*', 'PrivacyDashboardiOS/Resources/*'
s.resources = 'PrivacyDashboardiOS/**/*'
s.source_files = '**/Classes/**/*.{h,m,swift,storyboard}'
# s.source_files = 'PrivacyDashboardiOS/*' 'PrivacyDashboardiOS/Classes/**/*', 'PrivacyDashboardiOS/Classes/*', 'PrivacyDashboardiOS/Resources/*'
# s.resources = 'PrivacyDashboardiOS/**/*'

s.resource_bundles = {
'PrivacyDashboardiOS' => ['PrivacyDashboardiOS/PrivacyDashboard.storyboard','PrivacyDashboardiOS/PrivacyDashboard.xcassets']
'PrivacyDashboardiOS' => ['PrivacyDashboardiOS/Classes/PrivacyDashboard.storyboard','PrivacyDashboardiOS/Resources/PrivacyDashboard.xcassets']
}

# s.public_header_files = 'Pod/Classes/**/*.h'
Expand Down
10 changes: 10 additions & 0 deletions PrivacyDashboardiOS/_Pods.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4e60245

Please sign in to comment.