Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pod Problem with build ios #30

Open
a0fzide opened this issue Mar 11, 2020 · 7 comments
Open

Pod Problem with build ios #30

a0fzide opened this issue Mar 11, 2020 · 7 comments
Assignees
Labels
no response The person who raised the issue has not responded in a while question Further information is requested by the issue / pr raiser

Comments

@a0fzide
Copy link

a0fzide commented Mar 11, 2020

First build with error :
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.2.99. (in target 'GTMSessionFetcher' from project 'Pods')

I put this code in podfile

post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end

after that I build again.

This error apprears after build ios

Build/Products/Debug-iphonesimulator/GoogleMobileVision/GoogleMVTextDetectorResources.bundle" not found. Run 'pod install' to update the copy resources script.

@ChrisTomAlx
Copy link
Collaborator

Hey @a0fzide

You need to follow these steps as mentioned in Readme after adding the plugin and before doing a build :-

For iOS please also follow the steps below.

  • Once the iOS platform is added in command line, change directory to where podfile is found. Example location :- (myapp/platforms/ios).
  • Make sure you have cocoapods installed then in command line do pod update.
  • Now open myapp.xcworkspace which is usually found in the same directory as the podfile, then build and run.

    Note :- if you use myapp.xcodeproj to build and run, it will not work and it will show a linker error.

    Note :- if you manually create the podfile, please refer to issue #2

Cheers,
Chris
Neutrinos

@ChrisTomAlx ChrisTomAlx self-assigned this Mar 11, 2020
@ChrisTomAlx ChrisTomAlx added the question Further information is requested by the issue / pr raiser label Mar 11, 2020
@ChrisTomAlx ChrisTomAlx added the no response The person who raised the issue has not responded in a while label May 24, 2020
@Catscratch
Copy link

I wanna re-open this issue.

I have the same problem. The solution above works once. But how may I continuously develop on iOS using this plugin? I need cordova build to work for testing and production environment. Also things like live reload seem not to work as long as the usual XCode command line build is not working.

Can you fix the command line build?

@ChrisTomAlx
Copy link
Collaborator

You can use build flags to build via cli after the pod install step. Refer to the cordova official website to learn about build flags.

Here is an example build cli command with build flags :-

cordova build ios --device --codeSignIdentity="iPhone Developer" --developmentTeam="<yourTeamId>" --buildFlag="-allowProvisioningUpdates" --buildFlag="-UseModernBuildSystem=0"

You might have to change some things based on your setup.

Cheers,
Chris
Neutrinos

@Catscratch
Copy link

Problem is that the build is still not working. I get either the "GoogleMVTextDetectorResources.bundle not found" error or when I run pod install/update manually I get the "'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0" error.

So my question is how may we achieve a working build without errors?

@ChrisTomAlx
Copy link
Collaborator

So I think the min IPHONEOS_DEPLOYMENT_TARGET should be raised for the project or lowered for the pods, but I am not entirely sure how.

You can try editing the podfile to lower the deployment target in platforms/ios and see if that helps.

Cheers,
Chris
Neutrinos

@ChrisTomAlx ChrisTomAlx reopened this Jan 18, 2021
@Catscratch
Copy link

Ok. I played around a bit but have no real progress here.

I found out that the version mismatch for IOS comes from the Google implementation because it's simply too old. But it's only a warning. So it doesn't block the build.

But the build still fails because it can't find the bundle. The file is available in the platform/ios/build/emulator directory but the build itself fails because xcode is searching the file in kind of a temporary build directory from which the build will run. So it seems like whatever is triggering the build doesn't copy over the .bundle file. So it's missing in the actual build and therefore the build is failing.

And it doesn't matter if you run "pod install" and/or "pod update".

So it seems like there is something wrong with the build process of cordova itself. I'm not sure who's responsible for this file preparation.

But considering all these problems I would say the plugin (or any plugin based on cacoapods?) is not compatible to iOS.

Is there anyone out there with a working iOS build solution for current iOS, xcode and MacOS version?

@ChrisTomAlx
Copy link
Collaborator

ChrisTomAlx commented Jan 19, 2021

Could you try the following

  • cordova platform rm ios
  • cordova platform add [email protected] - where x.x.x is the cordova-ios version you are using
  • cd platform/ios
  • pod install
  • cd ..
  • cd ..
  • cordova build ios - let it build and fail its okay
  • cd platform/ios
  • Open the yourapp.xcworkspace file, which will open with xcode
  • Then build and run using a device rather than a simulator

Cheers,
Chris
Neutrinos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no response The person who raised the issue has not responded in a while question Further information is requested by the issue / pr raiser
Projects
None yet
Development

No branches or pull requests

3 participants