{"id":48,"date":"2016-09-23T16:21:49","date_gmt":"2016-09-23T06:21:49","guid":{"rendered":"http:\/\/www.codenkeg.com\/blog\/?p=48"},"modified":"2016-11-19T15:06:28","modified_gmt":"2016-11-19T05:06:28","slug":"submitting-apps-to-the-app-store-with-dynamic-libraries","status":"publish","type":"post","link":"https:\/\/www.codenkeg.com\/blog\/2016\/09\/23\/submitting-apps-to-the-app-store-with-dynamic-libraries\/","title":{"rendered":"Submitting apps to the App Store with Dynamic Libraries"},"content":{"rendered":"<p>I was trying to submit a proof of concept app to the app store for TestFlight distribution. Submission failed.<br \/>\nLooked up Mapbox to see if there was a new version. No.<br \/>\nLooked up Mapbox to see if I was missing something in their instructions. No<br \/>\nA quick google search, lead me to a stack overflow post, which linked to another, which linked to this: <a href=\"http:\/\/ikennd.ac\/blog\/2015\/02\/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode\/\" target=\"_blank\">Stripping Unwanted Architectures From Dynamic Libraries In Xcode<\/a><br \/>\nCopy, paste,<\/p>\n<pre class=\"lang:sh\" title=\"\">APP_PATH=\"${TARGET_BUILD_DIR}\/${WRAPPER_NAME}\"\r\n\r\n# This script loops through the frameworks embedded in the application and\r\n# removes unused architectures.\r\nfind \"$APP_PATH\" -name '*.framework' -type d | while read -r FRAMEWORK\r\ndo\r\n    FRAMEWORK_EXECUTABLE_NAME=$(defaults read \"$FRAMEWORK\/Info.plist\" CFBundleExecutable)\r\n    FRAMEWORK_EXECUTABLE_PATH=\"$FRAMEWORK\/$FRAMEWORK_EXECUTABLE_NAME\"\r\n    echo \"Executable is $FRAMEWORK_EXECUTABLE_PATH\"\r\n\r\n    EXTRACTED_ARCHS=()\r\n\r\n    for ARCH in $ARCHS\r\n    do\r\n        echo \"Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME\"\r\n        lipo -extract \"$ARCH\" \"$FRAMEWORK_EXECUTABLE_PATH\" -o \"$FRAMEWORK_EXECUTABLE_PATH-$ARCH\"\r\n        EXTRACTED_ARCHS+=(\"$FRAMEWORK_EXECUTABLE_PATH-$ARCH\")\r\n    done\r\n\r\n    echo \"Merging extracted architectures: ${ARCHS}\"\r\n    lipo -o \"$FRAMEWORK_EXECUTABLE_PATH-merged\" -create \"${EXTRACTED_ARCHS[@]}\"\r\n    rm \"${EXTRACTED_ARCHS[@]}\"\r\n\r\n    echo \"Replacing original executable with thinned version\"\r\n    rm \"$FRAMEWORK_EXECUTABLE_PATH\"\r\n    mv \"$FRAMEWORK_EXECUTABLE_PATH-merged\" \"$FRAMEWORK_EXECUTABLE_PATH\"\r\n\r\ndone\r\n<\/pre>\n<p>(might need to follow step 0 from <a href=\"http:\/\/www.codenkeg.com\/blog\/2016\/09\/22\/xcode-run-scrip-to-auto-increment-build-number\/\">here<\/a>)<br \/>\nArchive, submit.<br \/>\n<a href=\"http:\/\/www.codenkeg.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-23-at-16.05.09.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-50\" src=\"http:\/\/www.codenkeg.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-23-at-16.05.09-300x175.png\" alt=\"Upload Successful\" width=\"300\" height=\"175\" srcset=\"https:\/\/www.codenkeg.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-23-at-16.05.09-300x175.png 300w, https:\/\/www.codenkeg.com\/blog\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-23-at-16.05.09.png 319w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was trying to submit a proof of concept app to the app store for TestFlight distribution. Submission failed. Looked up Mapbox to see if there was a new version. No. Looked up Mapbox to see if I was missing something in their instructions. No A quick google search, lead me to a stack overflow &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.codenkeg.com\/blog\/2016\/09\/23\/submitting-apps-to-the-app-store-with-dynamic-libraries\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Submitting apps to the App Store with Dynamic Libraries&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[12,13,9],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7VdP6-M","_links":{"self":[{"href":"https:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/posts\/48"}],"collection":[{"href":"https:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/comments?post=48"}],"version-history":[{"count":3,"href":"https:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/posts\/48\/revisions"}],"predecessor-version":[{"id":103,"href":"https:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/posts\/48\/revisions\/103"}],"wp:attachment":[{"href":"https:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/media?parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/categories?post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codenkeg.com\/blog\/wp-json\/wp\/v2\/tags?post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}