Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

[IOS] Invalid Bundle Error #18

Closed
ghost opened this issue Sep 5, 2018 · 114 comments
Closed

[IOS] Invalid Bundle Error #18

ghost opened this issue Sep 5, 2018 · 114 comments
Assignees
Labels
bug Something isn't working fixed

Comments

@ghost
Copy link

ghost commented Sep 5, 2018

Hey,
On trying to upload the app build with a library using this mobile-ffmpeg I am getting the following errors -

ERROR ITMS-90208: "Invalid Bundle. The bundle Application.app/Frameworks/libavcodec.framework does not support the minimum OS Version specified in the Info.plist."
An unknown error occurred.

ERROR ITMS-90208: "Invalid Bundle. The bundle Application.app/Frameworks/libavdevice.framework does not support the minimum OS Version specified in the Info.plist."
An unknown error occurred.

ERROR ITMS-90208: "Invalid Bundle. The bundle Application.app/Frameworks/libavfilter.framework does not support the minimum OS Version specified in the Info.plist."
An unknown error occurred.

Likewise with all the other frameworks inside this mobile-ffmpeg.
I have MinimumOSVersion is the plist of all these frameworks set to 8.0.
Please help. Kind of urgent.

Thanks.

@tanersener
Copy link
Owner

Hi, which version you're using v2.0?

@tanersener
Copy link
Owner

Info.plist included in frameworks does not define a Minimum OS Version parameter, it shouldn't cause any conflicts. You can see all parameters below.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>CFBundleDevelopmentRegion</key>
        <string>en</string>
        <key>CFBundleExecutable</key>
        <string>libavfilter</string>
        <key>CFBundleIdentifier</key>
        <string>com.arthenica.mobileffmpeg.FFmpeglibavfilter</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>
        <string>libavfilter</string>
        <key>CFBundlePackageType</key>
        <string>FMWK</string>
        <key>CFBundleShortVersionString</key>
        <string>7.16.100</string>
        <key>CFBundleVersion</key>
        <string>7.16.100</string>
        <key>NSPrincipalClass</key>
        <string></string>
</dict>
</plist>

@ghost
Copy link
Author

ghost commented Sep 5, 2018

Initially, I was using 2.0. It didn't work out quite right so switched back to 1.2.
So initially it was giving me the following error -

ERROR ITMS-90360: "Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle Application.app/Frameworks/libavcodec.framework is required." An unknown error occurred.

So to fix that I added "MinimumOSVersion" in all the frameworks and then it started to give me the other error that I mentioned in my problem.

Do you think I am doing something wrong while adding it to my framework or some configuration?

@tanersener
Copy link
Owner

tanersener commented Sep 5, 2018

On trying to upload the app build with a library ...

Hmm, MinimumOSVersion never caused me a problem, on which step do you receive this error, while uploading to AppStore?

@ghost
Copy link
Author

ghost commented Sep 5, 2018

Yes. Working fine otherwise in the simulator, on a real device, in tests. Just when uploading to the AppStore.

@ghost
Copy link
Author

ghost commented Sep 5, 2018

So to re-reiterate the process -

  1. Add to the podfile and do a pod install.
  2. Add #import <mobileffmpeg/mobileffmpeg.h>
  3. Write code and run.
    Is there any other config that you feel I should do? Maybe build the entire ffmpeg again or using it straight from pods will be fine?

@tanersener
Copy link
Owner

Well, the next step is to check Build Settings in Xcode. Sometimes I see this error when some linking flags are not compatible with framework options. But it would prevent you from running/testing. You can run and test, so this is not the case.

There are a few other options to try:

  • There are universal fat binaries released but not published. Using them is an option
  • Adding MinimumOSVersion in Info.plist and publishing new version is another option. I'm releasing v2.1 right now, I can add this option and push the version to cocoapods

@ghost
Copy link
Author

ghost commented Sep 5, 2018

Yes, I think we can try those things.
One question here, where are these fat binaries available so I can get my hands on them?
Also, will try to use v2.1 once you publish it, and then see how things work out.

@tanersener
Copy link
Owner

They are not very easy to use, this why I don't publish them. Also, they are not available online, I need to upload them somewhere. Is there a specific package (min, full, full-gpl) you need? I can upload it on my Dropbox.

By the way, you have MinimumOSVersion = 8.0 setting in you application, am I right?

@ghost
Copy link
Author

ghost commented Sep 5, 2018

Yes, I also want to avoid using them, a lot of configs involved there.

I am using MinimumOSVersion = 10.0.

@tanersener
Copy link
Owner

Hmm, some stackoverflow posts recommend using the same MinimumOSVersion on both application and frameworks. So setting MinimumOSVersion = 10.0 might be a solution. You can test it if you want.

Below is the link for full-gpl-v2.1 universal binaries. You can test them too.
https://www.dropbox.com/sh/5ypukqxoxd5wv2i/AABv-YajCrm7N-FBr3rjNjnva?dl=0

@ghost
Copy link
Author

ghost commented Sep 5, 2018

Thank you so much. I will give them a go and let you know.
Also any particular recommendation on how to use these fat binaries?

@tanersener
Copy link
Owner

Sorry, I forgot to mention, v2.1 IOS API is completely new. You may receive too many compile errors. I'm working on documentation but https://github.com/tanersener/mobile-ffmpeg/tree/dev-v2.x includes a basic example about the new API.

Fat binaries are generally added to project by drag & drop to xcode. Then you need to update #include statements and application should work.

@ghost
Copy link
Author

ghost commented Sep 5, 2018

Got it. I will try these things out and let you know my results. Cheers!!!

@ghost
Copy link
Author

ghost commented Sep 5, 2018

I cannot find the pod by using

pod 'mobile-ffmpeg-full', '~> 2.1'
in my pod file.

@ghost
Copy link
Author

ghost commented Sep 5, 2018

After applying a MinimumOSVersion of 10.0 to both the app and the frameworks I am getting the errors -

ERROR ITMS-90208: "Invalid Bundle. The bundle Application.app/Frameworks/libavcodec.framework does not support the minimum OS Version specified in the Info.plist."
An unknown error occurred.

Any ideas about this?

@tanersener
Copy link
Owner

v2.1 of mobile-ffmpeg-full is not published to cocoapods yet, it takes time to build each package and publish. Can you try with mobile-ffmpeg-min.

@ghost
Copy link
Author

ghost commented Sep 5, 2018

Okay, I will try with that.

@ghost
Copy link
Author

ghost commented Sep 5, 2018

I tried min version, but I think the MinimumOSVersion is not there in it yet, is it?

@tanersener
Copy link
Owner

Actually it was added, and I can see it inside Info.plist from Cocoapods. Do you still get the same error?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>CFBundleDevelopmentRegion</key>
        <string>en</string>
        <key>CFBundleExecutable</key>
        <string>libavfilter</string>
        <key>CFBundleIdentifier</key>
        <string>com.arthenica.mobileffmpeg.FFmpeglibavfilter</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>
        <string>libavfilter</string>
        <key>CFBundlePackageType</key>
        <string>FMWK</string>
        <key>CFBundleShortVersionString</key>
        <string>7.16.100</string>
        <key>CFBundleVersion</key>
        <string>7.16.100</string>
        <key>MinimumOSVersion</key>
        <string>8.0</string>
        <key>NSPrincipalClass</key>
        <string></string>
</dict>
</plist>

@tanersener
Copy link
Owner

All v2.1 versions are published in cocoapods.

@ghost
Copy link
Author

ghost commented Sep 6, 2018

I tried out the v2.1 full and now I can see the minimum OS version there in the plist but I am still getting the error -

ERROR ITMS-90208: "Invalid Bundle. The bundle Application.app/Frameworks/libavcodec.framework does not support the minimum OS Version specified in the Info.plist."
An unknown error occurred.

@tanersener
Copy link
Owner

Sorry mate, I'm out of solutions. Any chance of asking this issue to Apple support?

@tanersener tanersener self-assigned this Sep 6, 2018
@ghost
Copy link
Author

ghost commented Sep 6, 2018

No worries buddy. Thank you for doing so much. I'll see what can be done, will update once I have something good.

@tanersener
Copy link
Owner

Just created a wiki page about Using IOS Universal Binaries. You might want to give it a try if you are still having problems with frameworks.

@tanersener
Copy link
Owner

Earlier IOS versions of the library had errors about bitcode, but it was fixed in v2.1.

@ghost
Copy link
Author

ghost commented Sep 10, 2018

I am still working on why this error

ERROR ITMS-90208: "Invalid Bundle. The bundle Application.app/Frameworks/libavcodec.framework does not support the minimum OS Version specified in the Info.plist."
An unknown error occurred.

is still persisting. I'll update here once I know the root cause.

@tanersener
Copy link
Owner

I'll update here once I know the root cause.

Ok mate, please let me know if you need anything

@Mcgode
Copy link

Mcgode commented Dec 12, 2018

Issue was solved by using the 3.1 distributed frameworks for me

@tanersener
Copy link
Owner

Issue was solved by using the 3.1 distributed frameworks for me

@Mcgode Do I understand correctly? Your application was getting Invalid Bundle Error with v3.0 frameworks, with v3.1 frameworks Invalid Bundle Error errors are gone, right?

@Mcgode
Copy link

Mcgode commented Dec 12, 2018

@tanersener Yup exactly, but only for the framework version, I still get issue #45 with the shared library

@tanersener
Copy link
Owner

@tanersener Yup exactly, but only for the framework version, I still get issue #45 with the shared library

@Mcgode Great, by the way how do you install frameworks, using Cocoapods or manually?

I made some custom builds for #45 but they didn't work as far as I remember. Did you try applying them or would you like to try them If you have time?

@Mcgode
Copy link

Mcgode commented Dec 12, 2018

@tanersener I installed those manually, from your releases (the mobile-ffmpeg-video version), here on Github

@tanersener
Copy link
Owner

@Mcgode Thank you very much, your comments helped a lot.

@Mcgode
Copy link

Mcgode commented Dec 13, 2018

Okay... So... For some reason, one of the build scripts for my app unlinked the whole library when archiving the entire app :/
After having fixed that issue, it turns out I still run into the issue of this topic. Sorry for giving you a fake hope :/

@codaman
Copy link

codaman commented Dec 13, 2018

Is there a solution about Invalid Bundle "does not support the minimum OS Version specified in the Info.plist"

I added MinimumOSVersion as 10.0 also my deployment target is 10.0

@codaman
Copy link

codaman commented Dec 13, 2018

I tried 2.1 3.0 and 3.1 framework but no fixes :(

@tanersener
Copy link
Owner

After having fixed that issue, it turns out I still run into the issue of this topic. Sorry for giving you a fake hope :/

No problem, it will be fixed sooner or later.

Is there a solution about Invalid Bundle "does not support the minimum OS Version specified in the Info.plist"

Can you try Universal Binaries?

@codaman
Copy link

codaman commented Dec 13, 2018

OMG I passed invalid binary. I just added frameworks manually and minimum iOS version is 11.0. I didn't try 10.0 with manually. Yes i tried with Universal Binaries. Also thank you Taner with this amazing project. It saved my life :)

Ellerine sağlık hocam :)

@tanersener
Copy link
Owner

OMG I passed invalid binary. I just added frameworks manually and minimum iOS version is 11.0. I didn't try 10.0 with manually. Yes i tried with Universal Binaries. Also thank you Taner with this amazing project. It saved my life :)

Ellerine sağlık hocam :)

Thanks, my friend. But I didn't fully understand how the problem was solved. You used frameworks and you have minimum iOS version 11.0 in your Info.plist file, right?

@codaman
Copy link

codaman commented Dec 14, 2018

I tried minimumosversion as 10 and 11. I didnt try below ios version may be it works. I just added frameworks manually

@tanersener
Copy link
Owner

@codaman great, thanks 👍

@codaman
Copy link

codaman commented Dec 16, 2018

@tanersener i didn't successed. 2 days ago. Time is late. I ran wrong project. I didn't add universal library as embedded. Yes it successfully uploaded store but i tested wrong project. Issue continue. I tried universal library also. But not yet succeeded. Has anybody find out the solution

@codaman
Copy link

codaman commented Dec 16, 2018

I am trying to add universal library But I got an interesting error.

dyld: Library not loaded: /Users/taner/Projects/mobile-ffmpeg/prebuilt/ios-aarch64-apple-darwin/ffmpeg/lib/libavfilter.7.dylib
Referenced from: /var/containers/Bundle/Application/81FB16BE-A478-4295-A273-0CC0B0EAD7F9/xxx.app/xxx
Reason: image not found

@tanersener
Copy link
Owner

@codaman Did you follow all steps defined in Using IOS Universal Binaries guide? Most of the time your error is received when step #8 is not applied. Can you check that?

@codaman
Copy link

codaman commented Dec 16, 2018

@tanersener thank you I passed this problem. Now I am trying upload to the store

@codaman
Copy link

codaman commented Dec 16, 2018

"Invalid Segment Alignment. The app binary at 'xxx.app/Frameworks/libmobileffmpeg.dylib' does not have proper segment alignment. I am searching the solution

@tanersener
Copy link
Owner

@codaman There is an issue about that: #45. Can you try using binaries posted in that page?

tanersener added a commit that referenced this issue Dec 17, 2018
@tanersener tanersener added bug Something isn't working and removed needs-analysis labels Dec 17, 2018
@tanersener
Copy link
Owner

This issue will be fixed in the next maintenance release. You can apply the following patch for the released versions.

Please note that this issue occurs only on frameworks (installed manually or via Cocoapods). Other errors reported in this thread are different issues. If you need support about them please submit a new issue.

  1. Go to Build Phases section under Xcode and add a new Run Script Phase as the last phase of your build.

  2. Use the following code block as the source of your new run phase.

echo "Applying patch for https://github.com/tanersener/mobile-ffmpeg/issues/18"
cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"

INFO_PLIST_FILES=$(find . -name Info.plist | grep 'libswresample\|libavfilter\|libavformat\|libavutil\|libswscale\|libavdevice\|libavcodec\|mobileffmpeg')

for INFO_PLIST in ${INFO_PLIST_FILES};
do
        existing_key_line_number=$(sed -n '/MinimumOS/=' ${INFO_PLIST})
        if [[ -z ${existing_key_line_number} ]]; then
            sed -i .tmp "s/<\/dict/    <key>MinimumOSVersion<\/key>\\
    <string>9.3<\/string>\\
<\/dict/g" ${INFO_PLIST}
            rm -f "${INFO_PLIST}.tmp"
            echo "Patch added MinimumOSVersion key & value at ${INFO_PLIST}"
        else
            sed -i .tmp "$((existing_key_line_number+1))s/.*/        <string>9.3<\/string>/" ${INFO_PLIST}
            rm -f "${INFO_PLIST}.tmp"
            echo "Patch replaced MinimumOSVersion value at ${INFO_PLIST}"
        fi
done

The final view of the Build Phases tab should be similar to the following screenshot.

last-phase

@tanersener
Copy link
Owner

This issue is fixed in the latest v4.2 release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

7 participants