ios


How to import AppDelegate.h from another Framework in Xcode


I have a framework called "MyFramework.xcodeproj" that is added to my main project. Within this framework, I'm working on a file that needs a reference to my AppDelegate.h file. It isn't able to locate it, and when I try to add the file from "Build Phases" in "Compile Sources" it isn't able to find it there either. How can I get the reference to this file?
Your framework should ideally be separate from any application delegate logic. However, if you do need access to it, you can simply cast the shared application delegate to AppDelegate.
(AppDelegate *)[[UIApplication sharedApplication] delegate];
Just copy AppDelegate's #interface and put it somewhere visible in your framework. AppDelegate.m does not need to be there.

Related Links

Crashlytics forceCrash not working
Swift 3: Ambiguous reference to member 'subscript' while using UberRides SDK
IOS Background Gradients - Storyboard
RxSwift not working with UIButton
Open URL within app in cocos2D version3
Using autolayout self-sizing cell in groupTableView,after reloadData,if I scroll upward,tableview will jump
Problems With Error Casting In Swift
Displaying fetched data in different section than store
iOS Location Update
iOS Obj-C custom number text field
Why I can only fetch one object from an array Core Data Swift 3 [duplicate]
Swift 3 Eureka Forms change button row font color
GCDAsyncSocket with Client Authentication
UIImage resizing via an extension
How can one download the data in cloudkit?
Tap Gesture on tableViewCell Swift

Categories

HOME
codeigniter
office-js
auth0
appium-ios
outlook
localforage
twitter-digits
jqgrid
visual-studio-2012
box
format
ionic3
angular-mdl
android-bluetooth
base
zipfile
google-cloud-sdk
html5-video
libssh
swig
nxbre
nintex-workflow
accelerated-mobile-page
polynomials
nice-language
easendmail
slf4j
smallbasic
vnc
desktop-app-converter
ucwa
google-geocoder
codeceptjs
kubernetes-go-client
seh
groove
chai
stackexchange.exceptional
delete-row
decompiler
joe-editor
clientscript
database-cleaner
webloadui
iseries-navigator
flattr
git-config
mit-scheme
jsbin
balana
illegalstateexception
dual-table
samsung-gear
uikeyboard
pyenchant
wt
protected
voting
stringr
xerces
janino
puppet-enterprise
simpleadapter
laravel-validation
gdk
linguistics
master-theorem
nine-patch
preon
location-client
prudentia
gdb-python
loadlibrary
arbtt
virtual-earth
hogan.js
haar-wavelet
guvnor
harvest
ad-hoc-distribution
livevalidation
jetspeed2
duplicate-data
sdl.net
etrade-api
n900
webshop
68hc11
large-teams

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App