You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 8, 2017. It is now read-only.
Merrick Sapsford edited this page Jun 21, 2016
·
2 revisions
To use MSSTabbedPageViewController in an App Extension, the preprocessor macro MSS_APP_EXTENSIONS must be defined. This makes the navigation bar components unavailable as they require UIKit API's that aren't available to extensions.
To achieve this:
Using CocoaPods
Add the following post_install hook to the end of your Podfile:
post_installdo |installer|
# NOTE: If you are using a CocoaPods version prior to 0.38, replace `pods_project` with `project` on the below lineinstaller.pods_project.targets.eachdo |target|
iftarget.name.end_with?"MSSTabbedPageViewController"target.build_configurations.eachdo |build_configuration|
ifbuild_configuration.build_settings['APPLICATION_EXTENSION_API_ONLY'] == 'YES'build_configuration.build_settings['GCC_PREPROCESSOR_DEFINITIONS']=['$(inherited)','MSS_APP_EXTENSIONS=1']endendendendend
The above post_install hook will define the macro MSS_APP_EXTENSIONS=1 for every build configuration on all MSSTabbedPageViewController targets in the generated Pods project that are used by App Extensions.
Direct Xcode integration
In Xcode, click on your Project
Click on the Target for your App Extension
Click Build Settings
Find (or search) Preprocessor Macros
For all build configurations (Debug & Release) add the macro: MSS_APP_EXTENSIONS=1