• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Looking at moving part of our iOS app become an iOS framework to be used in other apps.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking at moving part of our iOS app become an iOS framework to be used in other apps.


  • Subject: Re: Looking at moving part of our iOS app become an iOS framework to be used in other apps.
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 15 Jan 2016 13:56:41 -0800

> On Jan 15, 2016, at 1:31 PM, Alex Zavatone <email@hidden> wrote:
>
> However, a good amount of app startup and config is triggered in the appDelegate, same as push notification, opening the app via URLs and other appDelegate related tasks would conflict with the appDelegate of the app using the framework.

I think what you’re asking is how the framework can hook into the same calls that the app delegate receives, even though it can’t provide an app delegate of its own?

Many of the UIApplicationDelegate methods are also posted as equivalent NSNotifications. For example, there’s an UIApplicationDidFinishLaunchingNotification that’s posted at the same time as -application:didFinishLaunchingWithOptions:. (Well, it’s going to be either just before or just after, but you shouldn’t rely on any particular ordering.) It’s easy to have your framework observe those notifications once it’s initialized.

Some of them don’t have notifications because they need to return a response or because it wouldn’t make sense to have more than one handler; for example -application:openURL:options:. Here the only thing you can do (AFAIK) is to define an equivalent method in your framework’s API, and have the actual app delegate call that method in addition to whatever else it would normally do.

> Is there a set of standard operating practices that are available online to review for this type of app restructuring?

Not that I know of.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Looking at moving part of our iOS app become an iOS framework to be used in other apps.
      • From: Alex Zavatone <email@hidden>
References: 
 >Looking at moving part of our iOS app become an iOS framework to be used in other apps. (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: Looking at moving part of our iOS app become an iOS framework to be used in other apps.
  • Next by Date: Re: drawRect: wrong scale in a programmatically created window
  • Previous by thread: Re: Looking at moving part of our iOS app become an iOS framework to be used in other apps.
  • Next by thread: Re: Looking at moving part of our iOS app become an iOS framework to be used in other apps.
  • Index(es):
    • Date
    • Thread