简体   繁体   中英

Integrating Fabric / Crashlytics when iOS and OS X apps are in the same project

The ongoing application has its iOS and OS X versions in the same project because of a lot of shared code. I tried to integrate the Fabric platform, in particularity the Crashlytics toolset, into both of them but as far as I see it is not possible through the standard installation wizard since binaries compiled for the different architectures (x86_64, arm) rewrite each other during the installation because of the same path.

I think it could be solved by placing the binaries to different paths and specifying them at the run phase. But I'm not sure whether it could be maintainable in the future especially considering the fact of automatic updates. Has anyone encountered such task?

Mike from Crashlytics and Fabric here.

You would want to do something similar to what we mention here for tvOS and iOS projects.

But here's what you need to do.

  1. Add Fabric and Crashlytics to your iOS target.
  2. Move the iOS Crashlytics.framework and Fabric.framework to a different location then the default provided.
  3. Update the Framework Search Paths in your iOS project's Build Settings.
  4. Update the /run path in your iOS Run Scipt Build Phase to point to the updated location.
  5. Build your iOS project to ensure the frameworks and /run script are detected.
  6. Switch to your tvOS target.
  7. Use Fabric.app to follow the standard installation steps for Crashlytics into your tvOS target.
  8. Follow steps 2-5 for your tvOS target and that should do the trick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM