amirrajan / rubymotion-applied

RubyMotion documentation provided by the community. Submit a pull request to the docs for a free one year indie subscription.
Apache License 2.0
49 stars 10 forks source link

Realm and CFBundleExecutable #30

Open amirrajan opened 6 years ago

amirrajan commented 6 years ago

http://community.rubymotion.com/t/submission-to-app-store-fails-error-itms-90171-invalid-bundle-structure/2199/3

My app builds fine, but when I submit it to the app store, the application loader fails with:

ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'MYAPP.app/Intercom.framework/Versions/A/Intercom' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."

I need to add strip-frameworks.sh to the build process, per intercom's docs, but I don't know how to do this in rubymotion. help?

from https://github.com/intercom/intercom-ios :

Manual Installation

  1. Download Intercom for iOS and extract the zip.
  2. Go to your Xcode project's "General" settings. Drag Intercom.framework to the "Embedded Binaries" section. Make sure "Copy items if needed" is selected and click Finish.
  3. Create a new "Run Script Phase" in your app’s target’s "Build Phases" and paste the following snippet in the script text field:

    bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Intercom.framework/strip-frameworks.sh"

    This step is required to work around an App Store submission bug when archiving universal binaries.

spnkr commented 6 years ago

I fixed it! But this is a hack:

I pasted the source of strip-frameworks.sh into the top of /Users/me/MYSPECIALAPP//vendor/Pods/Target\ Support\ Files/Pods-RubyMotion/Pods-RubyMotion-resources.sh, and then did rake archive:distribution

Aside: How/where is the Pods-RubyMotion-resources.sh file generated?

amirrajan commented 6 years ago

Aside: How/where is the Pods-RubyMotion-resources.sh file generated?

https://github.com/HipByte/motion-cocoapods/blob/master/lib/motion/project/cocoapods.rb#L502

I fixed it! But this is a hack:

Hey hey. Hacks are the first steps to a solid solution :-D

amirrajan commented 6 years ago

https://github.com/MarkVillacampa/rubymotion-realm