2

I use latest version of Xcode (8.2.1 b8C1002) and latest version of GoogleCast.framework (3.3.0)

Obviously i followed these steps to integrate the SDK

When i try to upload my archived application i found these issues

enter image description here

someone had this trouble and found a solution?

Thanks in advance

Martino Bonfiglioli
  • 1,567
  • 1
  • 15
  • 29

2 Answers2

5

iOS Sender v3.3 added a shell script strip_unused_archs.sh to the SDK package that strips unused architectures from an app bundle. This enables submitting to the App Store. For example, this script removes simulator slices, which are included in the framework but are not allowed in the App Store.

Leon Nicholls
  • 4,623
  • 2
  • 16
  • 17
  • Thank you so much! Just to be clear, I have to add new "Run Script Phase" under "Project Settings -> Build Phases" ? – Martino Bonfiglioli Jan 11 '17 at 09:29
  • Where I am supposed to add execution of the script `strip_unused_archs.sh`? Is it really necessary? I successfully uploaded the app with Google Cast SDK 3.3.0 _without_ adding a run script phase for this script. – Lars Blumberg Jan 27 '17 at 13:25
  • PS: The documentation could be clearer about this, where the execution of this script should be added. Xcode has different settings where post script execution is possible: "Scheme Management" with "Post Actions" and also project settings with "Run Script" actions in "Build Phases". – Lars Blumberg Jan 27 '17 at 13:33
  • 1
    So where do you use this script? I tried it as a normal run script in build phases and as a post-build script in my scheme, but I got the still got the ERROR ITMS.. – fruitcoder Mar 10 '17 at 16:25
  • Please guide, where & how to add this script! Tried adding in build phase/runscript but facing errors – Fayza Nawaz Jan 26 '18 at 10:20
  • How big should the built framework be? I installed with Cocoapods, and it's around 650MB https://stackoverflow.com/questions/53465950/why-is-chromecast-sdk-for-ios-with-so-big-when-installed-with-cocoapods – gohnjanotis Nov 25 '18 at 09:00
5

Add strip_unused_archs.sh In Project -> Build Phases -> New Run Script Phase

Build Phases

strip_unused_archs.sh will scan entire your project's framework path to create new frameworks that are only built for your current target. If you build for simulator, you will only get x86_64 slice. If you build for real devices or "Generic iOS devices," you get arm64. If your app support older devices, other older archs (e.q. armv7) remain.

Note that not only does GoogleCast framework get stripped, all frameworks under Framework Search Path do.

Benson
  • 129
  • 1
  • 7
  • Thanks @Benson, the script somehow conflicts with the Carthage copy-frameworks script :/ – fruitcoder Mar 30 '17 at 16:54
  • @fruitcoder The order in Build Phases matters. I run `strip_unused_archs.sh` after `carthage copy-framework`, and there is no problem to submit to appStore. – Benson Apr 20 '17 at 23:05
  • This just doens't work for me.. The script is executed but I get the same errors – fruitcoder May 09 '17 at 15:59
  • 1
    @ fruitcoder Could you please move this script to Scheme -> Build -> Post-actions? It should be the last step on all builds complete. – Benson Dec 06 '17 at 19:37