swift - Adding Framework and App Extension targets to IOS App project, am I doing it correctly? -


i'm studying ios/swift development , i'd build ios app in future have own today extension. i've read better put common logic (for example logic accesses internet resources, performs job on result etc) between app , extension custom framework.. since think i'll need change both framework , app code during development of app, i'd avoid building framework in separate project, use show in finder function locate framework bundle , drag-and-dropping within app project.. i'd know if correct way set workspace app, framework uses , today extension of app:

  1. create new project ios app target
  2. select project in project navigator , editor->add target... , specify cocoa touch framework
  3. editor->add target... , specify today extension
  4. add framework in linked frameworks , libraries

in way i've seen changes framework sources not need framework target recompilation, maybe because project knows need recompile framework sources if build & run ios app target uses framework? doing right? i've seen today extension created in such way not lists framework in build phases -> target dependencies while ios app does, both of them correctly use updated code of framework when update it.

then, i've noticed following warning when compile project, don't know if related way i've setup project:

ld: warning: linking against dylib not safe use in application extensions: /users/gianni/library/developer/xcode/deriveddata/testframeworkapp-dshihhfiuepeqzddbnpgnfwilhem/build/products/debug-iphonesimulator/testframework.framework/testframework 

btw normal entries within products folder red? due fact build ios simulator since don't have paid developer account allows me build ios device? prevent me build framework can exported other project since can't find framework bundle right clicking on framework product , selecting show in finder (and can't drag-and-drop project)?

i hope i've been clear enough , you'll point me in right direction understand suggested way of starting new project :)

it sounds me you're headed down exact path take.

regarding warning you're seeing... believe checking "allow app extension api only" shared framework supress , cause build failures when attempt use api not allowed in extensions.

enter image description here


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -